/* ---- tokens ------------------------------------------------------------- */
:root {
  --bg: #f6f5f9;
  --surface: #ffffff;
  --text: #1d1926;
  --muted: #5c5470;
  --border: #e2e0ea;
  --accent: #1f6f7a;
  --accent-soft: #e6eef0;

  --measure: 68ch;
  --radius: 10px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16131c;
    --surface: #1f1b28;
    --text: #e9e6f0;
    --muted: #a79fb8;
    --border: #332c40;
    --accent: #5cc6d1;
    --accent-soft: #262034;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

img {
  max-width: 100%;
  height: auto;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---- header / footer ---------------------------------------------------- */
.site-header,
.site-footer,
main {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 2rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  flex: none;
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-header nav a:hover {
  color: var(--accent);
}

.site-header nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

main {
  flex: 1;
  padding-block: 1.5rem 4rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.4rem);
  margin-block: 0.5rem 1.25rem;
}

h2 {
  font-size: 1.35rem;
  margin-block: 2.5rem 0.75rem;
}

/* The lede carries the thesis — it should not read as a caption. */
.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-block: 1.25rem 1.75rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.5rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

/* ---- card lists (projects + artifacts) ---------------------------------- */
.cards {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.card h3 a {
  text-decoration: none;
}

.card h3 a:hover {
  text-decoration: underline;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.project-description {
  white-space: pre-line;
}

.project-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: -0.15rem 0 1rem;
}

.project-images figure {
  margin: 0;
}

.project-images img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 3px);
  background: #f1f2f6;
}

.project-images figcaption {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

@media (max-width: 560px) {
  .project-images {
    grid-template-columns: 1fr;
  }
}

.card-meta {
  margin-top: 0.75rem !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
  font-size: 0.85rem;
}

.tag {
  background: var(--accent-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.8rem;
}

.status {
  color: var(--muted);
  font-style: italic;
}

.empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--muted);
}

/* ---- resume ------------------------------------------------------------- */
.resume-contact {
  color: var(--muted);
  margin-top: -0.5rem;
  font-size: 0.95rem;
}

.resume-section {
  margin-top: 2.5rem;
}

.resume-section > h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.resume-entry {
  margin-bottom: 1.6rem;
}

.resume-entry h3 {
  margin: 0;
  font-size: 1.05rem;
}

.resume-meta {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.resume-meta-inline {
  color: var(--muted);
  font-size: 0.92rem;
}

.resume-entry ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

.resume-entry li {
  margin-bottom: 0.35rem;
}

.resume-plain {
  margin: 0;
  padding-left: 1.15rem;
}

.resume-plain li {
  margin-bottom: 0.5rem;
}

.resume-skills {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(9rem, auto) 1fr;
  gap: 0.4rem 1.25rem;
}

.resume-skills dt {
  font-weight: 650;
}

.resume-skills dd {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 34rem) {
  .resume-skills {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
  .resume-skills dd {
    margin-bottom: 0.6rem;
  }
}

/* Printing the page should produce something close to the PDF. */
@media print {
  .site-header nav,
  .site-footer,
  .skip-link {
    display: none;
  }
  body {
    font-size: 10.5pt;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  .resume-section {
    break-inside: avoid;
    margin-top: 1.4rem;
  }
  .resume-entry {
    break-inside: avoid;
  }
}

/* ---- name + handle lockup ------------------------------------------------ */
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 650;
}

.brand-sub {
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.name-heading {
  margin-bottom: 0.1rem;
}

.name-sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.08em;
}
