/* Elisa Huang — minimalist portfolio (EB Garamond + Jost) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0F0F0D;
  --white: #FFFFFF;
  --cream: #F8F7F4;
  --rule: rgba(15, 15, 13, 0.1);
  --muted: rgba(15, 15, 13, 0.42);
  --font-display: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-ui: "Jost", system-ui, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  background: var(--cream);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* ── Layout ── */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 48px);
  padding-right: clamp(20px, 4vw, 48px);
}

/* ── Site header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header .site-logo,
.site-header .site-nav a {
  text-decoration: none;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--black);
}

.site-logo:hover {
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  list-style: none;
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  transition: color 0.2s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--muted);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
}

.hamburger span {
  display: block;
  height: 1px;
  width: 22px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
  background: var(--cream);
  padding: 80px 24px;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 500;
  text-decoration: none;
  color: var(--black);
}

.mobile-nav a[aria-current="page"] {
  color: var(--muted);
}

.mobile-nav__close {
  position: absolute;
  top: 20px;
  right: clamp(20px, 4vw, 48px);
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--black);
}

@media (max-width: 639px) {
  .site-nav {
    display: none;
  }
  .site-header .hamburger {
    display: flex;
  }
}

/* ── Home ── */
.page-home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.page-home__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 100px;
  padding-bottom: 80px;
}

.page-home .site-footer {
  margin-top: auto;
}

.home-hero {
  max-width: 36rem;
}

.home-projects {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--rule);
}

.home-projects .page-head {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
}

.home-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.home-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: var(--black);
  margin-bottom: 1.5rem;
}

.home-title .dot {
  color: var(--muted);
}

.home-lead {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--muted);
  max-width: 32rem;
  margin-bottom: 2rem;
}

.home-lead strong {
  color: var(--black);
  font-weight: 500;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border: 1px solid var(--black);
  color: var(--black);
  background: transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  cursor: pointer;
}

.btn:hover {
  background: var(--black);
  color: var(--white);
}

.btn--ghost {
  border-color: var(--rule);
  color: var(--muted);
}

.btn--ghost:hover {
  border-color: var(--black);
  color: var(--black);
  background: transparent;
}

/* Pages with preview-style header — match index chrome */
body:has(> header.ph-nav) {
  background: var(--white);
}

/* ── About page ── */
main.page-about {
  padding-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-bottom: 100px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.about-intro h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.about-intro p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-intro strong {
  color: var(--black);
  font-weight: 500;
}

.about-sidebar {
  border: 1px solid var(--rule);
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--white);
}

.about-sidebar h2 {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.about-sidebar dl {
  font-size: 0.875rem;
  line-height: 1.7;
}

.about-sidebar dt {
  color: var(--muted);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1rem;
}

.about-sidebar dt:first-child {
  margin-top: 0;
}

.about-sidebar dd {
  color: var(--black);
}

.about-sidebar a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.about-sidebar a:hover {
  color: var(--muted);
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.25rem;
}

.skill-pill {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  color: var(--muted);
}

@media (max-width: 800px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Case study ── */
.case-study-main {
  padding-top: 88px;
  padding-bottom: 80px;
}

.case-study-back {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.case-study-back:hover {
  color: var(--black);
}

.case-study-header {
  max-width: 40rem;
  padding: 0 clamp(20px, 4vw, 48px) 3rem;
}

.case-study-label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.case-study-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 1.25rem;
}

.case-study-lede {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
}

.case-study-pages {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.case-study-pages figure {
  margin: 0 0 1.5rem;
}

.case-study-pages img {
  width: 100%;
  display: block;
  border: 1px solid var(--rule);
  background: var(--white);
}

.case-study-pages figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.75rem;
}

.case-study-footer-space {
  height: 2rem;
}

.case-study-note {
  padding: 2rem;
  border: 1px dashed var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  max-width: 40rem;
  margin: 0 auto 2rem;
  text-align: center;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem clamp(20px, 4vw, 48px);
  margin-top: auto;
}

.site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.site-footer__inner > .site-logo {
  justify-self: start;
}

.site-footer__inner > .footer-copy {
  justify-self: center;
  text-align: center;
}

.site-footer__inner > .footer-links {
  justify-self: end;
}

.site-footer .site-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.site-footer .site-logo img {
  display: block;
  height: auto;
  max-height: 32px;
  width: auto;
  max-width: min(200px, 55vw);
  object-fit: contain;
}

.site-footer .site-logo:hover img {
  opacity: 0.82;
}

.footer-copy {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--black);
}

@media (max-width: 560px) {
  .site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .site-footer__inner > .footer-copy {
    justify-self: auto;
    text-align: left;
  }

  .site-footer__inner > .footer-links {
    justify-self: auto;
  }
}

/* ── Reveal (optional) ── */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Home — portfolio preview layout (elisa_portfolio_preview.html)
   ═══════════════════════════════════════════════════════════════════════════ */

.page-home .ph-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ph-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 52px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 28px);
  background: var(--white);
}

.ph-nav-logo,
.ph-nav-link,
.ph-nav-btn {
  text-decoration: none;
}

.ph-nav-logo {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
  flex-shrink: 0;
}

.ph-nav-logo:hover {
  color: var(--muted);
}

.ph-nav-links-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.ph-nav-links {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: stretch;
}

.ph-nav-link {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0 12px;
  display: flex;
  align-items: center;
  height: 52px;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
}

.ph-nav-link:hover {
  color: var(--black);
}

.ph-nav-link--act,
.ph-nav-link[aria-current="page"] {
  color: var(--black);
  font-weight: 400;
  border-bottom-color: var(--black);
}

.ph-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.ph-nav-btn {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
  border: 1px solid rgba(15, 15, 13, 0.22);
  padding: 7px 14px;
  white-space: nowrap;
}

.ph-nav-btn:hover {
  border-color: var(--black);
}

.ph-hamburger {
  display: none;
}

@media (max-width: 639px) {
  .ph-nav-links-wrap {
    display: none;
  }

  .ph-hamburger {
    display: flex;
  }

  .ph-nav-btn {
    display: none;
  }
}

.ph-inner {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 28px);
}

.ph-hero {
  padding: 48px 0 28px;
}

.ph-hero-hl {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 72px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 14px;
}

.ph-hero-hl-em {
  font-style: italic;
}

.ph-hero-sub {
  font-family: var(--font-ui);
  font-size: clamp(0.875rem, 2.9vw, 1.125rem);
  font-weight: 300;
  color: var(--muted);
  line-height: 1.65;
  letter-spacing: 0.02em;
  max-width: min(40rem, 100%);
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-wrap: pretty;
}

.ph-hero-sub strong {
  font-weight: 600;
  color: var(--black);
}

.ph-hero-sub-rest {
  white-space: normal;
}

@media (min-width: 1024px) {
  .ph-hero-sub {
    line-height: 1.8;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .ph-hero-sub-rest {
    white-space: nowrap;
  }
}

.ph-filter-row {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 0 0 0;
  min-height: 38px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ph-filter-label {
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-right: 1px solid var(--rule);
  flex-shrink: 0;
}

.ph-filter-pill {
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--rule);
  flex-shrink: 0;
  white-space: nowrap;
}

.ph-filter-pill:hover {
  color: var(--black);
}

.ph-filter-pill--on {
  font-weight: 400;
  color: var(--black);
  box-shadow: inset 0 -2px 0 var(--black);
}

.ph-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  margin-top: 0;
}

.ph-card {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  display: block;
  background: var(--white);
  transition: background 0.2s var(--ease);
}

.ph-card:hover {
  background: var(--cream);
}

.ph-thumb {
  aspect-ratio: 4 / 3;
  position: relative;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  background: var(--cream);
}

.ph-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-thumb--yaya {
  background: #d6e4dc;
}

.ph-thumb--elaio {
  background: #e8dfc8;
}

.ph-thumb--artdeco {
  background: #d8d0e4;
}

.ph-thumb--hua {
  background: #e8c8c0;
}

.ph-thumb--kou {
  background: #c8d4e8;
}

.ph-thumb--sprints {
  background: #e4e4d4;
}

.ph-thumb--placeholder img {
  display: none;
}

.ph-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-tw {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 400;
  font-style: italic;
  color: rgba(15, 15, 13, 0.2);
  text-align: center;
  line-height: 1;
  user-select: none;
}

.ph-tnum {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 1;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(15, 15, 13, 0.28);
}

.ph-cinfo {
  padding: 12px 14px 10px;
}

.ph-ctop {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ph-ctitle {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  color: var(--black);
  letter-spacing: -0.01em;
}

.ph-carr {
  font-size: 12px;
  color: var(--muted);
}

.ph-ctags {
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

@media (max-width: 900px) {
  .ph-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .ph-grid {
    grid-template-columns: 1fr;
  }
}

.ph-foot {
  border-top: 1px solid var(--rule);
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(16px, 4vw, 28px);
  margin-top: auto;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  flex-shrink: 0;
}

.ph-foot-left,
.ph-foot-right,
.ph-foot-mid-txt {
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ph-foot-mid {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ph-foot-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4a7c4e;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .ph-foot {
    flex-direction: column;
    height: auto;
    padding: 14px clamp(16px, 4vw, 28px);
    align-items: flex-start;
  }
}
