:root{
  --paper:#FFFFFF;
  --thumb:#EDECE9;
  --ink:#141414;
  --muted:#767676;
  --line: rgba(20,20,20,0.12);
  --maxw: 820px;

  --frame-bg:#C9C2ED;
  --cream:#F3EFE4;
  --violet:#5B4CE0;
  --lime:#D3F26A;
  --yellow:#F4C93B;
}
*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background:var(--cream); color:var(--ink);
  font-family:'Inter',sans-serif; font-weight:300;
  line-height:1.65; -webkit-font-smoothing:antialiased;
  font-size:16px;
}
a{ color:inherit; text-decoration:none; }
img,svg{ display:block; max-width:100%; }
.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 24px; }
.eyebrow-label{ font-size:12px; font-weight:700; letter-spacing:0.05em; color:var(--violet); text-transform:uppercase; }
.section-head{ display:flex; align-items:baseline; gap:14px; margin:0 0 32px; }
.section-head h2{ font-family:'Inter', sans-serif; font-weight:500; font-size:26px; }

/* ---------- HERO FRAME ---------- */
.hero-frame-outer{
  background:var(--frame-bg);
  padding:18px;
  min-height:100vh;
  min-height:100dvh;
  min-height:100svh;
  box-sizing:border-box;
  display:flex;
}
.hero-frame-outer.page-frame{ min-height:auto; background:transparent; }
.hero-card{
  position:relative; overflow:hidden;
  background:var(--cream);
  border:1.5px solid var(--ink);
  border-radius:22px;
  background-image: radial-gradient(rgba(20,20,20,0.16) 1px, transparent 1px);
  background-size:22px 22px;
  flex:1;
  display:flex; flex-direction:column;
}

/* ---------- NAV (inside hero card) ---------- */
header{ padding:0; position:relative; z-index:5; }
nav.wrap{ display:flex; align-items:center; justify-content:space-between; padding:22px 28px; max-width:none; border-bottom:1.5px solid var(--ink); }
.logo-mark{
  width:30px; height:30px; border-radius:8px; background:var(--ink); color:var(--cream);
  display:flex; align-items:center; justify-content:center; font-weight:600; font-size:14px;
  border:1.5px solid var(--ink);
}
.brand{ display:flex; align-items:center; gap:10px; }
.wordmark{ font-weight:500; font-size:15px; }
.nav-links{ display:flex; align-items:center; gap:26px; }
.nav-links a{ font-size:14px; color:var(--ink); }
.nav-links a:hover{ color:var(--violet); }
.cv-link{
  display:inline-flex; align-items:center; gap:4px;
  font-size:14px; font-weight:600; color:var(--ink);
  transition:color .15s;
}
.cv-link:hover{ color:var(--violet); }
.cv-arrow{ flex-shrink:0; }

.menu-toggle{
  display:none; width:38px; height:38px; align-items:center; justify-content:center;
  background:var(--paper); border:1.5px solid var(--ink); border-radius:8px; cursor:pointer;
}

/* ---------- MOBILE SIDE MENU ---------- */
.mobile-nav-overlay{
  position:fixed; inset:0; background:rgba(20,20,20,0.4); z-index:40;
  opacity:0; pointer-events:none; transition:opacity .25s ease;
}
.mobile-nav-overlay.open{ opacity:1; pointer-events:auto; }
.mobile-nav{
  position:fixed; top:0; right:-280px; width:260px; z-index:50;
  height:100vh; height:100dvh; height:100svh;
  background:var(--cream); border-left:1.5px solid var(--ink);
  display:flex; flex-direction:column; gap:22px; padding:80px 28px 28px;
  transition:right .25s ease;
}
.mobile-nav.open{ right:0; }
.mobile-nav a{ font-size:17px; font-weight:600; color:var(--ink); }
.mobile-nav .cv-link{ text-align:center; }
.mobile-nav-close{
  position:absolute; top:22px; right:22px; width:34px; height:34px;
  display:flex; align-items:center; justify-content:center;
  background:var(--paper); border:1.5px solid var(--ink); border-radius:8px; cursor:pointer;
}

/* ---------- FLOATING NAV (appears on scroll) ---------- */
.floating-nav{
  position:fixed; top:18px; left:18px; right:18px; z-index:30;
  background:var(--cream); border:1.5px solid var(--ink); border-radius:22px;
  transform:translateY(-150%); opacity:0; pointer-events:none;
  transition:transform .25s ease, opacity .25s ease;
}
.floating-nav.visible{ transform:translateY(0); opacity:1; pointer-events:auto; }
.floating-nav .wrap{ padding:14px 28px; border-bottom:none; }

/* ---------- HERO CONTENT ---------- */
.hero{
  padding:56px 28px 90px; position:relative; z-index:5; text-align:center;
  flex:1; display:flex; flex-direction:column; justify-content:center;
}

.hero h1{
  font-family:'Inter', sans-serif; font-weight:600;
  font-size:clamp(30px, 5vw, 50px); line-height:1.15; letter-spacing:-0.01em;
  max-width:820px; margin:0 auto;
}
.hero h1 .accent{ color:var(--violet); }
.hero h1 .char{
  display:inline-block; cursor:default;
  transition:transform .3s cubic-bezier(.34,1.56,.64,1);
}
.hero h1 .char:hover{ transform:translateX(10px); }
.hero h1 .icon-chip{
  display:inline-flex; width:0.85em; height:0.85em; vertical-align:middle;
  background:var(--paper); border:2px solid var(--ink); border-radius:12px;
  align-items:center; justify-content:center; margin:0 6px; transform:translateY(-0.06em);
}
.hero h1 .icon-chip svg{ width:55%; height:55%; }

.hero .lead{
  margin:30px auto 0; color:var(--ink); opacity:0.68; font-size:16px; max-width:440px; font-weight:400;
}
.hero-actions{ display:flex; gap:14px; justify-content:center; margin-top:38px; flex-wrap:wrap; }
.hbtn{
  display:inline-flex; align-items:center; gap:8px; font-weight:600; font-size:15px;
  padding:15px 26px; border-radius:999px; border:1.5px solid var(--ink);
  box-shadow:3px 3px 0 var(--ink); transition:transform .15s, box-shadow .15s;
}
.hbtn-primary{ background:var(--lime); color:var(--ink); }
.hbtn-ghost{ background:var(--paper); color:var(--ink); }
.hbtn:hover{ transform:translate(-2px,-2px); box-shadow:5px 5px 0 var(--ink); }

/* ---------- PAGE HEADER (Playground / About) ---------- */
.page-title{
  text-align:center; padding:56px 28px 8px; max-width:600px; margin:0 auto;
}
.page-title h1{ font-family:'Inter', sans-serif; font-weight:500; font-size:clamp(32px, 5vw, 48px); }
.page-title p{ margin-top:14px; color:var(--ink); opacity:0.68; font-size:16px; }

/* ---------- COLLAGE DECOR ---------- */
.decor{ position:absolute; z-index:1; opacity:0.92; }
.decor svg{ display:block; }
.d-monitor{ top:120px; left:38px; transform:rotate(-9deg); width:120px; }
.d-cursor{ top:80px; right:46px; transform:rotate(10deg); width:110px; }
.d-notebook{ bottom:36px; left:60px; transform:rotate(-6deg); width:130px; }
.d-swatch{ bottom:54px; right:70px; transform:rotate(8deg); width:90px; }
.d-sticky{ position:absolute; background:var(--yellow); border:1.5px solid var(--ink); width:46px; height:46px; border-radius:8px; }
.d-sticky.s1{ bottom:110px; left:160px; transform:rotate(14deg); }
.d-sticky.s2{ bottom:110px; right:160px; transform:rotate(-10deg); }

.spin-badge{
  position:absolute; bottom:-34px; left:36px; width:96px; height:96px; z-index:6;
  animation:spin 10s linear infinite;
}
@keyframes spin{ from{ transform:rotate(0deg);} to{ transform:rotate(360deg);} }

/* ---------- LARGE DESKTOP HERO SCALE-UP ---------- */
@media (min-width: 1440px){
  .hero{ padding:100px 40px 160px; }
  .hero h1{ font-size:clamp(50px, 4.6vw, 88px); max-width:1450px; }
  .hero .lead{ font-size:22px; max-width:640px; margin-top:36px; }
  .hero-actions{ gap:20px; margin-top:52px; }
  .hero .hbtn{ font-size:19px; padding:20px 34px; }
  .d-monitor{ width:200px; }
  .d-cursor{ width:185px; }
  .d-notebook{ width:220px; }
  .d-swatch{ width:150px; }
  .d-sticky{ width:76px; height:76px; }
  .spin-badge{ width:160px; height:160px; bottom:-56px; left:60px; }
}

@media (max-width: 720px){
  .decor{ display:none; }
  .d-sticky{ display:none; }
  nav.wrap{ padding:18px; }
  .nav-links{ display:none; }
  nav.wrap > .cv-link{ display:none; }
  .menu-toggle{ display:flex; }
  .hero{ padding:42px 18px 70px; }
  .hero h1{ font-size:6vw; }
}

/* ---------- SECTIONS ---------- */
section{ padding:70px 0; }
.maxw-wide{ --maxw: 1080px; }

.card{
  background:#FFFFFF; border:1.5px solid var(--ink); border-radius:18px;
  box-shadow:5px 5px 0 var(--ink);
}

.project-grid{ display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.project-grid .project{ margin-bottom:0; }
@media (max-width: 720px){
  .project-grid{ grid-template-columns:1fr; }
}

.project{
  padding:30px; margin-bottom:28px; transition:transform .18s, box-shadow .18s;
  display:flex; flex-direction:column; height:100%; overflow:hidden;
}
.project:has(.project-cover){ padding:0; }
.project .read-link, .project .soon{ margin-top:auto; align-self:flex-start; }
a.project:hover{ transform:translate(-3px,-3px); box-shadow:8px 8px 0 var(--ink); }
.project-cover{ flex-shrink:0; padding:16px 16px 0; }
.project-body{ padding:30px; display:flex; flex-direction:column; flex:1; }
.project .tags{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
.tag-pill{
  font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.02em;
  color:var(--violet); background:var(--cream); border:1px solid var(--ink);
  padding:3px 8px; border-radius:999px; white-space:nowrap;
}
.project h3{ font-family:'Inter', sans-serif; font-size:22px; font-weight:500; margin-bottom:12px; display:block; }
.project p.desc{ color:var(--ink); opacity:0.68; font-size:15px; max-width:560px; margin-bottom:20px; }
.thumb{
  background:var(--cream); border:1.5px solid var(--ink); border-radius:10px; aspect-ratio:16/10;
  display:flex; align-items:center; justify-content:center; overflow:hidden;
  background-image: radial-gradient(rgba(20,20,20,0.14) 1px, transparent 1px);
  background-size:16px 16px;
}
.thumb .ph-label{ color:var(--ink); opacity:0.42; font-size:12.5px; }
.thumb > img{ width:100%; height:100%; object-fit:cover; display:block; }
.thumb-tall{ aspect-ratio:16/9; margin-bottom:20px; }

.project-cover-img{ width:100%; height:100%; object-fit:cover; object-position:top; }

/* ---------- PROJECT DETAIL ---------- */
.back-link{
  display:inline-block; margin-bottom:24px; font-size:14px; font-weight:600; color:var(--ink);
}
.back-link:hover{ color:var(--violet); }
.case-cover{ margin-bottom:40px; }
.case-cover .thumb{ border-radius:12px; margin-bottom:0; }
.case-cover-img{ width:100%; border-radius:12px; box-shadow:0 12px 24px -14px rgba(20,20,20,0.22); }
.project-detail{ padding:72px; margin-bottom:72px; }
.project-detail.card{ background:none; border:none; box-shadow:none; border-radius:0; }
#playground .project.card{ background:none; border:none; box-shadow:none; border-radius:0; }
.about-card.card{ background:none; border:none; box-shadow:none; border-radius:0; }
.project-detail .tags{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:40px; }
.project-detail .thumb-tall{ margin-bottom:48px; }
.case-section{ margin-bottom:72px; }
.case-section h2{ font-size:22px; font-weight:600; margin-bottom:24px; }
.case-section p{ color:var(--ink); opacity:0.72; font-size:15.5px; line-height:1.85; max-width:640px; }
.case-section p + p{ margin-top:28px; }
.case-section p b{ color:var(--ink); opacity:1; }
.case-section .thumb-tall{ margin-top:28px; margin-bottom:0; }
.case-list{ color:var(--ink); opacity:0.72; font-size:15.5px; line-height:1.85; max-width:640px; padding-left:20px; margin-bottom:14px; }
.case-list li b{ color:var(--ink); opacity:1; }
.case-subhead{ font-size:16px; font-weight:600; margin:36px 0 18px; }

.case-row{ display:flex; gap:40px; margin-bottom:48px; }
.case-row-label{ flex:0 0 140px; font-size:17px; font-weight:600; }
.case-row p{ flex:1; color:var(--ink); opacity:0.72; font-size:15.5px; line-height:1.85; max-width:640px; margin:0; }
.case-divider{ border:none; border-top:1.5px solid var(--line); margin:8px 0 72px; }
@media (max-width: 640px){
  .case-row{ flex-direction:column; gap:12px; }
  .case-row-label{ flex:none; }
}
.case-list li{ margin-bottom:18px; }

.inspo-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:24px; max-width:820px; margin:32px auto 0; }
.inspo-grid figure{ margin:0; }
.inspo-grid img{
  width:100%; aspect-ratio:2/3; object-fit:cover; object-position:top;
  border:1.5px solid var(--ink); border-radius:10px;
}
.inspo-grid figcaption{
  text-align:center; color:var(--ink); opacity:0.6; font-size:12.5px; font-weight:600;
  margin-top:8px;
}
@media (max-width: 640px){
  .inspo-grid{ grid-template-columns:1fr 1fr 1fr; gap:10px; }
  .inspo-grid figcaption{ font-size:11px; }
}

.case-compare-breakout{
  width:100vw; margin-left:calc(50% - 50vw); margin-bottom:72px;
  display:flex; justify-content:center;
  background:var(--cream);
}
.case-compare{
  display:grid; grid-template-columns:1fr 1fr; gap:32px;
  max-width:1400px; width:100%; padding:0 40px;
}
.case-compare figure{ margin:0; }
.case-compare img{ width:100%; border-radius:12px; box-shadow:0 12px 24px -14px rgba(20,20,20,0.22); }
.case-compare figcaption{
  text-align:center; color:var(--ink); opacity:0.6; font-size:13px; font-weight:600;
  margin-bottom:12px; text-transform:uppercase; letter-spacing:0.04em;
}
@media (max-width:780px){
  .case-compare{ grid-template-columns:1fr; padding:0 24px; gap:40px; }
}

.next-case-grid{ display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:60px; }
.next-case{ display:flex; align-items:center; gap:16px; padding:16px; transition:transform .18s, box-shadow .18s; }
.next-case:hover{ transform:translate(-3px,-3px); box-shadow:8px 8px 0 var(--ink); }
.next-case .thumb{ width:96px; height:72px; flex-shrink:0; aspect-ratio:auto; }
.next-case-text h3{ font-size:16px; font-weight:600; margin-top:4px; }
@media (max-width: 640px){
  .next-case-grid{ grid-template-columns:1fr; }
}

.back-to-top{
  position:fixed; bottom:24px; right:24px; width:44px; height:44px; z-index:60;
  display:flex; align-items:center; justify-content:center;
  background:var(--paper); border:1.5px solid var(--ink); border-radius:50%;
  box-shadow:3px 3px 0 var(--ink); cursor:pointer; color:var(--ink);
  opacity:0; pointer-events:none; transform:translateY(8px);
  transition:opacity .2s ease, transform .2s ease;
}
.back-to-top.visible{ opacity:1; pointer-events:auto; transform:translateY(0); }
.back-to-top:hover{ color:var(--violet); }
.thumb-grid{ column-count:2; column-gap:12px; margin-top:6px; }
.thumb-grid-single{ column-count:1; }
.thumb-grid .thumb{ aspect-ratio:auto; background:none; display:block; break-inside:avoid; margin-bottom:12px; }
.thumb-grid .thumb img, .thumb-grid .thumb video{ width:100%; height:auto; display:block; }
.read-link{
  display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:600;
  background:var(--lime); border:1.2px solid var(--ink); padding:8px 16px; border-radius:999px;
}
.soon{
  display:inline-block; font-size:12px; font-weight:700; color:var(--ink); opacity:0.55;
  border:1.2px dashed var(--ink); padding:6px 14px; border-radius:999px; margin-top:6px;
}

.section-note{ color:var(--ink); opacity:0.65; font-size:15px; max-width:560px; margin-bottom:40px; }

/* ---------- ABOUT ---------- */
.about-card{ padding:38px; display:grid; grid-template-columns:0.8fr 1.2fr; gap:36px; align-items:center; }
.about-visual{
  aspect-ratio:1; border-radius:14px; background:var(--violet); border:1.5px solid var(--ink);
  display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden;
}
.about-visual span{ font-family:'Inter', sans-serif; font-size:64px; color:#fff; }
.about p{ color:var(--ink); opacity:0.72; font-size:15.5px; margin-bottom:16px; }
.about p b{ color:var(--ink); opacity:1; font-weight:600; }
.about-facts{ display:flex; gap:12px; margin-top:22px; flex-wrap:wrap; }
.fact-pill{
  background:var(--cream); border:1.2px solid var(--ink); border-radius:999px;
  padding:8px 14px; font-size:13px; font-weight:600; display:flex; align-items:center; gap:6px;
}
.fact-pill b{ font-family:'Inter', sans-serif; font-weight:600; }

/* ---------- FOOTER ---------- */
.footer-card{ padding:0; text-align:left; }
.footer-card h2{ font-family:'Inter', sans-serif; font-weight:500; font-size:clamp(26px,3.4vw,38px); margin-bottom:16px; }
.footer-card p.sub{ color:var(--ink); opacity:0.65; font-size:15.5px; margin-bottom:24px; max-width:480px; }
.footer-email{
  display:inline-block; font-size:16px; font-weight:600; color:var(--violet);
}
.footer-email:hover{ text-decoration:underline; }
.social-row{ display:flex; gap:20px; flex-wrap:wrap; margin-top:22px; }
.social-row a{ font-size:14px; font-weight:600; color:var(--ink); }
.social-row a:hover{ color:var(--violet); }
footer{ padding:70px 0 60px; }
.credit{ text-align:left; margin-top:34px; font-size:13px; color:var(--ink); opacity:0.5; }

@media (max-width: 640px){
  .thumb-grid{ column-count:1; }
  .about-card{ grid-template-columns:1fr; }
  .about-visual{ max-width:160px; margin:0 auto; }
  .project-body{ padding:22px; }
  .project:not(:has(.project-cover)){ padding:22px; }
  .project-detail{ padding:32px; }
}
