:root {
  --bg: #f4f1ea;
  --panel: rgba(255, 255, 255, 0.84);
  --ink: #1e2430;
  --muted: #5f6b79;
  --line: rgba(27, 38, 54, 0.12);
  --brand: #0f766e;
  --brand-soft: #d5efe8;
  --accent: #c2410c;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 10% 15%, #e6f8f4 0%, transparent 38%),
    radial-gradient(circle at 80% 5%, #ffe9d8 0%, transparent 42%),
    var(--bg);
  font-family: "Noto Sans KR", sans-serif;
}

.aurora {
  position: fixed;
  inset: -20% -10%;
  background: conic-gradient(from 180deg at 50% 50%, rgba(15, 118, 110, 0.14), rgba(194, 65, 12, 0.1), rgba(22, 163, 74, 0.08), rgba(15, 118, 110, 0.14));
  filter: blur(64px);
  z-index: -1;
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translateY(-2%) scale(1); }
  to { transform: translateY(2%) scale(1.04); }
}

.shell {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.hero {
  padding: 3.4rem 0 1.8rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--brand);
  font-family: "Space Grotesk", sans-serif;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Noto Sans KR", sans-serif;
  margin: 0;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }

.lead {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.8rem;
}

.stats {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stats article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.stats strong {
  display: block;
  font-size: 1.3rem;
  color: var(--brand);
}

.panel {
  margin-top: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  backdrop-filter: blur(10px);
}

.memory-grid {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.memory-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: #fff;
}

.memory-grid p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.controls .control-row {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 0.8rem;
}

label {
  font-size: 0.85rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

select, input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.58rem 0.7rem;
  font-size: 0.94rem;
  background: #fff;
}

.part-list {
  margin: 1.2rem 0 2.4rem;
  display: grid;
  gap: 0.85rem;
}

.part {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.part summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.part summary::-webkit-details-marker { display: none; }

.part-title {
  font-weight: 700;
  font-family: "Space Grotesk", "Noto Sans KR", sans-serif;
}

.part-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.problem-grid {
  border-top: 1px solid var(--line);
  padding: 0.9rem;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.problem-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fff;
}

.problem-card header {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.pid {
  color: var(--accent);
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
}

.problem-card h4 {
  font-size: 0.97rem;
}

.algo {
  margin: 0.4rem 0 0;
  font-size: 0.86rem;
  color: var(--brand);
  font-weight: 500;
}

.arch {
  margin: 0.3rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

details summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 0.84rem;
}

.prompt {
  color: var(--muted);
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
}

.links {
  margin-top: 0.62rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.links a {
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.78rem;
  padding: 0.26rem 0.58rem;
  border: 1px solid var(--line);
  color: var(--ink);
}

.links a.active {
  background: var(--brand-soft);
  border-color: rgba(15, 118, 110, 0.35);
}

@media (max-width: 680px) {
  .hero { padding-top: 2.2rem; }
  .problem-grid { grid-template-columns: 1fr; }
}
