/* =========================================================
   Caroline Bae — Portfolio
   Design system per website-design-spec.md
   Warm · editorial · calm, but professional.
   ========================================================= */

:root {
  /* Neutral palette — no pure black / white. (Variable NAMES are kept from the
     earlier warm scheme to avoid a wide refactor; the VALUES are now neutral
     greys + the Hazy Blue accent. So e.g. --ivory is a neutral grey, not ivory.) */
  --ivory:       #F0EFED; /* primary background — neutral light grey */
  --ivory-card:  #F8F8F6; /* card / raised surface (neutral, not white) */
  --ivory-deep:  #E5E4E1; /* alternating section band */
  --roast:       #2A2A28; /* all text + headings — neutral charcoal */
  --roast-soft:  #595955; /* secondary text — neutral grey */
  --blue:        #8AAFC4; /* MAIN accent (kept) — buttons, emphasis */
  --blue-deep:   #547E97; /* deeper blue — links / stronger */
  --sand:        #9C9C96; /* borders, dividers, captions, meta — neutral grey */
  --sand-soft:   #D4D3CF; /* faint lines */
  --moss:        #6E9DBC; /* link-hover accent — a brighter blue */

  --maxw: 1080px;
  --gut: clamp(1.25rem, 5vw, 4rem);
  --radius: 4px;
  --shadow: 0 1px 2px rgba(42, 42, 40, .07), 0 10px 30px rgba(42, 42, 40, .09);
}

/* ---------- Korean body font: KoPubWorld Dotum (local) ---------- */
@font-face {
  font-family: 'KoPubWorld Dotum'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('assets/fonts/KoPubWorldDotum-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'KoPubWorld Dotum'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('assets/fonts/KoPubWorldDotum-Bold.ttf') format('truetype');
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--roast);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body[data-lang="ko"] {
  font-family: 'KoPubWorld Dotum', 'Noto Sans KR', system-ui, sans-serif;
  letter-spacing: -.01em;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-deep); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--moss); } /* the one Soft Moss moment */

/* ---------- Display type (Space Grotesk) ---------- */
.font-display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.14;
}
body[data-lang="ko"] .font-display {
  font-family: 'Noto Serif KR', serif;
  font-weight: 600;
  letter-spacing: -.01em;
}

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.band { background: var(--ivory-deep); }

.eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sand);
  margin: 0 0 1rem;
}
.section-title {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  margin: 0 0 1.5rem;
}
.lede { max-width: 60ch; color: var(--roast-soft); font-size: 1.12rem; }

.divider { height: 1px; background: var(--sand-soft); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: 'Inter', sans-serif;
  font-size: .95rem; font-weight: 600; letter-spacing: .01em;
  padding: .8rem 1.6rem; border-radius: var(--radius);
  cursor: pointer; transition: all .2s ease; border: 1.5px solid transparent;
}
.btn-primary { background: var(--blue); color: #2C3942; }
.btn-primary:hover { background: var(--blue-deep); color: var(--ivory-card); }
.btn-ghost { background: transparent; border-color: var(--sand); color: var(--roast); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-deep); }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ivory) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sand-soft);
}
.nav-inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: .85rem var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-brand { font-family: 'Fraunces', Georgia, serif; font-size: 1.15rem; font-weight: 600; color: var(--roast); }
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a { color: var(--roast-soft); font-size: .9rem; font-weight: 500; }
.nav-links a:hover { color: var(--blue-deep); }
.nav-links a.nav-resume {
  color: var(--blue-deep); font-weight: 600;
  border: 1px solid var(--sand); border-radius: 999px; padding: .3rem .85rem;
}
.nav-links a.nav-resume:hover { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
@media (max-width: 760px) {
  .nav-links a.nav-resume { display: inline-block; width: auto; margin-top: .5rem; }
}
.nav-right { display: flex; align-items: center; gap: 1rem; }

/* language toggle */
.lang-toggle {
  display: inline-flex; border: 1px solid var(--sand); border-radius: 999px; overflow: hidden;
  font-size: .78rem; font-weight: 600;
}
.lang-toggle button {
  border: 0; background: transparent; color: var(--sand);
  padding: .35rem .8rem; cursor: pointer; font-family: inherit; letter-spacing: .04em;
  transition: all .2s ease;
}
.lang-toggle button[aria-pressed="true"] { background: var(--blue); color: #2C3942; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; color: var(--roast); }

@media (max-width: 760px) {
  .nav-links {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--ivory); border-bottom: 1px solid var(--sand-soft);
    padding: .5rem var(--gut) 1rem; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .6rem 0; width: 100%; }
  .nav-toggle { display: inline-flex; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem); }
.hero-grid {
  display: grid; grid-template-columns: 1.3fr .9fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-name { font-size: clamp(2.4rem, 6.6vw, 4.2rem); font-weight: 400; margin: 0 0 .4rem; }
.hero-name .ko-name { display:block; font-family: 'Noto Serif KR', serif; font-size: .4em; color: var(--sand); margin-top:.5rem; font-weight:500; }
.hero-role {
  font-size: clamp(1rem, 2.3vw, 1.25rem); font-weight: 600; color: var(--blue-deep);
  letter-spacing: .01em; margin: 0 0 1.5rem;
}
.hero-tagline {
  font-family: 'Fraunces', Georgia, serif; font-style: normal; font-weight: 500;
  font-size: clamp(1.25rem, 3vw, 1.7rem); line-height: 1.38; color: var(--roast);
  max-width: 24ch; margin: 0 0 2rem; letter-spacing: -.01em;
}
body[data-lang="ko"] .hero-tagline { font-family: 'Noto Serif KR', serif; font-weight: 500; }
.hero-cta { display: flex; gap: .9rem; flex-wrap: wrap; }

.hero-photo { position: relative; justify-self: center; }
.hero-photo::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 78%;
  background: radial-gradient(120% 80% at 50% 100%, rgba(138,175,196,.32), transparent 70%);
  border-radius: 50%; z-index: 0;
}
.hero-photo img { position: relative; z-index: 1; max-height: 460px; width: auto; filter: drop-shadow(0 18px 30px rgba(58,50,40,.18)); }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-tagline { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-photo { order: -1; }
  .hero-photo img { max-height: 320px; }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: center; }
.about-photo { position: relative; }
.about-photo img {
  border-radius: var(--radius); width: 100%; max-width: 360px;
  background: var(--ivory-deep);
  filter: drop-shadow(0 14px 26px rgba(58,50,40,.16));
}
.about-body p { margin: 0 0 1.2rem; }
.about-body p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 240px; margin-inline: auto; }
}

/* =========================================================
   WHAT I DO
   ========================================================= */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.cap-card {
  background: var(--ivory-card); border: 1px solid var(--sand-soft);
  border-radius: var(--radius); padding: 2rem 1.7rem;
}
.cap-card .num { font-family: 'Fraunces', Georgia, serif; font-size: 1.5rem; color: var(--blue); margin-bottom: .8rem; }
.cap-card h3 { font-size: 1.18rem; margin: 0 0 .7rem; line-height: 1.3; }
.cap-card p { margin: 0; color: var(--roast-soft); font-size: .98rem; }
@media (max-width: 760px) { .cards-3 { grid-template-columns: 1fr; } }

/* =========================================================
   SELECTED WORK
   ========================================================= */
.job { padding-top: 3rem; }
.job + .job { margin-top: 3rem; border-top: 1px solid var(--sand-soft); }
.job-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; }
.job-title { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 0; }
.job-role { font-weight: 600; color: var(--blue-deep); }
.job-dates { color: var(--sand); font-size: .9rem; margin-left: auto; white-space: nowrap; }
.job-sub { color: var(--roast-soft); margin: .4rem 0 1.8rem; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.metric { background: var(--ivory-card); border: 1px solid var(--sand-soft); border-radius: var(--radius); padding: 1.3rem 1rem; text-align: center; }
.metric .val { font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--roast); line-height: 1; }
.metric .lbl { display: block; margin-top: .6rem; font-size: .78rem; color: var(--sand); letter-spacing: .02em; }
@media (max-width: 760px) { .metrics { grid-template-columns: repeat(2, 1fr); } }

.job-points { margin: 0 0 2rem; padding: 0; list-style: none; }
.job-points li { position: relative; padding-left: 1.4rem; margin-bottom: .6rem; color: var(--roast-soft); }
.job-points li::before { content: ""; position: absolute; left: 0; top: .65em; width: 7px; height: 7px; background: var(--blue); border-radius: 50%; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border: 1px solid var(--sand-soft); border-radius: var(--radius); background: var(--ivory-card);
  transition: transform .25s ease;
}
.gallery a:hover img { transform: translateY(-3px); }
.gallery figcaption { font-size: .76rem; color: var(--sand); margin-top: .45rem; }

/* =========================================================
   STAKEHOLDER MAP & WORKSCOPE
   ========================================================= */
.map-svg-wrap { margin: 2.5rem auto 0; max-width: 760px; }
.map-svg { width: 100%; height: auto; display: block; }
.map-legend { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; font-size: .82rem; color: var(--roast-soft); }
.map-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-internal { background: var(--blue); }
.dot-external { background: transparent; border: 1.5px solid var(--sand); }

.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-top: 3.5rem; }
.scope-grid h3 { font-size: 1.15rem; margin: 0 0 1.2rem; }
.bar-row { margin-bottom: 1.1rem; }
.bar-row .bar-label { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: .35rem; color: var(--roast-soft); }
.bar { height: 10px; background: var(--ivory-deep); border-radius: 999px; overflow: hidden; border: 1px solid var(--sand-soft); }
.bar-fill { height: 100%; background: var(--blue); border-radius: 999px; }
.bar-fill.sandy { background: var(--sand); }
.scope-note { font-size: .85rem; color: var(--sand); margin-top: 1rem; }
.chip-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font-size: .82rem; background: var(--ivory-card); border: 1px solid var(--sand-soft); color: var(--roast-soft); padding: .35rem .8rem; border-radius: 999px; }
@media (max-width: 760px) { .scope-grid { grid-template-columns: 1fr; } }

.patterns { margin-top: 3.5rem; }
.patterns h3 { text-align: center; font-size: 1.35rem; margin: 0 0 .4rem; }
.patterns-sub { text-align: center; color: var(--sand); font-size: .9rem; margin: 0 0 2rem; }
.pattern-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.pattern {
  background: var(--ivory-card); border: 1px solid var(--sand-soft);
  border-left: 3px solid var(--blue); border-radius: var(--radius);
  padding: 1.4rem 1.4rem;
}
.pattern h4 { margin: 0 0 .5rem; font-size: 1.02rem; }
.pattern p { margin: 0 0 .7rem; font-size: .92rem; color: var(--roast-soft); }
.pattern .ev { font-size: .78rem; color: var(--sand); border-top: 1px dashed var(--sand-soft); padding-top: .6rem; }

/* =========================================================
   MEDIA
   ========================================================= */
.media-block + .media-block { margin-top: 3.5rem; }
.media-block h3 { font-size: 1.3rem; margin: 0 0 .3rem; }
.media-block .sub { color: var(--sand); font-size: .9rem; margin: 0 0 1.6rem; }

.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.video-card { display: block; }
.video-thumb { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--sand-soft); background: var(--ivory-card); }
.video-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .3s ease; }
.video-card:hover .video-thumb img { transform: scale(1.04); }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play svg { width: 54px; height: 54px; filter: drop-shadow(0 4px 10px rgba(58,50,40,.4)); }
.video-card h5 { font-size: .98rem; font-weight: 600; margin: .8rem 0 .2rem; color: var(--roast); line-height: 1.35; }
.video-card .meta { font-size: .78rem; color: var(--sand); }
@media (max-width: 760px) { .video-grid { grid-template-columns: 1fr; } }

.reels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; align-items: start; }
.reels-grid .instagram-media { margin: 0 auto !important; min-width: 0 !important; }
@media (max-width: 880px) { .reels-grid { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; } }

.pub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.3rem; }
.pub-card {
  background: var(--ivory-card); border: 1px solid var(--sand-soft); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.pub-card .pub-img { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: var(--ivory-deep); border-bottom: 1px solid var(--sand-soft); }
.pub-body { padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.pub-body .byline { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--sand); }
.pub-body h5 { margin: 0; font-size: 1.02rem; font-weight: 600; line-height: 1.35; }
.pub-body p { margin: 0; font-size: .88rem; color: var(--roast-soft); }
.pub-body .pub-link { margin-top: auto; font-size: .85rem; font-weight: 600; }

/* =========================================================
   CARO IN KOREA
   ========================================================= */
.caro-grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: center; }
.caro-text { max-width: 60ch; }
.caro-photo img {
  width: 100%; max-width: 380px; border-radius: var(--radius);
  background: var(--ivory-deep); box-shadow: var(--shadow);
}
@media (max-width: 820px) {
  .caro-grid { grid-template-columns: 1fr; }
  .caro-photo { order: -1; }
  .caro-photo img { max-width: 300px; }
}
.caro-logo { width: clamp(220px, 40vw, 320px); height: auto; margin: .4rem 0 1.4rem; }
.caro .section-title { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin-bottom: 1.6rem; }
.caro-body p { margin: 0 0 1.2rem; color: var(--roast-soft); max-width: 64ch; }
.caro-body p:last-child { margin-bottom: 0; }
.caro-socials { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.social {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .6rem 1.1rem .6rem .85rem; border: 1px solid var(--sand); border-radius: 999px;
  color: var(--roast); transition: all .2s ease; background: var(--ivory-card);
}
.social:hover { border-color: var(--blue); color: var(--blue-deep); transform: translateY(-2px); }
.social-ic { display: inline-flex; }
.social-ic svg { width: 20px; height: 20px; display: block; }
.social-tx { display: flex; flex-direction: column; line-height: 1.15; }
.social-name { font-size: .9rem; font-weight: 600; }
.social-handle { font-size: .76rem; color: var(--sand); }
.social:hover .social-handle { color: var(--blue-deep); }

/* =========================================================
   CONTACT + FOOTER
   ========================================================= */
.contact { text-align: center; }
.contact .lede { margin-inline: auto; margin-bottom: 2rem; }
.contact-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.contact-email {
  font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--blue-deep); display: inline-block; margin-bottom: 1.8rem;
}
body[data-lang="ko"] .contact-email { font-family: 'KoPubWorld Dotum', 'Noto Sans KR', sans-serif; }

footer { border-top: 1px solid var(--sand-soft); padding-block: 2rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-inner small { color: var(--sand); font-size: .82rem; }

/* ---------- Work media blocks (merged into companies) ---------- */
.work-block { margin-top: 2.2rem; }
.job-divider { height: 0; border: 0; border-top: 1px solid var(--sand-soft); margin: 3.2rem 0 2.2rem; }
.work-block-title {
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sand); margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--sand-soft);
}

/* zoomable thumbnails */
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; font: inherit; color: inherit; }
.gallery .zoom img { transition: transform .25s ease; }
.gallery .zoom:hover img { transform: translateY(-3px); }
.gallery.growth { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gallery.growth img { aspect-ratio: 16/10; object-fit: contain; background: var(--ivory-card); padding: .6rem; }

/* pub card can be a link OR a zoom button */
a.pub-card, button.pub-card { cursor: pointer; text-align: left; font: inherit; color: inherit; }
button.pub-card { width: 100%; }
.pub-card:hover { border-color: var(--blue); }
.byline-tag { font-size: .76rem; font-weight: 600; color: var(--blue-deep); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 4vw;
  background: color-mix(in srgb, var(--roast) 84%, transparent);
  backdrop-filter: blur(3px); cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 90vh; width: auto; height: auto; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.4); cursor: default; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1.4rem; font-size: 2.4rem; line-height: 1;
  background: none; border: 0; color: var(--ivory); cursor: pointer; padding: .3rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
