/* =========================================================
   Chhang Mengchhay — Portfolio
   "Phnom Penh dusk, app-maker's craft"
   ========================================================= */

:root {
  --bg: #06080d;
  --bg-2: #0c1017;
  --surface: #111622;
  --surface-2: #182030;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(59, 130, 246, 0.2);

  --ink: #f8fafc;
  --muted: #94a3b8;
  --faint: #64748b;

  --blue: #3b82f6;
  --blue-dark: #1d4ed8;
  --cyan: #38bdf8;

  --primary: var(--blue);
  --accent: linear-gradient(115deg, #2563eb, #38bdf8);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.85);

  --maxw: 1120px;
  --gutter: clamp(20px, 6vw, 90px);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient grain / vignette layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(37, 99, 235, 0.08), transparent 60%),
    radial-gradient(90% 60% at 100% 110%, rgba(56, 189, 248, 0.06), transparent 60%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--blue);
  color: #ffffff;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(72px, 12vw, 150px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--blue);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-top: 18px;
}

.section-lead {
  color: var(--muted);
  max-width: 56ch;
  margin-top: 16px;
  font-size: 1.05rem;
}

/* =========================================================
   Navbar
   ========================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease,
    border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 8, 13, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-block: 12px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand .dot {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.7);
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  position: relative;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* unique "Founder" nav pill */
.nav-links a.nav-founder {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: #1a1206;
  background: var(--accent);
  box-shadow: 0 8px 22px -10px rgba(242, 105, 76, 0.7);
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-links a.nav-founder::after { display: none; } /* kill the underline used by other links */
.nav-links a.nav-founder:hover {
  color: #1a1206;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(242, 105, 76, 0.85);
}
.nav-founder i { font-size: 1rem; }
.nav-founder .bxs-crown { color: #7a4a05; }
.nav-founder-go {
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.nav-founder:hover .nav-founder-go { transform: rotate(45deg) translateY(-1px); }
/* sheen sweep */
.nav-founder::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.nav-founder:hover::before { left: 140%; }

.nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav-cta:hover {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.12);
}

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  color: var(--ink);
  font-size: 1.4rem;
  cursor: pointer;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(30px, 5vw, 70px);
  padding-block: 130px 70px;
  overflow: hidden;
}

/* Drifting aurora glow */
.aurora {
  position: absolute;
  inset: -20% -10% auto auto;
  z-index: 0;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    rgba(37, 99, 235, 0.32),
    rgba(56, 189, 248, 0.16) 45%,
    transparent 72%
  );
  filter: blur(10px);
  animation: drift 18s ease-in-out infinite alternate;
}
.aurora.two {
  inset: auto auto -25% -15%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(
    closest-side,
    rgba(14, 165, 233, 0.22),
    transparent 70%
  );
  animation-duration: 22s;
  animation-direction: alternate-reverse;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-6%, 8%, 0) scale(1.12); }
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-hi {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
  overflow: hidden;
}
.hero-hi .wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: wave 2.6s ease-in-out 2;
}
@keyframes wave {
  0%,60%,100% { transform: rotate(0); }
  10%,30% { transform: rotate(16deg); }
  20% { transform: rotate(-10deg); }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 9.5vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin: 14px 0 6px;
}
.hero h1 .ln {
  display: block;
  overflow: hidden;
}
.hero h1 .ln > span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero h1 .ln.two > span {
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation-delay: 0.12s;
}
@keyframes rise {
  to { transform: translateY(0); }
}

.hero-role {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  font-weight: 500;
  color: var(--ink);
  margin-top: 18px;
  min-height: 1.6em;
}
.hero-role .type {
  color: var(--blue);
  font-weight: 700;
}
.hero-role .caret {
  display: inline-block;
  width: 3px;
  height: 1.05em;
  translate: 0 3px;
  background: var(--cyan);
  margin-left: 3px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-bio {
  color: var(--muted);
  max-width: 52ch;
  margin-top: 22px;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
}

.btn {
  --pad: 14px 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: var(--pad);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease,
    border-color 0.25s ease, color 0.25s ease;
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 30px -10px rgba(37, 99, 235, 0.6);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -12px rgba(37, 99, 235, 0.75);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-3px);
}
.btn i {
  font-size: 1.2rem;
}

.socials {
  display: flex;
  gap: 10px;
  margin-left: 4px;
}
.socials a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 1.3rem;
  transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    background 0.25s ease;
}
.socials a:hover {
  color: var(--blue);
  border-color: var(--blue);
  transform: translateY(-3px);
  background: rgba(59, 130, 246, 0.1);
}

/* =========================================================
   Hero Profile Image (Dramatic Cutout Style)
   ========================================================= */
.hero-media {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: min(400px, 82vw);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.portrait-stage {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.portrait-spotlight {
  position: absolute;
  inset: auto auto 10% 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(37, 99, 235, 0.28),
    rgba(56, 189, 248, 0.10) 45%,
    transparent 70%
  );
  filter: blur(55px);
  pointer-events: none;
  z-index: 1;
}

.portrait-cutout {
  position: relative;
  z-index: 2;
  width: 100%;
  max-height: clamp(480px, 72vh, 680px);
  object-fit: contain;
  object-position: bottom center;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.85));
}

/* floating status chip */
.chip {
  position: absolute;
  z-index: 4;
  background: rgba(12, 16, 23, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: var(--shadow-lg);
  animation: float 5s ease-in-out infinite;
  white-space: nowrap;
}
.chip.avail { top: 8%; left: -2%; }
.chip.stack { bottom: 14%; right: -2%; animation-delay: -2.5s; }
.chip .pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2s infinite;
}
.chip .emoji { font-size: 1.05rem; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: var(--gutter);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.scroll-cue .line {
  width: 46px;
  height: 1px;
  background: var(--faint);
  position: relative;
  overflow: hidden;
}
.scroll-cue .line::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--blue);
  animation: slide 2.2s ease-in-out infinite;
}
@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

/* =========================================================
   Marquee ribbon
   ========================================================= */
.ribbon {
  position: relative;
  z-index: 1;
  border-block: 1px solid var(--line);
  background: linear-gradient(var(--bg-2), var(--bg-2));
  padding-block: 20px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ribbon-track {
  display: flex;
  width: max-content;
  gap: 44px;
  animation: marquee 32s linear infinite;
}
.ribbon:hover .ribbon-track { animation-play-state: paused; }
.ribbon-track span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 44px;
}
.ribbon-track span::after {
  content: "✦";
  color: var(--blue);
  font-size: 0.8rem;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: start;
  margin-top: 46px;
}
.about-body p {
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 18px;
  max-width: 60ch;
}
.about-body p strong {
  color: var(--ink);
  font-weight: 600;
}

.facts {
  display: grid;
  gap: 14px;
}
.fact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.fact:hover {
  border-color: var(--line-strong);
  transform: translateX(4px);
}
.fact .ic {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue);
}
.fact .k {
  font-size: 0.8rem;
  color: var(--faint);
}
.fact .v {
  font-weight: 600;
  font-size: 0.98rem;
}

/* =========================================================
   Experience
   ========================================================= */
.xp {
  margin-top: 50px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  overflow: hidden;
}
.xp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(22px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}
.xp-role {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.xp-co {
  color: var(--blue);
  font-weight: 600;
  margin-top: 4px;
}
.xp-when {
  text-align: right;
  color: var(--muted);
  font-size: 0.92rem;
}
.xp-when .badge {
  display: inline-block;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-weight: 600;
  color: var(--ink);
}
.xp-when small { display: block; margin-top: 6px; }

.xp-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
}
.xp-card {
  background: var(--bg-2);
  padding: 26px clamp(22px, 4vw, 40px);
}
.xp-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.xp-card h4 i {
  color: var(--cyan);
  font-size: 1.3rem;
}
.xp-card ul { list-style: none; }
.xp-card li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 10px;
}
.xp-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

/* =========================================================
   Work / Projects
   ========================================================= */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 34px;
  margin-top: 48px;
}
.work-card {
  --accent-1: var(--saffron);
  --accent-2: var(--coral);
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
  border-radius: 20px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.8),
    0 0 0 1px color-mix(in srgb, var(--accent-1) 22%, transparent);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease;
}
/* always-on gradient frame around each project */
.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  transition: opacity 0.35s ease;
  z-index: 4;
  pointer-events: none;
}
.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 55px -24px rgba(0, 0, 0, 0.78),
    0 0 26px -6px color-mix(in srgb, var(--accent-1) 45%, transparent);
}
.work-card:hover::before { opacity: 1; }

/* screenshot preview */
.work-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-1) 22%, var(--bg-2)),
    var(--bg-2));
  border-bottom: 1px solid var(--line);
}
.work-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--shot-pos, top center);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-card:hover .work-shot img { transform: scale(1.045); }

/* placeholder preview (no screenshot yet) */
.work-shot--ph {
  display: grid;
  place-items: center;
  gap: 12px;
  background:
    radial-gradient(120% 120% at 30% 10%,
      color-mix(in srgb, var(--accent-1) 38%, transparent), transparent 60%),
    linear-gradient(145deg,
      color-mix(in srgb, var(--accent-1) 20%, var(--bg-2)),
      var(--bg-2));
}
.work-ph-ic {
  font-size: 3.4rem;
  color: var(--accent-1);
  filter: drop-shadow(0 6px 18px color-mix(in srgb, var(--accent-1) 45%, transparent));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-card:hover .work-ph-ic { transform: scale(1.08) rotate(-6deg); }
.work-ph-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.9;
}

/* logo preview (centered brand mark on a clean backdrop) */
.work-shot--logo {
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 50% 20%, #ffffff, #eef2fb 70%);
}
.work-shot--logo img {
  width: auto;
  height: 72%;
  max-width: 68%;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(37, 99, 235, 0.22));
}
.work-card:hover .work-shot--logo img { transform: scale(1.06); }
/* soften the dark bottom overlay on the light logo backdrop */
.work-shot--logo::after {
  background: linear-gradient(to top, rgba(37, 99, 235, 0.08), transparent 55%);
}
.work-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(21, 18, 40, 0.55), transparent 55%);
  pointer-events: none;
}
.work-live {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: rgba(13, 11, 26, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 11px 5px 9px;
}
.work-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2s infinite;
}

/* body */
.work-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}
.work-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.work-head h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}
.work-go {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 1.15rem;
  color: var(--muted);
  transform: rotate(45deg);
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease,
    transform 0.3s ease;
}
.work-card:hover .work-go {
  color: #1a1206;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border-color: transparent;
  transform: rotate(45deg) translateY(-2px);
}
.work-body p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 16px;
}
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.work-tags span {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.work-demo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.77rem;
  color: var(--saffron);
  background: rgba(245, 179, 60, 0.08);
  border: 1px solid rgba(245, 179, 60, 0.2);
  border-radius: 10px;
  padding: 7px 11px;
  margin-bottom: 14px;
}
.work-demo i { font-size: 0.95rem; }
.work-url {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--accent-1) 9%, transparent);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  color: var(--accent-1);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.work-url i { font-size: 1.15rem; }
.work-url::after {
  content: "\2192";
  margin-left: auto;
  font-weight: 700;
  transition: transform 0.3s ease;
}
.work-card:hover .work-url {
  background: color-mix(in srgb, var(--accent-1) 16%, transparent);
  border-color: color-mix(in srgb, var(--accent-1) 55%, transparent);
}
.work-card:hover .work-url::after { transform: translateX(4px); }

/* =========================================================
   Skills
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 48px;
}
.skill {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.skill::after {
  content: "";
  position: absolute;
  inset: auto -40% -60% auto;
  width: 140px;
  height: 140px;
  background: radial-gradient(closest-side, rgba(59, 130, 246, 0.18), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.skill:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}
.skill:hover::after { opacity: 1; }
.skill .top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.skill .top i {
  font-size: 1.5rem;
  color: var(--blue);
}
.skill .top b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.skill p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.meter {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  width: 0;
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.certs {
  margin-top: 40px;
}
.certs .lbl {
  display: block;
  color: var(--faint);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.cert-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.cert-group {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: var(--surface);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.cert-group:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}
.cert-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.cert-group-head i {
  font-size: 1.4rem;
  color: var(--blue);
}
.cert-group-head b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.cert-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cert-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  transition: background 0.25s ease, color 0.25s ease;
}
.cert-list a:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--ink);
}
.cert-list a span { font-weight: 600; }
.cert-list a small {
  color: var(--faint);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* =========================================================
   Education + Languages
   ========================================================= */
.edu-lang {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(30px, 5vw, 60px);
  margin-top: 48px;
  align-items: start;
}
.timeline { position: relative; }
.tl-item {
  position: relative;
  padding-left: 34px;
  padding-bottom: 34px;
  border-left: 1px solid var(--line-strong);
}
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 2px;
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--bg);
}
.tl-year {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--blue);
  font-size: 0.95rem;
}
.tl-item h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 4px 0 3px;
}
.tl-item p { color: var(--muted); font-size: 0.95rem; }

.lang-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  background: var(--surface);
}
.lang-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.lang { margin-bottom: 22px; }
.lang:last-child { margin-bottom: 0; }
.lang .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.lang .row b { font-weight: 600; }
.lang .row span { color: var(--muted); font-size: 0.85rem; }
.dots { display: flex; gap: 7px; }
.dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}
.dots i.on { background: var(--accent); border-color: transparent; }

/* =========================================================
   Contact / footer
   ========================================================= */
.contact {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-block: clamp(80px, 14vw, 170px);
  overflow: hidden;
}
.contact .glow {
  position: absolute;
  inset: auto 0 -40% 0;
  height: 70%;
  z-index: -1;
  background: radial-gradient(60% 100% at 50% 100%, rgba(37, 99, 235, 0.25), transparent 70%);
  pointer-events: none;
}
.contact h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.contact h2 a {
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.25s ease;
}
.contact h2 a:hover { opacity: 0.8; }
.contact p {
  color: var(--muted);
  max-width: 46ch;
  margin: 20px auto 34px;
  font-size: 1.08rem;
}
.contact .socials { justify-content: center; }

.foot {
  border-top: 1px solid var(--line);
  padding: 26px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  color: var(--faint);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}
.foot a:hover { color: var(--blue); }

/* =========================================================
   Scroll reveal (JS-gated)
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* progress bar */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
}

/* =========================================================
   Responsive
   ========================================================= */
/* Tablet & down → collapse nav into a hamburger */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .menu-btn {
    display: grid;
    place-items: center;
    position: relative;
    z-index: 200; /* stay above the fullscreen overlay so the close (X) is tappable */
  }

  /* fullscreen mobile menu */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 13, 0.98);
    backdrop-filter: blur(16px);
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 150;
  }
  .nav-links.open a {
    font-size: 1.6rem;
    padding: 12px 20px;
    color: var(--ink);
  }
  .nav-links.open a::after { display: none; }
  /* keep the Founder pill as a pill (not giant text) in the mobile menu */
  .nav-links.open a.nav-founder {
    font-size: 1.05rem;
    padding: 11px 20px;
    margin-top: 10px;
    color: #1a1206;
  }
}

/* Stack the hero and center everything — Tablet */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-block: 100px 60px;
    gap: 32px;
  }
  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-bio { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-media {
    grid-row: 1;
    justify-self: center;
    width: min(300px, 72vw);
  }
  .portrait-cutout {
    max-height: clamp(380px, 55vh, 540px);
  }
  .portrait-spotlight {
    width: 260px;
    height: 380px;
  }
  .chip { font-size: 0.80rem; padding: 8px 12px; }
  .chip.avail { top: 6%; left: 0%; }
  .chip.stack { bottom: 12%; right: 0%; }
  .about-grid,
  .edu-lang { grid-template-columns: 1fr; }
  .xp-groups { grid-template-columns: 1fr; }
  .scroll-cue { display: none; }
}

/* Phones — 680px and below */
@media (max-width: 680px) {
  .hero {
    padding-top: 88px;
    padding-bottom: 48px;
    gap: 24px;
  }
  .hero-media {
    width: min(260px, 74vw);
  }
  .portrait-cutout {
    max-height: clamp(340px, 52vw, 440px);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
            mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  }
  .portrait-spotlight {
    width: 200px;
    height: 300px;
    filter: blur(40px);
  }

  /* Reposition chips so they flank the portrait, not cover the face */
  .chip { font-size: 0.75rem; padding: 7px 10px; gap: 7px; }
  .chip.avail { top: auto; bottom: 55%; left: -10px; }
  .chip.stack { bottom: 10%; right: -10px; }

  .hero-actions {
    gap: 10px;
    width: 100%;
  }
  .btn { flex: 1 1 auto; justify-content: center; }
  .socials {
    margin-left: 0;
    justify-content: center;
    width: 100%;
  }
}

/* Small phones — 400px and below */
@media (max-width: 400px) {
  .hero-media {
    width: min(200px, 66vw);
  }
  .portrait-cutout {
    max-height: clamp(260px, 55vw, 340px);
  }
  .chip { font-size: 0.70rem; padding: 6px 9px; gap: 6px; }
  .chip .pulse { width: 7px; height: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
