/* ---------- Design tokens ---------- */
:root {
  --cream: #eeece2;
  --cream-dim: #e2ded0;
  --ink: #17140f;
  --ink-soft: #2b271f;
  --accent: #d21f1f;
  --accent-dim: #a8130f;
  --muted: #8a8375;
  --line: rgba(23, 20, 15, 0.12);
  --line-on-dark: rgba(244, 239, 230, 0.16);

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;

  --wrap: 1180px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
}

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

.section { padding: 96px 0; }
.section-heading {
  font-size: clamp(32px, 4.5vw, 46px);
  margin-bottom: 40px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: var(--cream);
}
.btn-primary:hover { background: var(--accent-dim); }

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 230, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 32px;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
}
.site-nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 72px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dim);
  margin: 0 0 20px;
}

.hero-copy h1 {
  font-size: clamp(52px, 7.5vw, 92px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 0.98;
}

.hero-copy .role {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--muted);
  margin: 12px 0 20px;
}

.hero-copy .blurb {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 36px;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-photo { justify-self: center; }

.photo-frame {
  width: 320px;
  height: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-dim);
  border: 1px solid var(--line);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-fallback-initial {
  display: none;
  font-family: var(--font-display);
  font-size: 96px;
  font-weight: 700;
  color: var(--muted);
}
.photo-frame.photo-fallback img { display: none; }
.photo-frame.photo-fallback .photo-fallback-initial { display: block; }

/* ---------- About ---------- */
.about-inner { max-width: 780px; }
.about-copy p {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-pill {
  padding: 10px 20px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  background: var(--cream-dim);
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--cream-dim);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(23, 20, 15, 0.1);
}

.project-media {
  aspect-ratio: 16 / 10;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; }
.project-media .fallback {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 14px;
}

.project-body { padding: 24px; }
.project-body h3 {
  font-size: 22px;
  margin-bottom: 4px;
}
.project-subtitle {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--accent-dim) !important;
  font-size: 14px !important;
  margin: 0 0 10px !important;
}
.project-body p {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 16px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.project-tags span {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-dim);
}

/* ---------- Resume / timeline ---------- */
.resume-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.resume-head .section-heading { margin-bottom: 0; }

.timeline {
  border-left: 2px solid var(--line);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-item .period {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.timeline-item h3 {
  font-size: 20px;
  margin: 6px 0 2px;
}
.timeline-item .org {
  font-size: 15px;
  color: var(--accent-dim);
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}
.timeline-item p { color: var(--ink-soft); margin: 0; font-size: 15px; }

/* ---------- Contact ---------- */
.contact-section {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius);
  margin: 0 32px;
  padding: 96px 32px;
}
.contact-inner { text-align: center; max-width: 620px; margin: 0 auto; }
.contact-section .section-heading { color: var(--cream); }
.contact-blurb { color: var(--cream-dim); font-size: 17px; margin-bottom: 32px; }

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.contact-links a {
  padding: 12px 24px;
  border: 1.5px solid var(--line-on-dark);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}
.contact-links a:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 0 48px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}
.footer-note a { color: var(--accent-dim); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--cream);
    padding: 24px 32px;
    gap: 20px;
    border-bottom: 1px solid var(--line);
  }

  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .blurb { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-photo { order: -1; }
  .photo-frame { width: 220px; height: 260px; }

  .projects-grid { grid-template-columns: 1fr; }
  .resume-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .contact-section { margin: 0 16px; }
}
