/* weproject.site — dark, calligraphy curtain, based on the Portfolio Cosmic layout. */

@font-face { font-family: "Brush"; src: url("../fonts/brush.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif.woff2") format("woff2"); font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #101418;
  --stroke: #1f1f1f;
  --stroke-2: #2a2a2a;
  --text: #f5f5f5;
  --text-2: #a3a3a3;
  --muted: #878787;
  --ink: #ece8df;
  --accent-1: #89aacc;
  --accent-2: #4e85bf;
  --accent-ink: #a9c4e0;
  --accent-gradient: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --brush: Brush, KaiTi, STKaiti, serif;
  --open: 1;   /* set by main.js as the curtain opens; 1 = no-JS fallback */
  --pad: clamp(20px, 6vw, 120px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
h1, h2 { margin: 0; font-weight: 400; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14px;
}
.skip:focus { top: 16px; }

.eyebrow {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 24px; border-radius: 999px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid:hover { background: #ffffff; transform: translateY(-1px); }
.btn-ghost { border: 1px solid #333; color: var(--text); }
.btn-ghost:hover { border-color: #555; background: rgba(255, 255, 255, 0.04); }

/* ---------------------------------------------------------------- nav pill */
.nav {
  position: fixed; left: 50%; top: 18px; z-index: 40;
  display: flex; align-items: center; gap: 2px; padding: 6px;
  border-radius: 999px; border: 1px solid #262626;
  background: rgba(20, 20, 20, 0.78);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transform: translate(-50%, -14px); opacity: 0; pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
.nav.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.nav-logo {
  width: 36px; height: 36px; border-radius: 50%; padding: 1.5px;
  background: var(--accent-gradient); transition: transform .25s;
}
.nav-logo:hover { transform: scale(1.08); }
.nav-logo span {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); font-family: var(--serif); font-style: italic; font-size: 17px;
}
.nav-sep { width: 1px; height: 20px; background: #2a2a2a; margin: 0 6px; }
.nav-link {
  padding: 8px 16px; border-radius: 999px; font-size: 14px; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.nav-link:hover { color: var(--text); background: rgba(38, 38, 38, 0.6); }
.nav-link.active { color: var(--text); background: rgba(38, 38, 38, 0.6); }

/* ---------------------------------------------------------------- intro: hero behind the curtain */
.intro { position: relative; height: 175vh; height: 175svh; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 52%, rgba(78, 133, 191, 0.15), rgba(78, 133, 191, 0.045) 42%, rgba(78, 133, 191, 0) 72%),
    var(--bg);
}
.curtain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
body.on-strand { cursor: pointer; }
.strand-tip {
  position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none;
  padding: 6px 12px; border-radius: 999px; border: 1px solid #2f4a66;
  background: rgba(10, 10, 10, 0.85); color: var(--accent-ink); font-size: 12px; white-space: nowrap;
  opacity: 0; transition: opacity .18s;
}
.strand-tip.show { opacity: 1; }

.hero {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 0 var(--pad); text-align: center;
  opacity: calc(0.5 + 0.5 * var(--open));
  transform: scale(calc(0.96 + 0.04 * var(--open)));
}
.hero-name {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(64px, 11vw, 132px); line-height: 1; letter-spacing: -0.01em;
}
.hero-title { max-width: 560px; font-size: clamp(16px, 1.6vw, 20px); color: var(--text-2); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.hero .hero-actions { opacity: calc(var(--open) * 1.5 - 0.5); }
html.js:not(.opened) .hero .hero-actions { pointer-events: none; }

.cue {
  position: absolute; left: 50%; bottom: 26px; z-index: 3; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid #262626; background: rgba(10, 10, 10, 0.78);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #bdbdbd; white-space: nowrap;
  opacity: calc(1 - 3 * var(--open)); pointer-events: none;
}
.cue svg { animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(80px, 12vh, 140px) var(--pad); max-width: 1440px; margin: 0 auto; }
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 40px;
  margin-bottom: 40px;
}
.section-head > div { display: flex; flex-direction: column; gap: 12px; }
.section-head h2, .about-text h2, .footer-close h2 {
  font-size: clamp(38px, 5vw, 60px); line-height: 1.05; letter-spacing: -0.01em;
}
.section-head h2 em, .about-text h2 em, .footer-close h2 em { font-size: 1.12em; }
.section-note { max-width: 320px; font-size: 15px; color: var(--muted); }

/* ---------------------------------------------------------------- build cards */
.grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(340px, auto);
  gap: 20px;
}
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 24px; border: 1px solid #262626; background: var(--surface);
  transition: border-color .3s, transform .3s, box-shadow .6s;
}
.card--large { grid-column: span 2; grid-row: span 2; }
a.card:hover { border-color: #3a3a3a; transform: translateY(-2px); }
.card.flash { box-shadow: 0 0 0 2px var(--accent-1), 0 0 40px rgba(137, 170, 204, 0.25); }
.card-art {
  position: relative; flex: 1 1 auto; min-height: 180px; margin: 10px 10px 0; overflow: hidden;
  border-radius: 16px; border: 1px solid var(--stroke); background: var(--surface-2);
}
.card-art > svg, .card-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-art > img { object-position: top left; }
.card-art > svg, .card-art > img { transition: transform .6s ease; }
a.card:hover .card-art > svg, a.card:hover .card-art > img { transform: scale(1.03); }
.card-view {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  display: flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translate(-50%, -40%) scale(0.92);
  transition: opacity .25s, transform .25s;
}
a.card:hover .card-view, a.card:focus-visible .card-view { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card-body { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 20px 22px 22px; }
.card-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card-name { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 500; }
.card--large .card-name { font-size: 26px; }
.card-blurb { font-size: 14px; color: var(--text-2); }
.card--large .card-blurb { font-size: 15px; max-width: 560px; }
.card-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; font-size: 13px; color: var(--muted); }
.card-tag {
  padding: 4px 11px; border-radius: 999px; border: 1px solid #2f4a66; color: var(--accent-ink); font-size: 12px;
}
.card-tag--internal { border-color: #333; color: var(--text-2); }
.card:not(.card--large) .card-body { flex-direction: column; align-items: stretch; gap: 10px; }
.card:not(.card--large) .card-meta { flex-direction: row; justify-content: space-between; align-items: center; }
.card-next {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border-radius: 24px; border: 1px dashed #333; padding: 28px; text-align: center;
}
.card-next strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 32px; color: #d4d4d4; }
.card-next span:last-child { font-size: 13px; color: #6b6b6b; }
.noscript-list { color: var(--text-2); }

/* ---------------------------------------------------------------- about */
.about {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; row-gap: 48px; align-items: center;
}
.about-art {
  grid-column: span 5; margin: 0; aspect-ratio: 4 / 5; position: relative; overflow: hidden;
  border-radius: 28px; border: 1px solid #262626;
  background: radial-gradient(ellipse at 50% 40%, rgba(78, 133, 191, 0.14), rgba(78, 133, 191, 0) 70%), var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 32px;
}
.about-brush {
  writing-mode: vertical-rl; font-family: var(--brush); font-size: clamp(54px, 6.4vw, 92px); line-height: 1.05;
  color: var(--ink); letter-spacing: 0.02em;
}
.about-art figcaption { max-width: 280px; text-align: center; font-size: 13px; line-height: 1.5; color: var(--muted); }
.about-text { grid-column: 7 / span 6; display: flex; flex-direction: column; gap: 26px; }
.about-bio { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.65; color: var(--text-2); }
.about-tags { display: flex; flex-direction: column; gap: 12px; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 8px 14px; border-radius: 999px; border: 1px solid #262626; font-size: 14px; color: #d4d4d4; }
.about-actions { justify-content: flex-start; margin-top: 0; }

/* ---------------------------------------------------------------- footer */
.footer {
  position: relative; overflow: hidden; padding-top: clamp(60px, 10vh, 110px);
  background: radial-gradient(ellipse at 50% 100%, rgba(78, 133, 191, 0.15), rgba(78, 133, 191, 0.04) 45%, rgba(78, 133, 191, 0) 75%), var(--bg);
}
.marquee { display: flex; flex-direction: column; gap: 4px; }
.marquee-row { overflow: hidden; }
.marquee-track {
  display: flex; width: max-content; white-space: nowrap;
  font-family: var(--brush); font-size: clamp(56px, 8vw, 112px); line-height: 1.2; color: var(--ink); opacity: 0.85;
  animation: marquee 70s linear infinite;
}
.marquee-track span { padding-right: 0.4em; }
.marquee-row--back .marquee-track { opacity: 0.32; animation-duration: 90s; animation-direction: reverse; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.footer-close {
  display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center;
  padding: clamp(64px, 12vh, 120px) var(--pad);
}
.footer-bar {
  margin: 0 var(--pad); padding: 26px 0 32px; border-top: 1px solid var(--stroke);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 13px; color: var(--muted);
}
.footer-bar a { color: #d4d4d4; }
.footer-bar a:hover { color: var(--text); }

/* ---------------------------------------------------------------- reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-art { grid-column: span 12; aspect-ratio: auto; min-height: 380px; }
  .about-text { grid-column: span 12; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .card--large { grid-column: auto; grid-row: auto; }
  .card-art { min-height: 200px; flex: 0 0 auto; aspect-ratio: 16 / 10; }
  .card-body, .card--large .card-body { flex-direction: column; align-items: stretch; gap: 10px; }
  .card-meta { flex-direction: row; justify-content: space-between; align-items: center; }
  .section-note { max-width: none; }
  .nav-link { padding: 8px 12px; }
  .footer-bar { justify-content: center; text-align: center; }
}

/* ---------------------------------------------------------------- less motion */
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .cue svg { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card-art > svg, .card-art > img, .card-view, .nav, .btn { transition: none; }
}
