:root {
  color-scheme: light;
  --bg: #f7f3ea;
  --paper: #fffdf8;
  --ink: #20201d;
  --muted: #6e6a62;
  --line: #ddd4c4;
  --accent: #6f9278;
  --accent-dark: #3e6851;
  --soft: #efe6d6;
  --shadow: 0 18px 50px rgba(68, 55, 34, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(32, 32, 29, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(32, 32, 29, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  line-height: 1.7;
}

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

.site-header {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(247, 243, 234, 0.82);
  border-bottom: 1px solid rgba(221, 212, 196, 0.72);
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 18px clamp(20px, 5vw, 70px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
}

.site-name {
  font-weight: 800;
  letter-spacing: 0;
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  font-size: 14px;
}

.nav a {
  color: var(--muted);
}

.nav a:hover,
.site-name:hover {
  color: var(--accent-dark);
}

.page {
  margin: 0 auto;
  max-width: 1120px;
  padding: 0 clamp(20px, 5vw, 40px);
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(34px, 6vw, 76px);
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
  min-height: 76vh;
  padding: 92px 0 70px;
  text-align: left;
}

.hero-copy {
  min-width: 0;
}

.hero-photo {
  aspect-ratio: 0.86;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0;
  max-width: 430px;
  overflow: hidden;
  padding: 8px;
  position: relative;
  width: 100%;
}

.hero-photo::before {
  background: var(--soft);
  border-radius: 8px;
  content: "";
  inset: 18px -18px -18px 18px;
  position: absolute;
  z-index: -1;
}

.hero-photo img {
  border-radius: 6px;
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: 55% 50%;
  width: 100%;
}

.kicker,
.project-type,
.section-title span,
time {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1.05;
  margin-bottom: 20px;
}

.intro {
  color: var(--muted);
  font-size: 18px;
  max-width: 760px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-links a {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  padding: 9px 18px;
}

.hero-links a:first-child {
  background: var(--ink);
  border-color: var(--ink);
  color: #fffdf8;
}

.hero-links a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.hero-links a:first-child:hover {
  background: var(--accent-dark);
  color: #fffdf8;
}

.section {
  padding: 62px 0;
}

.section-title {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
}

.section-title h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  margin-bottom: 0;
}

.project-list {
  display: grid;
  gap: 18px;
}

.project-card {
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  padding: 24px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.project-card h3,
.timeline h3,
.stack-grid h3 {
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.project-card p,
.timeline p,
.stack-grid p,
.contact p {
  color: var(--muted);
  margin-bottom: 0;
}

.project-copy {
  min-width: 0;
}

.tags {
  align-content: end;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / 2;
  justify-content: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tags li {
  background: var(--soft);
  border: 1px solid rgba(111, 146, 120, 0.22);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 13px;
  padding: 5px 10px;
}

.project-shot {
  align-self: stretch;
  aspect-ratio: 1.58;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-column: 2;
  grid-row: 1 / span 2;
  overflow: hidden;
}

.project-shot img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 220ms ease;
  width: 100%;
}

.project-card:hover .project-shot img {
  transform: scale(1.025);
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline article {
  border-left: 1px solid var(--line);
  padding: 0 0 28px 24px;
  position: relative;
}

.timeline article::before {
  background: var(--accent);
  border: 4px solid var(--bg);
  border-radius: 50%;
  content: "";
  height: 11px;
  left: -10px;
  position: absolute;
  top: 4px;
  width: 11px;
}

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

.stack-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stack-grid div {
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.contact {
  padding-bottom: 40px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.contact-links a,
.contact-links span {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  padding-bottom: 3px;
}

.contact-links a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  margin: 30px auto 0;
  max-width: 1040px;
  padding: 24px clamp(20px, 5vw, 40px) 40px;
  text-align: center;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    overflow-x: auto;
    padding-bottom: 2px;
    width: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 66px;
    text-align: center;
  }

  .hero-photo {
    justify-self: center;
    max-width: min(420px, 100%);
    order: -1;
  }

  .hero-links {
    justify-content: center;
  }

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

  .tags {
    grid-column: auto;
    order: 3;
  }

  .project-shot {
    grid-column: auto;
    grid-row: auto;
    order: 1;
  }

  .project-copy {
    order: 2;
  }
}
