/* ════════════════════════════════════════════════════════════
   김도성 · Portfolio
   한국 미니멀 다크 톤 (토스/카뱅 영향) — 큰 여백, 큰 타이포, 차분한 색
   ════════════════════════════════════════════════════════════ */

:root {
  /* 배경: 거의 검정에 가까운 짙은 톤 (토스 다크 톤) */
  --bg: #0c0e14;
  --bg-2: #14171f;
  --bg-3: #1c2030;
  --bg-4: #262a3c;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.10);
  --line-3: rgba(255, 255, 255, 0.16);
  --ink: #f2f3f7;
  --ink-2: #b5b8c4;
  --ink-3: #7b7f8c;
  --ink-4: #4a4d5b;
  /* accent — 차분하게 한 톤 다운 */
  --accent: #00d4f0;
  --accent-2: #5ce8fa;
  --accent-soft: rgba(0, 212, 240, 0.10);
  --accent-glow: rgba(0, 212, 240, 0.28);
  --green: #2cca5a;
  --font: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  --maxw: 1160px;
  --gx: clamp(28px, 6vw, 96px);
  --gy: clamp(120px, 16vh, 180px);
  --radius: 14px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
  letter-spacing: -0.005em;
}
a { color: inherit; text-decoration: none; }
.accent { color: var(--accent); }
.hl {
  color: var(--accent-2);
  font-weight: 500;
}
.inlinecode {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 6px;
  background: var(--bg-3);
  border-radius: 4px;
  color: var(--accent-2);
}
.link {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color 0.2s;
}
.link:hover { border-color: var(--accent); }

::selection { background: var(--accent); color: var(--bg); }

.waves {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}
main, .nav, .foot { position: relative; z-index: 1; }

/* ── NAV ────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gx);
  background: rgba(12, 14, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-left { display: flex; align-items: center; gap: 14px; }
.breadcrumb {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg);
  font-weight: 800; font-size: 11px;
  letter-spacing: 0.5px;
}
.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }

/* ── HERO ───────────────────────────────────────── */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 14vh, 140px) var(--gx) clamp(96px, 14vh, 140px);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
  min-height: 84vh;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 100px;
  margin-bottom: 32px;
  color: var(--ink-2);
}
.status-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(44, 202, 90, 0.5);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.6; }
}
.hero-title {
  font-size: clamp(44px, 6.5vw, 76px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero-title .accent {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}
.hero-title .wave {
  display: inline-block;
  animation: handwave 2.4s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes handwave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30%, 50% { transform: rotate(14deg); }
  20%, 40% { transform: rotate(-8deg); }
}
.hero-sub {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--ink-2);
  margin-bottom: 28px;
  font-weight: 500;
  line-height: 1.65;
}
.hero-body {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.85;
  margin-bottom: 36px;
  max-width: 500px;
}
.hero-meta-row { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 100px;
}

/* ── Hero 우측 — Notion 화면 (살짝 tilt) ────────── */
.hero-right { perspective: 2000px; perspective-origin: 30% 50%; }
.notion-stage {
  transform: rotateY(-6deg) rotateX(3deg);
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(.16,1,.3,1);
}
.hero-right:hover .notion-stage {
  transform: rotateY(-2deg) rotateX(0.5deg);
}
.notion-window {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 60px 140px -40px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(0, 212, 240, 0.06);
}
.nw-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
}
.nw-dot { width: 11px; height: 11px; border-radius: 50%; }
.nw-dot.r { background: #ff5f57; }
.nw-dot.y { background: #febc2e; }
.nw-dot.g { background: #28c840; }
.nw-url {
  margin-left: 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.nw-body { display: grid; grid-template-columns: 176px 1fr; min-height: 500px; }

.nw-side {
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 16px 10px;
  font-size: 13px;
}
.ns-ws {
  display: flex; align-items: center; gap: 10px;
  padding: 9px;
  margin-bottom: 12px;
  border-radius: 7px;
  background: var(--bg-2);
}
.ns-ws-avatar {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg);
  font-weight: 800; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}
.ns-ws-name {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.3;
  font-weight: 500;
}
.ns-section {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  padding: 14px 9px 6px;
  text-transform: uppercase;
  font-weight: 600;
}
.ns-item {
  font-size: 13px;
  color: var(--ink-2);
  padding: 6px 9px;
  border-radius: 6px;
  margin-bottom: 1px;
  cursor: default;
  transition: background 0.2s;
}
.ns-item:hover { background: var(--bg-2); }
.ns-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.nw-main { padding: 0; overflow: hidden; }
.np-cover {
  height: 72px;
  background: linear-gradient(135deg, #1c2030 0%, var(--accent) 50%, var(--accent-2) 100%);
  opacity: 0.5;
}
.np-emoji {
  font-size: 40px;
  padding: 0 24px;
  margin-top: -24px;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
}
.np-title {
  padding: 12px 24px 16px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.np-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.np-meta > span { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.np-k { color: var(--ink-3); font-weight: 500; }
.np-status {
  color: var(--green);
  background: rgba(44, 202, 90, 0.10);
  border: 1px solid rgba(44, 202, 90, 0.25);
  padding: 3px 9px;
  border-radius: 5px;
  font-weight: 500;
}
.np-owner { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.np-avatar {
  width: 17px; height: 17px; border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg);
  font-size: 8px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.np-val { color: var(--ink-2); }

.np-block {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 0 24px 8px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  transition: border-color 0.25s, transform 0.25s;
}
.np-block:hover { border-color: rgba(0, 212, 240, 0.3); transform: translateX(2px); }
.np-block-emoji { font-size: 19px; flex-shrink: 0; }
.np-block-head { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.np-block-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.np-block-tags span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  background: var(--bg-3);
  border-radius: 4px;
  padding: 2px 7px;
}
.np-arrow {
  color: var(--accent);
  text-align: center;
  font-size: 13px;
  opacity: 0.4;
  margin: 0 24px;
}

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 56px; }
  .notion-stage { transform: none; }
  .hero-right:hover .notion-stage { transform: none; }
}
@media (max-width: 600px) {
  .nw-body { grid-template-columns: 1fr; }
  .nw-side { display: none; }
}

/* ── SECTION ────────────────────────────────────── */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--gy) var(--gx);
}
.section-head {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 64px;
  align-items: flex-start;
}
.section-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.16em;
  padding: 6px 13px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  background: var(--accent-soft);
  text-transform: uppercase;
}
.section-title {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.section-lede {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.75;
  max-width: 600px;
  margin-top: 4px;
}

/* ── Quote ──────────────────────────────────────── */
.quote {
  position: relative;
  padding: 28px 32px 28px 60px;
  margin-bottom: 32px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
}
.quote-mark {
  position: absolute;
  left: 20px; top: 14px;
  font-family: 'Georgia', serif;
  font-size: 58px;
  color: var(--accent);
  line-height: 1;
  opacity: 0.5;
}

/* ── Callout grid ───────────────────────────────── */
.callout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
}
.callout {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 24px 26px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-2);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.callout:hover {
  border-color: rgba(0, 212, 240, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.5);
}
.callout-emoji {
  font-size: 22px;
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3);
  border-radius: 9px;
}
.callout-h {
  font-size: 15px; font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.callout p { margin: 0; font-size: 14.5px; }
.cl-blue, .cl-purple, .cl-yellow, .cl-green { background: var(--bg-2); }

/* ── Info grid ──────────────────────────────────── */
.info-grid {
  margin-top: 32px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.info-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  align-items: center;
}
.info-row:last-child { border-bottom: none; }
.info-row:hover { background: rgba(255, 255, 255, 0.02); }
.info-k {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
}
.info-v { color: var(--ink); }

/* ── STACK ──────────────────────────────────────── */
.stack-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}
.stack-group {
  padding: 26px 28px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.stack-group:hover {
  border-color: rgba(0, 212, 240, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.5);
}
.sg-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.sg-desc {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.65;
  margin-bottom: 16px;
}
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 7px;
  transition: all 0.2s;
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  background: var(--accent-soft);
}
.pill-sub { font-size: 10.5px; color: var(--ink-3); margin-left: 4px; }

/* ── PROJECTS ───────────────────────────────────── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 18px;
}
.proj-card {
  display: block;
  padding: 28px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  transition: transform 0.3s cubic-bezier(.16,1,.3,1), border-color 0.25s, box-shadow 0.3s;
}
.proj-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 28px 60px -24px rgba(0, 212, 240, 0.25);
}
.pc-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.pc-emoji {
  font-size: 26px;
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-3);
  border-radius: 11px;
  border: 1px solid var(--line);
}
.pc-tag {
  display: inline-block;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 100px;
  text-transform: uppercase;
}
.tag-public {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(0, 212, 240, 0.3);
}
.tag-internal {
  color: var(--ink-2);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
}
.pc-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  transition: color 0.3s;
}
.proj-card:hover .pc-title { color: var(--accent); }
.pc-arrow {
  font-size: 15px;
  color: var(--ink-3);
  transition: all 0.3s;
  display: inline-block;
  margin-left: 6px;
}
.proj-card:hover .pc-arrow { color: var(--accent); transform: translate(3px, -3px); }
.pc-desc {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 18px;
}
.pc-points {
  list-style: none;
  margin-bottom: 18px;
  padding-left: 0;
}
.pc-points li {
  position: relative;
  padding: 5px 0 5px 20px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.pc-points li::before {
  content: '';
  position: absolute;
  left: 5px; top: 13px;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
}
.pc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pc-tags span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

/* ── CONTACT ────────────────────────────────────── */
.contact-card {
  display: flex; align-items: center; gap: 20px;
  padding: 26px 30px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  transition: all 0.25s;
  max-width: 520px;
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -18px var(--accent-glow);
}
.cc-emoji {
  font-size: 24px;
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-3);
  border-radius: 11px;
  border: 1px solid var(--line);
}
.cc-label {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.cc-val { font-size: 18px; font-weight: 600; color: var(--ink); }
.contact-card:hover .cc-val { color: var(--accent); }
.cc-arrow {
  margin-left: auto;
  font-size: 20px;
  color: var(--ink-3);
  transition: all 0.25s;
}
.contact-card:hover .cc-arrow { color: var(--accent); transform: translate(4px, -4px); }

/* ── FOOTER ─────────────────────────────────────── */
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px var(--gx) 64px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-3);
}

/* ── REVEAL ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (max-width: 640px) {
  .nav-links a { padding: 6px 10px; font-size: 13px; }
  .info-row { grid-template-columns: 1fr; gap: 4px; }
  .pc-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .breadcrumb { display: none; }
}
