:root {
  --bg: #161616;
  --text: #e8e8e8;
  --muted: #888888;
  --accent: #ef4444;
  --border: #2a2a2a;
  --code-bg: #0d0d0d;
}

* { box-sizing: border-box; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

nav.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 64px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

nav.top .brand {
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

nav.top .links {
  display: flex;
  gap: 22px;
}

nav.top .links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 16px;
}

nav.top .links a:hover,
nav.top .links a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.tagline {
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 18px;
  max-width: 60ch;
}

.more {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.currently {
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--muted);
}

.currently strong {
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}

h2 {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 56px 0 20px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.project {
  margin-bottom: 26px;
}

.project .title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.project .title-row a {
  font-size: 18px;
  font-weight: 700;
}

.project .year {
  color: var(--muted);
  font-size: 14px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.project .summary {
  color: var(--text);
  margin: 4px 0 0;
  font-size: 15px;
  max-width: 60ch;
}

article.case-study h1 {
  font-size: 32px;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

article.case-study .meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 40px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

article.case-study .meta a {
  color: var(--muted);
}

article.case-study .meta a:hover {
  color: var(--accent);
}

article.case-study h2 {
  font-size: 18px;
}

article.case-study p {
  margin: 0 0 20px;
}

article.case-study ul,
article.case-study ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

article.case-study li {
  margin-bottom: 6px;
}

article.case-study strong {
  color: var(--text);
  font-weight: 700;
}

article.case-study em {
  font-style: italic;
}

article.case-study code {
  background: var(--border);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 13px;
  color: #ffb4b4;
}

article.case-study pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 13px;
  margin: 0 0 20px;
}

article.case-study pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

/* Utility */
.muted { color: var(--muted); }

/* Download button */
.btn-download {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  margin: 8px 0 32px;
  transition: background 120ms, color 120ms;
}

.btn-download:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

/* Education */
.ed-entry { margin-bottom: 18px; }
.ed-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.ed-degree { font-weight: 700; font-size: 16px; }
.ed-dates {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.ed-detail {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
  max-width: 60ch;
}

/* Certifications */
.cert-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cert-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.cert-list li:last-child { border-bottom: none; }
.cert-title { font-weight: 600; }
.cert-date {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Experience timeline */
.timeline {
  position: relative;
  padding-left: 22px;
  border-left: 1px solid var(--border);
  margin-top: 8px;
}
.timeline-entry {
  position: relative;
  padding-bottom: 32px;
}
.timeline-entry:last-child { padding-bottom: 0; }
.timeline-entry::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 8px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--bg);
}
.timeline-dates {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.timeline-title {
  font-size: 16px;
  margin-bottom: 6px;
}
.timeline-title strong { font-weight: 700; }
.timeline-detail {
  color: var(--text);
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  max-width: 60ch;
}

footer {
  margin-top: 96px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

footer a {
  color: var(--muted);
}

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

@media (max-width: 640px) {
  .wrap { padding: 32px 18px 64px; }
  nav.top {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 40px;
  }
  nav.top .links { gap: 18px; flex-wrap: wrap; }
  h1 { font-size: 24px; }
  article.case-study h1 { font-size: 26px; }
  h2 { font-size: 18px; }
  .ed-row,
  .cert-list li { flex-wrap: wrap; }
}
