/* --- Premium CSS Variables --- */
:root {
  --primary-color: #00ffa3;
  --primary-dark: #00cc82;
  --primary-glow: rgba(0, 255, 163, 0.4);

  --bg-base: #050505;
  --bg-surface: rgba(10, 10, 12, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.02);
  --bg-glass-hover: rgba(255, 255, 255, 0.05);

  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  --border-primary: rgba(0, 255, 163, 0.3);

  --text-main: #f8f9fa;
  --text-muted: #a1a1aa;

  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;

  --border-radius-xl: 32px;
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;

  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--primary-glow);

  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Light Mode Variables --- */
[data-theme="light"] {
  --bg-base: #fafafa;
  --bg-surface: rgba(255, 255, 255, 0.8);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --bg-glass-hover: rgba(0, 0, 0, 0.05);

  --border-glass: rgba(0, 0, 0, 0.1);
  --border-glass-hover: rgba(0, 0, 0, 0.15);
  --border-primary: rgba(0, 204, 130, 0.4);

  --text-main: #18181b;
  --text-muted: #3f3f46;

  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --primary-color: #00cc82;
  --primary-glow: rgba(0, 204, 130, 0.2);
}

/* --- Global Resets & Body --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-muted);
  background-color: var(--bg-base);
  overflow-x: hidden;
  position: relative;
}

/* --- Ambient Globs --- */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.6;
  pointer-events: none;
  animation: floatGlow 20s infinite alternate var(--ease-smooth);
}

.bg-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(0, 255, 163, 0.15) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  top: -200px;
  left: -200px;
}

.bg-orb-2 {
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(0, 204, 130, 0.1) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  bottom: -300px;
  right: -200px;
  animation-delay: -5s;
}

[data-theme="light"] .ambient-glow {
  opacity: 0.4;
}

@keyframes floatGlow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(50px, 100px) scale(1.1);
  }
}

/* --- Scroll Progress Bar --- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-color);
  transform-origin: 0%;
  z-index: 2000;
}

/* --- Cinema Grain Overlay --- */
.cinema-grain {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    animation: grainAnimation 8s steps(10) infinite;
}

[data-theme="light"] .cinema-grain {
    opacity: 0.02;
}

@keyframes grainAnimation {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

/* --- Container & Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

section {
  padding: 120px 0;
  position: relative;
  z-index: 1;
}

section.bg-light {
  background-color: transparent; /* Relying on body base and ambient light now */
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 5rem;
  font-weight: 800;
  margin-bottom: 24px;
}
h2 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}
h3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 16px;
}
h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-bottom: 24px;
  font-size: 1.125rem;
}

.lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.8;
}

/* --- Utility Classes --- */
.text-center {
  text-align: center;
}
.text-primary {
  color: var(--primary-color);
}
.section-header {
  max-width: 700px;
  margin: 0 auto 80px auto;
  text-align: center;
}
.section-header p {
  font-size: 1.25rem;
  margin: 0 auto;
}

/* --- Buttons --- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  border-radius: var(--border-radius-xl);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s var(--ease-smooth), background-color 0.4s;
  overflow: hidden;
  z-index: 1;
  transform-style: preserve-3d;
}

/* Magnetic text wrapper inside button */
.btn-text {
    position: relative;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}

.btn-primary {
  background: var(--primary-color);
  color: #000; /* High contrast */
  border: none;
  box-shadow: 0 0 20px rgba(0, 255, 163, 0.4);
}

.btn-primary:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-smooth);
  z-index: -1;
}

.btn-primary:hover {
  box-shadow: 0 10px 30px rgba(0, 255, 163, 0.6);
}

.btn-primary:hover:before {
  transform: translateX(100%);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
}

.btn-lg {
  padding: 18px 44px;
  font-size: 1.15rem;
}

/* --- Button Ripple Effect --- */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%) scale(0);
  animation: rippleExpand 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleExpand {
  to {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}

/* --- Header & Navigation --- */
.main-header {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-xl);
  padding: 16px 32px;
  z-index: 1000;
  box-shadow: var(--shadow-glass);
  transition: all 0.4s var(--ease-smooth);
}

.main-header.scrolled {
  top: 12px;
  width: 95%;
  background: rgba(10, 10, 12, 0.8);
}

[data-theme="light"] .main-header.scrolled {
  background: rgba(255, 255, 255, 0.8);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo span {
  color: var(--primary-color);
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav ul li a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s var(--ease-smooth);
}

.main-nav ul li a:hover {
  color: var(--text-main);
}

/* Header CTA Button adjustments */
.main-nav ul li a.btn {
  padding: 10px 24px;
  font-size: 0.9rem;
  border-radius: var(--border-radius-lg);
}

/* --- Header Actions (theme toggle + hamburger) --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Nav Toggle (Hamburger) --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-sm);
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
}

.nav-toggle:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s var(--ease-smooth);
  transform-origin: center;
}

/* Hamburger → X animation */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Theme Toggle Button --- */
.theme-toggle {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.3s var(--ease-bounce);
}

.theme-toggle:hover {
  background: var(--bg-glass-hover);
  transform: scale(1.1) rotate(15deg);
  border-color: var(--border-glass-hover);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
  font-size: 1.1rem;
}
[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
html:not([data-theme="dark"]) .theme-toggle .icon-moon {
  display: block;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 120px;
    padding-bottom: 40px;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.hero-3d-wrapper {
    flex: 1;
    height: 500px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px; /* Enable 3D space */
}

/* --- Custom 3D Interactive Orb --- */
.hero-orb {
    position: relative;
    width: 350px;
    height: 350px;
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.1, 0.5, 0.3, 1);
    animation: floatOrb 8s ease-in-out infinite;
}

.orb-core {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 140px; height: 140px;
    background: radial-gradient(circle, #fff 0%, var(--primary-color) 40%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 60px var(--primary-color), inset 0 0 30px #fff;
    filter: blur(2px);
    z-index: 10;
}

.orb-ring {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 163, 0.3);
    box-shadow: inset 0 0 20px rgba(0, 255, 163, 0.1), 0 0 20px rgba(0, 255, 163, 0.1);
    transform-style: preserve-3d;
}

.ring-1 { animation: rotateRing 15s linear infinite; }
.ring-2 { animation: rotateRing 20s linear infinite reverse; border-color: rgba(255,255,255,0.2); width: 90%; height: 90%; top: 5%; left: 5%; }
.ring-3 { animation: rotateRing 25s linear infinite; border-style: dashed; width: 110%; height: 110%; top: -5%; left: -5%; opacity: 0.5; }

@keyframes floatOrb {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes rotateRing {
    0% { transform: rotateX(60deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(60deg) rotateY(360deg) rotateZ(360deg); }
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
  background: linear-gradient(
    135deg,
    var(--text-main) 0%,
    rgba(255, 255, 255, 0.4) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 32px;
}

[data-theme="light"] .hero h1 {
  background: linear-gradient(135deg, var(--text-main) 0%, #555 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero #typed-text {
  background: linear-gradient(90deg, var(--primary-color), #00A3FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .typed-wrapper {
  display: block;
  min-height: 2.4em; /* Increased to account for two lines naturally */
}

.hero p.lead {
    margin: 0 0 48px 0;
    font-size: 1.35rem;
}

/* --- Tech Proficiency --- */
.tech-proficiency-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 24px;
}

.tech-proficiency .logos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.tech-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 10px 24px;
  border-radius: var(--border-radius-lg);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s var(--ease-smooth);
}

.tech-item:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 255, 163, 0.1);
}

/* --- Services (Glass Cards) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

.service-card {
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 48px;
  transition: all 0.4s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glass-hover);
  box-shadow:
    var(--shadow-glass),
    0 20px 40px rgba(0, 0, 0, 0.4);
}

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

.service-card h3 {
  margin-top: 24px;
  margin-bottom: 16px;
}

.service-card p {
  font-size: 1.05rem;
  margin: 0;
}

.service-icon {
  width: 56px;
  height: 56px;
  color: var(--primary-color);
  background: rgba(0, 255, 163, 0.1);
  padding: 12px;
  border-radius: var(--border-radius-md);
  margin-bottom: 24px;
}

/* --- Portfolio --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

.portfolio-card {
  display: block;
  text-decoration: none;
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all 0.4s var(--ease-smooth);
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glass-hover);
  box-shadow:
    var(--shadow-glass),
    0 20px 40px rgba(0, 0, 0, 0.4);
}

.portfolio-card-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-glass);
  transition: transform 0.6s var(--ease-smooth);
}

.portfolio-card:hover .portfolio-card-image {
  transform: scale(1.05);
}

.portfolio-card-content {
  padding: 32px;
}

.portfolio-card-content h4 {
  margin-bottom: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.portfolio-card-content h4::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M4.25 5.5a.75.75 0 00-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 00.75-.75v-4a.75.75 0 011.5 0v4A2.25 2.25 0 0112.75 17h-8.5A2.25 2.25 0 012 14.75v-8.5A2.25 2.25 0 014.25 4h5a.75.75 0 010 1.5h-5zm7.25-.75a.75.75 0 01.75-.75h3.5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0V6.31l-5.47 5.47a.75.75 0 01-1.06-1.06l5.47-5.47H12.25a.75.75 0 01-.75-.75z' clip-rule='evenodd'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M4.25 5.5a.75.75 0 00-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 00.75-.75v-4a.75.75 0 011.5 0v4A2.25 2.25 0 0112.75 17h-8.5A2.25 2.25 0 012 14.75v-8.5A2.25 2.25 0 014.25 4h5a.75.75 0 010 1.5h-5zm7.25-.75a.75.75 0 01.75-.75h3.5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0V6.31l-5.47 5.47a.75.75 0 01-1.06-1.06l5.47-5.47H12.25a.75.75 0 01-.75-.75z' clip-rule='evenodd'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-card-content h4::after {
  opacity: 0.8;
}

.portfolio-card-content p {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

/* --- About Section --- */
.about-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

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

.about-text ul {
  list-style: none;
  margin-top: 32px;
}

.about-text li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: var(--text-main);
}

.about-text li::before {
  content: "\2713";
  color: var(--primary-color);
  font-weight: 800;
  margin-right: 16px;
  margin-top: 2px;
}

.about-image-wrapper {
  position: relative;
}

.about-image-wrapper::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
  z-index: -1;
  border-radius: 50%;
  opacity: 0.5;
}

.about-image {
  width: 100%;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-glass);
  border: 1px solid var(--border-glass);
}

/* --- Contact Form --- */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.form-group {
  margin-bottom: 24px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 18px 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1.05rem;
  transition: all 0.3s var(--ease-smooth);
  backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  background: var(--bg-glass-hover);
  border-color: var(--border-primary);
  box-shadow: 0 0 0 4px rgba(0, 255, 163, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 160px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* --- Form Validation Hints --- */
.validation-hint {
  display: none;
  color: #ff3366;
  font-size: 0.85rem;
  margin-top: 8px;
}

.form-group input:not(:placeholder-shown):invalid ~ .validation-hint {
  display: block;
}

/* Honeypot field (hidden from real users) */
.form-honey {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* --- Footer --- */
.main-footer {
  padding: 48px 0;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
}

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

.main-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: 24px;
}

.social-links a {
  color: var(--text-muted);
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.social-links a:hover {
  color: var(--text-main);
  transform: translateY(-3px);
}

.social-links svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* --- Toast --- */
.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 16px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  padding: 16px 24px;
  border-radius: var(--border-radius-md);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-glass);
  transform: translateX(120%);
  transition: transform 0.5s var(--ease-bounce);
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  border-left: 4px solid var(--primary-color);
}
.toast-error {
  border-left: 4px solid #ff3366;
}

.toast-icon {
  font-size: 1.25rem;
  font-weight: bold;
}
.toast-success .toast-icon {
  color: var(--primary-color);
}
.toast-error .toast-icon {
  color: #ff3366;
}

/* Skip Link / Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--primary-color);
  color: #000;
  padding: 12px 24px;
  z-index: 9999;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 20px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 {
    font-size: 4rem;
  }
  h2 {
    font-size: 3rem;
  }
  .hero {
    padding-top: 100px;
  }
  .hero .container {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-3d-wrapper {
    height: 350px;
  }
  .hero-orb {
    width: 280px;
    height: 280px;
  }
  .about-section .container,
  .contact-container {
    grid-template-columns: 1fr;
  }
  .about-text {
    order: 2;
  }
  .about-image-wrapper {
    order: 1;
    margin: 0 auto;
    max-width: 80%;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 3rem;
  }
  h2 {
    font-size: 2.5rem;
  }
  .main-header {
    width: 100%;
    top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }
  .main-header.scrolled {
    width: 100%;
    top: 0;
  }
  .main-header .container {
    flex-wrap: wrap;
    padding: 12px 0;
  }
  .nav-toggle {
    display: flex;
  }
  .main-nav {
    display: none;
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
    margin-top: 16px;
  }
  .main-nav.open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .main-nav ul li a {
    display: block;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    transition: background 0.2s ease;
  }
  .main-nav ul li a:hover {
    background: var(--bg-glass-hover);
  }
  .main-nav ul li a.btn {
    text-align: center;
    margin-top: 8px;
  }
  section {
    padding: 80px 0;
  }
  .hero {
    min-height: 80vh;
  }
  .hero .container {
    text-align: center;
  }
  .hero .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-3d-wrapper {
    display: none;
  }
  .hero .typed-wrapper { min-height: 2.4em; } /* Prevents jumpiness when words wrap */
  .toast-container {
    bottom: 20px;
    right: 20px;
    left: 20px;
  }
  .toast {
    width: 100%;
    max-width: 100%;
  }
  .main-footer .container {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
  .btn {
    padding: 14px 28px;
    width: 100%;
  }
  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}
