:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-muted: #eeeeeb;
  --text: #171717;
  --text-soft: #575757;
  --line: #dededb;
  --line-dark: #b8b8b4;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.055);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(0, 0, 0, 0.035), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  line-height: 1.6;
}

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

button,
input,
select {
  font: inherit;
}

.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 700ms ease, transform 700ms ease;
}

/* Intro */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: transform 900ms cubic-bezier(0.76, 0, 0.24, 1), opacity 900ms ease;
}

.intro.is-finished {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.type-text {
  position: relative;
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 7rem);
  font-weight: 760;
  letter-spacing: -0.08em;
  line-height: 1;
}

.type-text::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.82em;
  margin-left: 0.08em;
  background: var(--text);
  transform: translateY(0.08em);
  animation: blink 900ms infinite;
}

@keyframes blink {
  0%, 45% {
    opacity: 1;
  }

  46%, 100% {
    opacity: 0;
  }
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 22px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(14px);
}

.logo {
  font-size: 0.95rem;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.nav-menu a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.92rem;
  transition: background 180ms ease, color 180ms ease;
}

.nav-menu a:hover,
.nav-menu a.is-active {
  background: var(--text);
  color: #ffffff;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 5px auto;
  background: var(--text);
}

/* Layout */

.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 42px 22px 90px;
}

.section {
  min-height: calc(100vh - 120px);
  display: none;
  animation: fadeUp 500ms ease both;
}

.section.active-section {
  display: block;
}

.hero {
  padding-top: 12vh;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.06em;
}
.card h3,
.card p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

h1 {
  max-width: 830px;
  font-size: clamp(3.2rem, 9vw, 7.4rem);
}

h2 {
  font-size: clamp(2.3rem, 6vw, 4.8rem);
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 650px;
  margin: 28px 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--text);
  color: #ffffff;
}

.button.secondary {
  background: transparent;
  color: var(--text);
}

.content-section {
  padding-top: 70px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 32px;
}

.section-heading p:last-child {
  margin: 18px 0 0;
  color: var(--text-soft);
}

/* Toolbar */

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 160px;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.035);
}

.search-box,
.select-box {
  display: grid;
  gap: 6px;
}

.search-box span,
.select-box span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-box input,
.select-box select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.search-box input {
  padding: 0 14px;
}

.select-box select {
  padding: 0 12px;
  cursor: pointer;
}

.search-box input:focus,
.select-box select:focus {
  border-color: var(--text);
}

.result-count {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* Cards */

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

.card,
.list-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.card {
  min-height: 240px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.card p {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.card-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 22px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--text);
  font-weight: 760;
}

.card-link.disabled {
  color: var(--text-soft);
  border-bottom-color: transparent;
  pointer-events: none;
}

.stack-list {
  display: grid;
  gap: 12px;
}

.list-item {
  padding: 22px;
}

.list-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.list-item p {
  margin: 12px 0 0;
  color: var(--text-soft);
}

.date {
  white-space: nowrap;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line-dark);
  border-radius: var(--radius-lg);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.48);
}

/* Footer */

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 22px 36px;
  color: var(--text-soft);
  font-size: 0.86rem;
}

/* Animation */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Responsive */

@media (max-width: 820px) {
  .site-header {
    padding-top: 14px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 68px;
    right: 22px;
    width: min(260px, calc(100vw - 44px));
    display: none;
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius-lg);
    padding: 8px;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a {
    border-radius: var(--radius-md);
  }

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

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

  .hero {
    padding-top: 8vh;
  }
}

@media (min-width: 821px) and (max-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
