/* Reset */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.7;
  word-break: keep-all;
}

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

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

/* Theme Variables */
:root {
  --bg: #F2F3F4;
  --bg-soft: #FAFAFA;
  --surface: #E6E8EA;
  --card: #FFFFFF;
  --card-soft: #F8F8F9;
  --card-border: #D8DADF;
  --text: #252629;
  --muted: #666B72;
  --accent: #E7A8B5;
  --accent-soft: rgba(231, 168, 181, 0.14);
  --accent-border: rgba(231, 168, 181, 0.36);
  --warm-highlight: #8A765D;
  --warm-highlight-soft: rgba(138, 118, 93, 0.12);
  --max-width: 1180px;
  --radius: 18px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--card-border);
  background: rgba(250, 250, 250, 0.82);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.site-logo {
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: clamp(62px, 9vw, 108px) 0 clamp(72px, 9vw, 112px);
}

.hero__label,
.section__eyebrow,
.project-card__category,
.detail__eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 18px 0 22px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero__lead {
  margin: 0 0 12px;
  color: #75644f;
  font-size: clamp(1.28rem, 2.7vw, 2rem);
  font-weight: 650;
  line-height: 1.45;
}

.hero__description {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
}

/* Sections */
.section {
  padding: clamp(78px, 10vw, 124px) 0;
  border-top: 1px solid var(--card-border);
}

#archive,
#about {
  background: var(--bg-soft);
}

.section__header {
  display: block;
  max-width: 760px;
  margin-bottom: 40px;
}

.section__header .section__eyebrow {
  display: block;
  margin-bottom: 12px;
}

.section__title {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section__header .section__title {
  margin: 0;
}

.section__description {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

/* Project Card */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(24px, 4vw, 36px);
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--card);
  box-shadow: 0 12px 32px rgba(37, 38, 41, 0.06);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-card:hover {
  border-color: var(--accent-border);
  background-color: var(--card-soft);
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(37, 38, 41, 0.09);
}

.project-card__heading {
  margin: 20px 0 6px;
  color: var(--text);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.project-card__category {
  color: var(--warm-highlight);
}

.project-card__subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.96rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.project-meta li {
  padding: 5px 10px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.79rem;
}

.project-meta li:first-child {
  border-color: rgba(138, 118, 93, 0.28);
  color: var(--warm-highlight);
  background: var(--warm-highlight-soft);
}

.project-card__description {
  margin: 0 0 26px;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 28px;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 10px;
  border: 1px solid var(--accent-border);
  border-radius: 7px;
  color: #A95F70;
  background: var(--accent-soft);
  font-size: 0.76rem;
  font-weight: 650;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  color: #9F5969;
  background: rgba(231, 168, 181, 0.06);
  font-size: 0.88rem;
  font-weight: 650;
}

.button:hover,
.button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* About */
.about__content {
  max-width: 790px;
}

.about__content .section__title {
  display: block;
  padding: 0;
  color: var(--text);
  background: none;
}

.about__content p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

/* Project Detail */
.detail {
  padding: clamp(52px, 8vw, 96px) 0 clamp(80px, 10vw, 120px);
}

.back-link {
  display: inline-block;
  margin-bottom: 42px;
  color: var(--muted);
  font-weight: 650;
}

.detail__header {
  max-width: 850px;
  margin-bottom: 48px;
}

.detail__title {
  margin: 12px 0 6px;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.detail__subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.15rem;
}

.detail__description {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.detail-panel {
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 32px rgba(37, 38, 41, 0.05);
}

.detail-panel h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.detail-panel p,
.detail-panel ul {
  margin-bottom: 0;
  color: var(--muted);
}

.placeholder {
  display: grid;
  min-height: 240px;
  place-items: center;
  border: 1px dashed var(--card-border);
  border-radius: 12px;
  color: var(--muted);
  background: var(--card-soft);
  text-align: center;
}

.detail-screenshot {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: #15191f;
}

.detail-panel {
  overflow: hidden;
}

/* Footer */
.site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--card-border);
  color: var(--muted);
  background: var(--bg-soft);
  font-size: 0.86rem;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.site-footer p {
  margin: 0;
}

/* Responsive */
@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px 0;
    gap: 12px;
  }

  .site-nav {
    width: 100%;
    gap: 8px 18px;
  }

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

  .project-grid {
    gap: 24px;
  }

  .site-footer__inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .project-card {
    transition: none;
  }
}
