:root {
  --bg: #fbfbfa;
  --card: #ffffff;
  --ink: #1a1a1e;
  --muted: #66666e;
  --accent: #0369a1;
  --accent-strong: #075985;
  --sun: #f5b700;
  --line: #e5e5e1;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141417;
    --card: #1c1c21;
    --ink: #e7e7ea;
    --muted: #9a9aa3;
    --accent: #58b7e8;
    --accent-strong: #8ccdf0;
    --sun: #f5b700;
    --line: #2a2a30;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

.mono,
.wordmark,
header nav a,
h2,
.cmd,
.record dt,
.record dd,
.project .meta,
footer .fine {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
}

.inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-strong);
}

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

::selection {
  background: var(--sun);
  color: #1a1a1e;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  z-index: 10;
}

.skip-link:focus {
  left: 12px;
}

/* ---------- Header ---------- */

header {
  border-bottom: 1px solid var(--line);
}

header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.wordmark {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.wordmark .tld {
  color: var(--accent);
}

header nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 8px;
  font-size: 0.82rem;
  padding: 8px 8px;
}

header nav a:hover {
  color: var(--ink);
}

/* ---------- Hero ---------- */

.intro {
  padding: 56px 0 8px;
}

h1 {
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-wrap: balance;
}

.role {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 22px;
}

.bio {
  max-width: 36em;
  margin-bottom: 32px;
}

/* ---------- WHOIS card (signature) ---------- */

.whois {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 22px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.cmd {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.cmd .prompt {
  color: var(--sun);
  font-weight: 600;
}

.cmd .cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  vertical-align: text-bottom;
  background: var(--muted);
  animation: blink 1.1s steps(1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .cmd .cursor {
    animation: none;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.record {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  row-gap: 4px;
  font-size: 0.82rem;
  line-height: 1.8;
}

.record dt {
  color: var(--muted);
}

.record dd {
  color: var(--ink);
}

.record dd a {
  color: var(--accent);
  text-decoration: none;
}

.record dd a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.record .status {
  font-weight: 600;
}

.record .dot {
  color: var(--sun);
}

/* ---------- Sections ---------- */

section {
  padding: 36px 0 8px;
}

h2 {
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 18px;
}

h2::before {
  content: ";; " / "";
  color: var(--sun);
  font-weight: 600;
}

.section-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

/* ---------- Projects ---------- */

.project {
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}

.project:first-of-type {
  border-top: 1px solid var(--line);
}

.project h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline;
}

.project h3 a {
  color: var(--ink);
  text-decoration: none;
}

.project h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.project .meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 2px 0 8px;
}

.project p:last-child {
  max-width: 40em;
  color: var(--ink);
}

/* ---------- About / Contact ---------- */

#about p,
#contact p {
  max-width: 40em;
  margin-bottom: 14px;
}

.email {
  font-weight: 600;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
}

footer .inner {
  padding-top: 28px;
  padding-bottom: 44px;
}

footer p {
  margin-bottom: 10px;
}

footer .fine {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 0;
}

footer .fine a {
  color: var(--muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 520px) {
  .intro {
    padding-top: 40px;
  }

  .record {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .record dt {
    margin-top: 8px;
  }

  header nav a {
    margin-left: 2px;
    font-size: 0.78rem;
  }
}
