/* ============================================================
   project.css — Project Detail (Dark + Emerald, index와 톤 통일)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { line-height: 1.15; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* ── 1. Custom Properties ─────────────────────────────────── */
:root {
  --bg-dark:       #0a0a0a;
  --bg-surface:    #111111;
  --bg-hover:      #181818;
  --text-main:     #f3f4f6;
  --text-muted:    #9ca3af;
  --text-faint:    #858b98;
  --accent:        #34d399;
  --accent-dim:    rgba(52, 211, 153, 0.10);
  --accent-border: rgba(52, 211, 153, 0.25);
  --border:        #27272a;
  --border-hover:  #3f3f46;
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 1b. Light Theme Override ────────────────────────────── */
[data-theme="light"] {
  --bg-dark:       #f8f9fa;
  --bg-surface:    #ffffff;
  --bg-hover:      #f1f3f5;
  --text-main:     #111111;
  --text-muted:    #4b5563;
  --text-faint:    #667085;
  --accent:        #059669;
  --accent-dim:    rgba(5, 150, 105, 0.08);
  --accent-border: rgba(5, 150, 105, 0.22);
  --border:        #e5e7eb;
  --border-hover:  #d1d5db;
}

[data-theme="light"] body { background-color: var(--bg-dark); color: var(--text-main); }
[data-theme="light"] .back-nav {
  background: rgba(248, 249, 250, 0.92);
  border-color: var(--border);
}

/* ── 2. Base ─────────────────────────────────────────────── */
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; padding: 10px 14px; background: var(--text-main); color: var(--bg-dark); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
li { list-style: none; }

/* ── 3. Back Nav ─────────────────────────────────────────── */
.back-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 40px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.back-nav a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  transition: color 0.2s;
}

.back-nav a:hover { color: var(--accent); }

/* ── 4. Layout ───────────────────────────────────────────── */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 40px 120px;
}

/* ── 5. Project Header ───────────────────────────────────── */
.proj-header {
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.proj-company {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.proj-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 12px;
}

.proj-period {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 24px;
  font-variant-numeric: tabular-nums;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proj-tags li {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 4px 12px;
}

/* ── 6. Section ──────────────────────────────────────────── */
.proj-section {
  margin-bottom: 52px;
}

.section-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

p {
  font-size: 0.975rem;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

p:last-child { margin-bottom: 0; }

ul { margin: 0.5rem 0 0.9rem; }

ul > li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.1rem;
  font-size: 0.925rem;
  line-height: 1.75;
  color: var(--text-muted);
}

ul > li::before {
  position: absolute;
  left: 0;
  content: "–";
  color: var(--accent);
}

/* ── 7. Impl Block ───────────────────────────────────────── */
.impl-block {
  margin-bottom: 14px;
  padding: 28px 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.2s;
}

.impl-block:hover { border-color: var(--border-hover); }
.impl-block:last-child { margin-bottom: 0; }

.impl-block h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

/* ── 8. Callout ──────────────────────────────────────────── */
.callout {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.callout strong { color: var(--accent); }

/* ── 9. Theme Toggle Button ──────────────────────────────── */
.theme-toggle {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  background: var(--bg-surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }

[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }

/* ── 10. Responsive ─────────────────────────────────────── */
@media screen and (max-width: 640px) {
  .container { padding: 40px 24px 80px; }
  .back-nav  { padding: 12px 24px; }
  .proj-title { font-size: 2.2rem; }
  .impl-block { padding: 22px 20px; }
}

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