:root {
  color-scheme: dark;
  --page: #111118;
  --surface: #1c1c26;
  --raised: #252535;
  --line: #363649;
  --text: #f5f4fa;
  --muted: #c0becf;
  --accent: #c9bfff;
  --action-ink: #1b1334;
  --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.7 system-ui, "Malgun Gothic", sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: inherit; text-underline-offset: .24em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip { position: fixed; z-index: 3; top: 8px; left: 8px; padding: 8px 16px; background: var(--surface); transform: translateY(-160%); }
.skip:focus { transform: none; }
.wrap { width: min(1120px, calc(100% - 56px)); margin-inline: auto; }
.top { position: sticky; z-index: 2; top: 0; background: var(--page); border-bottom: 1px solid var(--line); }
nav, .links, .footer { display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); }
nav, .footer { justify-content: space-between; }
nav { min-height: 66px; }
nav a, .footer a { text-decoration: none; }
nav a:hover, .footer a:hover { color: var(--accent); }
.brand { font-size: 1.18rem; font-weight: 850; letter-spacing: -.04em; }
.brand span { color: var(--accent); }
.links { color: var(--muted); font-size: .91rem; font-weight: 650; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.055em; }
h1 { font-size: clamp(2.2rem, 5.55vw, 4.6rem); font-weight: 850; }
h2 { font-size: clamp(2rem, 4.1vw, 3.2rem); }
h3 { font-size: clamp(1.25rem, 2.3vw, 1.65rem); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: center;
  gap: clamp(28px, 6vw, 88px);
  padding-block: clamp(52px, 8vw, 112px);
}
.eyebrow { color: var(--accent); font-size: .84rem; font-weight: 750; }
.hero-label { margin-bottom: 20px; }
.lead { max-width: 43ch; margin-block: 22px 30px; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.14rem); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--accent);
  color: var(--action-ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #e0d8ff; }
.button[hidden] { display: none; }
.portrait {
  width: min(100%, 320px);
  justify-self: end;
  padding: 14px 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.profile-photo { display: block; width: 100%; height: auto; border-radius: 15px; }
.portrait .eyebrow { margin: 16px 6px 2px; }
.portrait-name { margin-inline: 6px; font-size: 1.55rem; font-weight: 820; line-height: 1.3; }
.portrait-meta { margin: 6px 6px 0; color: var(--muted); font-size: .91rem; }
.section { border-top: 1px solid var(--line); padding-block: clamp(44px, 7vw, 88px); }
.section h2 { margin-bottom: 22px; }
.section-intro { margin: -10px 0 28px; color: var(--muted); }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  padding: clamp(22px, 4vw, 46px);
  border: 1px solid #4d436a;
  border-radius: var(--radius);
  background: #242039;
  margin-bottom: 16px;
}
.feature h3 { margin: 7px 0 14px; font-size: clamp(2rem, 4.6vw, 3.65rem); }
.feature small { font-size: .43em; color: var(--accent); }
.feature p + p { margin-top: 12px; }
.feature p:not(.eyebrow), .card > p:not(.eyebrow, .result, .tags) { color: var(--muted); }
.demo { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.demo a {
  padding: 7px 11px;
  border: 1px solid #625783;
  border-radius: 9px;
  color: var(--accent);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}
.demo a:hover { background: var(--raised); text-decoration: underline; }
.feature-flow { margin-top: 12px; color: var(--muted); font-size: .9rem; }
.feature-flow summary { padding-block: 7px; cursor: pointer; }
.flow { padding-inline-start: 23px; margin-block: 6px 0; }
.flow li { padding-block: 2px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.card h3 { margin-bottom: 12px; }
.card .eyebrow { margin-bottom: 6px; }
.card ul { margin: 0; padding-inline-start: 20px; color: var(--muted); }
.card li + li { margin-top: 9px; }
.card strong { color: var(--text); }
.result { margin-top: 10px; color: var(--accent); font-weight: 800; }
.project-media { margin-top: 20px; }
.project-media a { display: block; border-radius: 13px; }
.project-media a:hover { outline: 1px solid var(--accent); outline-offset: 3px; }
.project-media img { display: block; width: 100%; height: auto; border-radius: inherit; }
.project-media figcaption { margin-top: 8px; color: var(--muted); font-size: .83rem; }
.feature-preview .project-media { margin: 0; }
#work .card { display: flex; flex-direction: column; }
#work .card .project-media { margin-top: auto; padding-top: 20px; }
#work .card .project-media a {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  background: var(--page);
  overflow: hidden;
}
#work .card .project-media img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.wide { grid-column: 1 / -1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 4px 12px; border-radius: 999px; background: var(--raised); color: var(--muted); font-size: .88rem; }
.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.contact h2 { margin-bottom: 8px; }
.contact a { color: var(--accent); }
.status { width: 100%; }
.status:empty { display: none; }
.footer { border-top: 1px solid var(--line); padding-block: 22px; color: var(--muted); font-size: .85rem; }
@media (max-width: 780px) {
  .wrap { width: calc(100% - 36px); }
  .hero, .feature { grid-template-columns: 1fr; }
  .portrait { justify-self: start; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .hero { padding-block: 40px; }
  .links { gap: 13px; }
  .footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
