:root {
  --paper: #eef0ff;
  --panel: #ffffff;
  --ink: #16143a;
  --muted: #55537a;
  --line: #d3d6f2;
  --accent: #ff5a6e;
  --accent-text: color-mix(in srgb, var(--accent) 55%, var(--ink));
  --on-accent: #ffffff;
  --r: 14px;
  --gutter: clamp(16px, 5vw, 64px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14122e; --panel: #1e1b44; --ink: #eceaff; --muted: #a5a3cf; --line: #34306a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.65 "Figtree", system-ui, sans-serif;
  transition: background .3s;
}
h1, h2, h3 { font-family: "Bricolage Grotesque", sans-serif; line-height: 1.05; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 9; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 20px var(--gutter); }
.mark { font: 800 1.6rem "Bricolage Grotesque", sans-serif; text-decoration: none; }
.mark::after { content: ""; }
nav { display: flex; gap: clamp(14px, 3vw, 32px); }
nav a { text-decoration: none; font-weight: 500; }
nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 3px; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding: clamp(24px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 104px);
}
.status { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; color: var(--muted); margin-bottom: 20px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s ease-out 3; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--accent); } 80%,100% { box-shadow: 0 0 0 12px transparent; } }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); font-weight: 800; font-variation-settings: "opsz" 96; }
.lede { max-width: 52ch; margin-top: 24px; font-size: 1.15rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-block; padding: 14px 26px; border-radius: var(--r);
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
  border: 2px solid var(--accent); transition: transform .15s, background .2s, border-radius .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.big { padding: 18px 34px; font-size: 1.15rem; margin-top: 28px; }

/* customizer */
.customizer {
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--r);
  padding: 20px; transition: border-radius .3s; box-shadow: 8px 8px 0 var(--accent);
}
.cz-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cz-head span { color: var(--muted); font-size: .95rem; }
.cz-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.cz-label { font-weight: 500; }
.swatches { display: flex; gap: 10px; }
.swatches button {
  width: 32px; height: 32px; border-radius: 50%; background: var(--c); border: 3px solid var(--panel);
  box-shadow: 0 0 0 2px var(--line); cursor: pointer;
}
.swatches button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--ink); }
.seg { display: flex; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.seg button { font: 500 .95rem "Figtree", sans-serif; padding: 6px 14px; background: transparent; color: var(--ink); border: 0; cursor: pointer; min-height: 36px; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--paper); }

.preview { margin-top: 12px; display: flex; justify-content: center; background: var(--paper); border-radius: var(--r); padding: 16px; }
.shop { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: width .4s cubic-bezier(.3,.8,.3,1); }
.preview[data-view="mobile"] .shop { width: 150px; }
.shop-bar { display: flex; gap: 5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.shop-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.shop-hero { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 18px 14px; background: var(--accent); color: var(--on-accent); }
.shop-hero b { font: 800 1.1rem "Bricolage Grotesque", sans-serif; }
.shop-btn { background: var(--on-accent); color: var(--accent); font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: var(--r); white-space: nowrap; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px; }
.preview[data-view="mobile"] .shop-grid { grid-template-columns: 1fr 1fr; }
.preview[data-view="mobile"] .item:nth-child(3) { display: none; }
.preview[data-view="mobile"] .shop-hero { flex-direction: column; align-items: flex-start; }
.item .img { aspect-ratio: 1; background: var(--line); border-radius: var(--r); }
.item .img.alt { background: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.item small { display: block; margin-top: 4px; font-size: .75rem; color: var(--muted); }

.band { background: var(--ink); color: var(--paper); padding: clamp(40px, 7vw, 88px) var(--gutter); }
.band p { max-width: 38em; font: 600 clamp(1.3rem, 2.8vw, 2rem)/1.35 "Bricolage Grotesque", sans-serif; letter-spacing: -.01em; }

.section { padding: clamp(56px, 8vw, 104px) var(--gutter) 0; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; margin-bottom: 32px; max-width: 18ch; }
h3 { font-size: 1.25rem; font-weight: 600; }

.work { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.card { background: var(--panel); border: 2px solid var(--ink); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 12px; transition: border-radius .3s; }
.card:nth-child(1) { grid-column: span 2; background: var(--accent); color: var(--on-accent); }
.card:nth-child(1) .tags { color: inherit; opacity: .9; }
@media (max-width: 700px) { .card:nth-child(1) { grid-column: auto; } }
.card p { color: inherit; }
.card:not(:first-child) p:not(.tags) { color: var(--muted); }
.tags { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: .95rem; color: var(--accent); }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--accent); }
.timeline li { display: grid; grid-template-columns: 11rem 1fr; gap: 24px; padding: 0 0 36px 28px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -11px; top: 6px; width: 19px; height: 19px; border-radius: 50%; background: var(--paper); border: 3px solid var(--accent); }
.timeline time { font-weight: 600; color: var(--muted); padding-top: 2px; }
.timeline p { color: var(--muted); margin-top: 6px; max-width: 60ch; }
@media (max-width: 640px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 32px; }
.skills h3 { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 3px solid var(--accent); display: inline-block; }
.skills p { color: var(--muted); max-width: 34ch; }

.contact { padding-bottom: clamp(56px, 8vw, 104px); }
.contact p { max-width: 46ch; color: var(--muted); }

footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 24px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  nav a:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- motion layer ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; will-change: transform; }
.b1 { width: 46vw; height: 46vw; left: -10vw; top: -8vw; background: var(--accent); animation: drift1 18s ease-in-out infinite alternate; }
.b2 { width: 38vw; height: 38vw; right: -8vw; top: 25vh; background: #7f6cff; animation: drift2 22s ease-in-out infinite alternate; }
.b3 { width: 32vw; height: 32vw; left: 30vw; bottom: -12vw; background: #3b82f6; opacity: .3; animation: drift3 26s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vw, 14vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vw, -10vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(-20vw, -14vh) scale(1.2); } }
.grid {
  position: absolute; inset: -48px;
  background-image: radial-gradient(var(--ink) 1.2px, transparent 1.4px);
  background-size: 32px 32px; opacity: .12;
  animation: gridmove 14s linear infinite;
}
@keyframes gridmove { to { transform: translate(32px, 32px); } }
.glow {
  position: absolute; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 38%, transparent), transparent 65%);
  transform: translate(var(--mx, 50vw), var(--my, 30vh)); transition: transform .25s ease-out; opacity: .8;
}
@media (hover: none) { .glow { display: none; } }

/* page-load sequence for the hero */
.hero-copy > *, .customizer { opacity: 0; transform: translateY(24px); animation: rise .8s cubic-bezier(.2,.8,.2,1) forwards; }
.hero-copy > :nth-child(1) { animation-delay: .05s; }
.hero-copy > :nth-child(2) { animation-delay: .15s; }
.hero-copy > :nth-child(3) { animation-delay: .3s; }
.hero-copy > :nth-child(4) { animation-delay: .4s; }
.customizer { animation-delay: .5s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.customizer { animation-name: rise, floaty; animation-duration: .8s, 7s; animation-delay: .5s, 1.4s; animation-iteration-count: 1, infinite; animation-timing-function: cubic-bezier(.2,.8,.2,1), ease-in-out; animation-direction: normal, alternate; animation-fill-mode: forwards, none; }
@keyframes floaty { from { transform: translateY(0) rotate(0); } to { transform: translateY(-10px) rotate(.6deg); } }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* marquee */
.marquee { overflow: hidden; border-block: 2px solid var(--ink); background: var(--accent); color: var(--on-accent); transform: rotate(-1.2deg); margin: 0 -2vw; }
.track { display: flex; width: max-content; animation: scroll 28s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.track span { font: 800 1.35rem "Bricolage Grotesque", sans-serif; padding: 14px 28px; white-space: nowrap; }
.track span::after { content: "✦"; margin-left: 56px; opacity: .7; }
@keyframes scroll { to { transform: translateX(-50%); } }
.band { margin-top: 36px; }

/* hover: buttons fill */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateY(101%); transition: transform .35s cubic-bezier(.2,.8,.2,1); z-index: -1; }
.btn:hover::before { transform: none; }
.btn:hover { color: var(--paper); border-color: var(--ink); }
.btn.ghost:hover { color: var(--paper); }

/* hover: cards with cursor spotlight */
.card { position: relative; overflow: hidden; isolation: isolate; transition: opacity .7s, transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-radius .3s; }
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--cx, 50%) var(--cy, 50%), color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
}
.card:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 8px 8px 0 var(--accent); }
.card:first-child:hover { box-shadow: 8px 8px 0 var(--ink); }
.card:hover::before { opacity: 1; }
.card h3 { transition: letter-spacing .3s; }
.card:hover h3 { letter-spacing: .01em; }

/* hover: timeline rows */
.timeline li { transition: transform .3s; }
.timeline li::before { transition: background .25s, transform .25s; }
.timeline li:hover { transform: translateX(8px); }
.timeline li:hover::before { background: var(--accent); transform: scale(1.35); }
.timeline li:hover h3 { color: var(--accent); }

/* hover: skills */
.skills > div { padding: 20px; border-radius: var(--r); transition: background .3s, transform .3s; }
.skills > div:hover { background: var(--panel); transform: translateY(-4px); }
.skills h3 { transition: border-color .3s, padding-right .3s; }
.skills > div:hover h3 { padding-right: 48px; }

/* hover: nav + logo */
.mark { display: inline-block; transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.mark:hover { transform: rotate(-12deg) scale(1.15); color: var(--accent); }
.swatches button { transition: transform .2s; }
.swatches button:hover { transform: scale(1.2) rotate(8deg); }
.seg button { transition: background .2s, color .2s; }
.seg button:not([aria-checked="true"]):hover { background: color-mix(in srgb, var(--accent) 25%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .customizer, .reveal { opacity: 1 !important; transform: none !important; }
  .glow { display: none; }
}

/* horizontal scroll fix */
html, body { overflow-x: clip; max-width: 100%; }
.marquee { margin: 0; transform: none; }
.blob { max-width: 60vw; }

/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.channels { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.channels li { display: grid; grid-template-columns: 6rem 1fr; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.channels span { color: var(--muted); }
.channels a { font: 600 1.15rem "Bricolage Grotesque", sans-serif; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 5px; overflow-wrap: anywhere; }
.channels a:hover { color: var(--accent); }
.form { background: var(--panel); border: 2px solid var(--ink); border-radius: var(--r); padding: 24px; display: grid; gap: 16px; box-shadow: 8px 8px 0 var(--accent); }
.form label { display: grid; gap: 6px; font-weight: 500; }
.form input, .form select, .form textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--line);
  border-radius: min(var(--r), 12px); padding: 11px 14px; width: 100%; transition: border-color .2s, background .2s;
}
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--accent); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); background: var(--panel); }
.form .btn { justify-self: start; cursor: pointer; font: 600 1rem "Figtree", sans-serif; }
.form-note { color: var(--muted); min-height: 1.5em; }
@media (max-width: 880px) { .contact { grid-template-columns: 1fr; } }

/* logo */
.mark { font-size: 1.5rem; letter-spacing: -.03em; }
.mark .m2 { color: var(--accent); }

/* movable avatar */
.hero { position: relative; }
.avatar {
  position: absolute; left: 44%; bottom: 8px; width: clamp(120px, 12vw, 170px); z-index: 3;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot, 0deg));
  transition: transform .6s cubic-bezier(.3,1.5,.5,1);
}
.avatar.dragging { cursor: grabbing; transition: none; }
.avatar:focus-visible { outline-offset: 6px; border-radius: 16px; }
.avatar .bob { animation: bob 3.6s ease-in-out infinite; transform-origin: 100px 200px; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.avatar #head { transform-origin: 100px 190px; transition: transform .2s ease-out; }
.avatar .eye { transform-origin: center; transform-box: fill-box; animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.avatar.dragging .smile { d: path("M89 124 Q100 116 111 124"); }
.bubble {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font-size: .85rem; font-weight: 600;
  padding: 4px 12px; border-radius: 99px; white-space: nowrap; animation: nudge 1.8s ease-in-out infinite;
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
.bubble.gone { display: none; }
@keyframes nudge { 50% { transform: translateX(-50%) translateY(-4px); } }
@media (max-width: 880px) {
  .avatar { position: relative; left: auto; bottom: auto; justify-self: end; width: 120px; }
}
@media (prefers-reduced-motion: reduce) { .avatar .bob, .avatar .eye, .bubble { animation: none; } }

/* ---------- hero v2: big type around a portrait ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero2 {
  --ink: #f4f2ff; --paper: #0b0a24; --muted: #b3b0dc; --line: #34306a; --panel: #1e1b44;
  position: relative; isolation: isolate; overflow: hidden; color: var(--ink);
  height: clamp(560px, calc(100svh - 76px), 760px);
  background:
    radial-gradient(60% 70% at 50% 60%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    #0b0a24;
}
.hero2::before { /* faint grid */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: linear-gradient(#ffffff14 1px, transparent 1px), linear-gradient(90deg, #ffffff14 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(70% 80% at 50% 50%, #000, transparent);
}
.who { position: absolute; left: var(--gutter); top: 22px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; z-index: 4; }
.w {
  position: absolute; font: 800 clamp(3.2rem, 9.4vw, 9rem)/.9 "Bricolage Grotesque", sans-serif;
  letter-spacing: -.045em; font-variation-settings: "opsz" 96; color: #fff; text-shadow: 0 8px 30px #0006; pointer-events: none;
  opacity: 0; animation: wordin 1s cubic-bezier(.2,.8,.2,1) forwards;
}
.w1 { left: 2vw; top: 26%; z-index: 1; }
.w2 { right: 2vw; bottom: 17%; z-index: 3; animation-delay: .2s; }
@keyframes wordin { from { opacity: 0; transform: translateY(40px); letter-spacing: .02em; } to { opacity: 1; transform: none; } }

.portrait { left: 50%; bottom: 0; width: min(44vw, 440px); z-index: 2; position: absolute;
  transform: translateX(-50%) translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot, 0deg)); }
.portrait .bob { transform-origin: 100px 230px; }
.halo { position: absolute; left: 50%; top: 12%; width: 92%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), #7f6cff, #3b82f6, var(--accent)); filter: blur(34px); opacity: .55; animation: spin 14s linear infinite; z-index: -1; }
@keyframes spin { to { transform: translateX(-50%) rotate(1turn); } }
.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.portrait.has-photo svg { visibility: hidden; }
.portrait .bubble { top: 4%; left: 82%; }

.cap { position: absolute; z-index: 4; max-width: 25ch; }
.cap em { font: italic 600 1.2rem "Bricolage Grotesque", sans-serif; }
.cap p { color: var(--muted); margin-top: 6px; }
.capL { left: var(--gutter); bottom: 8%; max-width: 30ch; }
.capL .actions { margin-top: 18px; }
.capR { right: var(--gutter); top: 30%; text-align: right; }

@media (max-width: 880px) {
  .hero2 { height: auto; min-height: 640px; display: flex; flex-direction: column; padding: 64px var(--gutter) 28px; }
  .w, .portrait, .cap, .who { position: relative; left: auto; right: auto; top: auto; bottom: auto; }
  .who { position: absolute; left: var(--gutter); top: 18px; }
  .w1 { order: 1; } .portrait { order: 2; width: min(78vw, 320px); margin: -10px auto -22px; left: 0; } .w2 { order: 3; align-self: flex-end; }
  .capL { order: 4; margin-top: 20px; } .capR { display: none; }
  .portrait { transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot, 0deg)); }
}

/* try the customizer */
.try { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.try .muted { color: var(--muted); max-width: 40ch; }
@media (max-width: 880px) { .try { grid-template-columns: 1fr; } }

/* project screenshots */
.shots { list-style: none; padding: 0; margin: 0 0 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 28px; }
.shot a { display: flex; flex-direction: column; gap: 10px; text-decoration: none; height: 100%; }
.frame { border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--panel); aspect-ratio: 16 / 8.2; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-radius .3s; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.shot a:hover .frame { transform: translateY(-6px) rotate(-.5deg); box-shadow: 8px 8px 0 var(--accent); }
.shot a:hover .frame img { transform: scale(1.06); }
.shot h3 { margin-top: 6px; transition: color .2s; }
.shot a:hover h3 { color: var(--accent); }
.shot p { color: var(--muted); max-width: 52ch; }
.more { margin: 0 0 20px; }
.card:nth-child(1) { grid-column: auto; background: var(--panel); color: inherit; }
.card:nth-child(1) .tags { color: var(--accent); opacity: 1; }
.card:first-child:hover { box-shadow: 8px 8px 0 var(--accent); }
.card:nth-child(1) p:not(.tags) { color: var(--muted); }

@media (max-width: 880px) {
  .hero2 { height: auto; min-height: 0; padding-bottom: 48px; overflow: visible; }
  .w { font-size: 14.5vw; }
  .w1 { align-self: flex-start; }
  .w2 { align-self: flex-end; margin-top: 0; }
  nav a:nth-child(2) { display: none; }
}
@media (max-width: 560px) { nav a:not(:last-child) { display: none; } }

/* hero without portrait: glow only */
.portrait { pointer-events: none; height: 78%; }
.portrait .halo { top: 8%; width: 85%; }
.ext { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.ext-copy p { color: var(--muted); max-width: 52ch; }
.ticks { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 10px; max-width: 52ch; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 8px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg); }
.textlink { align-self: center; font-weight: 600; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.ext .tags { margin-top: 20px; }
.ext-shot { border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--panel); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.ext-shot:hover { transform: translateY(-6px) rotate(.5deg); box-shadow: 8px 8px 0 var(--accent); }
.ext-shot img { display: block; width: 100%; height: auto; }
@media (max-width: 880px) { .ext { grid-template-columns: 1fr; } }

/* readable accent text on any accent or background */
.mark .m2, .mark:hover, .tags, .card .tags, .shot a:hover h3, .timeline li:hover h3, .channels a:hover { color: var(--accent-text); }
.card:nth-child(1) .tags { color: var(--accent-text); }
.mark:hover .m2 { color: var(--accent-text); }
.mark:hover { color: var(--ink); }
.skills h3 { border-color: var(--accent); }
.hp { position: absolute; left: -9999px; }

/* client sites without screenshots, projects */
.sites, .projects { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.sites { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 24px; }
.sites a { display: block; padding: 20px; border: 2px solid var(--ink); border-radius: var(--r); text-decoration: none; background: var(--panel); transition: transform .3s, box-shadow .3s; height: 100%; }
.sites a:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--accent); }
.sites p, .projects p { color: var(--muted); margin-top: 6px; }
.projects { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.projects li { padding: 22px; border-top: 3px solid var(--accent); background: var(--panel); border-radius: var(--r); transition: transform .3s, box-shadow .3s; }
.projects li:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--accent); }
.projects .tags { display: inline-block; margin-top: 12px; padding: 0; }
.skills > div h3 { font-size: 1.1rem; }

/* fixed, blurred top bar */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s; }
.top.scrolled { border-bottom-color: var(--line); }
main { padding-top: 68px; }
.hero2 { height: clamp(560px, calc(100svh - 68px), 760px); }
@media (max-width: 880px) { .hero2 { height: auto; } }

/* custom ring cursor, desktop with a mouse only */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
  .cursor {
    display: block; position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none;
    transform: translate3d(var(--cx, -100px), var(--cy, -100px), 0);
  }
  .cursor span {
    display: block; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
    border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent);
    transition: width .2s, height .2s, margin .2s, background .2s;
  }
  .cursor.big span { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: color-mix(in srgb, var(--accent) 22%, transparent); }
}

/* mobile: space above the ticker, client work as a swipe carousel */
@media (max-width: 880px) {
  .marquee { margin-top: 56px; margin-bottom: 8px; }
}
@media (max-width: 700px) {
  .shots {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px;
    margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 16px; scroll-padding: var(--gutter);
    scrollbar-width: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shot { flex: 0 0 84%; scroll-snap-align: start; }
  .shot a { height: 100%; }
  .sites {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px;
    margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 16px; scroll-padding: var(--gutter);
    scrollbar-width: none;
  }
  .sites::-webkit-scrollbar { display: none; }
  .sites li { flex: 0 0 70%; scroll-snap-align: start; }
}
@media (max-width: 880px) {
  .w { font-size: 12.5vw; max-width: 100%; }
  .w2 { align-self: flex-start; }
  .try > *, .ext > *, .contact > *, .hero2 > * { min-width: 0; max-width: 100%; }
  .try, .ext, .contact { grid-template-columns: minmax(0, 1fr); }
}
