:root {
  --bg: #F4F7F5;
  --surface: #ffffff;
  --ink: #2B3A34;
  --ink-strong: #243029;
  --muted: #56655D;
  --muted-soft: #7C8A82;
  --mint: #7FB0A3;
  --mint-dark: #5E9384;
  --mint-pale: #EBF1ED;
  --mint-pale-2: #F2F6F3;
  --peach: #F2D7C9;
  --peach-dark: #E8A491;
  --peach-pale: #FBEFE8;
  --border: rgba(126,176,163,0.22);
  --warn-bg: #FBF3E0;
  --warn-border: #F0E2BC;
  --warn-text: #8a6d1a;
  --dark-bg: #14181a;
  --footer-bg: #2B3A34;
  --max: 760px;
  --max-wide: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

a { color: var(--mint-dark); }
::selection { background: #C9E3D9; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 24px; }

/* nav */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,247,245,0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
nav .wrap-wide { display: flex; align-items: center; justify-content: space-between; height: 64px; flex-wrap: wrap; gap: 8px; }
nav .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
nav .brand-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 9px; background: linear-gradient(135deg, var(--mint), var(--mint-dark)); color: #fff; font-size: 14px; flex-shrink: 0;
}
nav .links { display: flex; gap: 4px; font-size: 14px; align-items: center; }
nav .links a { text-decoration: none; color: var(--muted); padding: 8px 14px; border-radius: 10px; font-weight: 500; }
nav .links a:hover { background: rgba(126,176,163,0.14); color: var(--mint-dark); }
nav .links a.current { color: var(--mint-dark); font-weight: 700; }

/* hero (index) */
header.hero { padding: 72px 0 56px; }
header.hero .eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--mint-dark);
  background: var(--mint-pale); padding: 4px 10px; border-radius: 12px; margin-bottom: 14px;
}
header.hero h1 { font-size: 38px; margin: 0 0 6px; letter-spacing: -0.02em; }
header.hero p.lede { font-size: 16px; color: var(--muted); max-width: 620px; margin: 10px 0 22px; }
.contact-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 10px; text-decoration: none; border: 1px solid var(--border);
  color: var(--ink); background: var(--surface); transition: all .15s;
}
.btn:hover { border-color: var(--mint-dark); color: var(--mint-dark); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #1f2a25; color: #fff; }

/* project page */
.project-hero { padding: 56px 0 8px; }
.project-hero .badge {
  font-size: 12px; font-weight: 700; color: var(--mint-dark); background: var(--mint-pale);
  border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; margin-left: 10px; vertical-align: middle;
}
.project-hero h1 { font-size: 32px; margin: 0; display: inline-block; font-weight: 800; letter-spacing: -0.02em; color: var(--ink-strong); }
.project-meta { color: var(--muted-soft); font-size: 13.5px; margin: 12px 0 8px; }
.one-liner { font-size: 18px; font-weight: 700; color: var(--mint-dark); margin: 6px 0 0; }

.project-body { padding: 30px 0 8px; }
.project-body p { color: var(--muted); }
ul.bullets { padding-left: 20px; margin: 0 0 16px; }
ul.bullets li { margin-bottom: 12px; color: var(--muted); }
.sub { font-weight: 700; color: var(--ink); }

.tags { margin: 14px 0 18px; }
.tag {
  display: inline-block; font-size: 13px; font-weight: 500; color: var(--mint-dark); background: var(--mint-pale-2);
  border: 1px solid var(--border); padding: 5px 13px; border-radius: 9px; margin: 0 6px 6px 0;
}

.result-box {
  font-size: 15px; background: var(--warn-bg); border: 1px solid var(--warn-border);
  padding: 16px 20px; border-radius: 14px; color: var(--warn-text); margin-top: 16px;
}
.result-box .sub { color: #6b5410; }

/* architecture / pipeline diagram (project pages) */
.pipeline-section { padding: 8px 0 56px; }
.pipeline-section .ptitle { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--mint); text-transform: uppercase; text-align: center; }
.pipeline-section h2 { margin: 12px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink-strong); text-align: center; }
.pipeline-section .pdesc { margin: 14px auto 0; font-size: 16px; color: var(--muted); max-width: 580px; line-height: 1.6; text-align: center; }
.pipeline-row {
  display: flex; align-items: stretch; gap: 0; margin-top: 40px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 24px; padding: 40px 32px;
  box-shadow: 0 24px 50px -32px rgba(45,58,52,0.25);
}
.pipeline-row > div { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.pipeline-row .p-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 14px; }
.pipeline-row .p-title { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.pipeline-row .p-desc { font-size: 12.5px; color: var(--muted-soft); margin-top: 6px; line-height: 1.5; padding: 0 4px; }
.pipeline-row .p-tag { font-size: 11px; color: var(--mint-dark); font-weight: 600; margin-top: 10px; background: var(--mint-pale-2); padding: 4px 10px; border-radius: 8px; }
.pipeline-ops { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.pipeline-ops .label { font-size: 13px; font-weight: 600; color: var(--mint-dark); white-space: nowrap; }
.pipeline-ops .bar { flex: 1; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--mint), var(--peach)); }
.pipeline-ops .detail { font-size: 13px; color: var(--muted-soft); white-space: nowrap; }
@media (max-width: 760px) {
  .pipeline-row { flex-direction: column; gap: 26px; padding: 32px 24px; }
  .pipeline-ops { flex-wrap: wrap; }
  .pipeline-ops .bar { order: 3; flex-basis: 100%; }
}

/* big galleries */
.gallery-section { padding: 40px 0 72px; }
.gallery-section h2.gtitle {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mint);
  margin: 0 0 22px; text-align: center;
}

.shots-wide { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; background: var(--ink-strong); padding: 32px; border-radius: 24px; }
.shots-wide figure { margin: 0; }
.shots-wide img { width: 100%; height: auto; display: block; border-radius: 12px; cursor: zoom-in; }
.shots-wide figcaption { font-size: 13px; color: #A9BAB1; text-align: center; margin-top: 10px; }
@media (max-width: 760px) { .shots-wide { grid-template-columns: 1fr; } }

.shots-phones { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.shots-phones figure { margin: 0; flex: 0 1 320px; max-width: 320px; }
.shots-phones img {
  width: 100%; height: auto; display: block; border-radius: 18px; cursor: zoom-in;
  border: 1px solid var(--border); box-shadow: 0 24px 50px -28px rgba(45,58,52,0.28);
}
.shots-phones figcaption { font-size: 13px; color: var(--muted-soft); text-align: center; margin-top: 12px; }

/* prev/next */
.proj-nav { display: flex; justify-content: space-between; padding: 36px 0 72px; border-top: 1px solid var(--border); margin-top: 8px; }
.proj-nav a { text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; }
.proj-nav .dir { color: var(--muted-soft); font-size: 11.5px; font-weight: 500; display: block; margin-bottom: 2px; }
.proj-nav .next { text-align: right; }

/* footer */
footer { padding: 48px 0 56px; margin-top: 24px; background: linear-gradient(160deg, var(--footer-bg), #38473F); color: #C9D6CF; font-size: 13.5px; }
footer .sub { color: #fff; }
footer a { color: #fff; }

/* scroll reveal (Apple-style fade/slide-up on scroll) */
.js .reveal { opacity: 0; transform: translateY(30px); }
.reveal { transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

.js .reveal-img { opacity: 0; transform: translateY(56px) scale(.96); }
.reveal-img { transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal-img.in { opacity: 1; transform: none; }

.js .reveal-stagger > * { opacity: 0; transform: translateY(22px); }
.reveal-stagger > * { transition: opacity .65s cubic-bezier(.2,.7,.2,1), transform .65s cubic-bezier(.2,.7,.2,1); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: .03s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .12s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .21s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .30s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .39s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .48s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .57s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: .66s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal-img, .js .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(20,26,23,0.92); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 30px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }

@media (max-width: 640px) {
  nav .wrap-wide { height: auto; padding: 12px 0; }
  nav .links { gap: 0; font-size: 13px; }
  nav .links a { padding: 6px 9px; }
  .project-hero h1 { font-size: 26px; }
  .proj-nav { flex-direction: column; gap: 16px; }
  .proj-nav .next { text-align: left; }
}

/* home-style nav (shared across all pages so the header matches the homepage) */
.dcnav { display: flex; align-items: center; gap: 4px; }
.dcnav a:hover { background: rgba(126,176,163,0.14); }
.dcbtn-dark:hover { background: #1f2a25 !important; }
.dcnav-toggle { display: none; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid rgba(126,176,163,0.3); background: #fff; font-size: 18px; line-height: 1; cursor: pointer; color: #2B3A34; }
.dcnav-mobile { display: none; flex-direction: column; gap: 2px; position: absolute; top: 100%; left: 0; right: 0; background: #F4F7F5; border-bottom: 1px solid rgba(126,176,163,0.16); box-shadow: 0 16px 30px -20px rgba(45,58,52,0.25); padding: 10px 22px 18px; }
.dcnav-mobile a { padding: 12px 8px; color: #4A5B53; text-decoration: none; font-size: 15px; font-weight: 600; border-radius: 8px; }
.dcnav-mobile a:hover { background: rgba(126,176,163,0.14); }
.dcnav-mobile.open { display: flex; }
@media (max-width: 980px) {
  .dcnav .navlinks { display: none; }
  .dcnav-toggle { display: inline-flex; }
}

/* all-projects timeline (projects.html) */
.ptimeline { position: relative; max-width: var(--max-wide); margin: 48px auto 0; padding: 0 24px 0 58px; }
.ptimeline::before { content: ''; position: absolute; left: 31px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--mint), var(--peach)); }
.ptl-item { position: relative; padding-bottom: 32px; }
.ptl-dot { position: absolute; left: -27px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--mint); }
.ptl-dot.company { border-color: var(--peach-dark); }
.ptl-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px 26px; box-shadow: 0 18px 40px -28px rgba(45,58,52,0.18); }
.ptl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ptl-period { font-size: 13px; font-weight: 700; color: var(--mint-dark); background: var(--mint-pale); padding: 4px 12px; border-radius: 8px; }
.ptl-type { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.ptl-type.personal { color: var(--mint-dark); background: var(--mint-pale-2); border: 1px solid var(--border); }
.ptl-type.company { color: var(--peach-dark); background: var(--peach-pale); border: 1px solid rgba(232,164,145,0.35); }
.ptl-card h3 { margin: 4px 0 0; font-size: 20px; font-weight: 700; color: var(--ink-strong); letter-spacing: -0.01em; }
.ptl-org { font-size: 13px; color: var(--muted-soft); margin-top: 4px; margin-bottom: 12px; }
.ptl-card p { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.ptl-link { font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; }
.ptl-link:hover { color: var(--mint-dark); }

@media (max-width: 640px) {
  .ptimeline { padding-left: 42px; }
  .ptl-dot { left: -19px; }
}
