:root {
  --bg: #fafaf8;
  --text: #1b1b1a;
  --muted: #6e6d68;
  --line: #e4e3de;
  --accent: #2f5d8a;
  --accent-soft: #d9e3ec;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --text: #e8e7e3;
    --muted: #9a9993;
    --line: #2a2a28;
    --accent: #8fb3d6;
    --accent-soft: #23303c;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* header */
.top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding-top: 32px; padding-bottom: 32px;
}
.logo { font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
nav { display: flex; gap: 20px; font-size: 14px; color: var(--muted); }
nav a { text-decoration: none; }
nav a:hover { color: var(--text); }

/* sections */
section { padding: 56px 0; border-top: 1px solid var(--line); }
.hero { border-top: 0; padding: 72px 0 88px; }

.label {
  font: 400 12px/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 0 0 28px;
}
.hero .label { margin-bottom: 20px; }

h1 {
  font-size: clamp(24px, 4.2vw, 34px); line-height: 1.3;
  font-weight: 500; letter-spacing: -0.02em; margin: 0; max-width: 30ch;
}

/* projects */
.projects { list-style: none; margin: 0; padding: 0; }
.project {
  display: grid; grid-template-columns: 132px 1fr; gap: 28px;
  padding: 28px 0; border-top: 1px solid var(--line);
}
.project:first-child { border-top: 0; padding-top: 0; }
.thumb {
  width: 132px; height: 84px; border: 1px solid var(--line);
  border-radius: 4px; display: block;
}
.thumb .mark { stroke: var(--accent); fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.thumb .bar { fill: var(--accent); }
.thumb .dot { fill: var(--accent); }
.thumb .axis { stroke: var(--line); stroke-width: 1; }

.project-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.project h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0; line-height: 1.4; }
.year { font: 400 12px var(--mono); color: var(--muted); }
.sample {
  font: 400 11px var(--mono); color: var(--muted);
  border: 1px dashed var(--line); border-radius: 3px; padding: 0 6px;
}
.project p { margin: 8px 0 12px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 10px; }
.tags li {
  font: 400 12px/1 var(--mono); padding: 5px 8px;
  background: var(--accent-soft); color: var(--text); border-radius: 3px;
}
.links { display: flex; gap: 18px; font-size: 14px; }
.links a { color: var(--accent); text-decoration: none; }
.links a:hover { text-decoration: underline; }

/* skills */
.skills { display: grid; grid-template-columns: 140px 1fr; gap: 10px 28px; margin: 0; }
.skills dt { color: var(--muted); font-size: 14px; padding-top: 1px; }
.skills dd { margin: 0; }

/* about */
.prose p { margin: 0 0 16px; max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }

/* contact */
.contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.contact a { color: var(--accent); text-decoration: none; }
.contact a:hover { text-decoration: underline; }

/* footer */
.foot {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 32px; padding-bottom: 48px; border-top: 1px solid var(--line);
  font: 400 12px var(--mono); color: var(--muted);
}

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .top { flex-direction: column; gap: 8px; padding-bottom: 8px; }
  nav { gap: 16px; }
  .hero { padding: 48px 0 64px; }
  .project { grid-template-columns: 1fr; gap: 16px; }
  .skills { grid-template-columns: 1fr; gap: 2px; }
  .skills dd { margin-bottom: 12px; }
}
