/* Infera Software - Dark Mode Website */

:root {
  --electric-blue: #007AFF;
  --blue-glow: rgba(0, 122, 255, 0.4);
  --bg-dark: #0a0e17;
  --bg-card: #121826;
  --bg-card-hover: #1a2332;
  --text-primary: #ffffff;
  --text-secondary: #a0a8c0;
  --text-muted: #6b7394;
  --border-subtle: #1f2937;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px var(--blue-glow);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 50%, rgba(0, 122, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 122, 255, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: block;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.8;
}

.logo:focus {
  outline: 2px solid var(--electric-blue);
  outline-offset: 4px;
  border-radius: 4px;
}

nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  font-size: 15px;
}

nav a:hover {
  color: var(--text-primary);
}

nav a:focus {
  outline: 2px solid var(--electric-blue);
  outline-offset: 4px;
  border-radius: 4px;
}

.btn-contact {
  background: var(--electric-blue);
  color: var(--text-primary) !important;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-contact:hover {
  background: #0066dd;
  box-shadow: var(--shadow-glow);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 101;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(0, 122, 255, 0.1);
}

.mobile-menu-toggle:focus {
  outline: 2px solid var(--electric-blue);
  outline-offset: 2px;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Content */
main {
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero {
  padding: 100px 0 120px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.btn:focus {
  outline: 2px solid var(--electric-blue);
  outline-offset: 4px;
}

.btn-primary {
  background: var(--electric-blue);
  color: var(--text-primary);
}

.btn-primary:hover {
  background: #0066dd;
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  background: #0055cc;
}

.btn-secondary {
  background: transparent;
  color: var(--electric-blue);
  border: 2px solid var(--electric-blue);
}

.btn-secondary:hover {
  background: rgba(0, 122, 255, 0.1);
  border-color: var(--electric-blue);
}

.btn-secondary:active {
  background: rgba(0, 122, 255, 0.2);
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

/* Neural Graphic - SVG Based */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.neural-graphic {
  width: 350px;
  height: 350px;
  opacity: 0.7;
}

/* SVG Nodes */
.neural-graphic .node {
  fill: rgba(0, 122, 255, 0.02);
  stroke: var(--electric-blue);
  stroke-width: 3;
  filter: drop-shadow(0 0 6px var(--blue-glow))
          drop-shadow(0 0 12px var(--blue-glow))
          drop-shadow(0 0 20px rgba(0, 122, 255, 0.4));
}

.neural-graphic .node:nth-child(9) {
  animation: pulse 3.2s ease-in-out infinite 0.3s;
}
.neural-graphic .node:nth-child(10) {
  animation: pulse 2.8s ease-in-out infinite 1.1s;
}
.neural-graphic .node:nth-child(11) {
  animation: pulse 3.5s ease-in-out infinite 1.8s;
}
.neural-graphic .node:nth-child(12) {
  animation: pulse 2.9s ease-in-out infinite 2.3s;
}
.neural-graphic .node:nth-child(13) {
  animation: pulse 3.3s ease-in-out infinite 0.7s;
}

/* SVG Connections */
.neural-graphic .connection {
  stroke: url(#lineGradient);
  stroke-width: 3;
  stroke-linecap: round;
  fill: none;
  filter: url(#glow);
  opacity: 0;
}

.neural-graphic .connection-dim {
  stroke: url(#lineGradientDim);
  stroke-width: 2.5;
}

/* Random animation durations and delays for each connection */
.neural-graphic .connection:nth-child(1) {
  animation: flow 8.2s ease-in-out infinite;
  animation-delay: 0s;
}
.neural-graphic .connection:nth-child(2) {
  animation: flow 9.7s ease-in-out infinite;
  animation-delay: 0.2s;
}
.neural-graphic .connection:nth-child(3) {
  animation: flow 7.5s ease-in-out infinite;
  animation-delay: 0.5s;
}
.neural-graphic .connection:nth-child(4) {
  animation: flow 10.3s ease-in-out infinite;
  animation-delay: 0.8s;
}
.neural-graphic .connection:nth-child(5) {
  animation: flow 8.9s ease-in-out infinite;
  animation-delay: 1.2s;
}
.neural-graphic .connection:nth-child(6) {
  animation: flow 9.1s ease-in-out infinite;
  animation-delay: 1.6s;
}
.neural-graphic .connection:nth-child(7) {
  animation: flow 11.2s ease-in-out infinite;
  animation-delay: 2.1s;
}
.neural-graphic .connection:nth-child(8) {
  animation: flow 7.8s ease-in-out infinite;
  animation-delay: 2.7s;
}
.neural-graphic .connection:nth-child(9) {
  animation: flow 10.6s ease-in-out infinite;
  animation-delay: 3.2s;
}
.neural-graphic .connection:nth-child(10) {
  animation: flow 8.4s ease-in-out infinite;
  animation-delay: 3.8s;
}
.neural-graphic .connection:nth-child(11) {
  animation: flow 9.5s ease-in-out infinite;
  animation-delay: 4.3s;
}
.neural-graphic .connection:nth-child(12) {
  animation: flow 11.8s ease-in-out infinite;
  animation-delay: 4.9s;
}
.neural-graphic .connection:nth-child(13) {
  animation: flow 8.7s ease-in-out infinite;
  animation-delay: 5.4s;
}
.neural-graphic .connection:nth-child(14) {
  animation: flow 10.1s ease-in-out infinite;
  animation-delay: 6.1s;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--blue-glow))
            drop-shadow(0 0 16px var(--blue-glow))
            drop-shadow(0 0 28px rgba(0, 122, 255, 0.5));
  }
}

@keyframes flow {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 0;
  }
  25% {
    opacity: 0.8;
  }
  40% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* Section Styles */
section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Work Section */
.work {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 122, 255, 0.02) 50%, transparent 100%);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.project-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--electric-blue);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:focus {
  outline: 2px solid var(--electric-blue);
  outline-offset: 2px;
}

.project-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 122, 255, 0.1);
  padding: 8px;
}

.project-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.project-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.tech-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tech-tags span {
  background: rgba(0, 122, 255, 0.15);
  color: var(--electric-blue);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.service-card:hover {
  border-color: var(--electric-blue);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:focus {
  outline: 2px solid var(--electric-blue);
  outline-offset: 2px;
}

.service-icon {
  width: 56px;
  height: 56px;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* Tech Stack */
.tech-stack {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
}

.tech-stack h4 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.tech-list span {
  background: rgba(0, 122, 255, 0.15);
  color: var(--electric-blue);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

/* About Section */
.about {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 122, 255, 0.02) 100%);
}

.about-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  font-size: 38px;
  margin-bottom: 24px;
}

.about-text p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-visual img {
  max-width: 300px;
  width: 100%;
  height: auto;
  opacity: 0.8;
  filter: drop-shadow(0 0 40px var(--blue-glow));
}

/* Contact Section */
.contact {
  padding: 100px 0;
}

.contact-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 122, 255, 0.05) 100%);
  border: 1px solid var(--electric-blue);
  border-radius: 20px;
  padding: 60px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.contact-box h2 {
  font-size: 38px;
  margin-bottom: 16px;
}

.contact-box p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Footer */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Responsive Design */

/* Tablets and small laptops */
@media (max-width: 1024px) {
  .container {
    padding: 0 32px;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-content h1 {
    font-size: 44px;
  }

  .hero-visual {
    order: -1;
  }

  .neural-graphic {
    width: 300px;
    height: 300px;
    margin: 0 auto;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-visual {
    order: -1;
  }

  .about-visual img {
    max-width: 250px;
  }
}

/* Tablets portrait */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile and small tablets */
@media (max-width: 768px) {
  /* Mobile Navigation */
  .mobile-menu-toggle {
    display: flex;
  }

  header .container {
    position: relative;
  }

  nav {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-subtle);
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  nav.active {
    max-height: 400px;
    opacity: 1;
    padding: 16px 0;
  }

  nav a {
    padding: 16px 32px;
    font-size: 16px;
    width: 100%;
    min-height: 48px;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
  }

  nav a:hover,
  nav a:active {
    background: rgba(0, 122, 255, 0.1);
  }

  .btn-contact {
    margin: 16px 32px 8px;
    width: calc(100% - 64px);
    text-align: center;
    display: block;
  }

  /* Logo */
  .logo img {
    height: 40px;
  }

  /* Hero Section */
  .hero {
    padding: 60px 0 80px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .hero-actions {
    gap: 12px;
  }

  .neural-graphic {
    width: 250px;
    height: 250px;
  }

  .neural-graphic .node {
    stroke-width: 2;
  }

  .neural-graphic .connection {
    stroke-width: 2.5;
  }

  .neural-graphic .connection-dim {
    stroke-width: 2;
  }

  /* Sections */
  section {
    padding: 60px 0;
  }

  .section-header h2 {
    font-size: 32px;
  }

  .section-header p {
    font-size: 16px;
  }

  /* Projects and Services */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* About */
  .about-text h2 {
    font-size: 32px;
  }

  .about-text p {
    font-size: 16px;
  }

  /* Contact */
  .contact {
    padding: 80px 0;
  }

  .contact-box {
    padding: 40px 24px;
  }

  .contact-box h2 {
    font-size: 28px;
  }

  .contact-box p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  /* Hero Section */
  .hero {
    padding: 40px 0 60px;
  }

  .hero-content h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 16px;
    margin-bottom: 24px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
    padding: 16px 24px;
    font-size: 15px;
  }

  .neural-graphic {
    width: 220px;
    height: 220px;
  }

  .neural-graphic .node {
    stroke-width: 2;
  }

  .neural-graphic .connection {
    stroke-width: 2;
  }

  .neural-graphic .connection-dim {
    stroke-width: 1.5;
  }

  /* Sections */
  section {
    padding: 50px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h2 {
    font-size: 26px;
  }

  .section-header p {
    font-size: 15px;
  }

  /* Cards */
  .project-card,
  .service-card {
    padding: 24px;
  }

  .project-card h3,
  .service-card h3 {
    font-size: 20px;
  }

  .project-card p,
  .service-card p {
    font-size: 14px;
  }

  /* Tech Stack */
  .tech-stack {
    padding: 24px;
  }

  .tech-list span {
    font-size: 13px;
    padding: 6px 12px;
  }

  /* About */
  .about-text h2 {
    font-size: 26px;
  }

  .about-text p {
    font-size: 15px;
  }

  .about-visual img {
    max-width: 200px;
  }

  /* Contact */
  .contact {
    padding: 60px 0;
  }

  .contact-box {
    padding: 32px 20px;
    border-radius: 16px;
  }

  .contact-box h2 {
    font-size: 24px;
  }

  .contact-box p {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .btn-large {
    padding: 14px 24px;
    font-size: 15px;
    word-break: break-all;
  }

  /* Footer */
  footer {
    padding: 24px 0;
  }

  footer p {
    font-size: 13px;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .container {
    padding: 0 16px;
  }

  .hero-content h1 {
    font-size: 24px;
  }

  .neural-graphic {
    width: 180px;
    height: 180px;
  }

  .neural-graphic .node {
    stroke-width: 1.5;
  }

  .neural-graphic .connection {
    stroke-width: 1.5;
  }

  .neural-graphic .connection-dim {
    stroke-width: 1;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .btn-large {
    font-size: 14px;
    padding: 12px 20px;
  }
}

/* Large screens */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }

  .hero-content h1 {
    font-size: 64px;
  }

  .hero-subtitle {
    font-size: 22px;
  }

  .section-header h2 {
    font-size: 48px;
  }
}
