/* ==========================================================
   Daniel Park — parallax portfolio
   ========================================================== */
:root {
  --bg: #050507;
  --bg-2: #0c0c11;
  --card: #111118;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f4f6;
  --muted: #8b8b97;
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --accent-3: #ff4fa3;
  --grad: linear-gradient(100deg, #a58bff 0%, #5fd8ff 55%, #ff7ac0 100%);
  --pad: clamp(20px, 5vw, 80px);
  --radius: 28px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.04em; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.22em; color: var(--muted); margin-bottom: 22px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.soft { background: linear-gradient(180deg, #ffffff 10%, rgba(255,255,255,.22) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-title { font-size: clamp(40px, 6.4vw, 92px); line-height: 0.98; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 28px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px; border-radius: 999px;
  font-weight: 600; font-size: 15px; cursor: pointer; border: 0;
  transition: transform .4s var(--ease), background .3s, color .3s, box-shadow .3s;
}
.btn i { font-size: 12px; transition: transform .4s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover i { transform: translateX(4px); }
.btn-primary { background: var(--text); color: #000; }
.btn-primary:hover { box-shadow: 0 10px 40px -10px rgba(124, 92, 255, .8); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.03); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: rgba(255,255,255,.3); }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: #000;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 28px var(--pad);
}
.loader-top, .loader-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 11px; color: var(--muted); }
.loader-count { font-size: clamp(90px, 22vw, 320px); font-weight: 800; letter-spacing: -0.06em; line-height: 1; align-self: flex-end; }
.loader-count small { font-size: 0.3em; color: var(--muted); margin-left: 8px; }
.loader-bar { flex: 1; max-width: 340px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.loader-bar i { position: absolute; inset: 0; background: var(--grad); transform-origin: left; transform: scaleX(0); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  width: min(1100px, calc(100% - 32px)); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px 10px 24px; border-radius: 999px;
  background: rgba(15, 15, 20, .55); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  transition: transform .5s var(--ease);
}
.nav.hide { transform: translate(-50%, -140%); }
.nav-logo { font-weight: 900; font-size: 20px; letter-spacing: -0.03em; }
.nav-logo span { color: var(--accent-2); }
.nav-links { display: flex; gap: 34px; font-size: 14px; color: var(--muted); }
.nav-links a { transition: color .3s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { font-size: 14px; font-weight: 600; background: var(--text); color: #000; padding: 10px 18px; border-radius: 999px; display: inline-flex; gap: 8px; align-items: center; }
.nav-cta i { font-size: 11px; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); transition: transform .4s var(--ease), top .4s var(--ease); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.menu-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.menu-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }
.menu-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(5,5,7,.96); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 0 var(--pad);
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
.menu-overlay > a { font-size: clamp(44px, 12vw, 80px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.menu-social { display: flex; gap: 24px; margin-top: 30px; color: var(--muted); }
.menu-open .menu-overlay { opacity: 1; pointer-events: auto; }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 110; }
.progress i { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 120px var(--pad) 80px; }
/* the glow layer fades out toward the bottom (and softly at the sides) so it melts into the page instead of ending in a hard edge */
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, rgba(0,0,0,.55) 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 45%, rgba(0,0,0,.55) 70%, transparent 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; will-change: transform; }
.orb-1 { width: 46vw; height: 46vw; background: radial-gradient(circle, #6a4dff, transparent 65%); top: -10%; left: -10%; }
.orb-2 { width: 38vw; height: 38vw; background: radial-gradient(circle, #00b7ff, transparent 65%); bottom: 8%; right: -8%; }
.orb-3 { width: 24vw; height: 24vw; background: radial-gradient(circle, #ff3d9a, transparent 65%); top: 40%; left: 55%; opacity: .4; }
.grid-lines {
  position: absolute; inset: -20% 0; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}
/* cursor-reactive layers: JS sets --mx/--my (-1..1); translate is separate from the scroll transform */
.hero-bg { --mx: 0; --my: 0; }
.m-layer { position: absolute; inset: 0; will-change: transform; transform: translate3d(calc(var(--mx) * var(--depth, 1) * 40px), calc(var(--my) * var(--depth, 1) * 40px), 0); }
.hero-spot {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s;
  background: radial-gradient(600px circle at var(--sx, 50%) var(--sy, 50%), rgba(130, 110, 255, .16), transparent 60%);
}
.hero:hover .hero-spot { opacity: 1; }
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px;
  border-radius: 50%; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .5s;
  background: radial-gradient(circle, rgba(124, 92, 255, .13), rgba(0, 212, 255, .05) 40%, transparent 70%);
}
.cursor-glow.on { opacity: 1; }
main, .footer { position: relative; z-index: 1; }
@media (hover: none), (pointer: coarse) { .cursor-glow, .hero-spot { display: none; } }
.hero-inner { position: relative; text-align: center; max-width: 1200px; will-change: transform, opacity; }
.hero-title { font-size: clamp(76px, 18vw, 280px); font-weight: 900; line-height: 0.86; letter-spacing: -0.065em; margin-bottom: 36px; }
.hero-title .line { display: block; overflow: hidden; padding: 0 0.04em; }
.hero-title .split { display: inline-block; }
.hero-title .char { display: inline-block; will-change: transform; }
/* tight negative tracking would clip the last glyph of gradient-clipped text */
.hero-title .split.grad, .statement-text span { padding-right: .07em; margin-right: -.07em; }
.hero-sub { max-width: 560px; margin: 0 auto 40px; color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
@media (max-height: 760px) { .hero .scroll-cue { display: none; } }
.scroll-cue { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 12px; letter-spacing: .2em; }
.scroll-cue i { width: 1px; height: 44px; background: linear-gradient(var(--text), transparent); animation: cue 2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- manifesto ---------- */
.manifesto { padding: 22vh var(--pad); max-width: 1400px; margin: 0 auto; }
.manifesto-text { font-size: clamp(30px, 4.6vw, 70px); line-height: 1.12; font-weight: 700; letter-spacing: -0.035em; }
.manifesto-text .word { display: inline-block; opacity: .14; margin-right: .22em; }

/* ---------- ticker ---------- */
.ticker { border-block: 1px solid var(--line); padding: 26px 0; overflow: hidden; background: var(--bg-2); }
.ticker-track { display: flex; gap: 40px; width: max-content; animation: ticker 40s linear infinite; font-size: clamp(22px, 3vw, 40px); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.ticker-track b { color: var(--accent); font-weight: 400; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- profile ---------- */
.profile { display: grid; grid-template-columns: minmax(240px, 380px) minmax(0, 620px); justify-content: center; gap: clamp(40px, 7vw, 110px); align-items: center; padding: 20vh var(--pad); max-width: 1400px; margin: 0 auto; }
.profile-media { position: relative; width: 100%; }
.profile-frame { border-radius: var(--radius); overflow: hidden; background: radial-gradient(circle at 50% 35%, #2b2350, #0d0d14 72%); border: 1px solid var(--line); aspect-ratio: 1 / 1; display: flex; align-items: flex-end; will-change: transform; }
.profile-frame img { width: 100%; height: auto; transform-origin: 50% 100%; }
.profile-tag { position: absolute; right: -20px; bottom: 28px; padding: 16px 20px; background: rgba(15,15,20,.75); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 16px; font-size: 12px; line-height: 1.6; }
.profile-copy p { color: var(--muted); margin-bottom: 18px; max-width: 560px; }
.facts { margin: 32px 0 36px; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; flex-wrap: wrap; }
.facts li span { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.facts a:hover { color: var(--accent-2); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); overflow: hidden; }
.stat { padding: 60px var(--pad); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-num { font-size: clamp(52px, 7vw, 110px); font-weight: 800; letter-spacing: -0.05em; line-height: 1; margin-bottom: 12px; }
.stat p { color: var(--muted); font-size: 14px; }

/* ---------- skills ---------- */
.skills-pin { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; align-items: center; padding: 15vh var(--pad); max-width: 1400px; margin: 0 auto; }
.skill { padding: 22px 0; border-bottom: 1px solid var(--line); }
.skill-row { display: flex; justify-content: space-between; font-size: clamp(22px, 2.4vw, 34px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.skill-row .mono { font-size: 15px; color: var(--muted); font-weight: 400; align-self: flex-end; }
.skill-row em { font-style: normal; }
.skill-bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.skill-bar i { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }

/* ---------- experience ---------- */
.experience { padding: 15vh var(--pad) 10vh; max-width: 1200px; margin: 0 auto; }
.section-head { margin-bottom: 8vh; }
.stack { display: flex; flex-direction: column; gap: 6vh; }
.card {
  position: sticky; top: 110px;
  background: linear-gradient(160deg, #15151e, #0c0c12);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(28px, 4vw, 56px);
  box-shadow: 0 -20px 60px -20px rgba(0,0,0,.8);
  transform-origin: center top; will-change: transform;
}
.card:nth-child(2) { top: 130px; }
.card:nth-child(3) { top: 150px; }
.card:nth-child(4) { top: 170px; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; font-size: 13px; color: var(--muted); }
.chip { font-size: 12px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); background: rgba(124,92,255,.12); }
.card h3 { font-size: clamp(28px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; }
.company { font-size: 18px; margin: 8px 0 26px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.card ul, .also-item ul { display: grid; gap: 12px; }
.card li, .also-item li { position: relative; padding-left: 22px; color: var(--muted); font-size: 15.5px; }
.card li::before, .also-item li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 1px; background: var(--accent-2); }

.also { margin-top: 14vh; }
.also-item { border-top: 1px solid var(--line); }
.also-item:last-child { border-bottom: 1px solid var(--line); }
.also-item summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 1fr auto; gap: 20px; align-items: center; padding: 26px 0; font-size: clamp(18px, 2vw, 26px); font-weight: 700; letter-spacing: -0.02em; }
.also-item summary::-webkit-details-marker { display: none; }
.also-item summary .muted { font-size: 15px; font-weight: 400; letter-spacing: 0; }
.also-item summary i { font-size: 14px; transition: transform .4s var(--ease); }
.also-item[open] summary i { transform: rotate(45deg); }
.also-item ul { padding-bottom: 28px; max-width: 900px; }

/* ---------- statement ---------- */
.statement { min-height: 120vh; display: flex; align-items: center; justify-content: center; padding: 0 var(--pad); overflow: hidden; }
.statement-text { font-size: clamp(54px, 11vw, 190px); font-weight: 900; letter-spacing: -0.06em; line-height: 0.92; text-align: center; }
.statement-text span { display: inline-block; }

/* ---------- projects ---------- */
.projects { position: relative; }
.projects-intro { padding: 15vh var(--pad) 2vh; max-width: 1400px; margin: 0 auto; }
.lang-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.lang-nav a { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); transition: color .3s, border-color .3s, background .3s; }
.lang-nav a:hover { color: var(--text); border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.04); }
.lang-nav sup { color: var(--accent-2); font-size: 10px; margin-left: 2px; }
.group-label { display: flex; align-items: baseline; gap: 14px; }
.group-label .mono { font-size: 13px; color: var(--muted); }
.group-label h3 { font-size: clamp(34px, 4.4vw, 64px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }

/* one shared layout for every language section */
.pgroup { padding: 12vh var(--pad) 4vh; max-width: 1400px; margin: 0 auto; }
.pgroup .group-label { margin-bottom: 40px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.group-count { margin-left: auto; }
.pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.pair.cols-3 { grid-template-columns: repeat(3, 1fr); }
.pair.cols-1 { grid-template-columns: minmax(0, 720px); justify-content: center; }
.pair .project { width: auto; }

/* more on GitHub */
.more-row { display: flex; align-items: center; gap: 18px; width: calc(100% - 2 * var(--pad)); max-width: 1240px; margin: 14vh auto 0; padding: 34px 0; border-block: 1px solid var(--line); font-size: clamp(24px, 3vw, 40px); font-weight: 700; letter-spacing: -0.02em; transition: color .3s; }
.more-row .mono { margin-left: auto; font-size: 13px; font-weight: 400; letter-spacing: .04em; }
.more-row:hover { color: var(--accent-2); }
.project { flex: 0 0 auto; width: clamp(300px, 34vw, 520px); display: flex; flex-direction: column; gap: 20px; }
.project-img { aspect-ratio: 4/3; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
/* transform is driven by scroll, so no CSS transition on it (that would make it lag and stutter) */
.project { will-change: transform; backface-visibility: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: filter .6s; filter: saturate(.85); will-change: transform; }
.project:hover .project-img img { filter: saturate(1.15); }
.project-img { box-shadow: 0 30px 80px -30px rgba(0,0,0,.9); }
.project-info { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: center; }
.project-info .mono { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.project-info h3 { font-size: clamp(19px, 1.8vw, 26px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.project-info i { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; transition: background .3s, color .3s, transform .4s var(--ease); }
.project:hover .project-info i { background: var(--text); color: #000; transform: rotate(-45deg); }
.project-more { justify-content: center; align-items: center; aspect-ratio: 4/3; height: auto; align-self: flex-start; border: 1px dashed rgba(255,255,255,.2); border-radius: 22px; text-align: center; transition: border-color .3s, background .3s; }
.project-more:hover { border-color: var(--accent); background: rgba(124,92,255,.06); }
.project-more i { font-size: 48px; margin-bottom: 16px; }
.project-more h3 { font-size: 26px; letter-spacing: -0.02em; margin-bottom: 8px; }
.project-more .mono { font-size: 12px; color: var(--muted); }

/* ---------- cta ---------- */
.cta { padding: 10vh var(--pad); }
.cta-inner {
  max-width: 1300px; margin: 0 auto; text-align: center; border-radius: 40px;
  padding: clamp(60px, 12vh, 140px) var(--pad);
  background: radial-gradient(ellipse at 50% 120%, rgba(124,92,255,.45), transparent 60%), var(--bg-2);
  border: 1px solid var(--line); will-change: transform;
}
.cta-title { font-size: clamp(54px, 10vw, 160px); line-height: .92; font-weight: 900; letter-spacing: -0.06em; margin-bottom: 28px; }
.cta-inner .muted { max-width: 480px; margin: 0 auto 40px; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); padding: 15vh var(--pad); max-width: 1400px; margin: 0 auto; }
.contact-email { display: inline-block; font-size: clamp(20px, 2.4vw, 32px); font-weight: 700; letter-spacing: -0.02em; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-top: 6px; word-break: break-all; transition: border-color .3s; }
.contact-email:hover { border-color: var(--accent-2); }
.socials { display: flex; gap: 12px; margin-top: 36px; }
.socials a { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background .3s, color .3s; }
.socials a:hover { background: var(--text); color: #000; }
.contact-form { display: grid; gap: 22px; align-content: start; }
.contact-form label { display: grid; gap: 10px; }
.contact-form label span { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.contact-form input, .contact-form textarea {
  width: 100%; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; color: var(--text); font: inherit; font-size: 16px; resize: vertical; transition: border-color .3s, background .3s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); background: rgba(124,92,255,.06); }
.contact-form .btn { justify-self: start; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 8vh var(--pad) 32px; overflow: hidden; }
.footer-big { font-size: clamp(44px, 13.5vw, 240px); font-weight: 900; letter-spacing: -0.07em; line-height: .85; text-align: center; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.05)); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.footer-row { display: flex; justify-content: space-between; margin-top: 40px; font-size: 12px; color: var(--muted); }
.footer-row a:hover { color: var(--text); }

/* ---------- floating decorations (parallax via data-speed) ---------- */
/* Decorations may spill past their centered column; clip only at the screen edge
   (clip, unlike hidden, doesn't create a scroll container, so sticky cards keep working). */
/* (on <main>, not <html>: clip on the root element turns into hidden and breaks sticky cards) */
main { overflow-x: clip; }
.manifesto, .profile, .statement, .contact { position: relative; }
.deco { position: absolute; pointer-events: none; z-index: -1; will-change: transform; }
.ring { width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 0 40px rgba(124,92,255,.12); }
.ring-lg { width: 320px; height: 320px; }
.blob { width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(124,92,255,.22), transparent 65%); }
.blob-cyan { background: radial-gradient(circle, rgba(0,212,255,.18), transparent 65%); }

/* ---------- masked title words ---------- */
/* Extra bottom room (cancelled by negative margin, so line spacing is unchanged) keeps
   descenders like g/q/p/j inside both the mask and the gradient's paint box. */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .08em .26em 0; margin: 0 -.08em -.26em 0; }
.wi { display: inline-block; will-change: transform; padding: 0 .08em .26em 0; margin: 0 -.08em -.26em 0; }

/* ---------- card shade (cheap dimming) ---------- */
.card { overflow: hidden; }
.card-shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; border-radius: inherit; }

/* ---------- touch devices: ambient drift instead of cursor tracking, lighter effects ---------- */
@media (hover: none), (pointer: coarse) {
  .m-layer { animation: drift 14s ease-in-out infinite; }
  .m-layer:nth-child(2) { animation-duration: 11s; animation-delay: -3s; }
  .m-layer:nth-child(3) { animation-duration: 16s; animation-delay: -7s; }
  .m-layer:nth-child(4) { animation-duration: 9s; animation-delay: -2s; }
  .orb { filter: none; opacity: .5; }
  .nav { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(calc(var(--depth, 1) * 22px), calc(var(--depth, 1) * -28px), 0) scale(1.06); }
  66% { transform: translate3d(calc(var(--depth, 1) * -18px), calc(var(--depth, 1) * 16px), 0) scale(.96); }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .profile, .skills-pin, .contact { grid-template-columns: 1fr; }
  .profile-media { max-width: 300px; margin: 0 auto; }
  .profile-tag { right: 12px; bottom: -18px; padding: 10px 14px; font-size: 11px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .skills-pin { min-height: 0; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .stat { padding: 40px 20px; }
  .card { padding: 24px 20px 28px; border-radius: 22px; }
  .card-meta { margin-bottom: 18px; }
  .company { margin-bottom: 18px; }
  .card li, .also-item li { font-size: 14.5px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .profile { padding: 14vh var(--pad); }
  .manifesto { padding: 16vh var(--pad); }
  .experience { padding-top: 10vh; }
  .also-item summary { grid-template-columns: 1fr auto; }
  .also-item summary .muted { grid-column: 1; grid-row: 2; margin-top: -14px; }
  .also-item summary i { grid-row: 1 / span 2; grid-column: 2; }
  .project { gap: 14px; }
  .pair, .pair.cols-3, .pair.cols-1 { grid-template-columns: 1fr; gap: 48px; }
  .pgroup { padding-top: 10vh; }
  .more-row { flex-wrap: wrap; gap: 10px 14px; }
  .more-row .mono { margin-left: 0; width: 100%; }
  .ring { width: 120px; height: 120px; }
  .ring-lg { width: 200px; height: 200px; }
  .blob { width: 280px; height: 280px; }
  .statement { min-height: 70vh; }
  .cta-inner { border-radius: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track, .scroll-cue i { animation: none; }
  .manifesto-text .word { opacity: 1; }
}
