/* Tom Hilbert — portfolio styles
   Dark, typographic, self-contained. No frameworks, no external assets. */

:root {
  --bg: #0b0d10;
  --bg-raised: #12151a;
  --border: #23272e;
  --border-strong: #33383f;
  --text: #e8e9eb;
  --text-dim: #9aa0aa;
  --text-faint: #6b7078;
  --accent: #e6b566;
  --accent-dim: #a9824e;
  --max: 880px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f5f2;
    --bg-raised: #ffffff;
    --border: #ddd9d1;
    --border-strong: #c7c2b8;
    --text: #1a1a18;
    --text-dim: #55534d;
    --text-faint: #85817a;
    --accent: #a9702c;
    --accent-dim: #8a5a20;
  }
}

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

html {
  color-scheme: dark light;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #14110a;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  z-index: 100;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Header */

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

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.wordmark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 4px 9px;
}

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

.site-header nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
}

.site-header nav a {
  display: inline-block;
  font-size: 14px;
  color: var(--text-dim);
  padding: 11px 6px;
  transition: color 0.15s ease;
}

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

/* Hero */

.hero {
  padding: 96px 24px 72px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(32px, 5.4vw, 52px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin-bottom: 22px;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 18px;
  max-width: 46ch;
}

/* Sections */

.section {
  padding: 64px 24px;
  border-top: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 32px;
}

/* Project cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  background: var(--bg-raised);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.card h3 {
  font-size: 19px;
  font-weight: 600;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
}

.tag-quiet {
  color: var(--text-faint);
  border-color: var(--border-strong);
}

.card p {
  color: var(--text-dim);
  font-size: 15px;
}

.card .tech {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: auto;
}

.card-link {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  padding-bottom: 12px;
  margin-top: 4px;
  min-width: 0;
  overflow-wrap: break-word;
}

.card-link:hover {
  color: var(--accent);
}

.card-link span {
  display: inline-block;
  transition: transform 0.15s ease;
}

.card-link:hover span {
  transform: translateX(3px);
}

/* About */

.about-copy {
  max-width: 62ch;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--text-dim);
  font-size: 17px;
}

/* Contact */

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 18px;
}

.contact-list a {
  display: inline-block;
  border-bottom: 1px solid var(--border-strong);
  padding: 10px 0 6px;
}

.contact-list a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Footer */

.site-footer {
  padding: 32px 24px 48px;
  color: var(--text-faint);
  font-size: 13px;
  font-family: var(--font-mono);
}

/* Responsive */

@media (max-width: 720px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .header-row {
    height: 56px;
  }

  .hero {
    padding: 72px 20px 56px;
  }

  .section {
    padding: 48px 20px;
  }

  .site-header nav ul {
    gap: 18px;
  }
}

@media (max-width: 400px) {
  body {
    font-size: 16px;
  }

  .site-header nav ul {
    gap: 14px;
  }

  .site-header nav a {
    font-size: 13px;
  }
}

/* Reduced motion */

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