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

:root {
  --white: #ffffff;
  --off: #f7f7f5;
  --light: #ededea;
  --navy: #1a2540;
  --navy-mid: #2e3f68;
  --blue: #2563eb;
  --blue-light: #eff4ff;
  --slate: #5a6a8a;
  --muted: #8a96aa;
  --border: #e4e6ec;
  --border-dark: #c8ccd8;
  --text: #1a2540;
  --serif: 'DM Serif Display', serif;
  --sans: 'Noto Sans KR', sans-serif;
  --mono: 'DM Mono', monospace;
}

body { background: var(--white); color: var(--text); font-family: var(--sans); line-height:1.7; overflow-x:hidden; }

/* ── NAV ── */
nav {
  position: fixed; top:0; left:0; right:0; z-index:100;
  display: flex; align-items:center; justify-content:space-between;
  padding: 1.1rem 5%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  font-family: var(--serif); font-size:1.15rem; color: var(--navy);
  letter-spacing: -0.01em;
}
.nav-links { display:flex; gap:2.5rem; list-style:none; }
.nav-links a {
  font-size:13px; color: var(--slate); text-decoration:none;
  letter-spacing:0.04em; transition:color 0.2s;
}
.nav-links a:hover { color: var(--blue); }

/* ── HERO ── */
#hero {
  min-height: 100vh; display:flex; align-items:center; justify-content:center;
  padding: 7rem 5% 4rem;
  background: var(--white);
  position: relative; overflow:hidden;
}
.hero-bg-line {
  position:absolute; right:0; top:0; bottom:0; width:48%;
  background: #f7f7f5;
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0% 100%);
}
.hero-inner {
  position:relative; z-index:1;
  display:flex; flex-direction:column; align-items:flex-start;
  text-align:left;
  max-width:500px; width:100%;
  margin-left: 8%;
}
.hero-eyebrow {
  display:inline-flex; align-items:center; gap:0.5rem;
  font-family:var(--mono); font-size:11px; letter-spacing:0.15em;
  color: var(--blue); background: var(--blue-light);
  padding:0.35rem 0.85rem; border-radius:2rem;
  margin-bottom:1.5rem;
}
.hero-eyebrow::before { content:''; display:block; width:6px; height:6px; border-radius:50%; background:var(--blue); }

h1.name-ko {
  font-family: var(--serif); font-size: clamp(3rem, 5.5vw, 4.8rem);
  font-weight: 400; line-height:1.05; letter-spacing:-0.02em;
  color: var(--navy); margin-bottom:0.3rem;
}
h1.name-en {
  font-family: var(--serif); font-style:italic;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--muted); font-weight:400; margin-bottom:1.5rem;
}
.hero-role {
  font-size:1rem; color: var(--slate);
  border-left: 3px solid var(--blue);
  border-top: none;
  padding-left:1rem; padding-top:0;
  margin-bottom:1.75rem; line-height:1.6;
}
.hero-desc {
  font-size:15px; color: var(--slate); line-height:1.9;
  max-width:480px; margin-bottom:2.5rem; word-break:keep-all;
}
.hero-desc strong { color:var(--navy); font-weight:500; }
.hero-btns { display:flex; gap:1rem; flex-wrap:wrap; justify-content:flex-start; }
.btn-solid {
  padding:0.8rem 2rem; background:var(--navy); color:#fff;
  font-size:13px; font-weight:500; letter-spacing:0.04em;
  border-radius:4px; text-decoration:none; transition:background 0.2s;
  border:none; cursor:pointer;
}
.btn-solid:hover { background: var(--navy-mid); }
.btn-outline {
  padding:0.8rem 2rem; background:transparent; color:var(--navy);
  font-size:13px; font-weight:500; letter-spacing:0.04em;
  border-radius:4px; border:1.5px solid var(--border-dark);
  text-decoration:none; transition:border-color 0.2s;
}
.btn-outline:hover { border-color: var(--navy); }

/* hero right panel */
.hero-stats-row {
  display:grid; grid-template-columns:repeat(5,1fr);
  gap:1px; background:var(--border);
  border:1px solid var(--border); border-radius:10px;
  overflow:hidden; margin-top:2rem; width:100%; max-width:640px;
}
.stat-row { display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--border); border-radius:8px; overflow:hidden; margin-bottom:1.5rem; }
.stat-cell { background:var(--white); padding:1.25rem 1rem; text-align:center; }
.stat-n { font-family:var(--serif); font-size:2.2rem; color:var(--navy); line-height:1; }
.stat-l { font-size:12px; color:var(--muted); margin-top:0.25rem; }
.cert-mini { display:flex; flex-direction:column; gap:0.6rem; }
.cert-row {
  display:flex; align-items:center; gap:0.75rem;
  padding:0.75rem 0.9rem; background:var(--off);
  border-radius:6px; border:1px solid var(--border);
}
.cert-ic { font-size:18px; line-height:1; }
.cert-t { font-size:13px; font-weight:500; color:var(--navy); }
.cert-s { font-size:11px; color:var(--muted); }

/* ── SECTION WRAPPER ── */
.s-wrap { max-width:1140px; margin:0 auto; padding:6rem 5%; }
.s-label {
  font-family:var(--mono); font-size:11px; letter-spacing:0.2em;
  color:var(--blue); margin-bottom:0.6rem;
}
h2.s-title {
  font-family:var(--serif); font-size:clamp(1.8rem, 3vw, 2.6rem);
  font-weight:400; color:var(--navy); letter-spacing:-0.02em;
  margin-bottom:3rem; line-height:1.2;
}
h2.s-title span { color:var(--muted); font-style:italic; }

/* ── DIVIDER ── */
.divider { border:none; border-top:1px solid var(--border); margin:0 5%; }

/* ── ABOUT ── */
.about-grid { display:grid; grid-template-columns:1.3fr 1fr; gap:5rem; align-items:start; }
.about-p { font-size:15px; color:var(--slate); line-height:1.95; margin-bottom:1.1rem; }
.about-p strong { color:var(--navy); font-weight:500; }
.about-highlight {
  margin-top:1.5rem; padding:1.25rem 1.5rem;
  background:var(--blue-light); border-left:3px solid var(--blue); border-radius:0 8px 8px 0;
  font-size:14px; color:var(--navy-mid); line-height:1.7;
}
.info-block { display:flex; flex-direction:column; gap:1rem; }
.info-card {
  background:var(--white); border:1px solid var(--border);
  border-radius:8px; padding:1.1rem 1.25rem;
  display:flex; align-items:flex-start; gap:0.9rem;
  transition: box-shadow 0.2s;
}
.info-card:hover { box-shadow:0 4px 16px rgba(26,37,64,0.08); }
.info-ic { font-size:20px; margin-top:1px; }
.info-title { font-size:13px; font-weight:500; color:var(--navy); }
.info-sub { font-size:12px; color:var(--muted); margin-top:1px; }
.info-badge {
  display:inline-block; margin-top:5px;
  font-size:10px; font-family:var(--mono); padding:0.2rem 0.55rem;
  border-radius:2rem; background:var(--blue-light); color:var(--blue); letter-spacing:0.05em;
}

/* ── SKILLS ── */
.skills-wrap { background:var(--off); }
.skills-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1.25rem; }
.sk-card {
  background:var(--white); border:1px solid var(--border); border-radius:10px;
  padding:1.5rem; transition: box-shadow 0.2s, transform 0.2s;
}
.sk-card:hover { box-shadow:0 6px 24px rgba(26,37,64,0.09); transform:translateY(-2px); }
.sk-head { display:flex; align-items:center; gap:0.6rem; margin-bottom:1.1rem; }
.sk-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.sk-name { font-size:13px; font-weight:500; color:var(--navy); letter-spacing:0.03em; }
.sk-tags { display:flex; flex-wrap:wrap; gap:0.4rem; }
.sk-tag {
  font-size:12px; padding:0.25rem 0.65rem; border-radius:2rem;
  background:var(--off); border:1px solid var(--border); color:var(--slate);
}

/* ── PROJECTS ── */
.proj-list { display:flex; flex-direction:column; gap:2rem; }
.proj-card {
  border:1px solid var(--border); border-radius:12px;
  overflow:hidden; display:grid; grid-template-columns:280px 1fr;
  transition: box-shadow 0.2s;
}
.proj-card:hover { box-shadow:0 8px 32px rgba(26,37,64,0.1); }
.proj-left {
  background:var(--off); padding:2rem 1.75rem;
  display:flex; flex-direction:column; justify-content:space-between;
  border-right:1px solid var(--border);
}
.proj-num { font-family:var(--serif); font-style:italic; font-size:4rem; color:var(--border-dark); line-height:1; }
.proj-badges { display:flex; flex-direction:column; gap:0.4rem; margin-top:auto; }
.p-badge {
  display:inline-flex; align-items:center; gap:0.3rem;
  font-size:10px; font-family:var(--mono); padding:0.3rem 0.7rem;
  border-radius:2rem; letter-spacing:0.06em; width:fit-content;
}
.b-award { background:#fff8e6; color:#b07c00; border:1px solid #ffe399; }
.b-cloud { background:var(--blue-light); color:var(--blue); border:1px solid #bfcfff; }
.b-onprem { background:#f0f7ff; color:#2c6fad; border:1px solid #c0daf7; }
.b-iot { background:#f5f0ff; color:#6d3fcf; border:1px solid #d3beff; }
.proj-right { padding:2rem 2.25rem; background:var(--white); }
h3.proj-title {
  font-family:var(--serif); font-size:1.35rem; font-weight:400;
  color:var(--navy); margin-bottom:0.75rem; line-height:1.35;
}
.proj-desc { font-size:14px; color:var(--slate); line-height:1.85; margin-bottom:1.25rem; }
.proj-stack { display:flex; flex-wrap:wrap; gap:0.4rem; }
.p-tag {
  font-family:var(--mono); font-size:11px; padding:0.25rem 0.6rem;
  border-radius:3px; background:var(--off); color:var(--slate);
  border:1px solid var(--border);
}

/* ── TIMELINE ── */
.tl-wrap { display:grid; grid-template-columns:200px 1fr; gap:0 3rem; }
.tl-year {
  text-align:right; padding-top:0.15rem;
  font-family:var(--mono); font-size:12px; color:var(--muted);
  letter-spacing:0.05em;
}
.tl-body { padding-bottom:2.5rem; border-left:1px solid var(--border); padding-left:2rem; position:relative; }
.tl-body::before {
  content:''; position:absolute; left:-5px; top:0.4rem;
  width:9px; height:9px; border-radius:50%;
  background:var(--white); border:2px solid var(--blue);
}
.tl-title { font-size:15px; font-weight:500; color:var(--navy); margin-bottom:0.2rem; }
.tl-sub { font-size:13px; color:var(--muted); }

/* ── CONTACT ── */
.contact-s { background:var(--navy); }
.contact-inner { max-width:1140px; margin:0 auto; padding:6rem 5%; }
.c-label { font-family:var(--mono); font-size:11px; letter-spacing:0.2em; color:rgba(255,255,255,0.4); margin-bottom:0.75rem; }
h2.c-title { font-family:var(--serif); font-size:clamp(2rem,4vw,3.2rem); font-weight:400; color:#fff; margin-bottom:0.75rem; }
.c-sub { font-size:15px; color:rgba(255,255,255,0.55); margin-bottom:3rem; max-width:480px; line-height:1.7; }
.c-links { display:flex; gap:1rem; flex-wrap:wrap; }
.c-link {
  display:flex; align-items:center; gap:0.6rem;
  padding:0.85rem 1.75rem; border-radius:6px;
  font-size:13px; font-weight:500; text-decoration:none;
  border:1px solid rgba(255,255,255,0.2); color:rgba(255,255,255,0.85);
  transition:background 0.2s, border-color 0.2s;
}
.c-link:hover { background:rgba(255,255,255,0.08); border-color:rgba(255,255,255,0.4); }

/* ── FOOTER ── */
footer {
  background:var(--navy); border-top:1px solid rgba(255,255,255,0.08);
  text-align:center; padding:1.5rem;
  font-family:var(--mono); font-size:11px; color:rgba(255,255,255,0.25);
  letter-spacing:0.08em;
}

/* ── ANIMATIONS ── */
.reveal { opacity:1; transform:translateY(0); transition:opacity 0.55s ease, transform 0.55s ease; }
.js-ready .reveal { opacity:0; transform:translateY(18px); }
.js-ready .reveal.visible { opacity:1; transform:translateY(0); }

/* ── RESPONSIVE ── */
@media(max-width:900px){
  nav { padding:1rem 4%; }
  .nav-links { display:none; }
  .hero-inner { margin-left:0; max-width:100%; }
  .hero-bg-line { display:none; }
  .about-grid { grid-template-columns:1fr; gap:2.5rem; }
  .skills-grid { grid-template-columns:1fr 1fr; }
  .proj-card { grid-template-columns:1fr; }
  .proj-left { border-right:none; border-bottom:1px solid var(--border); }
  .tl-wrap { grid-template-columns:1fr; gap:0; }
  .tl-year { text-align:left; padding-bottom:0.3rem; }
  .s-wrap { padding:4rem 4%; }
}
@media(max-width:580px){
  .skills-grid { grid-template-columns:1fr; }
  .stat-row { grid-template-columns:1fr 1fr; }
}

/* ── MODAL ── */
.modal-overlay {
  display:none; position:fixed; inset:0; z-index:200;
  background:rgba(26,37,64,0.55); backdrop-filter:blur(4px);
  align-items:center; justify-content:center; padding:1.5rem;
}
.modal-overlay.open { display:flex; }

.modal-box {
  background:var(--white); border-radius:16px;
  width:100%; max-width:780px; max-height:90vh;
  overflow-y:auto; position:relative;
  box-shadow:0 24px 80px rgba(26,37,64,0.18);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity:0; transform:translateY(16px) scale(0.98); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

.modal-header {
  padding:2rem 2.25rem 1.5rem;
  border-bottom:1px solid var(--border);
  position:sticky; top:0; background:var(--white);
  border-radius:16px 16px 0 0; z-index:1;
  display:flex; align-items:flex-start; justify-content:space-between; gap:1rem;
}
.modal-header-left { flex:1; }
.modal-num {
  font-family:var(--serif); font-style:italic;
  font-size:1rem; color:var(--muted); margin-bottom:0.3rem;
}
h3.modal-title {
  font-family:var(--serif); font-size:1.5rem; font-weight:400;
  color:var(--navy); line-height:1.3;
}
.modal-close {
  width:36px; height:36px; border-radius:50%;
  background:var(--off); border:1px solid var(--border);
  cursor:pointer; font-size:18px; color:var(--slate);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0; transition:background 0.2s;
}
.modal-close:hover { background:var(--border); }

.modal-body { padding:2rem 2.25rem; }

.modal-badges { display:flex; gap:0.5rem; flex-wrap:wrap; margin-bottom:1.75rem; }

.modal-section { margin-bottom:1.75rem; }
.modal-section-title {
  font-family:var(--mono); font-size:11px; letter-spacing:0.15em;
  color:var(--blue); margin-bottom:0.75rem; text-transform:uppercase;
}
.modal-section p {
  font-size:14px; color:var(--slate); line-height:1.85;
}

.modal-arch {
  background:var(--off); border:1px solid var(--border); border-radius:10px;
  padding:1.5rem; text-align:center; margin-bottom:1.75rem;
  font-size:13px; color:var(--muted);
}
.modal-arch-placeholder {
  font-size:40px; display:block; margin-bottom:0.5rem;
}

.modal-feature-list { list-style:none; display:flex; flex-direction:column; gap:0.6rem; }
.modal-feature-list li {
  font-size:14px; color:var(--slate); line-height:1.7;
  padding-left:1.25rem; position:relative;
}
.modal-feature-list li::before {
  content:''; position:absolute; left:0; top:0.6rem;
  width:5px; height:5px; border-radius:50%; background:var(--blue);
}

.modal-stack { display:flex; flex-wrap:wrap; gap:0.4rem; }
.modal-tag {
  font-family:var(--mono); font-size:11px; padding:0.3rem 0.7rem;
  border-radius:3px; background:var(--off); color:var(--slate);
  border:1px solid var(--border);
}

.proj-card { cursor:pointer; }
.proj-card:hover .proj-num { color:var(--navy-mid); transition:color 0.2s; }

/* ── MODAL ARCH IMAGE ── */
.modal-arch-img {
  width:100%; height:auto; max-height:340px;
  object-fit:contain;
  border-radius:8px;
  border:1px solid var(--border); display:block;
  background: var(--off);
}

/* ── LIGHTBOX ── */
.lightbox-overlay {
  display:none; position:fixed; inset:0; z-index:300;
  background:rgba(0,0,0,0.85);
  align-items:center; justify-content:center;
  cursor:zoom-out;
}
.lightbox-overlay.open { display:flex; }
.lightbox-overlay img {
  max-width:92vw; max-height:92vh;
  object-fit:contain; border-radius:8px;
  box-shadow:0 24px 80px rgba(0,0,0,0.5);
}
.modal-arch-img {
  cursor:zoom-in;
  transition: opacity 0.15s;
}
.modal-arch-img:hover { opacity:0.88; }