/* ==========================================================
   ikhushi.com · Khushi Chandra
   Design: chalkboard-green canvas, paper notes, polaroids
   ========================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/assets/fonts/sora-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/assets/fonts/sora-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/caveat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/caveat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --bg: #123528;
  --bg-glass: rgba(18, 53, 40, .72);
  --ink: #1f2a24;
  --ink-soft: #3a3a2e;
  --ink-note: #33301f;
  --muted: #8a8a72;
  --paper: #f6f2e4;
  --paper-note: #f6ecc9;
  --paper-snap: #fdfaf1;
  --accent: #e8683c;
  --accent-hover: #ff8657;
  --accent-soft: #f0a583;
  --gold: #c99a4e;
  --rope: #8a6a3e;
  --on-dark: #eef4ef;
  --on-dark-2: #cfe0d4;
  --on-dark-3: #a9c9b5;
  --on-dark-4: #8fa899;
  --line: rgba(255, 255, 255, .14);
  --glass: rgba(255, 255, 255, .07);
  --font: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Bradley Hand', cursive;
  --maxw: 1180px;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.skip-link:focus { top: 12px; color: #fff; }

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

.page { position: relative; min-height: 100vh; padding: 28px 5vw 0; overflow: hidden; overflow: clip; }
.grid-bg { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 42px 42px; }
.skyline { position: absolute; bottom: 0; left: 0; width: 100%; height: 260px; opacity: .06; pointer-events: none; }
.fog { position: absolute; bottom: 0; left: -120px; width: calc(100% + 120px); height: 120px; pointer-events: none;
  background: linear-gradient(to top, rgba(200,230,215,.06), transparent); animation: driftFog 26s linear infinite; }
.wrap { position: relative; padding-bottom: 80px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 14px; z-index: 100; display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 56px; }
.brand { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg-glass); border: 1px solid var(--line); color: #fff; font-weight: 800; font-size: 18px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.brand span { color: var(--accent); }
.brand:hover { color: #fff; border-color: var(--accent); }
.nav-pill { display: flex; gap: 4px; padding: 8px; border-radius: 999px; background: var(--bg-glass); border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.nav-pill a { color: #e9efe9; font-weight: 600; font-size: 14.5px; padding: 9px 16px; border-radius: 999px; white-space: nowrap; transition: background .25s, color .25s; }
.nav-pill a:hover, .nav-pill a.is-active { background: rgba(255,255,255,.12); color: #fff; }
.nav-pill .nav-cta { background: var(--accent); color: #fff; font-weight: 700; padding: 9px 20px; }
.nav-pill .nav-cta:hover { background: var(--accent-hover); }
.socials { display: flex; gap: 10px; }
.social { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #e9efe9; transition: background .2s, color .2s, transform .2s; }
.social:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14.5px; padding: 11px 24px; border-radius: 999px; transition: transform .2s, background .2s, color .2s, border-color .2s, translate .25s cubic-bezier(.2,.8,.2,1); }
.btn-lg { font-size: 15px; padding: 12px 30px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: scale(1.05); }
.btn-ghost { color: var(--on-dark); border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.04); }
.btn-ghost:hover { color: #fff; border-color: var(--accent); transform: scale(1.05); }

/* ---------- Section scaffolding ---------- */
.section, .about, .facts, .contact { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section { margin-bottom: 100px; }
.h2 { color: #fff; font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.h2-dark { color: var(--ink); font-size: 26px; }
.h2-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.h2-row .h2 { margin: 0; }
.trophy { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.rule { width: 52px; height: 3px; background: var(--accent); margin-bottom: 30px; }
.rule-lg { margin-bottom: 44px; }
.tape { position: absolute; top: -14px; left: 36px; width: 70px; height: 22px; background: rgba(232,104,60,.55); transform: rotate(-3deg); }
.tape-gold { top: -12px; left: 44px; width: 90px; background: rgba(201,154,78,.55); transform: rotate(2deg); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: rgba(232,104,60,.12); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; margin-bottom: 90px; }
.polaroid { width: 260px; background: #fff; padding: 16px 16px 44px; border-radius: 4px; box-shadow: 0 18px 40px rgba(0,0,0,.35);
  transform: perspective(700px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) rotate(-4deg); transition: transform .15s ease-out; will-change: transform; }
.polaroid-img { width: 100%; aspect-ratio: 1 / 1.05; overflow: hidden; border-radius: 2px; background: #e9e4d6; }
.polaroid-img img { width: 100%; height: 100%; object-fit: cover; }
.polaroid figcaption { text-align: center; font-family: var(--hand); font-weight: 500; font-size: 22px; color: #3a3a3a; margin-top: 10px; }
.about h1 { font-size: clamp(38px, 5vw, 52px); font-weight: 800; color: #fff; margin: 8px 0 6px; line-height: 1.1; letter-spacing: -.01em; }
.tagline { font-family: var(--hand); font-weight: 500; font-size: 20px; color: var(--accent-soft); margin-bottom: 26px; line-height: 1.35; }
.note { position: relative; background: var(--paper-note); border-radius: 4px; padding: 28px 30px; box-shadow: 0 16px 34px rgba(0,0,0,.3); transition: transform .3s, box-shadow .3s; }
.note:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(0,0,0,.4); }
.note p { font-size: 16px; line-height: 1.7; color: var(--ink-note); }
.note p + p { margin-top: 16px; }
.about-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- Skills ---------- */
.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.skill-group { background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 22px; transition: border-color .25s, background .25s; }
.skill-group:hover { border-color: rgba(232,104,60,.45); background: rgba(255,255,255,.07); }
.skill-name { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-3); margin-bottom: 14px; }
.skill-count { font-size: 11px; letter-spacing: 0; font-weight: 700; color: var(--accent-soft); background: rgba(232,104,60,.14); border-radius: 999px; padding: 2px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { flex: none; white-space: nowrap; padding: 7px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--on-dark); font-size: 13.5px; font-weight: 500; cursor: default;
  opacity: 0; transform: translateY(8px); transition: opacity .45s cubic-bezier(.2,.8,.2,1) var(--i), transform .45s cubic-bezier(.2,.8,.2,1) var(--i), background .2s, border-color .2s, color .2s; }
.is-revealed .chip { opacity: 1; transform: none; }
.chip:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Highlights (clothesline) ---------- */
.clothesline { position: relative; padding: 20px 10px 10px; }
.clothesline .line { position: absolute; top: 44px; left: 0; right: 0; height: 2px; background: var(--rope); opacity: .6; }
.cards { display: flex; gap: 26px; overflow-x: auto; padding: 14px 6px 24px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.cards::-webkit-scrollbar { height: 8px; }
.cards::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 8px; }
.snap { flex: 0 0 250px; scroll-snap-align: start; position: relative; background: var(--paper-snap); padding: 14px 14px 18px; border-radius: 2px; box-shadow: 0 14px 28px rgba(0,0,0,.3);
  transform: rotate(var(--rot)); transition: transform .3s, box-shadow .3s; }
.snap:hover { transform: translateY(-10px) rotate(0deg); box-shadow: 0 22px 40px rgba(0,0,0,.4); }
.clip { position: absolute; top: -12px; left: 50%; width: 26px; height: 14px; background: var(--gold); border-radius: 2px; transform-origin: top center; animation: clipSway 4.5s ease-in-out infinite; animation-delay: var(--d); }
.snap-img { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 12px; background: #e9e4d6; }
.snap-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.snap p { font-size: 13.5px; line-height: 1.55; color: var(--ink-note); }

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 22px; }
.project { all: unset; box-sizing: border-box; display: flex; flex-direction: column; cursor: pointer; background: var(--paper); border-radius: 8px; padding: 26px 26px 22px; box-shadow: 0 12px 26px rgba(0,0,0,.28); font-family: var(--font);
  opacity: 0; transform: translateY(16px); transition: opacity .5s var(--d), transform .35s, box-shadow .25s; }
.is-revealed .project { opacity: 1; transform: none; }
.is-revealed .project:hover, .project:focus-visible { transform: translateY(-8px) scale(1.02); box-shadow: 0 22px 40px rgba(0,0,0,.38); }
.project:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 4px; }
.project .tag { align-self: flex-start; }
.project-title { font-weight: 700; font-size: 18px; color: var(--ink); margin-bottom: 6px; line-height: 1.35; }
.project-date { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.project-blurb { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 14px; flex: 1; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.stack span { font-size: 11.5px; font-weight: 600; color: #4a5a50; background: rgba(18,53,40,.07); border: 1px solid rgba(18,53,40,.1); padding: 4px 9px; border-radius: 6px; }
.project-more { font-size: 13px; font-weight: 700; color: var(--accent); }
.project:hover .project-more { text-decoration: underline; }
.location { display: inline-flex; align-items: center; gap: 6px; color: var(--on-dark-3); font-size: 13.5px; margin: -8px 0 22px; }

/* ---------- Experience ---------- */
.paper { position: relative; background: var(--paper); border-radius: 6px; padding: 36px 40px; box-shadow: 0 16px 34px rgba(0,0,0,.3); }
.timeline-item { display: grid; grid-template-columns: 16px 1fr; gap: 14px; }
#experienceList .timeline-item { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid rgba(0,0,0,.08); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.dot-live { animation: pulseDot 2.2s ease-in-out infinite; }
.tl-title { font-weight: 700; font-size: 16px; color: var(--ink); }
.tl-sub { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.tl-list li { position: relative; padding-left: 14px; font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 4px; }
.tl-list li::before { content: '•'; position: absolute; left: 0; }
.edu-label { margin: 6px 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.edu-label + .timeline-item .tl-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 0; }
.tl-text { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); margin-top: 6px; }

.edu-item { margin-top: 18px; }
.edu-item .tl-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 0; }

/* ---------- "Now" badge ---------- */
.now { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--on-dark-2); font-size: 12.5px; font-weight: 500; }
.now-dot { width: 8px; height: 8px; border-radius: 50%; background: #5fd38d; box-shadow: 0 0 0 0 rgba(95,211,141,.6); animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(95,211,141,.55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(95,211,141,0); } }

/* ---------- Highlight card meta ---------- */
.snap-meta { margin-bottom: 4px; }
.snap-date { font-family: var(--hand); font-weight: 700; font-size: 18px; color: var(--accent); line-height: 1; }
.snap-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 6px; line-height: 1.3; }

/* ---------- Awards ---------- */
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.award { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 18px 20px; border-radius: 10px; background: var(--glass); border: 1px solid var(--line); transition: transform .25s, border-color .25s, background .25s; }
.award:hover { transform: translateY(-4px); border-color: rgba(232,104,60,.6); background: rgba(255,255,255,.1); }
.award-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--paper-note); display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.award-year { font-family: var(--hand); font-weight: 700; font-size: 18px; color: var(--accent-soft); line-height: 1; margin-bottom: 4px; }
.award-title { font-size: 15.5px; font-weight: 700; color: #fff; line-height: 1.35; }
.award-title a { color: #fff; }
.award-title a:hover { color: var(--accent-hover); }
.award-sub { font-size: 13.5px; color: var(--on-dark-2); line-height: 1.5; margin-top: 4px; }

/* ---------- Fun facts ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; margin-bottom: 90px; }
.fact { background: var(--glass); border: 1px solid var(--line); border-radius: 8px; padding: 24px; text-align: center; animation: floatY 5s ease-in-out infinite; animation-delay: var(--d); }
.fact-num { font-size: 36px; font-weight: 800; color: var(--accent-soft); font-variant-numeric: tabular-nums; }
.fact-label { font-size: 13px; color: var(--on-dark-2); margin-top: 6px; letter-spacing: .03em; }

/* ---------- Contact / footer ---------- */
.contact { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); }
.contact h2 { color: #fff; font-size: 26px; font-weight: 800; margin: 36px 0 10px; }
.contact p { color: var(--on-dark-2); font-size: 15px; margin-bottom: 22px; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 34px; }
.copyright { font-size: 12.5px; color: var(--on-dark-4); padding-bottom: 30px; }

/* ---------- Modal ---------- */
.modal { border: 0; padding: 24px; margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; background: transparent; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s, overlay .25s allow-discrete, display .25s allow-discrete; }
.modal:not([open]) { display: none; }
.modal[open] { opacity: 1; pointer-events: auto; }
@starting-style { .modal[open] { opacity: 0; } .modal[open] .modal-card { transform: scale(.92); } }
.modal::backdrop { background: rgba(8,20,15,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-card { position: relative; background: var(--paper); border-radius: 10px; padding: 38px 40px; max-width: 560px; width: 100%; max-height: 80vh; overflow-y: auto; box-shadow: 0 30px 60px rgba(0,0,0,.5); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.modal-close { position: absolute; top: 16px; right: 18px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.06); color: var(--ink-soft); font-size: 18px; line-height: 1; cursor: pointer; }
.modal-close:hover { background: rgba(0,0,0,.12); }
.modal-title { font-weight: 800; font-size: 22px; color: var(--ink); margin-bottom: 6px; padding-right: 30px; }
.modal-date { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.modal-list li { position: relative; padding-left: 14px; font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 8px; }
.modal-list li::before { content: '•'; position: absolute; left: 0; }
body.modal-open { overflow: hidden; }

/* ---------- Keyframes ---------- */
@keyframes clipSway { 0%, 100% { transform: translateX(-50%) rotate(-4deg); } 50% { transform: translateX(-50%) rotate(4deg); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes pulseDot { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.4); } }
@keyframes driftFog { 0% { transform: translateX(0); } 100% { transform: translateX(-120px); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { flex-wrap: wrap; }
  .nav-pill { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav-pill::-webkit-scrollbar { display: none; }
  .nav-pill .nav-cta { margin-left: auto; }
  .nav-pill { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .nav-pill.at-end { -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; gap: 36px; justify-items: center; }
  .about-body { width: 100%; }
  .about h1, .tagline { text-align: center; }
  .about-actions { justify-content: center; }
  .now { display: flex; width: fit-content; margin: 0 auto; }
}
@media (max-width: 600px) {
  .page { padding: 16px 16px 0; }
  .nav { margin-bottom: 36px; top: 8px; }
  .nav-pill a { font-size: 13.5px; padding: 8px 12px; }
  .socials { gap: 8px; }
  .polaroid { width: 230px; }
  .note { padding: 24px 20px; }
  .note p { font-size: 15px; }
  .section { margin-bottom: 72px; }
  .project-grid { grid-template-columns: 1fr; }
  .project { padding: 22px 20px 20px; }
  .paper { padding: 30px 20px; }
  .modal { padding: 16px; }
  .modal-card { padding: 30px 22px; }
  .facts { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .fact { padding: 18px 10px; }
  .fact-num { font-size: 28px; }
  .snap { flex-basis: 78vw; max-width: 280px; }
  /* Skills: one swipeable row per category */
  .skill-groups { gap: 20px; }
  .skill-group { background: none; border: 0; border-radius: 0; padding: 0; }
  .skill-group:hover { background: none; }
  .skill-name { margin-bottom: 10px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 0 -16px; padding: 2px 16px 8px; scroll-snap-type: x proximity; scroll-padding-left: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 40px), transparent); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { scroll-snap-align: start; font-size: 13px; padding: 7px 13px; }
  .now { font-size: 12px; text-align: left; }
  .clothesline { padding: 20px 0 10px; margin: 0 -16px; }
  .cards { padding-left: 22px; padding-right: 22px; scroll-padding-left: 22px; gap: 20px; }
  .about-actions .btn { flex: 1 1 auto; }
  .contact-actions .btn { width: 100%; }
  .award { padding: 16px; }
  .h2 { font-size: 24px; }
  .tagline { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .chip, .project { opacity: 1; transform: none; }
}

@media print {
  .nav, .progress, .grid-bg, .skyline, .fog, .modal { display: none !important; }
  body, .page { background: #fff; }
  .chip, .project { opacity: 1; transform: none; }
}

/* ==========================================================
   Motion: entrance, scroll reveals, rotator, card glow
   (uses `translate`/`opacity` so existing `transform`s stay intact)
   ========================================================== */
.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .7s cubic-bezier(.2,.8,.2,1) var(--rd, 0s), translate .7s cubic-bezier(.2,.8,.2,1) var(--rd, 0s), transform .3s, box-shadow .3s, border-color .25s, background .25s; }
.js .reveal.in { opacity: 1; translate: none; }
.js .snap.reveal { translate: 0 -40px; transition: opacity .6s ease var(--rd, 0s), translate .8s cubic-bezier(.3,1.4,.5,1) var(--rd, 0s), transform .3s, box-shadow .3s; }
.js .snap.reveal.in { translate: none; }
.js .fact.reveal { transition: opacity .6s ease var(--rd, 0s), translate .6s ease var(--rd, 0s); }

/* Hero entrance */
.js .polaroid { animation: dropIn 1s cubic-bezier(.3,1.3,.5,1) backwards; }
.js .about-body > * { animation: riseIn .8s cubic-bezier(.2,.8,.2,1) both; }
.js .about-body > :nth-child(1) { animation-delay: .15s; }
.js .about-body > :nth-child(2) { animation-delay: .25s; }
.js .about-body > :nth-child(3) { animation-delay: .35s; }
.js .about-body > :nth-child(4) { animation-delay: .45s; }
.js .about-body > :nth-child(5) { animation-delay: .55s; }
.js .about-body > :nth-child(6) { animation-delay: .65s; }
.js .nav { animation: fadeDown .7s ease backwards; }
@keyframes dropIn { from { opacity: 0; translate: 0 -40px; rotate: -10deg; } to { opacity: 1; translate: none; rotate: none; } }
@keyframes riseIn { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: none; } }
@keyframes fadeDown { from { opacity: 0; translate: 0 -12px; } to { opacity: 1; translate: none; } }

/* Rotating "I build ..." line */
.rotator { color: var(--on-dark-2); font-size: 15px; margin: -12px 0 32px; min-height: 1.5em; }
.rot-word { color: #fff; font-weight: 700; background: linear-gradient(transparent 62%, rgba(232,104,60,.45) 62%); padding: 0 2px; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--accent); margin-left: 3px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 820px) { .rotator { text-align: center; } }

/* Project card cursor glow */
.project { position: relative; overflow: hidden; isolation: isolate; }
.project::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(232,104,60,.16), transparent 60%); }
.project:hover::before { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: none; }
  .caret { display: none; }
}

/* Featured project + modal links */
.project-featured { grid-column: 1 / -1; background: linear-gradient(135deg, #fbf3dc 0%, var(--paper) 60%); border: 1px solid rgba(232,104,60,.35); }
.project-featured .project-title { font-size: 22px; }
.project-featured .project-blurb { max-width: 760px; font-size: 15px; }
.project-featured::after { content: 'New'; position: absolute; top: 22px; right: 22px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 4px 10px; border-radius: 999px; }
.modal-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.modal-links:empty { display: none; }
.btn-outline { color: var(--ink); border: 1px solid rgba(31,42,36,.25); }
.btn-outline:hover { color: var(--ink); border-color: var(--accent); transform: scale(1.05); }

/* Back to top */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 120; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.35); opacity: 0; translate: 0 16px; pointer-events: none; transition: opacity .3s, translate .3s, background .2s, transform .2s; }
.to-top.show { opacity: 1; translate: none; pointer-events: auto; }
.to-top:hover { background: var(--accent-hover); transform: translateY(-3px); }
@media (max-width: 600px) { .to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; } }

/* Skills marquee on mobile: rows auto-scroll, alternating direction */
.chip-clone { display: none; }
@media (max-width: 600px) {
  .skill-group.marquee { overflow: hidden; margin: 0 -16px; padding: 0; }
  .skill-group.marquee .skill-name { padding: 0 16px; }
  .skill-group.marquee .chips { overflow: visible; width: max-content; margin: 0; padding: 2px 0 8px; gap: 8px; scroll-snap-type: none;
    -webkit-mask-image: none; mask-image: none;
    animation: marquee var(--dur, 30s) linear infinite; }
  .skill-group.marquee:nth-child(even) .chips { animation-direction: reverse; }
  .skill-group.marquee { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent); }
  .skill-group.marquee .skill-name { -webkit-mask-image: none; }
  .skill-group.marquee .chip-clone { display: block; }
  .skill-group.marquee:active .chips, .skill-group.marquee.paused .chips { animation-play-state: paused; }
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 4px)); } }
@media (prefers-reduced-motion: reduce) {
  .skill-group.marquee .chips { animation: none; overflow-x: auto; width: auto; }
  .skill-group.marquee .chip-clone { display: none; }
}

/* ==========================================================
   Floating nav + site-wide motion layer
   ========================================================== */
.nav { transition: translate .45s cubic-bezier(.2,.8,.2,1), top .3s; }
.nav .nav-pill, .nav .brand, .nav .social { transition: background .3s, box-shadow .3s, padding .3s, border-color .3s, transform .2s, color .2s, translate .25s cubic-bezier(.2,.8,.2,1); }
.nav.is-floating .nav-pill { background: rgba(12, 38, 28, .82); box-shadow: 0 14px 34px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.nav.is-floating .brand, .nav.is-floating .social { background: rgba(12, 38, 28, .82); box-shadow: 0 10px 24px rgba(0,0,0,.3); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
@media (min-width: 961px) { .nav.is-floating .nav-pill { padding: 6px; } .nav.is-floating .nav-pill a { padding-top: 8px; padding-bottom: 8px; } }
.nav.is-hidden { translate: 0 calc(-100% - 30px); }
.nav-pill a[data-section] { position: relative; }
.nav-pill a[data-section]::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); translate: -50% 0; scale: 0; transition: scale .3s cubic-bezier(.3,1.6,.5,1); }
.nav-pill a.is-active::after { scale: 1; }

/* Name: letters rise in one by one */
.ltr { display: inline-block; white-space: pre; }
.js .ltr { animation: letterUp .8s cubic-bezier(.2,.9,.25,1.2) backwards; animation-delay: calc(.25s + var(--i) * .035s); }
@keyframes letterUp { from { opacity: 0; translate: 0 .55em; rotate: 8deg; filter: blur(4px); } to { opacity: 1; translate: none; rotate: none; filter: none; } }
.about h1 .ltr:hover { color: var(--accent-soft); translate: 0 -4px; transition: translate .2s, color .2s; }

/* Section rules draw in */
.js .rule { transform-origin: left center; scale: 0 1; transition: scale .9s cubic-bezier(.2,.8,.2,1) .15s; }
.js .rule.in { scale: 1 1; }

/* Cursor spotlight (desktop) */
.spotlight { position: fixed; left: 0; top: 0; width: 700px; height: 700px; margin: -350px 0 0 -350px; border-radius: 50%; pointer-events: none; z-index: 0; opacity: 0;
  background: radial-gradient(circle, rgba(240,165,131,.10) 0%, rgba(232,104,60,.05) 35%, transparent 65%); transition: opacity .5s; will-change: transform; }
.spotlight.on { opacity: 1; }
.wrap { z-index: 1; }

/* Experience timeline fills as you scroll */
#experienceList { position: relative; }
#experienceList::before, #experienceList::after { content: ''; position: absolute; left: 4px; top: 8px; bottom: 30px; width: 2px; border-radius: 2px; }
#experienceList::before { background: rgba(31,42,36,.1); }
#experienceList::after { background: linear-gradient(var(--accent), var(--gold)); transform-origin: top; scale: 1 var(--p, 0); }
#experienceList .dot { position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--paper); }

/* Magnetic buttons: JS sets --mx/--my offsets */
.btn, .social, .brand { translate: var(--mgx, 0) var(--mgy, 0); }
.btn { position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); translate: -120% 0; transition: translate .7s ease; pointer-events: none; }
.btn-primary:hover::after { translate: 120% 0; }

/* Highlight photos: gentle zoom on hover */
.snap-img img { transition: scale .6s cubic-bezier(.2,.8,.2,1); }
.snap:hover .snap-img img { scale: 1.06; }

/* Award + skill cards: lift with accent edge */
.award { position: relative; overflow: hidden; }
.award::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); scale: 1 0; transform-origin: bottom; transition: scale .35s cubic-bezier(.2,.8,.2,1); }
.award:hover::before { scale: 1 1; }

@media (prefers-reduced-motion: reduce) {
  .js .ltr { animation: none; }
  .js .rule { scale: 1 1; }
  .spotlight { display: none; }
  #experienceList::after { scale: 1 1; }
  .nav.is-hidden { translate: none; }
}
@media (hover: none) { .spotlight { display: none; } }

/* Mobile floating nav: collapse to a single row (menu pill only) once scrolled */
@media (max-width: 960px) {
  .nav .brand, .nav .socials { transition: opacity .3s, background .3s, box-shadow .3s, translate .25s; }
  .nav.is-floating:not(.is-hidden) { translate: 0 -50px; }
  .nav.is-floating .brand, .nav.is-floating .socials { opacity: 0; pointer-events: none; }
}
@media (max-width: 600px) { .nav.is-floating:not(.is-hidden) { translate: 0 -48px; } }
