/* ═══════════════════════════════════════════════════
   김해찬 포트폴리오 — Wanted Design System
═══════════════════════════════════════════════════ */

:root {
  --sans: 'Wanted Sans Variable', 'Pretendard Variable', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --mono: 'SFMono-Regular', Menlo, 'JetBrains Mono', monospace;

  --bg: #FFFFFF;
  --bg-2: #F7F8FA;
  --paper: #FFFFFF;
  --blue: #0066FF;
  --blue-strong: #005EEB;
  --blue-soft: #EBF3FF;
  --blue-border: #C2D9FF;
  --ink: #171719;
  --ink-2: #4E5968;
  --ink-3: #8B95A1;
  --line: #E5E8EB;
  --line-soft: #F2F4F6;

  /* compatibility aliases (kept so existing class names map cleanly) */
  --cream: var(--bg);
  --cream-2: var(--bg-2);
  --brick: var(--blue);
  --brick-deep: var(--blue-strong);
  --brick-soft: var(--blue-border);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-family: var(--sans); }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--blue); color: #fff; }

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

/* ── reveal ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1),
              transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ═══ NAV ═══════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 clamp(24px, 5vw, 64px);
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, height 0.3s;
}
nav.scrolled { border-color: var(--line); height: 58px; }

.nav-brand {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.03em;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-brand .dot { color: var(--blue); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  padding: 11px 14px;
  border-radius: 7px;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }
.nav-links a.active { color: var(--blue); }

.nav-cta {
  margin-left: 10px;
  padding: 8px 18px !important;
  background: var(--ink);
  color: #fff !important;
  border-radius: 100px;
  font-weight: 600 !important;
  transition: background 0.18s !important;
}
.nav-cta:hover { background: var(--blue) !important; color: #fff !important; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-burger span {
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 32px;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.mobile-menu a .mnum {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

/* ═══ LAYOUT ════════════════════════════════════ */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}

section { position: relative; }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 52px;
}
.sec-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.02em;
}
.sec-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.sec-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  align-self: center;
  margin-left: 8px;
}

/* ═══ HERO ══════════════════════════════════════ */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 110px 0 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--blue);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--blue-soft);
  padding: 7px 14px;
  border-radius: 100px;
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.hero-title {
  font-size: clamp(48px, 8vw, 86px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin-bottom: 24px;
}
.hero-title .accent { color: var(--blue); }

.hero-lead {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 480px;
  margin-bottom: 16px;
}
.hero-lead strong { color: var(--ink); font-weight: 600; }

.hero-meta {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 36px;
  letter-spacing: -0.01em;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 13px 24px;
  border-radius: 10px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.btn-fill { background: var(--blue); color: #fff; }
.btn-fill:hover { background: var(--blue-strong); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--bg); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

.hero-photo-wrap { display: flex; justify-content: center; position: relative; }
.hero-photo-frame {
  position: relative;
  display: inline-block;
  padding: 20px;
}

.photo-glow {
  position: absolute;
  inset: -10px;
  background: radial-gradient(ellipse at 60% 40%, rgba(0,102,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.hero-photo-img {
  display: block;
  position: relative;
  z-index: 1;
  width: 240px;
  height: 300px;
  object-fit: cover;
  border-radius: 16px;
}

.photo-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  z-index: 2;
  letter-spacing: -0.01em;
}

.chip-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #00BF40;
  flex-shrink: 0;
}

.photo-chip-1 {
  top: 12px;
  right: -32px;
  color: var(--blue);
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.photo-chip-2 {
  bottom: 64px;
  left: -36px;
  color: var(--ink-2);
  animation: chipFloat 4s ease-in-out infinite;
}

.photo-chip-3 {
  bottom: 14px;
  right: -28px;
  color: var(--ink-2);
  animation: chipFloat 4s ease-in-out 1.5s infinite;
}

.photo-chip svg { color: var(--blue); flex-shrink: 0; }

@keyframes chipFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ═══ ABOUT ═════════════════════════════════════ */
#about { padding: 104px 0; }

.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; }
.about-quote {
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.about-quote .hl { color: var(--blue); }

.about-body p {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.about-body p strong { color: var(--ink); font-weight: 600; }
.about-body p:last-child { margin-bottom: 0; }

.about-facts {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.about-fact { background: var(--bg); padding: 20px 22px; }
.about-fact dt {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}
.about-fact dd { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.5; }

/* ═══ SKILLS ════════════════════════════════════ */
#skills { padding: 104px 0; background: var(--bg-2); }

.skills-list { display: flex; flex-direction: column; }
.skill-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.skill-row:last-child { border-bottom: 1px solid var(--line); }

.skill-cat {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-top: 3px;
}
.skill-items { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip {
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-2);
  transition: all 0.18s;
}
.skill-chip:hover { border-color: var(--blue-border); color: var(--blue); }
.skill-chip.key {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue);
  font-weight: 600;
}

/* ═══ PROJECTS ══════════════════════════════════ */
#projects { padding: 104px 0; }

.proj-list { display: flex; flex-direction: column; gap: 24px; }

.proj-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1), box-shadow 0.28s, border-color 0.28s;
}
.proj-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(0,102,255,0.1);
  border-color: var(--blue-border);
}

.proj-cover { position: relative; overflow: hidden; min-height: 290px; }
.proj-cover svg { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }

.proj-info { padding: 34px 36px; display: flex; flex-direction: column; }
.proj-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.proj-index { font-size: 12px; font-weight: 700; color: var(--blue); }
.proj-type {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 3px 9px;
  background: var(--bg-2);
  border-radius: 5px;
}
.proj-period { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }

.proj-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.proj-sub { font-size: 14px; color: var(--ink-2); margin-bottom: 18px; }
.proj-tagline { font-size: 14px; line-height: 1.7; color: var(--ink-2); margin-bottom: 22px; flex: 1; }

.proj-metrics { display: flex; gap: 28px; margin-bottom: 22px; flex-wrap: wrap; }
.proj-metric .m-val {
  font-size: 25px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  letter-spacing: -0.03em;
}
.proj-metric .m-lab { font-size: 10.5px; color: var(--ink-3); margin-top: 6px; letter-spacing: 0.01em; }

.proj-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.proj-stack-mini { font-size: 11.5px; color: var(--ink-3); letter-spacing: -0.01em; }
.proj-open {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.proj-open svg { transition: transform 0.2s; }
.proj-card:hover .proj-open svg { transform: translateX(4px); }

/* ═══ MODAL ═════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(23,23,25,0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--bg);
  border-radius: 20px;
  width: 100%;
  max-width: 800px;
  margin: auto;
  transform: translateY(28px) scale(0.985);
  transition: transform 0.32s cubic-bezier(0.34,1.15,0.64,1);
  overflow: hidden;
  position: relative;
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--ink);
  transition: background 0.18s, transform 0.18s;
}
.modal-close:hover { background: var(--bg-2); transform: rotate(90deg); }

.modal-cover { height: 200px; position: relative; overflow: hidden; }
.modal-cover svg { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }

.modal-pad { padding: 38px clamp(28px, 5vw, 54px) 50px; }

.m-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.m-index { font-size: 12px; font-weight: 700; color: var(--blue); }
.m-type, .m-period { font-size: 11.5px; color: var(--ink-3); }
.m-type { padding: 3px 9px; background: var(--bg-2); border-radius: 5px; font-weight: 600; color: var(--ink-2); }
.m-period { margin-left: auto; }

.m-name {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 6px;
}
.m-sub { font-size: 15px; color: var(--ink-2); margin-bottom: 22px; }

.m-links { display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.m-link {
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.18s;
}
.m-link:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

.m-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 36px;
}
.m-metric { background: var(--bg); padding: 22px 20px; text-align: center; }
.m-metric .mm-val {
  font-size: 30px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  letter-spacing: -0.03em;
}
.m-metric .mm-lab { font-size: 10.5px; color: var(--ink-3); margin-top: 9px; letter-spacing: 0.01em; }

.m-block { margin-bottom: 36px; }
.m-block:last-child { margin-bottom: 0; }
.m-block-head { display: flex; align-items: baseline; gap: 11px; margin-bottom: 18px; }
.m-block-num { font-size: 14px; font-weight: 700; color: var(--blue); }
.m-block-title { font-size: 20px; font-weight: 800; letter-spacing: -0.025em; }

.m-overview { font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.m-overview strong { color: var(--ink); font-weight: 600; }

.m-problem {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 14px;
}
.m-problem:last-child { margin-bottom: 0; }
.m-problem-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.m-problem-title { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.5; margin-bottom: 14px; letter-spacing: -0.01em; }
.m-pq { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.7; margin-bottom: 8px; }
.m-pq:last-child { margin-bottom: 0; }
.m-pq .pq-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  width: 64px;
  padding-top: 3px;
}
.m-pq.problem .pq-label { color: var(--ink-3); }
.m-pq.solution .pq-label { color: var(--blue); }
.m-pq .pq-text { color: var(--ink-2); flex: 1; }
.m-pq .pq-text strong { color: var(--ink); font-weight: 600; }

.m-pq .pq-text code, .m-overview code, .m-rationale code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #EAF1FF;
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--blue-strong);
}

.m-codeblock {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  background: #0D1117;
  color: #C9D4E3;
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 12px;
  overflow-x: auto;
  white-space: pre;
}
.m-codeblock .c-comment { color: #6B7689; }
.m-codeblock .c-key { color: #5C9DFF; }

.m-rationale { display: flex; flex-direction: column; gap: 0; }
.m-rat-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.m-rat-item:last-child { border-bottom: 1px solid var(--line); }
.m-rat-tech { font-size: 13.5px; font-weight: 700; color: var(--blue); line-height: 1.5; letter-spacing: -0.01em; }
.m-rat-reason { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.m-rat-reason strong { color: var(--ink); font-weight: 600; }

.m-stack { display: flex; flex-wrap: wrap; gap: 7px; }
.m-stack-chip {
  font-size: 11.5px;
  font-weight: 500;
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-2);
}

/* ═══ CAREER ════════════════════════════════════ */
#career { padding: 104px 0; background: var(--bg-2); }

.career-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; }

.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 10px; bottom: 10px;
  width: 2px;
  background: var(--line);
}
.tl-item { position: relative; padding-bottom: 38px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -32px; top: 5px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--ink-3);
}
.tl-item:first-child .tl-dot { background: var(--blue); border-color: var(--blue); }
.tl-period { font-size: 11.5px; font-weight: 600; color: var(--blue); letter-spacing: 0.01em; margin-bottom: 6px; }
.tl-title { font-size: 18px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 6px; }
.tl-desc { font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.tl-desc strong { color: var(--ink); font-weight: 600; }

.tl-bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tl-bullets li {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
  padding-left: 14px;
  position: relative;
}
.tl-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--ink-3);
}
.tl-bullets li strong { color: var(--ink); font-weight: 600; }

.career-side { display: flex; flex-direction: column; gap: 24px; }
.cs-block {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
}
.cs-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.cs-cert { display: flex; flex-direction: column; gap: 11px; }
.cs-cert-item { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.cs-cert-item .ci-name { font-weight: 500; color: var(--ink); }
.cs-cert-item .ci-date { font-size: 11.5px; color: var(--ink-3); }

.cs-oss { display: block; text-decoration: none; }
.cs-oss-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 4px 9px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 12px;
}
.cs-oss-text { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.cs-oss-text strong { color: var(--ink); }
.cs-oss-text code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #EAF1FF;
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--blue-strong);
}
.cs-oss:hover .cs-oss-text { color: var(--blue); }

/* ═══ CONTACT ═══════════════════════════════════ */
#contact { padding: 116px 0 96px; }

.contact-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.contact-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--blue); margin-bottom: 22px; }
.contact-title {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.contact-title .accent { color: var(--blue); }
.contact-lead { font-size: 16px; line-height: 1.7; color: var(--ink-2); margin-bottom: 42px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; text-align: left; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: all 0.2s;
}
.contact-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.contact-card .cc-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}
.contact-card .cc-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 3px;
}
.contact-card .cc-value { font-size: 14.5px; font-weight: 600; color: var(--ink); word-break: break-all; }

/* ═══ FOOTER ════════════════════════════════════ */
footer { border-top: 1px solid var(--line); padding: 34px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-brand { font-size: 16px; font-weight: 800; letter-spacing: -0.03em; }
.footer-brand .dot { color: var(--blue); }
.footer-note { font-size: 11.5px; color: var(--ink-3); }

/* ═══ SCROLLBAR ═════════════════════════════════ */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--blue-border); }

/* ═══ RESPONSIVE ════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-photo-wrap { order: -1; justify-content: flex-start; }

  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .career-grid { grid-template-columns: 1fr; gap: 44px; }

  .proj-card { grid-template-columns: 1fr; }
  .proj-cover { min-height: 200px; height: 200px; }

  .skill-row { grid-template-columns: 1fr; gap: 12px; }

  .m-metrics { grid-template-columns: 1fr; }
  .m-rat-item { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 560px) {
  .contact-grid { grid-template-columns: 1fr; }
  .about-facts { grid-template-columns: 1fr; }
  .proj-metrics { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .otw-dot { animation: none; }
}

/* ═══ SCROLL PROGRESS ════════════════════════════ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), #7EB4FF);
  z-index: 300;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ═══ OPEN TO WORK BADGE ═════════════════════════ */
.otw-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: #009E38;
  background: #E8F8EE;
  border: 1px solid #9FE3B8;
  padding: 5px 11px;
  border-radius: 100px;
  margin-left: 14px;
  margin-right: auto;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.otw-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #00BF40;
  animation: otw-pulse 2s ease-out infinite;
}
@keyframes otw-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,191,64,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(0,191,64,0); }
}
@media (max-width: 680px) { .otw-badge { display: none; } }

/* ═══ GRAIN TEXTURE ══════════════════════════════ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ═══ TERMINAL ═══════════════════════════════════ */
.terminal-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.terminal-overlay.open { opacity: 1; pointer-events: auto; }

.terminal-window {
  width: 100%;
  max-width: 680px;
  height: 440px;
  background: #0D1117;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 48px 100px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
  transform: scale(0.95) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.34,1.15,0.64,1);
}
.terminal-overlay.open .terminal-window { transform: scale(1) translateY(0); }

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  background: #161B22;
  border-bottom: 1px solid #21262D;
  flex-shrink: 0;
}
.tb-dot { width: 12px; height: 12px; border-radius: 50%; }
.tb-red    { background: #FF5F57; }
.tb-yellow { background: #FFBD2E; }
.tb-green  { background: #28C840; }
.tb-title {
  font-family: var(--mono);
  font-size: 12px;
  color: #8B949E;
  margin-left: 6px;
}

.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 8px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  color: #C9D1D9;
}
.terminal-body::-webkit-scrollbar { width: 5px; }
.terminal-body::-webkit-scrollbar-thumb { background: #21262D; border-radius: 3px; }

.terminal-line { white-space: pre-wrap; word-break: break-all; min-height: 1.65em; }
.terminal-line.cmd { color: #79C0FF; }
.terminal-line.err { color: #F85149; }
.terminal-line.ok  { color: #56D364; }
.terminal-line.dim { color: #484F58; }

.terminal-input-line {
  display: flex;
  align-items: center;
  padding: 10px 20px 14px;
  border-top: 1px solid #21262D;
  background: #0D1117;
  flex-shrink: 0;
}
.terminal-prompt {
  font-family: var(--mono);
  font-size: 13px;
  color: #56D364;
  white-space: nowrap;
  margin-right: 8px;
  flex-shrink: 0;
}
#terminalInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--mono);
  font-size: 13px;
  color: #C9D1D9;
  caret-color: #79C0FF;
}
@media (max-width: 560px) {
  .terminal-window { height: 360px; }
  .terminal-body, .terminal-prompt, #terminalInput { font-size: 12px; }
}
