/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

ul {
  list-style: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* ---------- Design tokens ---------- */
:root {
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-title: "Syne", var(--font-body);

  --ink: #000000;
  --ink-soft: rgba(0, 0, 0, 0.62);
  --ink-faint: rgba(0, 0, 0, 0.4);

  --gradient-top: #999999;
  --gradient-bottom: #eeeeee;

  --surface: rgba(255, 255, 255, 0.55);
  --surface-strong: rgba(255, 255, 255, 0.78);
  --border-soft: rgba(0, 0, 0, 0.08);

  --container: 1120px;
  --space-section: clamp(80px, 12vw, 160px);
}

/* ---------- Base ---------- */
html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Fixed backdrop: one continuous gradient behind the entire page, so it
   never seams or restarts as sections scroll past. */
.page-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--gradient-top) 0%, var(--gradient-bottom) 100%);
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

h1, h2, h3 {
  font-family: var(--font-title);
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.logo-dot {
  color: var(--ink-faint);
}

.nav {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.25s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 140px 32px 80px;
}

.hero-inner {
  max-width: 760px;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 22px;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 34px;
  border: 1.5px solid var(--ink-faint);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-cue span {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--ink-soft);
  animation: scrollcue 1.8s ease infinite;
}

@keyframes scrollcue {
  0% { opacity: 1; transform: translateY(0); }
  60% { opacity: 0.2; transform: translateY(8px); }
  100% { opacity: 0; transform: translateY(8px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.btn-ghost {
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-large {
  padding: 16px 36px;
  font-size: 1.05rem;
  margin-bottom: 28px;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-section) 32px;
}

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.project-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--tone-a), var(--tone-b));
  display: flex;
  align-items: flex-end;
  padding: 18px 22px;
  position: relative;
  overflow: hidden;
}

.project-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-index {
  position: relative;
  z-index: 1;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.4rem;
  color: rgba(0, 0, 0, 0.35);
}

/* Paper cards — document glyph instead of a photo. */
.project-thumb--paper {
  background: linear-gradient(135deg, #dcdcdc, #f4f4f4);
}

.paper-glyph {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 116px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
}

.paper-glyph::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 22px;
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.16);
  box-shadow: 0 14px 0 rgba(0, 0, 0, 0.16),
              0 28px 0 rgba(0, 0, 0, 0.16),
              0 42px 0 rgba(0, 0, 0, 0.11),
              0 56px 0 rgba(0, 0, 0, 0.08);
}

.project-thumb:has(img) .project-index {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.project-thumb:has(img)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 55%);
}

.project-body {
  padding: 28px;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.project-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag-list li {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink-soft);
}

.project-links {
  display: flex;
  gap: 20px;
}

.project-status {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.text-link {
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.text-link:hover {
  border-color: var(--ink);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  text-align: left;
  align-items: center;
}

.about-photo {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.about-content .section-title {
  margin-bottom: 24px;
}

.about-text {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 20px;
}

.fact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.fact-list li {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 100px;
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

/* Central spine — runs down the middle between the image and text columns. */
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 28px;
  bottom: 28px;
  width: 1px;
  background: rgba(0, 0, 0, 0.14);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  column-gap: 28px;
  align-items: start;
  padding-bottom: 56px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  grid-column: 2;
  justify-self: center;
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
}

/* Media sits in the left column, hugging the spine. */
.timeline-media {
  grid-column: 1;
  justify-self: end;
  width: 100%;
  max-width: 360px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.timeline-media img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.timeline-media.bw img {
  filter: grayscale(100%);
}

/* Text sits in the right column. */
.timeline-body {
  grid-column: 3;
  padding-top: 6px;
}

.inline-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  vertical-align: -6px;
  margin-right: 8px;
  border: 1px solid var(--border-soft);
}

.timeline-age {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.timeline-text {
  font-size: 1rem;
  color: var(--ink-soft);
}

.timeline-list li {
  font-size: 1rem;
  color: var(--ink-soft);
  padding-left: 18px;
  position: relative;
  margin-bottom: 10px;
}

.timeline-list li:last-child {
  margin-bottom: 0;
}

.timeline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
}

/* ---------- Contact ---------- */
.section-contact .section-inner {
  text-align: center;
  max-width: 640px;
}

.contact-text {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

.social-links {
  display: flex;
  gap: 28px;
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-photo {
    max-width: 360px;
    margin: 0 auto;
  }

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

  /* Collapse the timeline to a single left-spine column: marker on the
     left, image and text stacked on the right. */
  .timeline-item {
    grid-template-columns: 44px 1fr;
    column-gap: 18px;
    padding-bottom: 44px;
  }

  .timeline::before {
    left: 22px;
    transform: none;
  }

  .timeline-marker {
    grid-column: 1;
    width: 44px;
    height: 44px;
    font-size: 0.85rem;
  }

  .timeline-media {
    grid-column: 2;
    justify-self: stretch;
    max-width: 100%;
    margin-bottom: 16px;
  }

  .timeline-media img {
    height: 200px;
  }

  .timeline-body {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(280px, 80vw);
    background: var(--surface-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
    padding: 32px 40px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}
