/* ============================================================
   SAGI SIMHI — PORTFOLIO
   "Financial Intelligence Core" design system
   Cleaned & consolidated — one canonical rule per selector.
   ============================================================ */

:root {
  /* Palette */
  --navy-950: #080D16;
  --navy-900: #0C131F;
  --navy-850: #101828;
  --navy-800: #141E2E;
  --navy-700: #1B2738;
  --slate-600: #3A4658;
  --slate-500: #5C6A80;
  --slate-400: #8592A6;
  --border: #212D3F;
  --border-soft: #182233;

  --ink: #F2F4F8;
  --ink-muted: #A7B0C0;
  --ink-faint: #5C6A80;

  --accent: #53D7A6;         /* brand accent — signal green / data-growth */
  --accent-bright: #6EE7BE;
  --accent-dim: #3FB88F;
  --accent-soft: rgba(83, 215, 166, 0.12);
  --accent-line: rgba(83, 215, 166, 0.28);
  --accent-glow: rgba(83, 215, 166, 0.55);

  --gold: #C9A15A;           /* secondary accent, used sparingly */

  /* Driven by script.js on scroll — ambient background lightening */
  --bg-ambient-a: 0.06;
  --bg-ambient-b: 0.04;
  --bg-overlay-opacity: 0.02;

  --nav-glass-bg: rgba(8, 13, 22, 0.55);
  --nav-glass-border: rgba(255, 255, 255, 0.08);

  /* Type */
  --font-display: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Layout */
  --max-w: 1180px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --floating-nav-clearance: 96px;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-fast: 0.2s;
  --motion-base: 0.28s;
  --motion-slow: 0.45s;
  --glass-blur: 16px;
  --glass-saturation: 120%;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

html, body { min-height: 100vh; margin: 0; padding: 0; }

body {
  position: relative;
  overflow-x: hidden;
  padding-bottom: 0;
  /* Ambient gradient responds live to --bg-ambient-a/b, set by the
     scroll handler in script.js — keep this the single source of
     truth for the body background so that effect stays visible. */
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(83,215,166,var(--bg-ambient-a)), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(201,161,90,var(--bg-ambient-b)), transparent 55%),
    var(--navy-950);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 100%);
  opacity: var(--bg-overlay-opacity);
  pointer-events: none;
  z-index: -1;
  transition: opacity var(--motion-base) var(--motion-ease);
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); color: var(--ink); font-weight: 600; }
p { margin: 0; color: var(--ink-muted); }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; transition: color var(--motion-fast) var(--motion-ease), opacity var(--motion-fast) var(--motion-ease); }
img { max-width: 100%; display: block; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: var(--accent-soft); color: var(--accent-bright); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--navy-800); color: var(--ink); padding: 10px 16px;
  border-radius: 0 0 8px 0; border: 1px solid var(--border);
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) var(--motion-ease), background var(--motion-base) var(--motion-ease), border-color var(--motion-base) var(--motion-ease), color var(--motion-base) var(--motion-ease), opacity var(--motion-base) var(--motion-ease);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.16) 48%, transparent 100%);
  transform: translateX(-120%);
  transition: transform var(--motion-slow) var(--motion-ease);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }

.btn-primary {
  background: var(--accent);
  color: var(--navy-950);
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(83, 215, 166, 0.2), 0 0 34px rgba(83, 215, 166, 0.14);
}

.btn-ghost { background: transparent; color: var(--ink); border: 1px solid transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24), 0 0 18px rgba(255, 255, 255, 0.06); transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 6px 22px rgba(83, 215, 166, 0.14); transform: translateY(-1px); }

/* ============================================================
   NAVIGATION — floating liquid-glass control layer
   ============================================================ */
.site-header {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 1000;
  width: auto;
  background: transparent;
  pointer-events: none;
  transition: transform var(--motion-base) var(--motion-ease), opacity var(--motion-base) var(--motion-ease);
}

.site-header.nav-scrolled {
  transform: translateX(-50%) translateY(-1px);
}

.nav-container {
  pointer-events: auto;
  width: auto;
  max-width: min(94vw, 1100px);
  margin: 0;
  padding: 0.52rem 0.64rem;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  justify-content: center;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.10) 0%,
      rgba(255, 255, 255, 0.032) 34%,
      rgba(255, 255, 255, 0.01) 58%,
      transparent 78%
    ),
    rgba(10, 16, 27, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  transition:
    background var(--motion-base) var(--motion-ease),
    border-color var(--motion-base) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease),
    transform var(--motion-base) var(--motion-ease);
}
.site-header.nav-scrolled .nav-container {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.11) 0%,
      rgba(255, 255, 255, 0.034) 34%,
      rgba(255, 255, 255, 0.01) 58%,
      transparent 78%
    ),
    rgba(8, 13, 22, 0.30);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.19),
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    inset 0 -1px 0 rgba(255, 255, 255, 0.045);
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid rgba(255, 255, 255, 0.11);
  transition: color var(--motion-fast) var(--motion-ease), opacity var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}
.nav-logo:hover {
  color: var(--accent-bright);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 4px 12px rgba(0, 0, 0, 0.12);
}

.nav-logo-mark {
  width: 20px;
  height: 20px;
  color: var(--accent);
  transition: color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}
.nav-logo:hover .nav-logo-mark { color: var(--accent-bright); transform: translateY(-0.5px); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.24rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-muted);
  min-width: 0;
}
.nav-links a {
  position: relative;
  padding: 0.46rem 0.7rem;
  border-radius: 999px;
  line-height: 1;
  transition:
    color var(--motion-fast) var(--motion-ease),
    background-color var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    transform var(--motion-fast) var(--motion-ease),
    opacity var(--motion-fast) var(--motion-ease);
}
.nav-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11);
  transform: translateY(-1px);
}

/* Toggled by the scroll-spy IntersectionObserver in script.js */
.nav-links a.nav-link-active {
  color: var(--accent-bright);
  background: rgba(255, 255, 255, 0.058);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 0 0 1px rgba(83, 215, 166, 0.14);
}
.nav-links a.nav-link-active::after {
  content: none;
}

.nav-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.9rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: var(--navy-950);
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow:
    0 4px 14px rgba(83, 215, 166, 0.28),
    0 0 0 1px rgba(83, 215, 166, 0.18);
  transition: opacity var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), filter var(--motion-fast) var(--motion-ease);
}
.nav-contact-btn:hover {
  opacity: 0.96;
  transform: translateY(-1px);
  filter: saturate(106%);
  box-shadow:
    0 8px 20px rgba(83, 215, 166, 0.31),
    0 0 0 1px rgba(83, 215, 166, 0.28);
}

@media (max-width: 768px) {
  :root { --floating-nav-clearance: 104px; }
  .site-header {
    left: 50%;
    right: auto;
    top: calc(12px + env(safe-area-inset-top, 0px));
    transform: translateX(-50%);
  }
  .nav-container {
    width: min(96vw, 760px);
    padding: 0.48rem 0.52rem;
    gap: 0.5rem;
  }
  .nav-logo { display: none; }
  .nav-right { width: 100%; }
  .nav-links {
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
    padding-bottom: 2px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a {
    padding: 0.44rem 0.64rem;
    font-size: 0.8rem;
  }
  .nav-contact-btn {
    padding: 0.42rem 0.82rem;
    font-size: 0.78rem;
  }
}

/* ============================================================
   HERO STATUS BADGE
   ============================================================ */
.hero-status-wrapper { margin-bottom: 1.1rem; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.9rem 0.3rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  background-color: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--border);
}
.status-indicator {
  position: relative;
  width: 0.4rem; height: 0.4rem;
  border-radius: 9999px;
  background-color: var(--accent);
  animation: status-breathe 3.4s ease-in-out infinite;
}
@keyframes status-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .status-indicator { animation: none; opacity: 0.85; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 0;
  overflow: hidden;
  padding: 118px 2rem 80px;
  min-height: 68vh;
  display: flex;
  align-items: flex-start;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(90deg, rgba(8,13,22,0.16) 0%, rgba(8,13,22,0.05) 32%, rgba(8,13,22,0) 72%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.82) 42%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.82) 42%, rgba(0,0,0,0) 100%);
}

.hero-inner { position: relative; z-index: 1; max-width: 1136px; margin: 0 auto; width: 100%; }

.hero-eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.16;
  color: var(--ink);
  max-width: 560px;
  margin-bottom: 8px;
}
.hero-title-accent { color: var(--accent-bright); font-weight: 650; font-size: 1em; display: inline; }

@media (max-width: 720px) { .hero-title { max-width: 100%; } }

.hero-bio { max-width: 640px; font-size: 1.1rem; margin-top: 24px; margin-bottom: 0; }
.hero-cta { display: flex; gap: 16px; margin-top: 34px; }

/* ---------- Typewriter caret ---------- */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  background-color: rgba(255, 255, 255, 0.85);
  vertical-align: text-bottom;
  animation: caret-blink 1s steps(1, start) infinite;
}
@keyframes caret-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .typewriter-cursor { animation: none; display: none; }
}

/* ============================================================
   FINANCIAL INTELLIGENCE CORE — persistent experience layer
   A single canvas instance lives at page-level (outside hero) and
   remains present through the full scroll journey.
   ============================================================ */
.core-layer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(52vw, 640px);
  height: 100vh;
  min-height: 560px;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.96;
  filter: saturate(108%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.92) 16%, rgba(0,0,0,1) 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.92) 16%, rgba(0,0,0,1) 78%, transparent 100%);
}
.core-layer::before {
  content: "";
  position: absolute;
  inset: -8%;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.core-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
}

.core-layer { opacity: 0; animation: bgFadeIn 1.2s ease forwards; }
@keyframes bgFadeIn { to { opacity: 1; } }

/* ---------- reduced motion: show final state instantly ---------- */
@media (prefers-reduced-motion: reduce) {
  .core-layer, .core-canvas {
    animation: none !important;
  }
  .core-layer { opacity: 1; }
}

/* ---------- responsive: recede gracefully, never crowd content ---------- */
@media (max-width: 1100px) { .core-layer { width: 44vw; opacity: 0.7; } }
@media (max-width: 820px)  { .core-layer { width: 60vw; opacity: 0.45; } }
@media (max-width: 560px)  { .core-layer { width: 100vw; opacity: 0.28; } }

main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ============================================================
   SECTIONS (generic)
   ============================================================ */
.section { padding: 108px 28px 96px; position: relative; }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* Quiet system-activation cue — a small mark that sits dormant until
   its section scrolls into view, then settles into a lit state once.
   No page-spanning timeline, no per-section indicator column — the
   only trace of "the system waking up" lives inside the header itself. */
.eyebrow-signal {
  display: inline-block;
  width: 12px;
  height: 1px;
  background: var(--border);
  position: relative;
  transition: background 1.1s ease, width 1.1s ease;
}
.eyebrow-signal::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--slate-500);
  transform: translate(50%, -50%) scale(1);
  transition: background 0.9s ease, box-shadow 0.9s ease, transform 0.9s ease;
}
.section.is-active .eyebrow-signal {
  width: 18px;
  background: var(--accent-line);
}
.section.is-active .eyebrow-signal::after {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  transform: translate(50%, -50%) scale(1.4);
}
@media (prefers-reduced-motion: reduce) {
  .eyebrow-signal, .eyebrow-signal::after { transition: none; }
}
.section-title { font-size: 2.2rem; margin-bottom: 42px; letter-spacing: -0.02em; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.section-lede {
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.55;
  max-width: 640px;
  margin-bottom: 34px;
}
.about-copy { font-size: 1rem; margin-bottom: 16px; }
.about-copy:last-child { margin-bottom: 0; }

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--navy-900);
  overflow: hidden;
}
.about-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-soft);
}
.about-fact:last-child { border-bottom: none; }
.about-fact-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.about-fact-value { font-size: 0.98rem; color: var(--ink); }

/* ============================================================
   EDUCATION
   ============================================================ */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }

.edu-card, .project-card, .stack-group, .timeline-content {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.058) 0%,
      rgba(255, 255, 255, 0.014) 38%,
      transparent 72%
    ),
    rgba(9, 15, 25, 0.13);
  backdrop-filter: blur(12px) saturate(116%);
  -webkit-backdrop-filter: blur(12px) saturate(116%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  box-shadow:
    0 9px 24px rgba(0, 0, 0, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.085);
  transition:
    transform var(--motion-base) var(--motion-ease),
    border-color var(--motion-base) var(--motion-ease),
    background var(--motion-base) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease);
}

.project-card {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.074) 0%,
      rgba(255, 255, 255, 0.018) 40%,
      rgba(255, 255, 255, 0.005) 64%,
      transparent 78%
    ),
    rgba(9, 15, 25, 0.16);
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow:
    0 11px 28px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.edu-card::before, .project-card::before, .stack-group::before, .timeline-content::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  opacity: 0.16;
  pointer-events: none;
  transition: opacity var(--motion-base) var(--motion-ease);
}

.edu-card:hover, .stack-group:hover, .timeline-content:hover {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.063) 0%,
      rgba(255, 255, 255, 0.015) 39%,
      transparent 73%
    ),
    rgba(9, 15, 25, 0.15);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow:
    0 13px 30px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.project-card:hover {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.019) 40%,
      rgba(255, 255, 255, 0.005) 65%,
      transparent 78%
    ),
    rgba(9, 15, 25, 0.17);
  border-color: rgba(255, 255, 255, 0.13);
  transform: translateY(-2px);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.edu-card:hover::before, .project-card:hover::before, .stack-group:hover::before, .timeline-content:hover::before {
  opacity: 0.24;
}

.edu-card { padding: 32px; }
.edu-card-primary {
  background:
    linear-gradient(145deg, rgba(83, 215, 166, 0.048) 0%, rgba(255, 255, 255, 0.018) 54%, transparent 100%),
    rgba(9, 15, 25, 0.15);
  border-color: rgba(83, 215, 166, 0.14);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.edu-card-primary:hover {
  background:
    linear-gradient(145deg, rgba(83, 215, 166, 0.056) 0%, rgba(255, 255, 255, 0.02) 54%, transparent 100%),
    rgba(9, 15, 25, 0.16);
  border-color: rgba(83, 215, 166, 0.19);
}
.edu-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 16px; }
.edu-card-head h3 { font-size: 1.2rem; }
.edu-period { font-size: 0.85rem; color: var(--slate-400); white-space: nowrap; }
.edu-org { font-size: 0.95rem; margin-bottom: 24px; }
.edu-scores { border-top: 1px solid var(--border-soft); padding-top: 16px; }
.edu-scores li { display: flex; align-items: center; font-size: 0.9rem; padding: 8px 0; border-bottom: 1px dashed var(--border-soft); }
.edu-scores li:last-child { border-bottom: none; }
.score-label { flex: 1; color: var(--ink); }
.score-meta { color: var(--slate-500); font-size: 0.8rem; margin-right: 16px; }
.score-val { color: var(--accent); font-weight: 500; }
.edu-card-wide { grid-column: 1 / -1; }

.course-list { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.course-list li { background: var(--navy-850); padding: 8px 16px; border-radius: 20px; font-size: 0.9rem; color: var(--ink-muted); border: 1px solid var(--border-soft); }

.language-list { display: flex; flex-direction: column; gap: 12px; }
.language-list li { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.language-list li:last-child { border-bottom: none; padding-bottom: 0; }
.language-name { font-size: 1rem; color: var(--ink); }
.language-level { font-size: 0.85rem; color: var(--ink-muted); }

/* ============================================================
   SKILLS / LEARNING JOURNEY
   ============================================================ */
.journey-strip { display: flex; align-items: center; gap: 12px; margin-bottom: 48px; flex-wrap: wrap; }
.journey-step { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border: 1px solid var(--border); border-radius: 9999px; background: var(--navy-900); font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-muted); }
.journey-step-index { color: var(--accent); }
.journey-arrow { color: var(--slate-500); font-size: 0.9rem; }

.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.stack-group { padding: 28px; }
.stack-group-title { font-size: 1.1rem; color: var(--ink); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { background: var(--navy-850); color: var(--ink-muted); padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.85rem; border: 1px solid var(--border-soft); }
.tag-mono { font-family: var(--font-mono); font-size: 0.8rem; }

/* ============================================================
   PROJECTS — interactive case studies
   ============================================================ */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
@media (max-width: 900px) { .project-grid { grid-template-columns: 1fr; } }

.project-card { display: flex; flex-direction: column; padding: 32px; width: 100%; }
.project-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.project-index { font-size: 1.2rem; color: var(--slate-500); font-weight: 500; }
.project-tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 20px; }
.project-title { font-size: 1.4rem; margin-bottom: 14px; }
.project-desc { font-size: 0.95rem; margin-bottom: 20px; }

.project-case { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; padding: 18px 20px; border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: rgba(0, 0, 0, 0.15); }
.project-case-row { display: flex; gap: 14px; align-items: baseline; }
.project-case-label { flex: none; width: 96px; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); }
.project-case-value { font-size: 0.9rem; color: var(--ink-muted); line-height: 1.55; }

.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; align-items: center; }
.project-link { font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; margin-top: auto; width: fit-content; }
.project-link .arrow { transition: transform var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease); }
.project-card:hover .project-link .arrow { transform: translateX(3px); color: var(--accent); }

/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.timeline { position: relative; max-width: 800px; padding-left: 32px; border-left: 2px solid var(--border); }
.timeline-item { position: relative; margin-bottom: 48px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-marker { position: absolute; left: -41px; top: 6px; width: 16px; height: 16px; background: var(--navy-950); border: 2px solid var(--accent); border-radius: 50%; }
.timeline-content { padding: 24px 32px; }
.timeline-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.timeline-head h3 { font-size: 1.2rem; }
.timeline-period { font-size: 0.85rem; color: var(--slate-400); }
.timeline-org { color: var(--gold); font-size: 0.95rem; margin-bottom: 16px; }
.timeline-points { list-style: disc; padding-left: 16px; }
.timeline-points li { color: var(--ink-muted); font-size: 0.95rem; margin-bottom: 8px; }
.timeline-points li:last-child { margin-bottom: 0; }

/* ============================================================
   CONTACT & FOOTER
   ============================================================ */
.section-contact { text-align: center; background: var(--navy-900); border-top: 1px solid var(--border); }
.section-contact .section-inner { display: flex; flex-direction: column; align-items: center; }
.contact-sub { font-size: 1.1rem; max-width: 500px; margin-bottom: 40px; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

.site-footer { text-align: center; padding: 32px 28px; background: var(--navy-950); border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--slate-500); }
.site-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 480px) { .site-footer-inner { justify-content: center; text-align: center; } }

.footer-social-link { display: inline-flex; align-items: center; justify-content: center; color: var(--ink-muted); line-height: 0; padding: 6px; margin: -6px; border-radius: 50%; transition: color var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease); }
.footer-social-link:hover { color: var(--ink); background-color: var(--navy-850); transform: translateY(-1px); }
.footer-social-link:focus-visible { outline: 2px solid var(--ink-muted); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .footer-social-link { transition: none; transform: none; } }

/* ============================================================
   SCROLL REVEAL (JS hook: IntersectionObserver adds .reveal-visible)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--motion-ease), transform 0.6s var(--motion-ease); }
.reveal-visible { opacity: 1; transform: translateY(0); }



/* ============================================================
   LIQUID GLASS FALLBACKS
   ============================================================ */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-container { background: rgba(10, 16, 27, 0.70); }
  .site-header.nav-scrolled .nav-container { background: rgba(8, 13, 22, 0.75); }
  .edu-card, .project-card, .stack-group, .timeline-content { background: rgba(12, 19, 31, 0.62); }
  .edu-card-primary {
    background:
      linear-gradient(145deg, rgba(83, 215, 166, 0.04), transparent 65%),
      rgba(12, 19, 31, 0.64);
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero { padding-top: 100px; min-height: auto; }
  .section { padding: 94px 22px 86px; }
  .edu-card-head { flex-direction: column; }
  .project-card-top { flex-direction: column; align-items: flex-start; gap: 12px; }
  .timeline { padding-left: 20px; }
  .timeline-marker { left: -29px; }
  .project-case-row { flex-direction: column; gap: 4px; }
  .project-case-label { width: auto; }
}
/* ============================================================
   PROJECT MODAL — in-page project viewer (iframe overlay)
   ============================================================ */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.project-modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}
.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 14, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.project-modal-window {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1320px;
  display: flex;
  flex-direction: column;
  background: var(--navy-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  overflow: hidden;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-modal.is-open .project-modal-window { transform: translateY(0) scale(1); }

.project-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--navy-850);
  flex-shrink: 0;
}
.project-modal-title { font-size: 0.8rem; color: var(--ink-muted); }
.project-modal-actions { display: flex; align-items: center; gap: 4px; }
.project-modal-newtab, .project-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.project-modal-newtab:hover, .project-modal-close:hover { color: var(--ink); background: rgba(255,255,255,0.06); }

.project-modal-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--navy-950);
}

body.project-modal-lock { overflow: hidden; }

@media (max-width: 720px) {
  .project-modal { padding: 0; }
  .project-modal-window { max-width: none; border-radius: 0; }
}