:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --text: #171411;
  --muted: #6d6760;
  --line: #ded9d1;
  --accent: #c76a28;
  --soft: #f1eee8;
  --max: 1120px;
  --header-bg: rgba(251, 250, 247, 0.96);
  --card-bg: rgba(251, 250, 247, 0.6);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171411;
  --text: #f5f1eb;
  --muted: #b9b1a7;
  --line: #433b33;
  --accent: #efaa70;
  --soft: #26211c;
  --header-bg: rgba(23, 20, 17, 0.96);
  --card-bg: #211c18;
}

.theme-toggle {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

a:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Pretendard",
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  background: linear-gradient(180deg, var(--header-bg), transparent);
}

.brand,
.nav a,
.eyebrow,
.section-label,
.project-index,
.project-card span,
.hero-meta {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand {
  font-size: 12px;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 22px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.nav a {
  transition: color 160ms ease;
}

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

main {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 94vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 128px 0 56px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 28px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

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

h1 {
  max-width: 1060px;
  margin-bottom: 76px;
  font-size: clamp(48px, 7vw, 94px);
  line-height: 1.08;
  font-weight: 600;
  word-break: keep-all;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.section {
  padding: 120px 0;
  border-bottom: 1px solid var(--line);
}

.section-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: clamp(40px, 9vw, 120px);
  align-items: start;
  margin-top: 44px;
}

.profile-photo {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(23, 20, 17, 0.04), rgba(199, 106, 40, 0.08)),
    var(--soft);
  border: 1px solid var(--line);
}

.profile-photo span {
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.section-copy {
  max-width: 720px;
}

.section-copy h2,
.section-heading h2,
.contact-copy h2 {
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.18;
  font-weight: 600;
}

.section-copy p {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  word-break: keep-all;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 44px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.project-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--card-bg);
}

.project-index {
  margin-bottom: 72px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.project-card h3 {
  margin-bottom: 18px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
}

.project-card p:not(.project-index) {
  color: var(--muted);
  word-break: keep-all;
}

.project-card span {
  margin-top: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.contact {
  min-height: 72vh;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  border-bottom: 0;
}

.contact-copy {
  max-width: 780px;
}

.contact-copy h2 {
  margin-bottom: 34px;
}

.contact-copy a {
  display: inline-flex;
  color: var(--accent);
  font-family: "Inter", sans-serif;
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 600;
  word-break: break-word;
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid,
  .contact {
    grid-template-columns: 1fr;
  }

  .contact {
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .site-header,
  main {
    width: min(100% - 28px, var(--max));
  }

  .site-header {
    padding: 18px 0;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav {
    gap: 14px;
  }

  .hero {
    min-height: 92vh;
    padding-bottom: 40px;
  }

  h1 {
    margin-bottom: 48px;
    font-size: 44px;
    line-height: 1.12;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .section {
    padding: 84px 0;
  }

  .about-grid {
    margin-top: 32px;
  }

  .profile-photo {
    max-width: 260px;
  }

  .section-heading {
    display: block;
  }

  .section-heading .section-label {
    margin-bottom: 24px;
  }

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

  .project-card {
    min-height: 300px;
    padding: 24px;
  }

  .project-index {
    margin-bottom: 54px;
  }
}
