/* ============================================================
   Joshua Lee Portfolio — UI Kit stylesheet
   Recreated from the live Next.js site (app/*.tsx).
   Editorial · monochrome · General Sans.
   ============================================================ */
@import url("https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&display=swap");

* { margin: 0; padding: 0; box-sizing: border-box; font-weight: 400; color: #000; }

html, body { background: #fff; overflow-x: hidden; }
body {
  font-family: 'General Sans', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5,h6 { line-height: 1.15; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

/* The scaled app stage */
#app { min-height: 100dvh; }
body:has(.hero) { overflow: hidden; }
body:has(.hero) #app { height: 100dvh; display: flex; flex-direction: column; }
body:has(.hero) .hero { flex: 1; min-height: 0; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 32px; z-index: 200; background: #fff;
}
.nav.transparent {
  position: fixed;
  background: transparent;
  pointer-events: none;
}
.nav.transparent > * { pointer-events: auto; }
.nav.transparent ~ article { padding-top: 88px; }
.nav-home { transition: opacity 0.3s ease, transform 0.3s ease; }
.nav-home.hidden { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.nav a { font-size: 17px; letter-spacing: 0.12em; text-transform: uppercase; transition: opacity 0.2s ease; white-space: nowrap; }
.nav a:hover { opacity: 0.45; }
.nav-projects { display: flex; gap: 12px; align-items: center; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-proj-link { display: flex; align-items: center; opacity: 0.35; transition: opacity 0.2s ease; cursor: pointer; }
.nav-proj-link:hover, .nav-proj-link.active { opacity: 1; }
.nav-proj-link img { width: 44px; height: 44px; object-fit: contain; mix-blend-mode: multiply; }
.proj-index { font-size: 17px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }

/* ── HERO (home) ── */
.hero { width: 100%; display: flex; flex-direction: column; padding-top: 16px; overflow: hidden; }
.hero h1 {
  font-size: 13.5vw; line-height: 0.84; letter-spacing: -0.02em; text-align: center;
  text-transform: uppercase; white-space: nowrap; cursor: default; user-select: none; flex-shrink: 0;
}
.hero h1 .char { display: inline-block; will-change: transform; }
.hero-bio-wrap { padding: 16px 32px 12px; display: flex; align-items: flex-end; gap: 24px; flex-shrink: 0; }
.imessage { display: inline-flex; flex-direction: column; gap: 5px; list-style: none; flex-shrink: 0; }
.imessage li {
  display: inline-block; padding: 7px 14px; border-radius: 20px; font-size: 20px; line-height: 1.45;
  background: #e5e5ea; align-self: flex-start; border-bottom-left-radius: 4px; max-width: 80%;
  opacity: 0; animation: bubble-in 0.3s ease forwards;
}
.imessage li:nth-child(1) { animation-delay: 0.1s; }
.imessage li:nth-child(2) { animation-delay: 0.35s; }
.imessage li:nth-child(3) { animation-delay: 0.6s; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(6px) scale(0.96); } to { opacity: 1; transform: none; } }
.project-info { flex: 1 1 0; min-width: 0; text-align: right; transition: opacity 0.2s ease; }
.project-info-title { font-size: clamp(48px, 5.7vw, 81px); font-weight: 300; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.project-info-tags { font-size: 17px; letter-spacing: 0.05em; margin-top: 6px; }

.hero-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 20px; padding: 0 32px 16px; flex: 1; min-height: 0; }
.hero-proj { display: flex; flex-direction: column; align-items: center; cursor: pointer; min-height: 0; }
.hero-proj .img-wrap { width: 100%; flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; padding-bottom: 4px; }
.hero-proj .img-wrap img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; mix-blend-mode: multiply; transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.19,1,0.22,1); }
.hero-grid:hover .hero-proj .img-wrap img { opacity: 0.4; transform: scale(0.97); }
.hero-grid:hover .hero-proj:hover .img-wrap img { opacity: 1; transform: none; }
.hero-proj-num { font-size: 18px; letter-spacing: 0.04em; margin-top: 0; flex-shrink: 0; transition: opacity 0.2s ease; }
.hero-grid:hover .hero-proj .hero-proj-num { opacity: 0.4; }
.hero-grid:hover .hero-proj:hover .hero-proj-num { opacity: 1; }

.site-footer { display: flex; justify-content: space-between; align-items: center; padding: 14px 32px 18px; flex-shrink: 0; }
.site-footer a { font-size: 17px; letter-spacing: 0.06em; transition: opacity 0.2s ease; }
.site-footer a:hover { opacity: 0.45; }
.site-footer span, .site-footer .small { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-contact { display: flex; flex-direction: column; gap: 4px; }
.site-footer .footer-available { font-size: 22px; letter-spacing: -0.01em; text-transform: none; line-height: 1.1; }

/* ── CASE STUDY ── */
.proj-hero { display: flex; align-items: stretch; min-height: 78vh; }
.proj-hero-left { flex: 0 0 42%; display: flex; flex-direction: column; padding: 48px 48px 80px 32px; }
.proj-eyebrow { font-size: 17px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 20px; }
.proj-title { font-size: clamp(72px, 9.5vw, 160px); line-height: 0.85; letter-spacing: -0.03em; text-transform: uppercase; }
.proj-tags { margin-top: 8px; font-size: 17px; letter-spacing: 0.14em; text-transform: uppercase; }
.proj-meta { margin-top: 40px; display: flex; flex-direction: column; }
.proj-meta-row { display: flex; gap: 24px; padding: 8px 0; border-top: 1px solid rgba(0,0,0,0.08); }
.meta-label { font-size: 17px; letter-spacing: 0.14em; text-transform: uppercase; width: 112px; flex-shrink: 0; padding-top: 2px; }
.meta-value { font-size: 17px; letter-spacing: 0.01em; line-height: 1.5; }
.proj-hero-right { flex: 0 0 58%; display: flex; align-items: center; justify-content: center; padding: 64px 48px; position: relative; overflow: hidden; }
.proj-hero-obj { max-width: 76%; max-height: 440px; object-fit: contain; mix-blend-mode: multiply; }

.content-section { display: grid; grid-template-columns: 42% 58%; border-top: 1px solid rgba(0,0,0,0.08); }
.section-label { padding: 64px 80px 64px 32px; font-size: 17px; letter-spacing: 0.18em; text-transform: uppercase; }
.section-body { padding: 64px 48px 64px 80px; }
.lead-text { font-size: 22px; letter-spacing: -0.01em; line-height: 1.5; margin-bottom: 24px; text-wrap: balance; }
.section-body p { font-size: 17px; line-height: 1.6; max-width: 540px; text-wrap: pretty; }
.section-body p + p { margin-top: 16px; }

.callout-section { padding: 32px; display: grid; grid-template-columns: 42% 58%; border-top: 1px solid rgba(0,0,0,0.08); }
.callout-label { font-size: 17px; letter-spacing: 0.18em; text-transform: uppercase; padding-top: 6px; padding-right: 80px; }
.callout-text { font-size: clamp(36px, 4.75vw, 80px); line-height: 1.2; letter-spacing: -0.02em; max-width: 640px; padding-left: 80px; text-wrap: balance; }

.metrics-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(0,0,0,0.08); }
.metric-cell { padding: 40px 32px; border-right: 1px solid rgba(0,0,0,0.08); display: flex; flex-direction: column; gap: 8px; }
.metric-cell:last-child { border-right: none; }
.metric-num { font-size: clamp(36px, 4vw, 56px); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-desc { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4; }

.stats-section { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(0,0,0,0.08); }
.stat { display: flex; flex-direction: column; align-items: flex-start; padding: 48px 32px; border-right: 1px solid rgba(0,0,0,0.08); }
.stat:last-child { border-right: none; }
.stat-num { font-size: clamp(28px, 3.5vw, 52px); letter-spacing: -0.03em; line-height: 1; margin-bottom: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 17px; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.3; }

.findings-list, .decision-list { display: flex; flex-direction: column; }
.finding { display: flex; gap: 12px; padding: 20px 0; align-items: flex-start; border-top: 1px solid rgba(0,0,0,0.08); }
.finding:first-child { border-top: none; padding-top: 0; }
.finding-num { font-size: 17px; letter-spacing: 0.14em; flex-shrink: 0; padding-top: 3px; width: 28px; color: rgba(0,0,0,0.4); }
.finding h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.finding p { font-size: 17px; line-height: 1.6; color: rgba(0,0,0,0.72); max-width: 480px; }

.pull-quote { margin: 4px 0; padding: 6px 0 6px 26px; border-left: 2px solid rgba(0,0,0,0.15); }
.pull-quote p { font-size: 18px; line-height: 1.55; font-style: italic; }
.pull-quote .source { display: block; margin-top: 10px; font-size: 13px; font-style: normal; letter-spacing: 0.06em; color: rgba(0,0,0,0.4); }

.proto-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border: 1px solid rgba(0,0,0,0.15); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; background: #fff; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.proto-btn:hover { background: #000; color: #fff; border-color: #000; }

.proj-footer { display: flex; justify-content: space-between; align-items: center; padding: 28px 32px; border-top: 1px solid rgba(0,0,0,0.08); }
.proj-footer a { font-size: 17px; letter-spacing: 0.12em; text-transform: uppercase; transition: opacity 0.2s ease; }
.proj-footer a:hover { opacity: 0.4; }
.proj-footer-next { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.proj-footer-next img { width: 44px; height: 44px; object-fit: contain; mix-blend-mode: multiply; flex-shrink: 0; }

/* ── ABOUT ── */
.about-page { padding: 24px 32px 80px; max-width: 1200px; margin: 0 auto; }
.about-top { display: grid; grid-template-columns: 1fr 180px 200px; gap: 0 60px; align-items: start; margin-bottom: 64px; }
.about-bio { font-size: 17px; line-height: 1.7; letter-spacing: 0.01em; }
.portrait { width: 100%; aspect-ratio: 3/4; background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(0,0,0,0.4); overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; user-select: none; }
.contact-info { font-size: 17px; line-height: 2; letter-spacing: 0.04em; }
.contact-info a { display: block; transition: opacity 0.2s ease; }
.contact-available { display: block; font-weight: 600; margin-bottom: 8px; }
.contact-info a:hover { opacity: 0.45; }
.about-bottom { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 60px; border-top: 1px solid rgba(0,0,0,0.1); padding-top: 20px; align-items: start; }
.cv-col h3 { font-size: 17px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; }
.cv-entry { margin-bottom: 16px; }
.cv-entry .role { font-size: 17px; display: block; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(0,0,0,0.2); }
.cv-entry .place, .cv-entry .year { display: block; font-size: 17px; letter-spacing: 0.01em; color: rgba(0,0,0,0.62); }

/* ── Borderless override (user request: remove all hairlines) ── */
.proj-meta-row,
.content-section,
.callout-section,
.metrics-strip,
.metric-cell,
.stats-section,
.stat,
.finding,
.proj-footer,
.about-bottom { border: none !important; }
.pull-quote { border-left: none !important; padding-left: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .imessage li { opacity: 1; }
}

/* ─── Mobile (≤640px) — explicit fixes for cramped phone widths ─── */
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .hero h1 { font-size: 18vw; }
  .hero-bio-wrap { padding: 16px 24px 8px; flex-direction: column; align-items: stretch; gap: 12px; }
  .imessage { max-width: 100%; }
  .imessage li { font-size: 17px; max-width: 92%; }
  .project-info { text-align: left; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px; }
  .site-footer .footer-available { font-size: 19px; }
  .footer-contact { gap: 4px; }
  .site-footer .small { white-space: normal; }
}
