:root {
  --bg: #111318;
  --text: #F4F1EA;
  --muted: #8A93A3;
  --accent: #2E6F85;
  --accent-text: #6FB3C9;
  --measure: 40rem;
  --wide: 60rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

main { flex: 1; }

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

h1, h2, h3, .brand {
  font-family: 'Jost', system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--accent-text); }
a:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Header */
.site-header {
  position: relative;
  padding-block: clamp(3rem, 10vw, 6.5rem) clamp(2.5rem, 7vw, 4.5rem);
  border-bottom: 1px solid var(--accent);
  background-image: linear-gradient(to top, rgba(46, 111, 133, 0.12), rgba(46, 111, 133, 0) 70%);
}
.site-header.compact {
  padding-block: 1.5rem;
  background-image: none;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand {
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  letter-spacing: 0.01em;
}
.compact .brand { font-size: 1.5rem; }
.brand a { color: inherit; text-decoration: none; }
.brand a:hover { color: var(--accent-text); }
.tagline {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.25rem;
}
.intro {
  margin: 1.75rem 0 0;
  max-width: var(--measure);
}

/* Sections */
section { padding-block: clamp(2.25rem, 6vw, 3.5rem); }
section + section { border-top: 1px solid rgba(138, 147, 163, 0.25); }
h2 {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Projects */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
}
.card {
  border: 1px solid var(--accent);
  padding: 1.5rem;
}
.card h3 { font-size: 1.5rem; }
.status {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-style: italic;
}
.card p:last-child { margin: 1rem 0 0; }
.tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--text);
  font-family: 'Jost', system-ui, sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

/* Values */
.values {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: var(--measure);
}
.values li {
  padding: 0.75rem 0 0.75rem 1.25rem;
  border-left: 2px solid var(--accent);
}
.values li + li { margin-top: 0.5rem; }

/* Prose */
.prose { max-width: var(--measure); }
.prose h1 { font-size: clamp(2rem, 6vw, 2.75rem); }
.prose .meta { color: var(--muted); margin: 0.75rem 0 2rem; }
.prose p { margin: 0 0 1.25rem; }
.prose-page { padding-block: clamp(2.5rem, 7vw, 4.5rem); }

/* Footer */
.site-footer {
  padding-block: 1.75rem;
  border-top: 1px solid var(--accent);
  color: var(--muted);
  font-size: 1rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-text); }

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