/* ===== 색상·글꼴 : 밝은 파스텔 블루 + 미래지향 (유리 카드, 빛 번짐, 그라데이션) ===== */
:root {
  --bg: #F6FAFF;
  --surface: rgba(255, 255, 255, .72);   /* 반투명 유리 카드 */
  --surface-solid: #FFFFFF;
  --tint: #EAF4FF; --tint-2: #DCEBFF; --line: rgba(160, 196, 238, .45);
  --ink: #2E5486; --text: #4A6A90; --muted: #8299B8;
  --accent: #4C9BEA; --accent-2: #8E9CF6; --accent-3: #6FD3E0;
  --accent-soft: #B4D6F7;
  --grad: linear-gradient(120deg, #5FAEF2 0%, #8E9CF6 55%, #6FD3E0 100%);
  --grad-soft: linear-gradient(120deg, #E3F1FF 0%, #ECEBFF 55%, #E2F8FA 100%);
  --on-accent: #FFFFFF;
  --glow: 0 8px 30px rgba(110, 160, 240, .22);
  --shadow: 0 4px 24px rgba(120, 165, 225, .14);
  --blob-1: rgba(140, 200, 255, .45); --blob-2: rgba(180, 170, 255, .35); --blob-3: rgba(130, 225, 230, .35);
  --grid: rgba(120, 165, 225, .08);
  --f-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --f-tech: "Space Grotesk", "Noto Sans KR", system-ui, sans-serif;
  --fs-body: 1.0625rem; --fs-small: .9375rem; --radius: 18px;
  --max: 1040px;
}
/* 어두운 화면: 버튼을 눌렀을 때만. 너무 검지 않은 밤하늘 파랑 */
:root[data-theme="dark"] {
  --bg: #1B2A45;
  --surface: rgba(255, 255, 255, .07); --surface-solid: #22345A;
  --tint: rgba(140, 190, 255, .12); --tint-2: rgba(140, 190, 255, .2); --line: rgba(160, 200, 255, .2);
  --ink: #EEF5FF; --text: #CFDDF2; --muted: #9DB2D3;
  --accent: #8CC4FF; --accent-soft: rgba(140, 196, 255, .45);
  --grad-soft: linear-gradient(120deg, rgba(95,174,242,.18), rgba(142,156,246,.18) 55%, rgba(111,211,224,.18));
  --on-accent: #16243D;
  --glow: 0 8px 30px rgba(110, 160, 255, .3);
  --shadow: 0 4px 24px rgba(0, 0, 0, .2);
  --blob-1: rgba(90, 160, 255, .3); --blob-2: rgba(150, 130, 255, .25); --blob-3: rgba(90, 210, 220, .2);
  --grid: rgba(180, 210, 255, .06);
  color-scheme: dark;
}

/* ===== 기본 ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font-family: var(--f-body); font-size: var(--fs-body); line-height: 1.75;
  word-break: keep-all; overflow-wrap: break-word; overflow-x: hidden;
}
/* 은은한 빛 번짐 + 격자 배경 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 8% 0%, var(--blob-1), transparent 70%),
    radial-gradient(36vmax 36vmax at 100% 30%, var(--blob-2), transparent 70%),
    radial-gradient(38vmax 38vmax at 30% 100%, var(--blob-3), transparent 70%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
}
h1, h2, h3 { color: var(--ink); line-height: 1.35; margin: 0; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.ico { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== 위쪽 메뉴 ===== */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 12px; min-height: 66px; }
.brand {
  font-weight: 900; text-decoration: none; font-size: 1.2rem; margin-right: auto;
  display: inline-flex; align-items: center; gap: 10px; color: var(--ink);
}
.brand::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--tint-2);
}
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--text); text-decoration: none; font-weight: 700;
  padding: 10px 16px; border-radius: 99px; min-height: 44px; display: inline-flex; align-items: center;
  transition: background .2s, color .2s;
}
.nav a:hover { background: var(--tint-2); color: var(--ink); }
.nav a.on { background: var(--tint-2); color: var(--accent); }
.icon-btn {
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.menu-btn { display: none; }

/* ===== 공통 카드 (유리) ===== */
.card, .hero, .stat, .contact {
  background: var(--surface);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .6);
}
:root[data-theme="dark"] .card, :root[data-theme="dark"] .hero,
:root[data-theme="dark"] .stat, :root[data-theme="dark"] .contact {
  border-color: var(--line); box-shadow: var(--shadow);
}
.card { border-radius: var(--radius); padding: 24px; }

/* ===== 히어로 ===== */
.hero {
  margin-top: 28px; border-radius: 28px;
  padding: clamp(28px, 5vw, 56px);
  display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 52px); align-items: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: .8; z-index: 0;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  border: 1.5px dashed var(--accent-soft); z-index: 0;
  box-shadow: 0 0 0 30px rgba(255, 255, 255, .18), 0 0 0 60px rgba(255, 255, 255, .1);
}
.hero > * { position: relative; z-index: 1; }
.avatar-ring {
  padding: 6px; border-radius: 50%;
  background: conic-gradient(from 200deg, #5FAEF2, #8E9CF6, #6FD3E0, #5FAEF2);
  box-shadow: 0 10px 40px rgba(110, 160, 240, .35);
}
.avatar {
  width: clamp(120px, 18vw, 176px); aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(140deg, #CFE7FF, #DCD9FF 60%, #CFF4F6);
  border: 5px solid var(--surface-solid);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 900; color: #5B86C8; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--surface-solid); color: var(--accent);
  font-weight: 700; font-size: var(--fs-small); padding: 4px 14px; border-radius: 99px;
  border: 1px solid var(--line);
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5FD0B0; box-shadow: 0 0 8px #5FD0B0; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.1rem); font-weight: 900; margin: 12px 0 6px; letter-spacing: -.01em; }
.hero .intro { margin: 0 0 16px; font-size: 1.125rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li {
  background: var(--surface-solid); color: var(--ink); font-size: var(--fs-small); font-weight: 500;
  padding: 3px 12px; border-radius: 99px; border: 1px solid var(--line);
}
.tags li::before { content: "#"; color: var(--accent); margin-right: 2px; font-weight: 700; }
.link-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 22px;
  border-radius: 99px; font-weight: 700; text-decoration: none; font-size: 1rem;
  background: var(--accent); color: var(--on-accent); border: 0; box-shadow: 0 4px 14px rgba(76, 155, 234, .25);
  transition: transform .2s, box-shadow .2s;
}
.btn.ghost {
  background: var(--surface-solid); color: var(--accent); box-shadow: none;
  border: 1.5px solid var(--accent-soft);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(76, 155, 234, .25); }

/* ===== 섹션 공통 ===== */
.section { padding: clamp(52px, 8vw, 88px) 0 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-tech); font-weight: 700; font-size: .875rem; letter-spacing: .14em;
  color: var(--accent); background: var(--surface-solid); border: 1px solid var(--line);
  padding: 3px 14px 3px 10px; border-radius: 99px;
}
.eyebrow::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--grad); }
.section h2 { font-size: clamp(1.7rem, 3.8vw, 2.15rem); font-weight: 900; margin: 12px 0 26px; }
.empty { color: var(--muted); text-align: center; padding: 32px; border: 1.5px dashed var(--accent-soft); border-radius: var(--radius); }

/* 소개 */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.about .card p { margin: 0 0 12px; }
.about .card p:last-child { margin-bottom: 0; }
.stats { display: grid; gap: 12px; }
.stat { border-radius: var(--radius); padding: 16px 22px; display: flex; align-items: baseline; gap: 12px; }
.stat b {
  font-family: var(--f-tech); font-size: 1.9rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--muted); font-weight: 500; }

/* 이력 (타임라인) */
.timeline { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px;
  background: linear-gradient(#8CC4FF, #B3A9FF, #8BE0E8);
}
.timeline li { position: relative; margin-bottom: 16px; }
.timeline li::before {
  content: ""; position: absolute; left: -28px; top: 28px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface-solid); border: 4px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(140, 196, 255, .25);
}
.period {
  display: inline-block; font-family: var(--f-tech); font-weight: 700; font-size: .875rem;
  color: var(--accent); background: var(--tint); border: 1px solid var(--line);
  padding: 1px 12px; border-radius: 99px;
}
.timeline h3 { font-size: 1.25rem; font-weight: 700; margin: 8px 0 0; }
.timeline .place { color: var(--muted); font-size: var(--fs-small); }
.timeline p { margin: 6px 0 0; }

/* 프로젝트 */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filters button {
  min-height: 44px; padding: 8px 18px; border-radius: 99px; cursor: pointer;
  border: 1.5px solid var(--accent-soft); background: var(--surface-solid); color: var(--text);
  font: inherit; font-weight: 700; font-size: 1rem; transition: all .2s;
}
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.project { display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.project::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--grad); }
.project:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(110, 160, 240, .22); }
.project .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.project .cat { background: var(--tint-2); color: var(--ink); font-weight: 700; font-size: .875rem; padding: 2px 12px; border-radius: 99px; }
.project .year { font-family: var(--f-tech); color: var(--muted); font-size: var(--fs-small); font-weight: 700; }
.project h3 { font-size: 1.25rem; font-weight: 700; }
.project p { margin: 0; flex: 1; }
.project .tags li { background: var(--tint); }
.project .more { align-self: flex-start; margin-top: 4px; }

/* 연락처 */
.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.contact {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink);
  border-radius: var(--radius); padding: 18px 20px; font-weight: 700; min-height: 76px;
  transition: transform .2s, box-shadow .2s;
}
.contact .ico-wrap {
  width: 48px; height: 48px; border-radius: 14px; background: var(--tint-2); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.contact small { display: block; color: var(--muted); font-weight: 400; font-size: .875rem; word-break: break-all; }
.contact:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(110, 160, 240, .22); }

.footer { margin-top: 80px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-small); text-align: center; font-family: var(--f-tech); }

/* 움직임 줄이기 설정을 켠 사람에게는 효과 끄기 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ===== 태블릿 ===== */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
  .stat { flex-direction: column; align-items: center; text-align: center; gap: 0; padding: 14px 10px; }
  .stat b { font-size: 1.7rem; }
}

/* ===== 휴대폰 ===== */
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 4px; padding: 10px 16px 16px;
    background: var(--surface-solid); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { min-height: 52px; font-size: 1.1rem; }
  .hero { grid-template-columns: 1fr; text-align: center; justify-items: center; margin-top: 16px; }
  .hero .tags, .hero .link-row { justify-content: center; }
  .link-row .btn { flex: 1 1 140px; justify-content: center; }
  .projects { grid-template-columns: 1fr; }
}
