:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-strong: #111827;
  --text: #111827;
  --muted: #5b6472;
  --line: #d9d5ca;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --amber: #b45309;
  --code: #e8f2ef;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(217, 213, 202, 0.75);
  background: rgba(247, 245, 239, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  font-size: 18px;
  font-weight: 750;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav a:hover,
.card-links a:hover,
.site-footer a:hover {
  color: var(--accent);
}

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.94fr);
  gap: 44px;
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: 64px 0 72px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.lead {
  max-width: 690px;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 750;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.52);
}

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

.terminal-card {
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.terminal-bar {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ef4444;
}

.terminal-bar span:nth-child(2) {
  background: #f59e0b;
}

.terminal-bar span:nth-child(3) {
  background: #10b981;
}

pre {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  color: var(--code);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.section {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card,
.writing-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.project-card.featured {
  grid-column: span 2;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.09);
}

.project-card p,
.writing-card p {
  color: var(--muted);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.project-meta span,
.tag-list span,
.writing-card span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 750;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.metrics div {
  padding: 14px;
  border: 1px solid rgba(180, 83, 9, 0.22);
  border-radius: 8px;
  background: rgba(180, 83, 9, 0.08);
}

.metrics dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.metrics dd {
  margin: 3px 0 0;
  color: var(--amber);
  font-size: 22px;
  font-weight: 850;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
  font-weight: 780;
}

.split {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 0.64fr);
  gap: 28px;
  align-items: start;
}

.writing-card strong {
  margin-top: 16px;
  font-size: 24px;
  line-height: 1.25;
}

.writing-card p {
  margin: 14px 0 0;
}

.focus-section {
  padding-bottom: 90px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  min-height: 34px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.62);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  main {
    width: min(100% - 28px, 1120px);
  }

  .hero {
    padding-top: 42px;
  }

  .lead {
    font-size: 18px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .project-card,
  .writing-card {
    padding: 20px;
  }
}
