/* ---- tokens ---- */
:root{
  --bg:#f2f2f2;
  --fg:#111111;
  --muted:rgba(17,17,17,.55);
  --line:rgba(17,17,17,.15);
  --accent:#ff1f6b;
  --stroke:var(--fg);
  --ease:cubic-bezier(.16,1,.3,1);
}
body.mode-night{ --bg:#0a0a0a; --fg:#f2f2f2; --muted:rgba(242,242,242,.55); --line:rgba(242,242,242,.18); --stroke:var(--fg); }
body.mode-ultra{ --bg:#c21e56; --fg:#f7eef1; --muted:rgba(247,238,241,.68); --line:rgba(247,238,241,.26); --stroke:#f7eef1; }

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; background:var(--bg); color:var(--fg);
  font-family:"Inter",system-ui,sans-serif; font-size:16px; line-height:1.5;
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
  transition:background .6s var(--ease), color .6s var(--ease);
}
a{ color:inherit; text-decoration:none; }

/* ---- giant display type ---- */
.giant{
  font-family:"Archivo Expanded","Archivo",sans-serif;
  font-weight:900; text-transform:uppercase; letter-spacing:.01em;
  line-height:.88; margin:0;
}
.outline{
  color:transparent;
  -webkit-text-stroke:2px var(--stroke);
  text-stroke:2px var(--stroke);
  transition:color .4s var(--ease);
}
/* fill outlined type on hover where it's a link */
a.giant.outline:hover{ color:var(--stroke); }

/* ---- fixed chrome ---- */
.ui{ position:fixed; inset:0 0 auto 0; z-index:10; display:flex; align-items:center;
     justify-content:space-between; padding:22px clamp(20px,5vw,60px); pointer-events:none; }
.ui > *{ pointer-events:auto; }
.logo{ font-family:"Archivo Expanded","Archivo",sans-serif; font-weight:900; text-transform:uppercase;
       font-size:15px; line-height:.9; letter-spacing:.02em; display:flex; gap:.4em; }
.nav ul{ display:flex; gap:26px; margin:0; padding:0; list-style:none; }
.nav a{ font-size:12px; letter-spacing:.04em; opacity:.8; transition:opacity .3s; }
.nav a:hover{ opacity:1; }
.num{ font-size:10px; opacity:.5; margin-right:2px; }

/* mode toggle */
.modeToggle{ display:flex; gap:8px; align-items:center; }
.modeToggle button{ width:14px; height:14px; border-radius:50%; border:1.5px solid var(--fg);
  background:transparent; cursor:pointer; padding:0; transition:transform .3s var(--ease), background .3s; }
.modeToggle button[data-mode="light"]{ background:#f2f2f2; border-color:rgba(0,0,0,.3); }
.modeToggle button[data-mode="night"]{ background:#0a0a0a; }
.modeToggle button[data-mode="ultra"]{ background:#c21e56; }
.modeToggle button:hover{ transform:scale(1.25); }

/* ---- hero ---- */
.hero{ min-height:100vh; display:flex; flex-direction:column; justify-content:center;
       padding:0 clamp(20px,5vw,60px); }
.kicker{ font-size:13px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin:0 0 24px; }
.hero .giant{ font-size:clamp(60px,15vw,240px); }
.hero .giant span span{ display:block; }
.tagline{ max-width:620px; margin:34px 0 0; font-size:clamp(16px,2vw,20px); color:var(--muted); }
.scrollHint{ margin-top:56px; font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); }
.scrollHint span{ display:inline-block; animation:bob 1.8s var(--ease) infinite; }
@keyframes bob{ 0%,100%{ transform:translateY(0);} 50%{ transform:translateY(5px);} }

/* ---- sections ---- */
.section{ padding:clamp(80px,14vh,180px) clamp(20px,5vw,60px); border-top:1px solid var(--line); }
.sectionHead{ display:flex; align-items:baseline; gap:16px; margin-bottom:48px; }
.sectionHead .num{ font-size:14px; opacity:.5; }
.sectionHead .giant{ font-size:clamp(44px,9vw,140px); }

.prose{ max-width:760px; }
.prose .lead{ font-size:clamp(22px,3vw,34px); line-height:1.25; margin:0 0 28px; }
.prose p{ color:var(--muted); font-size:18px; margin:0 0 18px; }

/* experience timeline */
.timeline{ list-style:none; margin:0; padding:0; max-width:900px; }
.timeline li{ padding:28px 0; border-top:1px solid var(--line); }
.timeline li:first-child{ border-top:0; }
.tHead{ display:flex; justify-content:space-between; align-items:baseline; gap:20px; flex-wrap:wrap; margin-bottom:10px; }
.tHead h3{ font-size:26px; margin:0; font-weight:600; }
.tMeta{ font-size:13px; letter-spacing:.03em; color:var(--muted); }
.timeline p{ color:var(--muted); max-width:680px; margin:0; }

/* projects — 3D angled stage */
.stage{ perspective:1500px; perspective-origin:100% 50%; }
.projects{ list-style:none; margin:0; padding:0; transform-style:preserve-3d; }
/* the ROW is a flat, full-width hover target (never transformed) */
.projectRow{ padding:clamp(16px,2.4vw,30px) 0; border-top:1px solid var(--line); }
/* the INNER wrapper carries all the 3D motion (visual only) */
.projectInner{ display:flex; flex-direction:column; gap:8px; transform-style:preserve-3d;
  transform-origin:right center; transform:rotateY(-30deg) translateZ(-50px);
  opacity:.5; transition:transform .8s var(--ease), opacity .8s var(--ease); will-change:transform; }
.projectRow.in .projectInner{ transform:rotateY(-22deg) translateZ(0); opacity:1; }
.projectRow:hover .projectInner{ transform:rotateY(0deg) translateZ(80px); opacity:1; }
.projectRow .giant{ font-size:clamp(40px,8vw,120px); }
.pMain{ width:100%; }
.pMeta{ font-size:13px; letter-spacing:.03em; color:var(--muted); }

/* project main row: gear + title */
.pMain{ display:flex; align-items:center; gap:clamp(12px,2vw,28px); }
.gear{ flex:0 0 auto; width:clamp(28px,4vw,56px); height:clamp(28px,4vw,56px);
  display:inline-flex; opacity:.5;
  transition:opacity .4s var(--ease); }
.gear svg{ width:100%; height:100%; fill:var(--accent); transform-origin:50% 50%; }
body.mode-ultra .gear svg{ fill:var(--stroke); }
.projectRow:hover .gear{ opacity:1; }
.projectRow:hover .gear svg{ animation:spin 3.2s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* expanding detail panel */
.pReveal{ max-height:0; opacity:0; overflow:hidden;
  transition:max-height .55s var(--ease), opacity .45s var(--ease); }
.projectRow:hover .pReveal{ max-height:180px; opacity:1; }
.pDesc{ margin:14px 0 4px; max-width:640px; font-size:clamp(15px,1.6vw,18px); color:var(--muted); }

/* ---- custom cursor (desktop pointers only) ---- */
.cursor{ position:fixed; top:0; left:0; width:14px; height:14px; border-radius:50%;
  background:var(--stroke); pointer-events:none; z-index:100; mix-blend-mode:difference;
  transform:translate(-50%,-50%); transition:width .25s var(--ease), height .25s var(--ease),
  background .3s; opacity:0; }
.cursor.active{ opacity:1; }
.cursor.hover{ width:52px; height:52px; }
@media (hover:none),(pointer:coarse){ .cursor{ display:none; } }

/* contact */
.contact .mailto{ display:inline-block; font-size:clamp(44px,10vw,150px); margin-bottom:56px; }
.social{ list-style:none; margin:0 0 60px; padding:0; display:flex; gap:40px; flex-wrap:wrap; }
.social a{ font-size:15px; letter-spacing:.03em; opacity:.85; transition:opacity .3s; }
.social a:hover{ opacity:1; }
.copyright{ font-size:12px; color:var(--muted); margin:0; }

/* ---- reveal animation ---- */
.reveal{ display:block; overflow:hidden; }
.reveal > span{ display:block; transform:translateY(115%); transition:transform 1s var(--ease); }
.reveal.in > span{ transform:translateY(0); }
/* staggering for grouped reveals */
.hero .giant .reveal:nth-child(2) > span{ transition-delay:.08s; }

/* fade-up for section blocks */
.prose,.timeline,.contact .mailto,.social{ opacity:0; transform:translateY(24px);
  transition:opacity .9s var(--ease), transform .9s var(--ease); }
.in-view .prose,.in-view .timeline,.in-view .mailto,.in-view .social{ opacity:1; transform:none; }

/* loading gate */
body.loading .reveal > span{ transform:translateY(115%); }

/* ---- responsive ---- */
@media (max-width:720px){
  .nav{ display:none; }
  .ui{ padding:16px 20px; }
  .tHead{ flex-direction:column; gap:2px; }
}
/* no-hover (touch): show project details and flatten tilt so content is readable */
@media (hover:none),(pointer:coarse){
  .projectInner{ transform:none; opacity:1; }
  .pReveal{ max-height:180px; opacity:1; }
  .gear{ opacity:1; }
}
@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; }
  .reveal > span{ transform:none; }
  .prose,.timeline,.mailto,.social{ opacity:1; transform:none; }
}
