/* ---------------------------------------------------------------
   Design tokens. Defined once on :root, overridden for dark mode.
   Think of these as #defines — change here, everything follows.
   --------------------------------------------------------------- */
:root {
  --bg:        #fbfbfa;
  --surface:   #ffffff;
  --text:      #1a1a1a;
  --text-dim:  #5c5c5c;
  --border:    #e2e2df;
  --accent:    #1c5d99;
  --accent-fg: #ffffff;

  --measure: 68ch;        /* readable line length cap */
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #121212;
    --surface:  #1a1a1a;
    --text:     #ececec;
    --text-dim: #a0a0a0;
    --border:   #2e2e2e;
    --accent:   #7cb3e0;
    --accent-fg:#10243a;
  }
}

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

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

/* Keyboard users get a visible target; mouse users never see it. */
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--pad);
  top: 0.5rem;
  z-index: 10;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
}

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

/* --- header ---------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 5;
}
.site-header nav {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.85rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: var(--mono);
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.04em;
}
.site-header ul {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.94rem;
}
.site-header a:not(.brand) {
  color: var(--text-dim);
  text-decoration: none;
}
.site-header a:not(.brand):hover { color: var(--text); }

/* --- layout ---------------------------------------------------- */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--pad);
}
section { padding: 3.5rem 0; }
section + section { border-top: 1px solid var(--border); }

h1 {
  font-size: clamp(2.1rem, 7vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}
h2 {
  font-size: 1.05rem;
  font-family: var(--mono);
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 0 1.5rem;
}
h3 { font-size: 1.12rem; margin: 0 0 0.35rem; }

.hero { padding-top: 4.5rem; }
.tagline {
  font-size: 1.15rem;
  color: var(--text-dim);
  margin: 0 0 2rem;
  max-width: 54ch;
}
.section-note {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: -0.75rem 0 1.75rem;
}

/* --- buttons --------------------------------------------------- */
.links { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.btn {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: border-color 0.15s, transform 0.15s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

/* --- project cards --------------------------------------------- */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.4rem;
}
.card p { margin: 0.5rem 0 0; }
.meta {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}
.status {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.status.building {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- tags ------------------------------------------------------ */
.skills-heading {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-top: 2rem;
}
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}
.tags li {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
}

.contact-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }

footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 2rem var(--pad);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* Respect users who asked the OS to reduce motion. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
html { scroll-behavior: smooth; }
