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

:root {
  --bg: #f5f4f1;
  --text: #1c1c1c;
  --muted: #888;
  --subtle: #aaa;
  --border: #d8d6d0;
  --thumb-bg: #e2e0db;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* Layout */

.wrap {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 40px;
  padding-right: 40px;
}

main {
  flex: 1;
}

/* Header */

header {
  padding-top: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-name {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  font-size: 0.82rem;
  color: var(--muted);
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--text);
}

/* Footer */

footer {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  padding-bottom: 28px;
  margin-top: 100px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

footer p,
footer a {
  font-size: 0.78rem;
  color: var(--subtle);
}

/* Home — intro */

.home-intro {
  padding-top: 88px;
  padding-bottom: 96px;
}

.home-intro h1 {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 20px;
}

.home-intro .tagline {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Home — projects */

.projects-section {
  padding-bottom: 20px;
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 20px;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.project-thumb {
  background-color: var(--thumb-bg);
  width: 100%;
  aspect-ratio: 5 / 4;
  overflow: hidden;
}

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

.project-caption {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 28px;
  gap: 16px;
}

.project-caption .name {
  font-size: 0.82rem;
}

.project-caption .year {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

/* About */

.page-heading {
  padding-top: 72px;
  padding-bottom: 60px;
}

.page-heading h1 {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: start;
  padding-bottom: 20px;
}

.about-image {
  background-color: var(--thumb-bg);
  aspect-ratio: 3 / 4;
  width: 100%;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text p {
  font-size: 0.9rem;
  line-height: 1.82;
  color: #2c2c2c;
  margin-bottom: 24px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Contact */

.contact-content {
  padding-top: 72px;
  padding-bottom: 20px;
}

.contact-content h1 {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 52px;
}

.contact-email {
  font-size: clamp(1.5rem, 4.5vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 52px;
}

.contact-email a {
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
}

.contact-email a:hover {
  opacity: 0.45;
}

.contact-note {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 400px;
}

/* Responsive */

@media (max-width: 680px) {
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  header .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  nav {
    gap: 20px;
  }

  .home-intro {
    padding-top: 52px;
    padding-bottom: 60px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .about-body {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-image {
    aspect-ratio: 4 / 3;
    max-width: 260px;
  }

  footer {
    margin-top: 64px;
  }

  footer .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
