:root {
  --bg: #fafaf8;
  --bg-secondary: #f0efea;
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-tertiary: #888;
  --border: rgba(0,0,0,0.1);
  --link: #0969da;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --body: 'Inter', -apple-system, system-ui, sans-serif;
  --content-width: min(900px, 100%);
  --gutter: clamp(16px, 5vw, 64px);
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-secondary: #161b22;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --text-tertiary: #6e7681;
  --border: rgba(255,255,255,0.1);
  --link: #58a6ff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    --border: rgba(255,255,255,0.1);
    --link: #58a6ff;
  }
}

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

html {
  font-size: clamp(13px, 1.2vw, 15px);
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--body);
  line-height: 1.6;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.container {
  width: var(--content-width);
  margin: 0 auto;
  padding: clamp(32px, 5vh, 64px) var(--gutter) clamp(48px, 8vh, 96px);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── header ── */
.header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.header img {
  width: clamp(56px, 6vw, 80px);
  height: clamp(56px, 6vw, 80px);
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.header-text .name {
  font-family: var(--mono);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  text-decoration: none;
  display: inline-block;
}

.header-text .name:hover { color: var(--link); }

.header-text .bio {
  font-size: clamp(12px, 1.1vw, 14px);
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.header-text .links {
  font-family: var(--mono);
  font-size: clamp(11px, 1vw, 13px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.header-text .links a {
  color: var(--link);
  text-decoration: none;
}

.header-text .links a:hover { text-decoration: underline; }

/* ── tagline ── */
.tagline {
  font-size: clamp(12px, 1.1vw, 14px);
  color: var(--text-tertiary);
  font-style: italic;
  margin-bottom: 40px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ── main content grid (two columns on wide screens) ── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  flex: 1;
}

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

/* ── section ── */
.section { margin-bottom: 40px; }

.section-header {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

/* ── rows ── */
.row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid var(--border);
}

.row:last-child { border-bottom: 1px solid var(--border); }

.row .label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.row .content .title {
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
}

.row .content .title:hover { color: var(--link); }

.row .content .desc {
  font-size: clamp(11px, 0.9vw, 12px);
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── coming soon ── */
.coming-soon {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── footer ── */
footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

footer a { color: var(--text-tertiary); text-decoration: none; }
footer a:hover { color: var(--link); }

/* ── theme toggle ── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  border-radius: 3px;
}

.theme-toggle:hover { color: var(--text-primary); border-color: var(--text-tertiary); }

/* ── mobile tweaks ── */
@media (max-width: 480px) {
  .header { flex-direction: column; gap: 12px; }
  .header img { width: 56px; height: 56px; }
  footer { flex-direction: column; align-items: flex-start; gap: 10px; }
}
