@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  --ink:     #1A1A18;
  --mid:     #4A4A46;
  --soft:    #8A8A84;
  --rule:    #DDDDD8;
  --accent:  #1B6B4A;
  --bg:      #FAFAF8;
  --white:   #FFFFFF;
  --tag-bg:  #EDF4F0;
  --tag-ink: #1B6B4A;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ── Layout ─────────────────────────────────── */

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ─────────────────────────────────────── */

.site-nav {
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
}

.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.74rem;
  color: var(--mid);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}

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

/* ── Global type ─────────────────────────────── */

h1 {
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.015em;
}

h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
}

p {
  color: var(--mid);
  line-height: 1.75;
  font-size: 0.97rem;
}

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

a:hover { text-decoration: underline; }

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

/* ── Labels ──────────────────────────────────── */

.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--soft);
  display: block;
  margin-bottom: 28px;
}

/* ── Tags ────────────────────────────────────── */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.69rem;
  background: var(--tag-bg);
  color: var(--tag-ink);
  padding: 3px 8px;
  border-radius: 3px;
}

/* ── Divider ─────────────────────────────────── */

.section-divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 60px 0 0;
}

/* ── Hero ────────────────────────────────────── */

.hero {
  padding: 76px 0 0;
}

.hero h1 {
  margin-bottom: 20px;
  max-width: 600px;
}

.hero-sub {
  max-width: 600px;
  font-size: 1rem;
  color: var(--mid);
}

/* ── What I do ───────────────────────────────── */

.what-section {
  padding-top: 60px;
}

.what-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.what-item h3 {
  font-family: 'DM Mono', monospace;
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 8px;
}

.what-item p {
  max-width: 580px;
}

/* ── Selected work ───────────────────────────── */

.work-section {
  padding: 60px 0 80px;
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.work-item {
  border-left: 2px solid var(--accent);
  padding: 14px 16px;
  border-radius: 0 6px 6px 0;
  transition: background 0.15s;
  position: relative;
}

.work-item:hover {
  background: var(--tag-bg);
}

.work-item h3 {
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}

.work-item h3 a {
  color: var(--ink);
  text-decoration: none;
}

.work-item h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.work-item h3 a::before {
  content: '→';
  font-size: 0.85rem;
  color: var(--accent);
  margin-right: 8px;
  transition: transform 0.15s;
  display: inline-block;
}

.work-item:hover h3 a::before {
  transform: translateX(3px);
}

.work-item p {
  font-size: 0.93rem;
}

.work-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* ── Project page ────────────────────────────── */

.project-header {
  padding: 72px 0 0;
}

.project-header h1 {
  max-width: 640px;
  margin-bottom: 0;
}

.project-body {
  padding-bottom: 80px;
}

.project-body section {
  padding-top: 52px;
}

.project-body p + p {
  margin-top: 16px;
}

.steps {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.steps li {
  counter-increment: steps;
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.steps li::before {
  content: counter(steps);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  min-width: 18px;
  flex-shrink: 0;
  line-height: 1.75;
}

.steps li strong {
  color: var(--ink);
  font-weight: 500;
}

.callout {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 16px;
}

.callout p {
  font-size: 0.95rem;
}

/* ── Side projects page ──────────────────────── */

.side-project {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.side-project:last-child {
  border-bottom: none;
}

.side-project-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.side-project h2 {
  font-size: 1.05rem;
  font-weight: 500;
}

.project-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-link:hover { text-decoration: underline; }

.project-link-placeholder {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--soft);
  white-space: nowrap;
  flex-shrink: 0;
}

.side-project--muted h2 {
  color: var(--mid);
}

.side-project--muted p {
  color: var(--soft);
}

.side-project p + p {
  margin-top: 10px;
}

.photo-section {
  padding: 60px 0 80px;
  border-top: 1px solid var(--rule);
  margin-top: 20px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.photo-item {
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  transition: opacity 0.15s;
}

.photo-item:hover img {
  opacity: 0.85;
}

.photo-caption {
  font-family: 'DM Mono', monospace;
  font-size: 0.67rem;
  color: var(--soft);
  margin-top: 7px;
  line-height: 1.45;
}

/* ── Lightbox ─────────────────────────────────── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 24, 0.94);
  z-index: 100;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 48px 24px 32px;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  margin-top: 14px;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.15s;
}

.lightbox-close:hover { color: white; }

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 3px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}

.lightbox-nav:hover { border-color: white; color: white; }
.lightbox-nav--prev { left: 20px; }
.lightbox-nav--next { right: 20px; }

@media (max-width: 600px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox-nav { display: none; }
}

.side-project code {
  font-family: 'DM Mono', monospace;
  font-size: 0.85em;
  color: var(--ink);
  background: var(--tag-bg);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── Resume ──────────────────────────────────── */

.page {
  background: var(--white);
  max-width: 760px;
  margin: 32px auto 40px;
  padding: 48px 56px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.08);
}

.hd { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; }

.hd-left h1 { font-size: 26px; font-weight: 500; letter-spacing: -0.3px; margin-bottom: 3px; }

.hd-left .title {
  font-family: 'DM Mono', monospace;
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hd-right { text-align: right; font-size: 12px; color: var(--mid); line-height: 1.7; }
.hd-right a { color: var(--accent); text-decoration: none; }
.hd-right a:hover { text-decoration: underline; }

.resume-actions {
  max-width: 760px;
  margin: 24px auto 0;
  padding: 0 24px 16px;
  display: flex;
  justify-content: center;
}

.pdf-download {
  font-family: 'DM Mono', monospace;
  font-size: 0.74rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 7px 16px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
}

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

hr.rule { border: none; border-top: 1px solid var(--rule); margin: 0 0 24px; }

.summary {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.7;
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  margin-bottom: 28px;
}

.section { margin-bottom: 26px; }
.page .section-label { font-size: 10px; margin-bottom: 14px; }

.skills-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag {
  background: var(--tag-bg);
  color: var(--tag-ink);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 3px;
}

.job { margin-bottom: 22px; }
.job:last-child { margin-bottom: 0; }
.job-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.job-title { font-size: 14px; font-weight: 500; }
.job-dates { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--soft); white-space: nowrap; }
.job-company { font-size: 12px; color: var(--accent); margin-bottom: 8px; }
.job-bullets { list-style: none; }
.job-bullets li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 5px;
  color: var(--mid);
  font-size: 12.5px;
  line-height: 1.6;
}
.job-bullets li::before { content: '–'; position: absolute; left: 0; color: var(--rule); }
.job-bullets li strong { color: var(--ink); font-weight: 500; }

.project {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
  padding: 12px 14px;
}
.project-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.project-desc { font-size: 12px; color: var(--mid); line-height: 1.6; }
.project-stack { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.project-stack span {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  background: var(--white);
  border: 1px solid var(--rule);
  color: var(--mid);
  padding: 2px 7px;
  border-radius: 3px;
}

.edu-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.edu-row:last-child { border-bottom: none; }
.edu-inst { font-size: 13px; font-weight: 500; }
.edu-deg { font-size: 12px; color: var(--mid); margin-top: 1px; }
.edu-year { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--soft); }

@media print {
  .site-nav, footer, .resume-actions { display: none; }
  body { background: white; }
  .page { box-shadow: none; padding: 32px 40px; margin: 0; max-width: none; }
  a { color: inherit !important; text-decoration: none !important; }
}

/* ── Footer ──────────────────────────────────── */

footer {
  border-top: 1px solid var(--rule);
  padding: 36px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-name {
  font-weight: 500;
  font-size: 0.93rem;
  color: var(--ink);
}

.footer-tagline {
  font-family: 'DM Mono', monospace;
  font-size: 0.69rem;
  color: var(--soft);
  margin-top: 5px;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.69rem;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--accent); }

/* ── Animations ──────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.55s ease both; }
.fade-up.d1 { animation-delay: 0.1s; }
.fade-up.d2 { animation-delay: 0.2s; }
.fade-up.d3 { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; }
}

/* ── Responsive ──────────────────────────────── */

@media (max-width: 600px) {
  h1 { font-size: 1.65rem; }

  .hero { padding-top: 48px; }

  .site-nav .container {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }

  .page { padding: 28px 20px; margin: 0; box-shadow: none; }
  .hd { flex-direction: column; gap: 12px; }
  .hd-right { text-align: left; }
  .job-header { flex-direction: column; gap: 2px; }

  .footer-inner { flex-direction: column; }
}
