/* ============================================================
   PREMIUM ENTERPRISE AI PORTFOLIO — Design System
   Navy · Gold · Aqua · Teal · Sand
   ============================================================ */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  /* Core palette */
  --navy:        #083A4F;
  --navy-dark:   #052530;
  --navy-deeper: #031820;
  --gold:        #A58D66;
  --gold-light:  #B9A482;
  --gold-dark:   #8A7554;
  --aqua:        #C0D5D6;
  --aqua-light:  #E8F1F2;
  --aqua-muted:  #D8E8E9;
  --teal:        #407E8C;
  --teal-dark:   #356A76;
  --sand:        #E5E1DD;
  --sand-light:  #F0EEEB;
  --white:       #FFFFFF;

  /* Semantic */
  --bg-primary:    var(--sand-light);
  --bg-secondary:  var(--sand);
  --bg-card:       var(--white);
  --bg-navy:       var(--navy);
  --bg-navy-dark:  var(--navy-dark);

  --text-primary:   var(--navy);
  --text-secondary: rgba(8, 58, 79, 0.72);
  --text-muted:     rgba(8, 58, 79, 0.55);
  --text-on-dark:   var(--sand);
  --text-on-dark-muted: rgba(229, 225, 221, 0.72);

  --nav-link:        rgba(8, 58, 79, 0.82);
  --nav-link-hover:  var(--teal-dark);
  --nav-link-active: var(--navy);

  --accent:        var(--gold);
  --accent-teal:   var(--teal);
  --accent-tint:   rgba(165, 141, 102, 0.1);
  --accent-border: rgba(192, 213, 214, 0.85);
  --accent-border-hover: var(--teal);

  --border:        rgba(192, 213, 214, 0.65);
  --border-strong: rgba(64, 126, 140, 0.45);
  --shadow-xs:     0 1px 2px rgba(8, 58, 79, 0.04);
  --shadow-card:   0 4px 24px rgba(8, 58, 79, 0.06), 0 1px 3px rgba(8, 58, 79, 0.04);
  --shadow-hover:  0 12px 40px rgba(8, 58, 79, 0.1), 0 4px 12px rgba(8, 58, 79, 0.05);
  --shadow-gold:   0 8px 32px rgba(165, 141, 102, 0.22);

  /* Layout — 8px spacing system */
  --container-width: 1280px;
  --container-padding: clamp(1.5rem, 4vw, 3rem);
  --header-height:   80px;

  --space-1:  0.5rem;   /* 8px */
  --space-2:  1rem;     /* 16px */
  --space-3:  1.5rem;   /* 24px */
  --space-4:  2rem;     /* 32px */
  --space-5:  2.5rem;   /* 40px */
  --space-6:  3rem;     /* 48px */
  --space-7:  4rem;     /* 64px */
  --space-8:  5rem;     /* 80px */
  --space-xs:  var(--space-1);
  --space-sm:  var(--space-2);
  --space-md:  var(--space-3);
  --space-lg:  var(--space-4);
  --space-xl:  var(--space-6);
  --space-2xl: var(--space-8);

  /* Radii */
  --radius-sm:   8px;
  --radius-card: 16px;
  --radius-btn:  12px;
  --radius-xl:   24px;
  --radius-lg:   20px;

  /* Typography */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', 'Fira Code', monospace;

  --text-hero:       clamp(2.75rem, 5vw, 4.5rem);
  --text-h2:         clamp(2rem, 3.5vw, 2.875rem);
  --text-h3:         1.5rem;
  --text-card-title: 1.25rem;
  --text-body:       1.0625rem;
  --text-small:      0.9375rem;
  --text-prose:      68ch;
  --line-height-body: 1.75;

  /* Motion */
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-reveal: 0.65s;
  --duration-hover: 0.28s;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--line-height-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Justified prose — cleaner alignment for readable body copy */
section p:not(.hero-subtitle):not(.hero-typing):not(.section-subtitle-center):not(.about-philosophy-intro),
.hero-description,
.project-highlights li {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.section-subtitle,
.hero-description {
  max-width: var(--text-prose);
}

img    { max-width: 100%; display: block; }
a      { text-decoration: none; color: inherit; transition: var(--transition); }
ul     { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* Section backgrounds */
.section-sand  { background-color: var(--sand); }
.section-white { background-color: var(--white); }
.section-aqua  { background-color: var(--aqua-light); }

/* Icons */
.heading-icon,
.category-icon,
.info-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--teal);
}

.heading-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.category-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* ============================================================
   NAVBAR — Glass morphism
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(245, 243, 240, 0.94);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  border-bottom: 1px solid rgba(8, 58, 79, 0.1);
  z-index: 1000;
  transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}

.navbar .container {
  height: 100%;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-card);
  border-bottom-color: rgba(64, 126, 140, 0.28);
}

.nav-hidden {
  transform: translateY(-100%);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  height: 100%;
  width: 100%;
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.04em;
  line-height: 1;
  flex-shrink: 0;
  transition: color var(--duration-hover) var(--ease-out),
              transform var(--duration-hover) var(--ease-out);
}

.nav-logo:hover {
  color: var(--teal);
  transform: scale(1.03);
}

.nav-menu {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  flex-wrap: nowrap;
  margin: 0;
  padding-left: var(--space-3);
  border-left: 1px solid rgba(8, 58, 79, 0.14);
}

.nav-link {
  font-family: var(--font-mono);
  color: var(--nav-link);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color var(--duration-hover) var(--ease-out),
              transform var(--duration-hover) var(--ease-out);
  padding: var(--space-1) var(--space-2);
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: var(--space-2);
  right: var(--space-2);
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-hover) var(--ease-out);
  border-radius: 1px;
}

.nav-link:hover {
  color: var(--nav-link-hover);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--nav-link-active);
  font-weight: 700;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span {
  width: 22px;
  height: 2px;
  background-color: var(--navy);
  transition: var(--transition);
  border-radius: 2px;
  display: block;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   HERO — Navy gradient
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-height);
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--navy-deeper) 0%, var(--navy) 45%, var(--teal-dark) 100%);
  color: var(--text-on-dark);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(192, 213, 214, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(165, 141, 102, 0.08) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C0D5D6' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

#neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.05;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 213, 214, 0.15) 0%, transparent 70%);
  top: 10%;
  right: -10%;
  pointer-events: none;
  z-index: 0;
  display: block;
}

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

.hero-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(var(--space-5), 5vw, var(--space-7));
  position: relative;
  z-index: 1;
  padding: var(--space-6) 0;
  width: 100%;
}

.hero-content {
  text-align: left;
  flex: 1 1 560px;
  min-width: 0;
  max-width: 720px;
}

.hero-photo {
  position: relative;
  flex: 0 0 auto;
  width: clamp(280px, 30vw, 400px);
  line-height: 0;
}

.hero-photo-inner {
  position: relative;
  will-change: transform;
}

.hero-photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(192, 213, 214, 0.35);
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 80px rgba(192, 213, 214, 0.08);
  backdrop-filter: blur(8px);
  transition: border-color var(--duration-hover) var(--ease-out),
              box-shadow var(--duration-hover) var(--ease-out),
              transform var(--duration-hover) var(--ease-out);
}

.hero-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.55s var(--ease-out);
}

.hero-photo-enter {
  transform: translateY(24px);
}

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

.hero-photo:hover .hero-photo-frame {
  border-color: rgba(165, 141, 102, 0.45);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(165, 141, 102, 0.15) inset,
    0 0 100px rgba(165, 141, 102, 0.1);
  transform: translateY(-4px);
}

.hero-photo:hover .hero-profile-img {
  transform: scale(1.04);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(192, 213, 214, 0.25);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  animation: statusPulse 2.5s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(165, 141, 102, 0.4); }
  50%       { opacity: 0.7; box-shadow: 0 0 0 5px rgba(165, 141, 102, 0); }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: var(--space-2);
  letter-spacing: -0.03em;
  color: var(--white);
}

.hero-enter {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
  transition-delay: var(--enter-delay, 0ms);
}

.hero-loaded .hero-enter {
  opacity: 1;
  transform: translateY(0);
}

.hero-loaded .hero-photo-enter {
  transform: translateY(0);
}

.hero-loaded .hero-photo-inner {
  animation: heroPhotoFloat 6s ease-in-out infinite;
}

.highlight {
  color: var(--gold);
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  color: var(--aqua);
  margin-bottom: var(--space-2);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero-typing {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-2);
  min-height: 1.6em;
}

.typewriter-cursor {
  color: var(--gold);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-description {
  font-size: 1.1875rem;
  color: rgba(229, 225, 221, 0.85);
  line-height: var(--line-height-body);
  max-width: 48ch;
  margin: 0 0 var(--space-5);
}

.hero-buttons {
  display: flex;
  justify-content: flex-start;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Hero stats */
.hero-stats {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: clamp(0.375rem, 1vw, var(--space-2));
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(192, 213, 214, 0.15);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 0;
  min-width: 0;
}

.hero-stat-value {
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1;
}

.hero-stat-label {
  font-family: var(--font-mono);
  font-size: clamp(0.5rem, 0.72vw, 0.625rem);
  font-weight: 500;
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.hero-stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(192, 213, 214, 0.2);
  flex-shrink: 0;
  align-self: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9375rem 2rem;
  min-height: 48px;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  transition: transform var(--duration-hover) var(--ease-out),
              box-shadow var(--duration-hover) var(--ease-out),
              background var(--duration-hover) var(--ease-out),
              border-color var(--duration-hover) var(--ease-out),
              color var(--duration-hover) var(--ease-out);
  border: none;
  cursor: pointer;
  letter-spacing: 0.01em;
  overflow: hidden;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: var(--shadow-card);
}

.btn-primary.btn-pulse {
  animation: btnGlow 4s ease-in-out infinite;
}

@keyframes btnGlow {
  0%, 100% { box-shadow: var(--shadow-card); }
  50%       { box-shadow: var(--shadow-gold); }
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
  background: var(--gold-light);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(229, 225, 221, 0.45);
  color: var(--sand);
}

.btn-outline:hover {
  border-color: var(--sand);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transform: translateY(-3px);
}

.btn-ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.35) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-ripple:active::after {
  opacity: 1;
}

/* ============================================================
   SECTIONS — COMMON
   ============================================================ */
section {
  padding: var(--space-2xl) 0;
}

.section-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.section-header-center {
  text-align: center;
}

.section-header-center .section-title {
  justify-content: center;
}

.section-header-center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.section-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: var(--space-2);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: var(--text-body);
  margin-top: var(--space-2);
  max-width: min(var(--text-prose), 100%);
  line-height: var(--line-height-body);
}

.section-subtitle-center {
  margin-left: auto;
  margin-right: auto;
}

.highlight-text {
  color: var(--gold);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.section-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
}

.section-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.stagger-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item.stagger-item {
  transform: translateY(24px) translateX(var(--slide-x, 0));
}

.timeline-item.stagger-item.is-visible {
  transform: translateY(0) translateX(0);
}

.reveal.stagger-item {
  opacity: 0;
  transform: translateY(24px);
}

.reveal.stagger-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-item.animate,
.reveal.animate {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about .section-header {
  margin-bottom: var(--space-4);
}

.about-content {
  width: 100%;
  max-width: none;
}

.about-story {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.about-text {
  width: 100%;
}

.about-text p {
  color: var(--text-secondary);
  font-size: var(--text-body);
  margin-bottom: 0;
  line-height: var(--line-height-body);
}

.about-text strong {
  color: var(--navy);
  font-weight: 600;
}

.about-philosophy {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.about-philosophy-intro {
  color: var(--text-secondary);
  font-size: var(--text-body);
  margin: 0;
  line-height: var(--line-height-body);
  flex-shrink: 0;
  white-space: nowrap;
}

.about-quote {
  flex: 1;
  min-width: min(100%, 420px);
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--gold);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

.about-quote p {
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* About info cards slider */
.about-slider {
  margin-top: var(--space-4);
  margin-left: calc(-1 * var(--container-padding));
  margin-right: calc(-1 * var(--container-padding));
}

.about-slider-viewport {
  overflow: hidden;
  padding: var(--space-2) var(--container-padding) var(--space-3);
  outline: none;
  mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
}

.about-slider-viewport::-webkit-scrollbar {
  display: none;
}

.about-slider-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: var(--space-3);
  width: max-content;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .about-slider-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .about-slider-track {
    will-change: auto;
  }
}

.info-card--slide {
  flex: 0 0 clamp(240px, 28vw, 280px);
  scroll-snap-align: start;
  align-self: stretch;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-card--slide.info-card--wide {
  flex: 0 0 clamp(300px, 36vw, 360px);
}

.info-card--slide.info-card--tags {
  flex: 0 0 clamp(260px, 32vw, 300px);
}

.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-hover) var(--ease-out),
              box-shadow var(--duration-hover) var(--ease-out),
              border-color var(--duration-hover) var(--ease-out);
}

.info-card:hover {
  border-color: var(--accent-border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.info-card--featured {
  border-color: rgba(165, 141, 102, 0.35);
  border-top: 3px solid var(--gold);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(229, 225, 221, 0.4) 100%);
}

.info-card--featured .info-card-value {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
}

.info-card-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  height: 100%;
}

.info-card-body {
  flex: 1;
  min-width: 0;
}

.info-card-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--aqua-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--teal);
}

.info-card--featured .info-card-icon {
  background: rgba(165, 141, 102, 0.12);
  border-color: rgba(165, 141, 102, 0.25);
  color: var(--gold-dark);
}

.info-card-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.info-card-value {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.55;
}

.info-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.info-tag {
  display: inline-flex;
  padding: 4px 10px;
  background: var(--aqua-light);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--teal-dark);
  line-height: 1.3;
}

/* ============================================================
   EXPERIENCE — Timeline
   ============================================================ */
.experience {
  background: var(--white);
}

.experience .section-header {
  margin-bottom: var(--space-4);
}

.timeline {
  position: relative;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  top: 0;
  bottom: 0;
  background: var(--aqua);
  opacity: 0.6;
  pointer-events: none;
}

.timeline::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%) scaleY(var(--timeline-progress, 0));
  transform-origin: top center;
  width: 2px;
  top: 0;
  height: 100%;
  background: var(--teal);
  pointer-events: none;
  will-change: transform;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 var(--space-3) var(--space-3);
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: var(--space-4);
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: var(--space-4);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--white);
  border: 2px solid var(--teal);
  border-radius: 50%;
  top: 6px;
  z-index: 1;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -6px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -6px;
}

.timeline-item:hover .timeline-dot {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(64, 126, 140, 0.15);
}

.timeline-item--current .timeline-dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(165, 141, 102, 0.2);
}

.timeline-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  transition: transform var(--duration-hover) var(--ease-out),
              box-shadow var(--duration-hover) var(--ease-out),
              border-color var(--duration-hover) var(--ease-out);
  box-shadow: var(--shadow-card);
}

.timeline-item--current .timeline-content {
  border-color: rgba(165, 141, 102, 0.35);
  border-left: 3px solid var(--gold);
}

.timeline-item:hover .timeline-content {
  border-color: var(--accent-border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--teal);
  margin-bottom: 2px;
  font-weight: 600;
  display: block;
}

.timeline-item--current .timeline-date {
  color: var(--gold-dark);
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: var(--text-card-title);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.125rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.timeline-company {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.45;
}

/* ============================================================
   PROJECTS — Case study cards
   ============================================================ */
.projects-slider {
  position: relative;
}

.projects-slider-viewport {
  overflow: hidden;
  padding: var(--space-2) 0 var(--space-2);
  outline: none;
  mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
}

.projects-slider-viewport::-webkit-scrollbar {
  display: none;
}

.projects-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.625rem;
  width: max-content;
  will-change: transform;
}

.projects-slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.projects-slider-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--duration-hover) var(--ease-out),
              background var(--duration-hover) var(--ease-out),
              border-color var(--duration-hover) var(--ease-out),
              color var(--duration-hover) var(--ease-out),
              box-shadow var(--duration-hover) var(--ease-out);
}

.projects-slider-btn:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.projects-slider-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.projects-slider-btn:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .projects-grid {
    will-change: auto;
  }
}

.project-card {
  flex: 0 0 clamp(228px, 62vw, 268px);
  scroll-snap-align: start;
  align-self: stretch;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-hover) var(--ease-out),
              box-shadow var(--duration-hover) var(--ease-out),
              border-color var(--duration-hover) var(--ease-out);
}

.project-card.is-visible:hover,
.project-card.stagger-item.is-visible:hover {
  border-color: var(--accent-border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px) scale(1.008);
}

.project-content {
  padding: 0.875rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.28;
}

.project-summary {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.45;
  font-weight: 500;
}

.project-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.project-chip {
  display: inline-flex;
  padding: 2px 8px;
  background: var(--aqua-light);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--teal-dark);
  line-height: 1.35;
  transition: border-color var(--duration-hover) var(--ease-out),
              background var(--duration-hover) var(--ease-out);
}

.project-card:hover .project-chip {
  border-color: rgba(64, 126, 140, 0.35);
}

.project-highlights {
  list-style: none;
  flex: 1;
  background: var(--sand-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.625rem;
}

.project-highlights li {
  position: relative;
  padding-left: 0.875rem;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 0.25rem;
}

.project-highlights li:last-child {
  margin-bottom: 0;
}

.project-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 4px;
  height: 4px;
  background-color: var(--teal);
  border-radius: 50%;
  transform: translateY(-50%);
}

.project-actions {
  margin-top: auto;
  padding-top: 0.125rem;
}

.project-github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  padding: 0.4375rem 0.875rem;
  min-height: 36px;
  background: transparent;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-xl);
  transition: transform var(--duration-hover) var(--ease-out),
              background var(--duration-hover) var(--ease-out),
              color var(--duration-hover) var(--ease-out),
              gap var(--duration-hover) var(--ease-out);
  text-decoration: none;
}

.project-github-link:hover {
  background: var(--navy);
  color: var(--white);
  gap: 0.65rem;
  transform: translateY(-2px);
}

/* ============================================================
   EXPERTISE / FRONTIER
   ============================================================ */
.frontier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.frontier-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-hover) var(--ease-out),
              box-shadow var(--duration-hover) var(--ease-out),
              border-color var(--duration-hover) var(--ease-out);
}

.frontier-card.stagger-item.is-visible:hover {
  border-color: var(--accent-border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.frontier-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--aqua-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--teal);
  margin-bottom: var(--space-2);
  transition: var(--transition);
}

.frontier-icon svg {
  width: 24px;
  height: 24px;
}

.frontier-card:hover .frontier-icon {
  border-color: var(--accent-border-hover);
  background: rgba(64, 126, 140, 0.08);
  transform: scale(1.05);
}

.frontier-title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.375rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.frontier-tools {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.frontier .section-subtitle {
  font-size: 1rem;
}

/* ============================================================
   TECH STACK
   ============================================================ */
.stack-categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stack-category {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-hover) var(--ease-out),
              border-color var(--duration-hover) var(--ease-out),
              box-shadow var(--duration-hover) var(--ease-out);
}

.stack-category:hover {
  border-color: var(--accent-border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.stack-category-title {
  font-family: var(--font-heading);
  font-size: var(--text-card-title);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.4375rem 0.875rem;
  background: var(--sand-light);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: transform var(--duration-hover) var(--ease-out),
              border-color var(--duration-hover) var(--ease-out),
              color var(--duration-hover) var(--ease-out),
              background var(--duration-hover) var(--ease-out);
  cursor: default;
}

.skill-tag:hover {
  border-color: var(--teal);
  color: var(--navy);
  background: var(--aqua-light);
  transform: translateY(-2px);
}

/* ============================================================
   CONTACT — Dark navy
   ============================================================ */
.contact {
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(192, 213, 214, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.contact .container {
  position: relative;
  z-index: 1;
}

.contact .section-header {
  border-bottom-color: rgba(192, 213, 214, 0.15);
}

.contact .section-tag {
  color: var(--aqua);
}

.contact .section-title {
  color: var(--white);
}

.contact .section-subtitle {
  color: var(--text-on-dark-muted);
}

.contact .heading-icon {
  color: var(--gold);
}

.contact-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin: var(--space-6) 0;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 112px;
  min-height: 112px;
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(192, 213, 214, 0.2);
  border-radius: var(--radius-card);
  color: var(--sand);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(8px);
  transition: transform var(--duration-hover) var(--ease-out),
              box-shadow var(--duration-hover) var(--ease-out),
              border-color var(--duration-hover) var(--ease-out),
              background var(--duration-hover) var(--ease-out);
}

.social-btn:hover {
  border-color: rgba(165, 141, 102, 0.45);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.social-btn svg {
  color: var(--teal);
  transition: color var(--duration-hover) var(--ease-out),
              transform var(--duration-hover) var(--ease-out);
}

.social-btn:hover svg {
  color: var(--gold);
  transform: scale(1.1);
}

.social-btn span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-on-dark-muted);
}

.social-btn:hover span {
  color: var(--sand);
}

.contact-cta {
  text-align: center;
  margin-top: var(--space-4);
}

.contact-cta .btn-primary {
  padding: 1rem 2.5rem;
  font-size: 1.0625rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: var(--space-4) 0;
  background: var(--navy-deeper);
  border-top: 1px solid rgba(192, 213, 214, 0.1);
  font-size: var(--text-small);
  color: var(--text-on-dark-muted);
}

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

.copyright span {
  color: var(--gold);
  font-weight: 500;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .section-reveal,
  .stagger-item,
  .reveal.stagger-item,
  .hero-enter,
  .hero-photo-enter {
    opacity: 1;
    transform: none;
  }

  .hero-loaded .hero-photo-inner {
    animation: none;
  }

  .hero-photo:hover .hero-profile-img,
  .project-card.is-visible:hover {
    transform: none;
  }

  .timeline::after {
    transform: translateX(-50%) scaleY(1);
  }

  .status-dot,
  .btn-primary.btn-pulse,
  .typewriter-cursor {
    animation: none !important;
  }

  #neural-canvas {
    opacity: 0.03;
  }
}
