/* ============ Portfolio v3 · category standard, light ============ */
:root {
  --page: #fbfbfc;
  --surface: #ffffff;
  --tint: #f4f5f7;
  --ink: #0b0d12;
  --ink-2: #4b5060;
  --ink-3: #6b7080;
  --line: #e6e8ec;
  --line-2: #d6d9df;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --ok-line: #c6efd5;
  --focus: #2b59c3;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  --shadow-shot: 0 1px 2px rgb(11 13 18 / .06), 0 24px 48px -16px rgb(11 13 18 / .18);
  --shadow-card: 0 1px 2px rgb(11 13 18 / .04), 0 8px 24px -12px rgb(11 13 18 / .10);
  --f: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gut: clamp(20px, 5vw, 40px);
  --sec: clamp(80px, 11vw, 136px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--f); font-size: 16px; line-height: 1.6; letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: #dbe4fb; color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: var(--line-2) transparent; }
.wrap { width: min(1120px, 100% - 2 * var(--gut)); margin-inline: auto; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); font-weight: 500; font-size: 14px; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 500; letter-spacing: -.005em;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #262a33; }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-secondary:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.btn-ghost { color: var(--ink-2); padding-inline: 10px; }
.btn-ghost:hover { color: var(--ink); }
.btn-quiet { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.btn .ic { width: 17px; height: 17px; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50; background: rgb(251 251 252 / .86);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s var(--ease);
}
.bar.scrolled { border-bottom-color: var(--line); }
.bar-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.name-mark { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.links { display: flex; gap: 4px; margin-inline: auto; }
.links a { padding: 8px 12px; border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: color .2s, background-color .2s; }
.links a:hover { color: var(--ink); background: var(--tint); }
.links a.on { color: var(--ink); }
.menu { display: none; width: 40px; height: 40px; border-radius: 999px; align-items: center; justify-content: center; }
.menu .ic-close, .menu[aria-expanded="true"] .ic-open { display: none; }
.menu[aria-expanded="true"] .ic-close { display: block; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.portrait {
  width: 144px; height: 144px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 6px var(--surface), 0 0 0 7px var(--line), 0 18px 36px -18px rgb(11 13 18 / .35);
}
.status {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 32px; padding: 6px 12px 6px 10px;
  border-radius: 999px; background: var(--ok-bg); box-shadow: inset 0 0 0 1px var(--ok-line);
  color: var(--ok); font-size: 13px; font-weight: 500;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
h1 { margin-top: 20px; font-size: clamp(42px, 6.4vw, 76px); font-weight: 600; line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; }
.role { margin-top: 14px; font-size: clamp(19px, 2vw, 23px); font-weight: 500; letter-spacing: -.015em; color: var(--ink-2); }
.summary { margin-top: 18px; max-width: 56ch; font-size: 17px; line-height: 1.65; color: var(--ink-3); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-top: 28px; font-size: 14px; color: var(--ink-3); }
.meta li { display: inline-flex; align-items: center; gap: 6px; }
.meta .ic { width: 16px; height: 16px; }

/* ---------- worked-with row ---------- */
.worked { border-block: 1px solid var(--line); background: var(--surface); }
.worked .wrap { display: flex; align-items: center; gap: 16px 40px; padding: 26px 0; flex-wrap: wrap; justify-content: center; }
.worked-label { font-size: 13px; color: var(--ink-3); }
.worked-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; }
.worked-list li { font-size: 16px; font-weight: 600; letter-spacing: -.015em; color: var(--ink-2); }
.worked-list span { font-weight: 400; color: var(--ink-3); font-size: 14px; margin-left: 4px; }

/* ---------- sections ---------- */
.section { padding: var(--sec) 0; }
.section-tint { background: var(--tint); border-block: 1px solid var(--line); }
.head { display: grid; gap: 10px; margin-bottom: clamp(40px, 6vw, 64px); max-width: 640px; }
.head h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 600; line-height: 1.1; letter-spacing: -.035em; }
.head p { font-size: 17px; color: var(--ink-3); }

/* experience */
.roles { display: grid; }
.role-item { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding: 40px 0; border-top: 1px solid var(--line); }
.role-item:last-child { border-bottom: 1px solid var(--line); }
.when { font-family: var(--f-mono); font-size: 13px; color: var(--ink-3); padding-top: 6px; font-variant-numeric: tabular-nums; }
.what h3 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.org { margin-top: 4px; font-size: 16px; color: var(--ink-2); }
.points { display: grid; gap: 10px; margin-top: 20px; max-width: 68ch; }
.points li { position: relative; padding-left: 20px; color: var(--ink-2); }
.points li::before { content: ""; position: absolute; left: 3px; top: .72em; width: 5px; height: 1.5px; background: var(--ink-3); }
.sub-label { margin-top: 28px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tags li { font-size: 13.5px; padding: 5px 12px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.clients { display: grid; margin-top: 12px; max-width: 760px; }
.clients div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.clients dt { font-weight: 600; font-size: 15px; }
.clients dd { color: var(--ink-2); font-size: 15px; }

/* featured project */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.feature-copy h3 { font-size: 32px; font-weight: 600; letter-spacing: -.03em; }
.feature-lead { margin-top: 12px; font-size: 17px; color: var(--ink-2); line-height: 1.65; }
.feature .points { margin-top: 24px; font-size: 15px; }
.feature-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.tour { position: sticky; top: 88px; min-width: 0; }
.feature-copy { min-width: 0; }
.tour-tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 16px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tour-tabs::-webkit-scrollbar { display: none; }
.tour-tabs [role="tab"] { padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink-3); white-space: nowrap; transition: color .2s, background-color .25s var(--ease); }
.tour-tabs [role="tab"]:hover { color: var(--ink); }
.tour-tabs [aria-selected="true"], .tour-tabs [aria-selected="true"]:hover { background: var(--ink); color: #fff; }
.frame { border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-shot); overflow: hidden; outline: 1px solid rgb(11 13 18 / .06); }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #fafafb; }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.frame-bar span { margin-left: auto; margin-right: auto; padding: 3px 14px; border-radius: 6px; background: var(--tint); font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); transform: translateX(-24px); }
.frame-view { aspect-ratio: 16 / 11; overflow: hidden; background: var(--tint); }
.frame-view img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: opacity .35s var(--ease), transform .6s var(--ease); }
.frame-view img.swap { opacity: 0; transform: scale(1.015); }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.stack li { font-family: var(--f-mono); font-size: 12px; padding: 4px 10px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.stack-sm { margin-top: 16px; }

.more { margin-top: clamp(64px, 9vw, 104px); }
.more-h { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 20px; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.card-shot { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--tint); }
.card-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.card-body { padding: 22px 24px 24px; }
.card h4 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.more-grid:has(> li:only-child) { grid-template-columns: minmax(0, 1fr); }
.more-grid > li:only-child { flex-direction: row; }
.more-grid > li:only-child .card-shot { flex: 0 0 42%; aspect-ratio: auto; min-height: 260px; border-bottom: 0; border-right: 1px solid var(--line); }
.more-grid > li:only-child .card-body { align-self: center; padding: 32px 40px; }
.card p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }

/* skills */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.skills div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.skills dt { font-size: 14px; font-weight: 500; color: var(--ink-3); padding-top: 3px; }
.skills dd { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; font-weight: 500; }
.edu { margin-top: clamp(56px, 8vw, 88px); display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
.edu h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.edu ul { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) max-content; column-gap: 0; border-bottom: 1px solid var(--line); }
.edu li { display: contents; }
.edu li > * { padding: 16px 0; border-top: 1px solid var(--line); }
.edu li > *:not(:last-child) { padding-right: 16px; }
.edu strong { font-weight: 600; }
.edu span { color: var(--ink-2); }
.edu time { font-family: var(--f-mono); font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* contact */
.contact { background: var(--surface); border-top: 1px solid var(--line); }
.contact-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact h2 { font-size: clamp(36px, 5vw, 60px); font-weight: 600; line-height: 1.05; letter-spacing: -.04em; text-wrap: balance; }
.contact-lead { margin-top: 18px; max-width: 52ch; font-size: 17px; color: var(--ink-3); }
.channels { width: min(560px, 100%); margin-top: 56px; text-align: left; border-top: 1px solid var(--line); }
.channels li { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.channels a { flex: 1; display: grid; grid-template-columns: 20px 90px minmax(0, 1fr); align-items: center; gap: 14px; padding: 16px 4px; transition: color .2s; min-width: 0; }
.channels a:hover .ch-v { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.channels .ic { color: var(--ink-3); }
.ch-k { font-size: 14px; color: var(--ink-3); }
.ch-v { font-weight: 500; overflow-wrap: anywhere; }
.copy { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; color: var(--ink-3); transition: background-color .2s, color .2s; }
.copy:hover { background: var(--tint); color: var(--ink); }
.copy .ic-done, .copy.done .ic-copy { display: none; }
.copy.done .ic-done { display: block; color: var(--ok); }
.toast { min-height: 1.6em; margin-top: 16px; font-size: 14px; color: var(--ok); }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 28px 0; font-size: 13px; color: var(--ink-3); }

/* entrance: one quiet moment in the hero, content visible by default */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-in > * { animation: rise .8s var(--ease) both; }
  .js .hero-in > :nth-child(2) { animation-delay: .06s; }
  .js .hero-in > :nth-child(3) { animation-delay: .1s; }
  .js .hero-in > :nth-child(4) { animation-delay: .14s; }
  .js .hero-in > :nth-child(5) { animation-delay: .18s; }
  .js .hero-in > :nth-child(6) { animation-delay: .22s; }
  .js .hero-in > :nth-child(7) { animation-delay: .26s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .tour { position: static; order: -1; }
  .skills { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .links {
    position: absolute; top: 64px; left: 0; right: 0; margin: 0; flex-direction: column; gap: 0;
    padding: 8px var(--gut) 16px; background: var(--page); border-bottom: 1px solid var(--line);
    display: none;
  }
  .links.open { display: flex; }
  .links a { padding: 14px 0; border-radius: 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .links a:last-child { border-bottom: 0; }
  .links a:hover { background: none; }
  .bar-cv { margin-left: auto; }
  .menu { display: inline-flex; }
  .bar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--page); }
  .role-item { grid-template-columns: 1fr; gap: 10px; padding: 32px 0; }
  .when { padding-top: 0; }
  .clients div, .skills div { grid-template-columns: 1fr; gap: 6px; }
  .edu { grid-template-columns: 1fr; gap: 16px; }
  .edu ul { grid-template-columns: minmax(0, 1fr); }
  .edu li > * { border-top: 0; padding: 0; }
  .edu li > strong { border-top: 1px solid var(--line); padding-top: 14px; }
  .edu li > time { padding-bottom: 14px; }
  .worked .wrap { flex-direction: column; gap: 14px; }
  .worked-list { gap: 10px 24px; }
  .more-grid > li:only-child { flex-direction: column; }
  .more-grid > li:only-child .card-shot { flex: none; aspect-ratio: 16 / 9; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .more-grid > li:only-child .card-body { padding: 22px 24px 24px; }
}
@media (max-width: 480px) {
  .cta { flex-direction: column; align-items: stretch; width: 100%; }
  .cta .btn { width: 100%; }
  .channels a { grid-template-columns: 20px 64px minmax(0, 1fr); gap: 10px; }
  .frame-bar span { display: none; }
}
