

:root {
  --maxw: 1180px;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}


[data-theme="dark"] {
  --bg:        #14100b;
  --bg-deep:   #0e0b07;
  --bg-soft:   #1c160f;
  --text:      #f1e8da;
  --text-dim:  #b3a48f;
  --text-mute: #7e7058;
  --line:      rgba(230, 200, 150, 0.12);
  --accent:    #e9af56;
  --accent-soft: #f4cd8a;
  --accent-deep: #c98b32;
  --glow:      rgba(233, 175, 86, 0.22);

  /* glass */
  --glass-bg:   rgba(40, 31, 21, 0.55);
  --glass-bg-2: rgba(28, 22, 15, 0.45);
  --glass-brd:  rgba(244, 205, 138, 0.16);
  --glass-hi:   rgba(255, 240, 215, 0.28);
  --glass-sh:   rgba(0, 0, 0, 0.45);

  --hero-filter: brightness(0.78) contrast(1.06) saturate(1.05);
  --img-dark: 1;
  --img-light: 0;

  /* hero frame — darkened edges in dark theme */
  --frame-brd: rgba(255, 220, 160, 0.10);
  --frame-shadow:
    0 0 0 1px rgba(0,0,0,0.55),
    0 60px 130px -50px rgba(0,0,0,0.9),
    0 18px 50px -30px rgba(0,0,0,0.8);
  --hero-backdrop: #100c08;
  --hero-glow: rgba(233, 175, 86, 0.12);
}


[data-theme="light"] {
  --bg:        #f4eee3;
  --bg-deep:   #ece3d3;
  --bg-soft:   #fbf7ef;
  --text:      #221a10;
  --text-dim:  #6a5c46;
  --text-mute: #9a8a6e;
  --line:      rgba(120, 90, 40, 0.14);
  --accent:    #c4881f;
  --accent-soft: #dca348;
  --accent-deep: #9e6b14;
  --glow:      rgba(220, 163, 72, 0.30);

  --glass-bg:   rgba(255, 252, 245, 0.55);
  --glass-bg-2: rgba(255, 250, 240, 0.40);
  --glass-brd:  rgba(255, 255, 255, 0.7);
  --glass-hi:   rgba(255, 255, 255, 0.9);
  --glass-sh:   rgba(120, 95, 50, 0.16);

  --hero-filter: brightness(1.12) contrast(1.0) saturate(1.05);
  --img-dark: 0;
  --img-light: 1;

  /* hero frame — warm light glowing behind the frame; backdrop stays dark */
  --frame-brd: rgba(255, 216, 150, 0.55);
  --frame-shadow:
    0 0 0 1px rgba(255, 205, 135, 0.40),
    0 0 55px rgba(242, 182, 92, 0.55),
    0 0 130px rgba(236, 162, 70, 0.40),
    0 40px 90px -40px rgba(0, 0, 0, 0.7);
  --hero-backdrop: #100c08;
  --hero-glow: rgba(247, 200, 120, 0.30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .6s var(--ease), color .4s var(--ease);
}

/* background canvas + glow */
#bgCanvas {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none;
}
.bg-glow {
  position: fixed; z-index: 0; pointer-events: none;
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  top: -18vw; right: -10vw;
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
  filter: blur(20px);
  transition: background .6s var(--ease);
}
.bg-glow.two {
  top: auto; bottom: -22vw; left: -16vw; right: auto;
  width: 60vw; height: 60vw; opacity: .7;
}

/* warm light that follows the cursor; fades out when idle */
/* ============================================================
   Fluid cursor — organic warm-yellow metaball blob (canvas)
   Single hue, soft blurred edges, deforms while moving,
   settles when idle. Positioned/animated entirely in JS.
   ============================================================ */
#fluidCursor {
  position: fixed; inset: 0; z-index: 45;
  width: 100vw; height: 100vh;
  pointer-events: none;
}

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

.wrap { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }

.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: .02em; }

/* ============================================================
   GLASS
   ============================================================ */
.glass, .glass-sm {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--glass-brd);
  box-shadow:
    0 1px 0 0 var(--glass-hi) inset,
    0 22px 50px -22px var(--glass-sh),
    0 4px 14px -8px var(--glass-sh);
  border-radius: var(--r-lg);
}
.glass-sm { border-radius: var(--r-md); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
/* top sheen highlight */
.glass::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, var(--glass-hi) 0%, transparent 26%);
  opacity: .5; mix-blend-mode: screen;
}

/* ============================================================
   HEADER / NAV — transparent overlay on hero, glass on scroll
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  color: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), border-color .4s var(--ease);
}
.site-header .nav {
  display: flex; align-items: center; gap: 22px;
  width: min(100% - 56px, 1320px); margin-inline: auto;
  padding: 22px 0;
  transition: padding .35s var(--ease);
}
.site-header.scrolled {
  background: var(--glass-bg-2);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--glass-brd);
  color: var(--text);
}
.site-header.scrolled .nav { padding: 13px 0; }

.brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 9px; white-space: nowrap;
  color: inherit; text-decoration: none;
}
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

.nav-links { display: flex; gap: 4px; margin: 0 auto; }
.nav-link {
  font-size: 14px; color: currentColor; opacity: .72; text-decoration: none;
  padding: 7px 13px; border-radius: 999px; transition: opacity .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}
.nav-link:hover { opacity: 1; }
.nav-link.active { opacity: 1; color: var(--accent); }

.nav-tools { display: flex; align-items: center; gap: 16px; }
.nav-social { display: flex; gap: 12px; }
.nav-social a { color: inherit; opacity: .78; transition: opacity .25s var(--ease), color .25s var(--ease), transform .25s var(--ease); }
.nav-social a:hover { opacity: 1; color: var(--accent); transform: translateY(-2px); }
.nav-social svg { width: 18px; height: 18px; display: block; }
.nav-sep { width: 1px; height: 18px; background: currentColor; opacity: .25; }

.lang-switch { display: flex; align-items: center; gap: 7px; }
.lang-btn {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  border: 0; background: transparent; color: currentColor; opacity: .6;
  padding: 2px 2px; cursor: pointer; transition: opacity .25s var(--ease), color .25s var(--ease);
}
.lang-btn:hover { opacity: 1; }
.lang-btn.active { opacity: 1; color: var(--accent); }
.lang-divider { opacity: .35; }

.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  background: transparent; color: inherit; border-radius: 50%;
  cursor: pointer; transition: all .3s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: rotate(-18deg); }
.icon-btn svg { width: 17px; height: 17px; }

/* ============================================================
   HERO — full-bleed background image, centered title
   ============================================================ */
.hero {
  position: fixed; inset: 0; z-index: 1;
  display: grid; place-items: center; text-align: center;
  padding: 90px 24px 60px;
  background:
    radial-gradient(ellipse 64% 56% at 50% 46%, var(--hero-glow) 0%, transparent 62%),
    var(--hero-backdrop);
  opacity: var(--hero-fade, 1);
  pointer-events: none;
  will-change: opacity;
}
.hero-frame {
  position: absolute; inset: 0 18px 18px; z-index: 0;
  border-radius: 0 0 30px 30px; overflow: hidden;
  border: 1px solid var(--frame-brd);
  box-shadow: var(--frame-shadow);
  transition: box-shadow .6s var(--ease), border-color .6s var(--ease);
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: var(--hero-filter);
  transition: opacity .9s var(--ease), filter .6s var(--ease);
}
.hero-bg .img-dark  { opacity: var(--img-dark); }
.hero-bg .img-light { opacity: var(--img-light); }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(8,6,4,.30) 0%, rgba(8,6,4,.62) 100%),
    linear-gradient(to bottom, rgba(8,6,4,.55) 0%, transparent 22%, transparent 70%, rgba(8,6,4,.6) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 1000px; }

/* content sheet slides up over the fixed hero; transparent so the live
   animated background shows through on every section below the hero */
.content-sheet {
  position: relative; z-index: 2;
  margin-top: 100vh;
  background: transparent;
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -34px 70px -34px rgba(0, 0, 0, 0.55);
  padding-top: 26px;
}
.hero-kicker {
  font-family: var(--font-mono); font-size: clamp(12px, 1.2vw, 15px);
  letter-spacing: .38em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72); margin: 0 0 8px;
  padding-left: .38em;
}
.hero-name {
  font-family: var(--font-serif);
  font-weight: 600; line-height: 1; letter-spacing: .015em; text-transform: uppercase;
  font-size: clamp(42px, 9vw, 128px);
  color: #fff; margin: 18px 0;
  text-shadow: 0 6px 40px rgba(0,0,0,.45);
}
.hero-role {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(18px, 2vw, 24px); color: var(--accent-soft);
}
.hero-tagline {
  font-size: clamp(15px, 1.7vw, 20px); color: rgba(255, 255, 255, 0.82);
  margin-top: 14px;
}
.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; z-index: 2;
  color: rgba(255, 255, 255, 0.7); text-decoration: none;
  pointer-events: auto;
  animation: heroBob 2.2s var(--ease) infinite;
}
.hero-scroll svg { width: 22px; height: 22px; display: block; }
@keyframes heroBob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 9px); }
}

/* legacy button styles (kept for reuse) */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  padding: 13px 24px; border-radius: 999px; cursor: pointer;
  transition: all .3s var(--ease); border: 1px solid transparent;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn-primary { background: var(--accent); color: #1a1206; box-shadow: 0 8px 26px -10px var(--accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -10px var(--accent); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost { background: var(--glass-bg-2); color: var(--text); border-color: var(--glass-brd); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: 70px 0; }
.sec-head { margin-bottom: 38px; max-width: 720px; }
.sec-label { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); letter-spacing: .1em; text-transform: uppercase; }
.sec-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(30px, 4vw, 48px); margin-top: 10px; line-height: 1.02;
}
.sec-note { color: var(--text-dim); margin-top: 12px; font-size: 16px; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: center; }
.about-card { padding: 34px 34px 30px; }
.about-body { font-size: clamp(16px, 1.5vw, 18px); color: var(--text); line-height: 1.7; max-width: 56ch; }
.qualities-title { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .08em; margin: 28px 0 14px; }
.qualities { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.quality { display: flex; align-items: center; gap: 11px; font-size: 15.5px; font-weight: 500; }
.quality svg { width: 17px; height: 17px; color: var(--accent); flex: none; }

/* about video */
.about-media { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 720px; border: 1px solid var(--glass-brd); }
.about-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: var(--hero-filter); }
.about-media .media-grain { position:absolute; inset:0; background: linear-gradient(to top, rgba(20,16,11,.28), transparent 42%); pointer-events:none; }

/* SKILLS */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.skill {
  display: flex; align-items: center; gap: 11px;
  padding: 18px 20px; font-weight: 600; font-size: 16px;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.skill:hover { transform: translateY(-3px); border-color: var(--accent); }
.skill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: none; }

/* EXPERIENCE */
.exp-list { display: flex; flex-direction: column; gap: 18px; }
.job { padding: 28px 30px; }
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.job-org { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2.2vw, 26px); }
.job-role { color: var(--accent-soft); font-weight: 600; font-size: 15.5px; margin-top: 3px; }
.job-period { font-size: 12.5px; color: var(--text-mute); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.job-tag { display: inline-block; font-size: 11.5px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 5px 12px; border-radius: 999px; margin: 16px 0 4px; }
.job-points { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.job-points li { position: relative; padding-left: 22px; color: var(--text-dim); font-size: 15.5px; }
.job-points li::before { content:""; position: absolute; left: 2px; top: 11px; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--accent); }

/* EDUCATION */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.edu { padding: 28px 30px; }
.edu-period { font-size: 12.5px; color: var(--accent); }
.edu-org { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin: 12px 0 6px; line-height: 1.2; }
.edu-field { color: var(--text-dim); font-size: 15px; }

/* CONTACT */
.contact-card { padding: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 38px; align-items: center; }
.contact-intro .sec-title { font-size: clamp(28px, 3.5vw, 42px); }
.contact-body { color: var(--text-dim); margin-top: 14px; font-size: 16.5px; max-width: 36ch; }
.contact-list { display: flex; flex-direction: column; gap: 10px; }
.contact-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; text-decoration: none; color: var(--text); transition: transform .25s var(--ease), border-color .25s var(--ease); }
.contact-item:hover { transform: translateX(4px); border-color: var(--accent); }
.contact-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); flex: none; }
.contact-icon svg { width: 18px; height: 18px; }
.contact-text { display: flex; flex-direction: column; line-height: 1.3; }
.contact-label { font-size: 11px; color: var(--text-mute); text-transform: uppercase; }
.contact-value { font-weight: 600; font-size: 15px; }

/* FOOTER */
.site-footer { padding: 50px 0 60px; border-top: 1px solid var(--line); margin-top: 30px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-copy { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-mute); max-width: 50ch; }
.social-row { display: flex; gap: 10px; }
.social-btn {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--glass-bg-2); border: 1px solid var(--glass-brd); color: var(--text-dim);
  transition: all .28s var(--ease); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.social-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.social-btn svg { width: 19px; height: 19px; }

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-card { order: 2; }
  .about-media { order: 1; min-height: 460px; }
  .contact-card { grid-template-columns: 1fr; gap: 26px; padding: 32px; }
  .nav-links { display: none; }
  .nav-social { display: none; }
}
@media (max-width: 620px) {
  .edu-grid { grid-template-columns: 1fr; }
  .wrap { width: min(100% - 32px, var(--maxw)); }
  .hero { padding-top: 110px; }
  section { padding: 52px 0; }
  .about-card, .job, .edu { padding: 24px 22px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .brand .brand-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
