@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&family=JetBrains+Mono:wght@400;500&display=swap");

/* ═══════════════════════════════════════════════════════════
   DESIGN SYSTEM
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #060a12;
  --bg-soft: #0c1320;
  --card: #0e1726;
  --card-elevated: #121d30;
  --line: #1e3050;
  --line-soft: rgba(140, 180, 240, 0.1);
  --line-glow: rgba(59, 200, 255, 0.15);
  --text: #e8f0ff;
  --text-secondary: #c0d0e8;
  --muted: #8a9fc0;
  --accent: #3bc8ff;
  --accent-2: #60e5bf;
  --accent-3: #7ea2ff;
  --accent-warm: #f0a060;
  --chip: #152035;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(59, 200, 255, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --mono: "JetBrains Mono", monospace;
}

/* ═══════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════ */

html {
  min-height: 100%;
  background-color: var(--bg);
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: var(--bg);
  line-height: 1.6;
  position: relative;
}

/* Seamless gradient overlay — single fixed layer, no seams */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(80vw 60vh at 8% 10%, rgba(126, 162, 255, 0.15), transparent 60%),
    radial-gradient(70vw 55vh at 92% 15%, rgba(96, 229, 191, 0.10), transparent 55%),
    radial-gradient(60vw 50vh at 50% 85%, rgba(59, 200, 255, 0.07), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #080e1a 50%, #0a1220 100%);
}

/* Film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}


/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
  z-index: 10000;
  transition: width 0.1s linear;
}

h1, h2, h3, h4 {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

p, li { color: var(--text-secondary); }

a { color: var(--accent); }

::selection {
  background: rgba(59, 200, 255, 0.2);
  color: #fff;
}

#quarto-content {
  max-width: 1280px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

/* ═══════════════════════════════════════════════════════════
   GRADIENT TEXT
   ═══════════════════════════════════════════════════════════ */

.gradient-text {
  background: linear-gradient(135deg, #3bc8ff 0%, #7ea2ff 45%, #60e5bf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-animated {
  background: linear-gradient(135deg, #3bc8ff, #7ea2ff, #60e5bf, #3bc8ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ═══════════════════════════════════════════════════════════
   SCROLL REVEAL SYSTEM
   ═══════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.07s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.14s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.21s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.35s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.42s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.49s; }
.reveal-stagger.visible > *:nth-child(9) { transition-delay: 0.56s; }
.reveal-stagger.visible > *:nth-child(10) { transition-delay: 0.63s; }
.reveal-stagger.visible > *:nth-child(11) { transition-delay: 0.70s; }
.reveal-stagger.visible > *:nth-child(12) { transition-delay: 0.77s; }
.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* ═══════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════ */

.navbar {
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(6, 10, 18, 0.75);
  transition: all 0.35s ease;
  padding: 0.6rem 0;
}

.navbar-scrolled {
  background: rgba(6, 10, 18, 0.92);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  padding: 0.35rem 0;
}

#quarto-header .navbar-brand {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  letter-spacing: 0.01em;
  max-width: none !important;
  white-space: nowrap;
  font-size: 1.15rem;
}

#quarto-header .navbar-title {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap;
}

#quarto-header .navbar-nav .nav-link {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin: 0 0.08rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#quarto-header .navbar-nav .nav-link:hover,
#quarto-header .navbar-nav .nav-link.active {
  border-color: var(--line-glow);
  background: rgba(59, 200, 255, 0.06);
  color: #ffffff;
  text-shadow: 0 0 20px rgba(59, 200, 255, 0.4);
}

#quarto-header .navbar .navbar-container {
  max-width: 1280px;
}

@media (min-width: 992px) {
  #quarto-header .navbar .navbar-container {
    display: grid;
    grid-template-columns: max-content 1fr max-content;
    align-items: center;
    column-gap: 1rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  #quarto-header .navbar-brand-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-self: start;
    width: max-content;
    min-width: 240px;
  }
  #quarto-header #navbarCollapse {
    display: flex !important;
    justify-content: center;
    min-width: 0;
  }
  #quarto-header ul.navbar-nav.me-auto {
    margin-right: 0 !important;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
  }
  #quarto-header ul.navbar-nav.ms-auto {
    margin-left: auto !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   HOME LAYOUT
   ═══════════════════════════════════════════════════════════ */

.home-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* ── Profile Sidebar ── */
.profile-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  background: linear-gradient(170deg, rgba(14, 23, 38, 0.95), rgba(8, 12, 20, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow), var(--shadow-glow);
  backdrop-filter: blur(8px);
}

.profile-photo {
  width: 100%;
  max-width: 280px;
  height: auto;
  max-height: 380px;
  display: block;
  object-fit: cover;
  object-position: center 18%;
  image-rendering: auto;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  margin: 0 auto 0.9rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.profile-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(59, 200, 255, 0.1);
}

.profile-sidebar h3 {
  margin-top: 0.1rem;
  margin-bottom: 0.12rem;
  font-size: 1.25rem;
}

.identity-line {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  letter-spacing: 0.01em;
}

.profile-sidebar > p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.profile-disciplines {
  display: grid;
  gap: 0.38rem;
  margin-bottom: 0.7rem;
}

.discipline-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.discipline-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 200, 255, 0.18);
  background: rgba(59, 200, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
}

.discipline-pill:hover {
  border-color: rgba(59, 200, 255, 0.45);
  background: rgba(59, 200, 255, 0.1);
  color: #fff;
  transform: translateY(-1px);
}

.profile-links {
  display: grid;
  gap: 0.5rem;
  margin: 0.8rem 0 0.9rem;
}

.profile-meta {
  display: grid;
  gap: 0;
}

.profile-meta div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--line-soft);
  padding: 0.5rem 0;
}

.profile-meta div:last-child {
  border-bottom: none;
}

.profile-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.profile-meta strong {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.home-main { min-width: 0; }

/* ═══════════════════════════════════════════════════════════
   HERO PANEL
   ═══════════════════════════════════════════════════════════ */

.hero-panel {
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(165deg, rgba(14, 23, 38, 0.96), rgba(8, 12, 20, 0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Rotating conic gradient */
.hero-panel::before {
  content: "";
  position: absolute;
  inset: -80%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(59, 200, 255, 0.05),
    rgba(96, 229, 191, 0.03),
    rgba(126, 162, 255, 0.05),
    rgba(59, 200, 255, 0.05)
  );
  animation: hero-rotate 25s linear infinite;
  z-index: -2;
}

/* Dot grid */
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(59, 200, 255, 0.1) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 25%, black 15%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 25%, black 15%, transparent 65%);
}

@keyframes hero-rotate {
  to { transform: rotate(360deg); }
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 0.9rem;
  font-family: var(--mono);
}

.hero-panel h1,
.hero-h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  margin-bottom: 1rem;
  line-height: 1.15;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: -0.02em;
  font-weight: 800;
}

/* Lock height so typed text never shifts layout */
.hero-h1 {
  min-height: 3.5em;
}

/* Typed text — wrapper reserves space, inner cursor follows text */
.typed-slot {
  position: relative;
}

.typed-cursor {
  border-right: 2px solid var(--accent);
  padding-right: 0.04em;
  animation: blink 0.8s step-end infinite;
  background: linear-gradient(135deg, #3bc8ff, #7ea2ff, #60e5bf, #3bc8ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: blink 0.8s step-end infinite, gradient-shift 5s ease infinite;
}

/* Original span before JS replaces it */
.typed-text {
  border-right: 2px solid var(--accent);
  padding-right: 0.04em;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  50% { border-color: transparent; }
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 600px;
  margin-bottom: 0.2rem;
}

.hero-personal {
  font-size: 0.92rem;
  color: var(--muted);
  opacity: 0.85;
  font-style: italic;
  margin-top: 0.6rem;
}

.section-intro {
  color: var(--muted);
  max-width: 760px;
  margin: -0.1rem 0 0.95rem;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   SECTION DIVIDERS
   ═══════════════════════════════════════════════════════════ */

.home-main h2 {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  background-image: linear-gradient(90deg, var(--line-glow), transparent 80%);
  background-size: 100% 1px;
  background-position: top;
  background-repeat: no-repeat;
}

/* ═══════════════════════════════════════════════════════════
   FLAGSHIP PANEL
   ═══════════════════════════════════════════════════════════ */

.flagship-panel {
  display: block;
  border-radius: var(--radius);
  padding: 1.2rem;
  margin: 0.95rem 0 1.25rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(12, 20, 32, 0.97), rgba(7, 11, 18, 0.97));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

/* Subtle glow in corner */
.flagship-panel::before {
  content: "";
  position: absolute;
  top: -120px;
  left: -60px;
  width: 500px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(59, 200, 255, 0.1), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.flagship-panel > * { position: relative; z-index: 1; }

.flagship-banner {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: var(--bg-soft);
  margin-bottom: 1.1rem;
  transition: transform 0.4s ease;
}

.flagship-panel:hover .flagship-banner {
  transform: scale(1.008);
}

.flagship-copy {
  min-width: 0;
  padding: 0.15rem 0.25rem 0.1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-family: var(--mono);
}

.flagship-copy h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.flagship-copy > p {
  color: var(--muted);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.flagship-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 1.05rem;
}

.flagship-stat {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.95rem;
  background: rgba(255, 255, 255, 0.018);
  transition: all 0.3s ease;
}

.flagship-stat:hover {
  border-color: var(--line-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.flagship-stat strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 500;
  white-space: nowrap;
}

.flagship-stat span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0.62rem 1.15rem;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  color: #060a12;
  background: linear-gradient(130deg, var(--accent), var(--accent-3));
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(59, 200, 255, 0.2);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(59, 200, 255, 0.35);
  color: #060a12;
}

.btn-ghost {
  color: var(--text-secondary);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  border-color: var(--line-glow);
  background: rgba(59, 200, 255, 0.05);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59, 200, 255, 0.08);
}

/* ═══════════════════════════════════════════════════════════
   OPERATING DOCTRINE — GLASSMORPHISM CARDS
   ═══════════════════════════════════════════════════════════ */

.operating-grid,
.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0.95rem 0 1.2rem;
}

.op-card,
.skill-card {
  border-radius: var(--radius-sm);
  padding: 1.05rem 1.1rem;
  backdrop-filter: blur(16px);
  background: rgba(14, 23, 38, 0.55);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.op-card::before,
.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.op-card:hover::before,
.skill-card:hover::before { opacity: 1; }

.op-card:hover,
.skill-card:hover {
  border-color: var(--line-glow);
  box-shadow: var(--shadow), 0 0 24px rgba(59, 200, 255, 0.04);
  transform: translateY(-4px);
}

.op-card h4,
.skill-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--text);
}

.op-card p,
.skill-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════
   METRICS
   ═══════════════════════════════════════════════════════════ */

.metric-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.9rem 0 1.1rem;
}

.metric-pill {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  background: linear-gradient(165deg, rgba(18, 29, 48, 0.7), rgba(8, 12, 20, 0.7));
  transition: all 0.3s ease;
}

.metric-pill:hover {
  border-color: rgba(96, 229, 191, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.metric-pill strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 500;
  white-space: nowrap;
}

.metric-pill span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   PROJECT CARDS
   ═══════════════════════════════════════════════════════════ */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.15rem 0 1.25rem;
}

.home-main .project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  position: relative;
  background: linear-gradient(165deg, rgba(14, 23, 38, 0.96), rgba(8, 12, 20, 0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease,
              opacity 0.35s ease;
}

/* Mouse-tracking radial glow */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  opacity: 0;
  background: radial-gradient(
    500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(59, 200, 255, 0.07),
    transparent 40%
  );
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

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

.project-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(59, 200, 255, 0.4);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(59, 200, 255, 0.08),
    0 0 0 1px rgba(59, 200, 255, 0.15) inset;
}

.project-card.hidden {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project-card:hover .project-thumb {
  transform: scale(1.04);
}

.project-body {
  padding: 1rem;
  position: relative;
  z-index: 2;
}

.card-topline { margin-bottom: 0.5rem; }

.project-badge {
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: #b0e8ff;
  background: rgba(59, 200, 255, 0.1);
  border: 1px solid rgba(59, 200, 255, 0.22);
  font-family: var(--mono);
}

.project-body .card-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  line-height: 1.28;
  font-weight: 800;
  color: var(--text);
}

.project-body p {
  color: var(--muted);
  margin: 0 0 0.7rem;
  line-height: 1.4;
  font-size: 0.88rem;
}

.chips {
  display: flex;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.chip {
  font-size: 0.7rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 200, 255, 0.12);
  background: rgba(59, 200, 255, 0.04);
  color: var(--muted);
  font-weight: 600;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: rgba(96, 229, 191, 0.35);
  color: var(--text-secondary);
}

.center-link { margin-top: 0.6rem; }

/* ═══════════════════════════════════════════════════════════
   PROJECT FILTER BAR
   ═══════════════════════════════════════════════════════════ */

.filter-bar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.filter-btn {
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: transparent;
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: rgba(59, 200, 255, 0.35);
  color: var(--text);
  background: rgba(59, 200, 255, 0.04);
}

.filter-btn.active {
  background: rgba(59, 200, 255, 0.1);
  border-color: rgba(59, 200, 255, 0.4);
  color: #fff;
  box-shadow: 0 0 12px rgba(59, 200, 255, 0.08);
}

/* ═══════════════════════════════════════════════════════════
   PROJECT DETAIL PAGES
   ═══════════════════════════════════════════════════════════ */

.cover-image {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 1.2rem;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.viz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.3rem;
}

.viz-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(14, 23, 38, 0.96), rgba(8, 12, 20, 0.96));
  box-shadow: var(--shadow);
  transition: all 0.35s ease;
}

.viz-card:hover {
  border-color: var(--line-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.viz-card img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.viz-card:hover img { transform: scale(1.03); }

.viz-card p {
  margin: 0;
  padding: 0.85rem 0.95rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.viz-card p strong { color: var(--text); }

/* ═══════════════════════════════════════════════════════════
   RESUME PAGE
   ═══════════════════════════════════════════════════════════ */

.resume-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.resume-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1.2rem;
}

.resume-viewer,
.resume-timeline {
  border-radius: var(--radius);
  padding: 1.15rem;
  background: linear-gradient(165deg, rgba(14, 23, 38, 0.96), rgba(8, 12, 20, 0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.resume-frame {
  width: 100%;
  min-height: 780px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--bg-soft);
}

.resume-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.65rem;
}

.timeline-item {
  border-left: 2px solid rgba(59, 200, 255, 0.4);
  padding: 0 0 0.5rem 0.85rem;
  margin: 0.25rem 0 1rem;
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  position: relative;
}

/* Timeline dot */
.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(59, 200, 255, 0.4);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-item h4 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  color: var(--text);
}

.timeline-item ul {
  margin: 0;
  padding-left: 1rem;
}

.timeline-item li {
  margin: 0.22rem 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT PAGE
   ═══════════════════════════════════════════════════════════ */

.about-hero {
  text-align: center;
  padding: 2.5rem 0 1.2rem;
}

.about-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 0.8rem;
}

.about-lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 2rem 0;
}

.about-section {
  background: linear-gradient(165deg, rgba(14, 23, 38, 0.96), rgba(8, 12, 20, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.about-section h2 { margin-top: 0; font-size: 1.3rem; }

.about-section p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.about-values { display: grid; gap: 0.75rem; }

.value-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.value-item:hover {
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.015);
}

.value-icon {
  color: var(--accent);
  font-size: 0.65rem;
  margin-top: 0.4rem;
  flex-shrink: 0;
}

.value-item strong { display: block; color: var(--text); font-size: 0.92rem; }
.value-item p { margin: 0.12rem 0 0; color: var(--muted); font-size: 0.85rem; }

.about-tech { margin: 1rem 0 2rem; }

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.tech-card {
  background: linear-gradient(165deg, rgba(14, 23, 38, 0.96), rgba(8, 12, 20, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.tech-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.tech-card:hover {
  border-color: var(--line-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.tech-card h4 {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.95rem;
}

.tech-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.about-working-style { margin: 0 0 2rem; }

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.style-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.015);
  transition: all 0.25s ease;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.style-item:hover {
  border-color: rgba(96, 229, 191, 0.3);
  background: rgba(96, 229, 191, 0.03);
  transform: translateX(4px);
}

.style-icon {
  color: var(--accent-2);
  font-size: 0.7rem;
  flex-shrink: 0;
}

.about-cta {
  text-align: center;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line-soft);
}

.about-cta p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.3rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

footer.footer {
  border-top: 1px solid var(--line-soft) !important;
  background: rgba(6, 10, 18, 0.85) !important;
  backdrop-filter: blur(12px);
  padding: 0 !important;
  margin-top: 3rem;
}

.custom-footer-active .nav-footer { display: none; }

.custom-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.8rem 1.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-brand strong {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  color: var(--text);
}

.footer-brand span {
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  gap: 0.9rem;
}

.footer-social a {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.3s ease;
  display: inline-flex;
}

.footer-social a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════════════
   PROJECT DETAIL PAGE POLISH
   ═══════════════════════════════════════════════════════════ */

/* Better code blocks on project pages */
pre {
  background: rgba(10, 16, 26, 0.95) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-xs) !important;
  padding: 1rem !important;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
}

/* Project detail content */
#quarto-content h2 {
  margin-top: 2rem;
  padding-top: 1rem;
}

#quarto-content h3 {
  margin-top: 1.5rem;
}

/* Horizontal rules on project pages */
#quarto-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, var(--line-glow), transparent 70%);
  margin: 2rem 0;
}

/* Quarto default footer cleanup */
.nav-footer {
  border-top: 1px solid var(--line-soft) !important;
  background: rgba(6, 10, 18, 0.85) !important;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATED LINK UNDERLINES
   ═══════════════════════════════════════════════════════════ */

.home-main a:not(.btn-primary):not(.btn-ghost):not(.project-card):not(.chip),
.about-section a,
.resume-timeline a {
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease;
}

.home-main a:not(.btn-primary):not(.btn-ghost):not(.project-card):not(.chip):hover,
.about-section a:hover,
.resume-timeline a:hover {
  background-size: 100% 1px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
  .home-shell { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
  .resume-layout { grid-template-columns: 1fr; }
  .flagship-banner { aspect-ratio: 16 / 8; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .operating-grid,
  .skill-grid,
  .project-grid,
  .metric-strip,
  .flagship-stats,
  .viz-grid {
    grid-template-columns: 1fr;
  }

  .home-main .project-grid { grid-template-columns: 1fr; }
  .resume-frame { min-height: 480px; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .hero-panel { padding: 1.5rem 1.2rem; }
  .hero-panel h1,
  .hero-h1 { font-size: 1.7rem; min-height: auto; }
  .typed-slot { min-width: 0 !important; }
}
