:root {
  --bg:          #0b0d12;
  --bg-2:        #12151e;
  --panel:       #161923;
  --panel-2:     #1d2133;
  --text:        #eef1f7;
  --muted:       #7a84a0;
  --line:        rgba(255,255,255,0.07);
  --accent:      #5b6cf9;
  --accent-dim:  rgba(91,108,249,0.12);
  --accent-glow: rgba(91,108,249,0.28);
  --shadow:      0 28px 56px rgba(0,0,0,0.55);
}

*  { box-sizing: border-box; }
h1,h2,p { margin: 0; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans','Noto Sans KR',ui-sans-serif,system-ui,sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .brand strong, .hero-metrics strong {
  font-family: 'Bricolage Grotesque','Noto Sans KR',ui-sans-serif,system-ui,sans-serif;
}

button,input,select,textarea { font: inherit; }

/* ── HEADER ─────────────────────────────────────── */
.site-header {
  height: 68px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(11,13,18,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand strong { font-size: 15px; font-weight: 700; display: block; }
.brand small  { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }

.admin-link {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.admin-link:hover {
  background: var(--panel-2);
  border-color: var(--accent);
  color: var(--accent);
}

svg { width: 18px; height: 18px; }

/* ── MAIN ────────────────────────────────────────── */
main {
  width: min(1200px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 0 0 72px;
}

/* ── HERO ────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 72px 0 52px;
  display: grid;
  gap: 44px;
  overflow: hidden;
}

/* 배경 글로우 — 헤딩 왼쪽 위에서 번지는 퍼플 빛 */
.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -120px;
  width: 700px;
  height: 600px;
  background: radial-gradient(ellipse at 30% 40%, rgba(91,108,249,0.13) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero-copy {
  display: grid;
  gap: 22px;
}

.eyebrow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.eyebrow span {
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'DM Sans', sans-serif;
}

h1 {
  font-size: 58px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 900px;
}

h1 .hl {
  color: var(--accent);
}

.hero-copy > p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.72;
  max-width: 580px;
}

/* ── METRICS 수평 바 ───────────────────────────── */
.hero-metrics {
  display: flex;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

.hero-metrics article {
  padding: 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--line);
}

.hero-metrics article:last-child { border-right: none; }

.hero-metrics strong {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--text);
}

.hero-metrics span {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: 'DM Sans', sans-serif;
}

/* ── FILTERS ─────────────────────────────────────── */
.filters {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 180px 180px;
  gap: 10px;
  margin: 0 0 24px;
}

.search-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  transition: border-color 0.18s;
  color: var(--muted);
}

.search-box:focus-within {
  border-color: var(--accent);
  color: var(--accent);
}

.search-box input,
.filters select {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.search-box input::placeholder { color: var(--muted); }

.filters select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 0 14px;
  cursor: pointer;
  transition: border-color 0.18s;
  color: var(--text);
}

.filters select:hover  { border-color: var(--muted); }
.filters select:focus  { border-color: var(--accent); outline: none; }
.filters select option { background: var(--panel-2); color: var(--text); }

/* ── PROJECT GRID ────────────────────────────────── */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.project-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 390px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  animation: cardIn 0.38s ease both;
}

.project-card:nth-child(3n+2) { animation-delay: 0.07s; }
.project-card:nth-child(3n+3) { animation-delay: 0.14s; }

.project-card:hover {
  transform: translateY(-7px);
  border-color: rgba(91,108,249,0.55);
  box-shadow: 0 0 0 1px var(--accent-dim), 0 36px 60px rgba(0,0,0,0.65), 0 0 32px var(--accent-glow);
}

.project-thumb {
  height: 190px;
  background-size: cover !important;
  background-position: center !important;
  position: relative;
  flex-shrink: 0;
}

.feature-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 6px;
  padding: 5px 10px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
}

.project-body {
  padding: 18px 18px 12px;
  display: grid;
  gap: 10px;
  flex: 1;
}

.project-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-meta span {
  color: var(--muted);
  font-size: 11px;
  background: var(--panel-2);
  border-radius: 5px;
  padding: 3px 8px;
  letter-spacing: 0.01em;
}

.project-card h2 {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--text);
}

.project-card p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 13.5px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-content: start;
}

.tag-row span {
  border-radius: 5px;
  padding: 4px 8px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11.5px;
}

.project-actions {
  padding: 0 18px 18px;
}

.primary-link,
.disabled-link {
  height: 40px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.15s, transform 0.15s;
}

.primary-link {
  background: var(--accent);
  color: #fff;
}

.primary-link:hover {
  opacity: 0.85;
}

.disabled-link {
  background: var(--panel-2);
  color: var(--muted);
}

.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .project-card { animation: none; transition: none; }
}

/* ── TABLET ──────────────────────────────────────── */
@media (max-width: 980px) {
  .site-header { padding: 0 24px; }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 { font-size: 44px; }
}

/* ── MOBILE ──────────────────────────────────────── */
@media (max-width: 640px) {
  .site-header { padding: 0 18px; }

  main {
    width: min(100vw - 24px, 1200px);
    padding-bottom: 48px;
  }

  .hero { padding: 44px 0 36px; gap: 32px; }

  h1 { font-size: 34px; }

  .hero-metrics {
    width: 100%;
  }

  .hero-metrics article {
    flex: 1;
    padding: 16px 20px;
  }

  .hero-metrics strong { font-size: 30px; }

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

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