/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  --bg:        #fbfbf9;
  --bg-soft:   #f2f2ee;
  --surface:   #ffffff;
  --border:    #e2e2dc;
  --border-strong: #cfcfc7;

  --text:      #15181d;
  --text-soft: #545a63;
  --text-dim:  #7c828b;

  --accent:      #0a6c7d;
  --accent-soft: #e4f2f4;
  --accent-text: #ffffff;

  --radius: 10px;
  --wrap: 1080px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
          "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:        #0d1016;
    --bg-soft:   #12161e;
    --surface:   #151a23;
    --border:    #242b36;
    --border-strong: #333c4a;

    --text:      #e7eaef;
    --text-soft: #a3abb7;
    --text-dim:  #78808c;

    --accent:      #4fd1e0;
    --accent-soft: #10262c;
    --accent-text: #07171b;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:        #0d1016;
  --bg-soft:   #12161e;
  --surface:   #151a23;
  --border:    #242b36;
  --border-strong: #333c4a;

  --text:      #e7eaef;
  --text-soft: #a3abb7;
  --text-dim:  #78808c;

  --accent:      #4fd1e0;
  --accent-soft: #10262c;
  --accent-text: #07171b;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 60px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 620;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--accent);
  flex: none;
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14.5px;
}
.nav a { color: var(--text-soft); }
.nav a:hover { color: var(--text); text-decoration: none; }

.header-actions { display: flex; gap: 8px; }

.pill {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  min-width: 38px;
  height: 32px;
  padding-inline: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.pill:hover { color: var(--text); border-color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(56px, 11vw, 104px) clamp(40px, 8vw, 72px);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60% 120% at 12% 0%, var(--accent-soft), transparent 62%),
    var(--bg);
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-tagline {
  max-width: 36ch;
  margin: 0 0 26px;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  line-height: 1.5;
  color: var(--text-soft);
  text-wrap: balance;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}
.chips li {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding-inline: 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 560;
  transition: border-color .15s, transform .1s;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover { filter: brightness(1.08); }

/* ---------- sections ---------- */
.section { padding-block: clamp(48px, 8vw, 84px); }
.section + .section { border-top: 1px solid var(--border); }

.section-title {
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  font-weight: 660;
  margin-bottom: 12px;
}

.section-lede {
  margin: 0 0 34px;
  max-width: 60ch;
  color: var(--text-soft);
}
.section-title + .cards,
.section-title + .grid { margin-top: 34px; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.about-prose p { margin: 0 0 18px; color: var(--text-soft); max-width: 56ch; }
.about-prose p:last-child { margin-bottom: 0; }

.skill-list { list-style: none; margin: 0; padding: 0; }
.skill-list li {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.skill-list li:last-child { border-bottom: 1px solid var(--border); }
.skill-list h3 { font-size: 15px; font-weight: 640; margin-bottom: 4px; }
.skill-list p { margin: 0; font-size: 14.5px; color: var(--text-dim); }

/* ---------- featured cards ---------- */
.cards { display: grid; gap: 18px; }

.card {
  position: relative;
  padding: 26px clamp(20px, 3vw, 30px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .15s;
}
.card:hover { border-color: var(--border-strong); }

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 6px;
}

.card-title { font-size: 1.22rem; font-weight: 660; }
.card-title a { color: var(--text); }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:hover { color: var(--accent); text-decoration: none; }

.card-stack {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
}

.card-desc { margin: 0 0 18px; color: var(--text-soft); max-width: 72ch; }

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

/* Sits above the title's full-card overlay link, so these stay clickable. */
.card-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 13.5px;
  font-weight: 560;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.card-meta li {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .02em;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-dim);
  background: var(--bg-soft);
}
.card-meta li.is-star { color: var(--accent); border-color: var(--accent); }

/* ---------- compact grids ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.grid .card { padding: 22px; }
.grid .card-title { font-size: 1.05rem; }
.grid .card-desc { font-size: 14.5px; margin-bottom: 16px; }

.grid-private .card { background: var(--bg-soft); }
.grid-private .card:hover { border-color: var(--border); }

.tag-private {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px dashed var(--border-strong);
  border-radius: 5px;
  padding: 1px 8px;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 30px;
  background: var(--bg-soft);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-name { margin: 0; font-weight: 600; }
.footer-links { display: flex; gap: 20px; font-size: 14.5px; }
.footer-links a { color: var(--text-soft); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .hero-tagline { max-width: none; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
}
