/* home.css — landing page design system
   Warm off-white, near-black ink, one cobalt accent, heavy geometric headlines,
   a handwritten accent used sparingly. */

:root {
  --bg: #F1F0EC;
  --bg-2: #E8E6E0;
  --surface: #FFFFFF;
  --ink: #151515;
  --muted: #5C5B57;
  --subtle: #8C8A84;
  --line: #DAD8D1;
  --accent: #2D3EB8;
  --accent-soft: #E3E6F7;
  --dot: #CDCAC2;
  --m-accent: #2D3EB8;
  --display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --wrap: min(1200px, calc(100% - 80px));
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background-color: var(--bg); background-image: radial-gradient(circle at center, var(--dot) 1.1px, transparent 1.5px); background-size: 24px 24px; background-position: 12px 12px; color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: var(--wrap); margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: 10px 16px; z-index: 500; }
.skip-link:focus { left: 16px; top: 16px; }

/* ── type ── */
.h1, .h2, .h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; margin: 0; color: var(--ink); }
.h1 { font-size: clamp(48px, 6.4vw, 92px); line-height: 1.0; }
.h2 { font-size: clamp(44px, 5.6vw, 80px); line-height: .98; }
.h3 { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; }
.blue { color: var(--accent); }
.scribble { font-family: var(--hand); font-size: 26px; line-height: 1.1; color: var(--accent); }
.label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); font-weight: 600; }
.lead { font-size: 20px; line-height: 1.55; color: var(--muted); }
.lead strong, .row-copy strong { color: var(--ink); font-weight: 600; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 16px; border: 1.5px solid var(--ink); transition: transform .25s var(--ease), background .25s, color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: var(--accent); border-color: var(--accent); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--bg); }

/* ── nav ── */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 200; transition: background .3s, box-shadow .3s, transform .35s var(--ease); }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.nav.hide { transform: translateY(-100%); }
.nav-inner { width: var(--wrap); margin: 0 auto; height: 76px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: Georgia, serif; font-size: 36px; font-weight: 700; line-height: 1; color: var(--accent); transition: transform .3s var(--ease); }
.logo:hover { transform: rotate(-6deg); }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; font-size: 15px; font-weight: 500; }
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover::after { transform: scaleX(1); }
.menu-btn { display: none; font-size: 22px; }

/* ── hero ── */
.hero { padding: 150px 0 90px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: 60px; align-items: center; }
.hero .lead { max-width: 560px; margin: 28px 0 34px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.cycle { display: block; color: var(--accent); white-space: nowrap; }
.cycle span { display: inline-block; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.cycle span.out { opacity: 0; transform: translateY(-14px); }
.cycle span.pre { opacity: 0; transform: translateY(14px); transition: none; }
.photo { justify-self: end; position: relative; width: min(400px, 100%); margin-right: 18px; transform-origin: 50% 40%; }
.photo-frame { position: relative; background: #fff; padding: 14px 14px 58px; border-radius: 4px; box-shadow: 0 30px 60px -28px rgba(21,21,21,.35), 0 2px 6px rgba(21,21,21,.06); }
.photo-frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.photo-cap { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-family: var(--hand); font-size: 26px; color: var(--ink); }

/* Figma-style selection around the photo */
.sel { position: absolute; inset: -10px; border: 1.5px solid var(--accent); pointer-events: none; animation: selIn .5s ease .75s both; }
.sel i { position: absolute; width: 10px; height: 10px; background: #fff; border: 1.5px solid var(--accent); animation: handleIn .3s var(--ease) both; }
.sel .tl { top: -6px; left: -6px; animation-delay: 1.05s; }
.sel .tr { top: -6px; right: -6px; animation-delay: 1.12s; }
.sel .bl { bottom: -6px; left: -6px; animation-delay: 1.19s; }
.sel .br { bottom: -6px; right: -6px; animation-delay: 1.26s; }
.sel-tag { position: absolute; left: 50%; top: calc(100% + 12px); transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 5px; white-space: nowrap; animation: tagIn .4s var(--ease) 1.35s both; }

/* multiplayer cursor */
.mp-cursor { position: absolute; right: -34px; top: 34%; display: flex; align-items: flex-start; gap: 2px; pointer-events: none; animation: cursorIn 1s var(--ease) 1.5s both, cursorIdle 6s ease-in-out 3s infinite; }
.mp-cursor svg { filter: drop-shadow(0 2px 3px rgba(21,21,21,.25)); }
.mp-cursor span { margin-top: 20px; background: var(--accent); color: #fff; font-family: var(--hand); font-size: 20px; line-height: 1; padding: 5px 10px 6px; border-radius: 4px 10px 10px 10px; white-space: nowrap; box-shadow: 0 6px 14px -6px rgba(45,62,184,.6); }

@keyframes photoSway { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
.photo.swaying { animation: photoSway 2.4s ease-in-out infinite; }
@keyframes selIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes handleIn { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
@keyframes tagIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes cursorIn { from { opacity: 0; transform: translate(140px, 120px); } to { opacity: 1; transform: none; } }
@keyframes cursorIdle { 0%, 100% { transform: none; } 30% { transform: translate(-8px, 10px); } 60% { transform: translate(4px, -6px); } }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.tag { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }

/* ── sections ── */
.section { padding: 120px 0; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 56px; }

/* ── work rows ── */
.rows { display: grid; gap: 0; }
.row:first-child { padding-top: 0; }
.row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; padding: 64px 0; border-bottom: 1px solid var(--line); }
.row-media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-2); }
.row-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.row:hover .row-media img { transform: scale(1.035); }
.row-badge { position: absolute; top: 16px; left: 16px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 6px 11px; border-radius: 999px; }
.row-copy .label { display: block; margin-bottom: 14px; }
.row-copy .h3 { margin-bottom: 16px; }
.row-copy p { margin: 0 0 26px; color: var(--muted); font-size: 18px; line-height: 1.55; max-width: 520px; }
.row-meta { display: flex; gap: 26px; margin: -6px 0 28px; }
.row-meta div b { display: block; font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.row-meta div span { font-size: 12.5px; color: var(--subtle); }

/* ── how I think ── */
.think { display: grid; grid-template-columns: 1fr 1.25fr; gap: 70px; }
.think-rail { position: sticky; top: 120px; align-self: start; height: 420px; display: grid; grid-template-columns: 34px 1fr; gap: 22px; }
.rail { position: relative; width: 6px; margin-left: 14px; background: var(--accent-soft); border-radius: 6px; }
.rail-fill { position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--p, 0) * 100%); background: var(--accent); border-radius: 6px; transition: height .15s linear; }
.rail-dot { position: absolute; left: 50%; top: calc(var(--p, 0) * 100%); width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); transform: translate(-50%, -50%); transition: top .15s linear; }
.rail-note { align-self: center; }
.rail-note .scribble { display: block; font-size: 30px; max-width: 320px; transition: opacity .3s; }
.rail-note .label { display: block; margin-bottom: 10px; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 70px; }
.principle { opacity: .28; transition: opacity .45s var(--ease); }
.principle.on { opacity: 1; }
.principle .num { font-size: 13px; font-weight: 600; color: var(--subtle); letter-spacing: .08em; }
.principle h3 { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.025em; margin: 6px 0 10px; line-height: 1.15; }
.principle p { margin: 0; color: var(--muted); font-size: 18px; max-width: 520px; }
.principle .from { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--accent); font-weight: 600; }

/* ── skillset (bento) ── */
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.bento-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .35s var(--ease), box-shadow .35s; }
.bento-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -26px rgba(21,21,21,.3); }
.bento-eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); font-weight: 600; margin-bottom: 14px; }
.bento-title { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 10px; }
.bento-body { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.skill-pill { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.stat-card { background: var(--accent); border-color: var(--accent); color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.stat-number { font-family: var(--display); font-weight: 800; font-size: 64px; letter-spacing: -0.04em; line-height: 1; }
.stat-desc { font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.82); margin-top: 18px; }
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tool-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 12px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.tool-item svg { width: 20px; height: 20px; }
.tool-item-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-item svg { flex-shrink: 0; }
.bento-card:has(.tools-grid) { display: flex; flex-direction: column; }
.bento-card:has(.tools-grid) .tools-grid { flex: 1; grid-auto-rows: 1fr; }
.bento-card--full { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }

/* ── off screen ── */
.off { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.snap { display: block; background: #fff; padding: 10px 10px 46px; border-radius: 4px; position: relative; box-shadow: 0 20px 40px -24px rgba(21,21,21,.35); transform: rotate(var(--r, 0deg)); transition: transform .45s var(--ease); }
.snap:hover { transform: rotate(0deg) translateY(-6px); }
.snap img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.snap span { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-family: var(--hand); font-size: 24px; }
.off-more { margin-top: 50px; }

/* ── contact ── */
.contact { padding: 140px 0 60px; border-top: 1px solid var(--line); }
.contact .h1 { font-size: clamp(52px, 7.6vw, 112px); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 80px; padding-top: 30px; border-top: 1px solid var(--line); }
.contact-grid .label { display: block; margin-bottom: 14px; }
.contact-links { display: grid; gap: 10px; font-weight: 600; font-size: 18px; }
.contact-links a:hover { color: var(--accent); }
.email { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-weight: 600; font-size: 20px; }
.copy { font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--ink); transition: background .2s, color .2s; }
.copy:hover, .copy.done { background: var(--ink); color: var(--bg); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 90px; font-size: 14px; color: var(--subtle); }

/* ── reveal (works with motion.js [data-reveal]) ── */
.cycle-line { display: block; }

@media (max-width: 1000px) {
  :root { --wrap: calc(100% - 48px); }
  .hero { padding-top: 120px; }
  .hero-grid, .row, .think, .contact-grid { grid-template-columns: 1fr; }
  .photo { justify-self: start; width: min(340px, calc(100% - 40px)); margin: 10px 0 40px 10px !important; }
  .row { gap: 28px; }
  .row { padding: 48px 0; }
  .think-rail { display: none; }
  .principle { opacity: 1; }
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-card { grid-column: auto !important; grid-row: auto !important; }
  .bento-card--full { grid-column: 1 / -1 !important; grid-template-columns: 1fr; }
  .off { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .cycle { white-space: normal; }
  .nav-links { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 18px; }
  .nav.open .nav-links { display: flex; }
  .nav-links a { display: block; padding: 12px 0; }
  .menu-btn { display: block; }
  .section { padding: 90px 0; }
  .bento-grid { grid-template-columns: 1fr; }
  .lead { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .photo, .photo-frame, .sel, .sel i, .sel-tag, .mp-cursor { animation: none !important; }
  .cycle span, .principle, .rail-fill, .rail-dot, .snap, .row-media img, .btn, .bento-card { transition: none; }
}
