:root {
  --paper: #f5f4ef;
  --ink: #181916;
  --muted: #777871;
  --line: #d9d8d1;
  --accent: #3358ff;
  --page-x: clamp(1.25rem, 4vw, 4.5rem);
  --sans: "DM Sans", "Noto Sans KR", sans-serif;
  --display: "Sora", "Noto Sans KR", sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

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

.skip-link {
  position: fixed;
  z-index: 10;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  height: 3.25rem;
  margin: 0 var(--page-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.62rem;
  font-weight: 600;
}

.site-header > p,
.eyebrow,
.list-header,
.card-content > span,
footer {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header > p {
  margin: 0;
  color: var(--muted);
}

main {
  padding: 0 var(--page-x);
}

.intro {
  padding: clamp(2rem, 3vw, 2.75rem) 0;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-weight: 600;
}

.intro-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
}

.intro h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.85rem, 3vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.052em;
  line-height: 1.08;
}

.intro-row > p {
  max-width: 27rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
  word-break: keep-all;
}

.projects {
  padding-bottom: clamp(6rem, 10vw, 10rem);
}

.list-header {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ink);
}

.list-header h2,
.list-header p {
  margin: 0;
  font: inherit;
  font-weight: 600;
}

.list-header p {
  color: var(--muted);
}

.list-header p span {
  color: var(--ink);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 1.5vw, 1.75rem);
  padding-top: clamp(0.8rem, 1.4vw, 1.4rem);
}

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

.project-card > a {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  min-height: clamp(23rem, 27vw, 31rem);
  background: #fff;
  color: var(--ink);
  overflow: hidden;
}

.project-visual {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.project-card figure {
  position: absolute;
  inset: 0;
  margin: 0;
  background: #e2e1db;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition:
    transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 400ms ease;
}

.card-number {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
}

.card-number {
  top: clamp(1rem, 1.8vw, 1.75rem);
  left: clamp(1rem, 1.8vw, 1.75rem);
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  background: rgba(245, 244, 239, 0.92);
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 600;
}

.visual-caption {
  position: absolute;
  z-index: 1;
  right: clamp(1rem, 1.8vw, 1.75rem);
  bottom: clamp(1rem, 1.8vw, 1.75rem);
  left: clamp(1rem, 1.8vw, 1.75rem);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.38);
}

.project-card a:hover img {
  filter: brightness(0.9);
  transform: scale(1.035);
}

.project-card a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.card-content {
  padding: clamp(1.25rem, 1.8vw, 2rem);
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-title {
  margin-top: auto;
}

.card-title p {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-content h3 {
  margin: 0.85rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.75rem, 2.2vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 1.02;
}

.card-description {
  margin: clamp(1.25rem, 2vw, 2rem) 0 0;
  color: var(--muted);
  font-size: clamp(0.72rem, 0.8vw, 0.82rem);
  line-height: 1.75;
  word-break: keep-all;
}

.project-link {
  margin-top: clamp(1.25rem, 2vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-arrow {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  white-space: nowrap;
  transition:
    transform 250ms ease,
    background-color 250ms ease;
}

.project-card a:hover .card-arrow,
.project-card a:focus-visible .card-arrow {
  background: var(--ink);
  color: #fff;
  transform: rotate(45deg);
}

footer {
  min-height: 7rem;
  margin: 0 var(--page-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer p {
  margin: 0;
}

@media (max-width: 1100px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card > a {
    grid-template-columns: minmax(0, 1.8fr) minmax(18rem, 0.82fr);
    min-height: 31rem;
  }

  .card-content {
    padding: clamp(1.5rem, 3vw, 3rem);
  }

  .card-content h3 {
    font-size: clamp(2.15rem, 3.2vw, 3.8rem);
  }
}

@media (max-width: 900px) {
  .intro-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-card > a {
    grid-template-columns: minmax(0, 1.3fr) minmax(16rem, 0.8fr);
    min-height: 31rem;
  }

  .card-description br {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 3.25rem;
  }

  .site-header > p {
    display: none;
  }

  .intro {
    padding: 1.75rem 0 2rem;
  }

  .intro h1 {
    font-size: clamp(1.7rem, 8vw, 2.25rem);
  }

  .intro-row > p {
    font-size: 0.76rem;
  }

  .project-card > a {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .project-visual {
    min-height: 63vw;
  }

  .card-content {
    min-height: 25rem;
  }

  .card-title {
    margin-top: 4rem;
  }

  .card-content h3 {
    font-size: clamp(2.4rem, 12vw, 3.4rem);
  }

  footer {
    min-height: 8rem;
    align-items: flex-end;
    padding-bottom: 1.5rem;
  }

  footer p:first-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
