:root{
  --ink:#0a0b10;
  --surface:#12141c;
  --surface-2:#181b26;
  --line: rgba(139,147,167,0.18);
  --steel:#9099b0;
  --steel-dim:#6b7288;
  --paper:#eef0f6;
  --sapphire:#3a4bf0;
  --sapphire-2:#5c6bff;
  --sapphire-deep:#131a52;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  background:var(--ink);
  color:var(--paper);
  font-family:var(--font-body);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{max-width:100%; display:block;}
a{color:inherit; text-decoration:none;}
ul{list-style:none;}

.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:0 clamp(20px, 5vw, 64px);
}

/* ---------- Ambient background texture ---------- */
.facet-field{
  position:absolute; inset:0;
  overflow:hidden;
  pointer-events:none;
  z-index:0;
}
.facet-field svg{position:absolute; width:100%; height:100%; opacity:0.5;}

/* ---------- Nav ---------- */
header{
  position:fixed; top:0; left:0; right:0;
  z-index:100;
  background:linear-gradient(to bottom, rgba(10,11,16,0.92), rgba(10,11,16,0));
  backdrop-filter: blur(6px);
}
.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:22px clamp(20px,5vw,64px);
}
.nav-links{
  display:flex;
  gap:clamp(20px,3vw,40px);
  font-size:0.92rem;
  letter-spacing:0.02em;
}
.nav-links a{
  color:var(--steel);
  transition:color .25s ease;
  position:relative;
}
.nav-links a:hover, .nav-links a:focus-visible{color:var(--paper);}
.nav-links a::after{
  content:'';
  position:absolute; left:0; right:0; bottom:-6px;
  height:1px; background:var(--sapphire-2);
  transform:scaleX(0); transform-origin:left;
  transition:transform .3s ease;
}
.nav-links a:hover::after, .nav-links a:focus-visible::after{transform:scaleX(1);}

.nav-right{
  display:flex;
  align-items:center;
  gap:22px;
}
.nav-mark img{height:30px; width:auto;}
.social-row{display:flex; gap:14px;}
.social-row a{
  width:30px; height:30px;
  display:flex; align-items:center; justify-content:center;
  color:var(--steel);
  border:1px solid var(--line);
  border-radius:50%;
  transition:all .25s ease;
}
.social-row a:hover, .social-row a:focus-visible{
  color:var(--paper);
  border-color:var(--sapphire-2);
  box-shadow:0 0 0 3px rgba(92,107,255,0.12);
}
.social-row svg{width:14px; height:14px;}

.nav-toggle{display:none;}

/* ---------- Hero ---------- */
.hero{
  position:relative;
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding-top:100px;
}
.hero-inner{position:relative; z-index:1;}
.hero-logo{
  width:min(560px, 78vw);
  margin:0 auto 28px;
  opacity:0;
  animation:rise 1.1s cubic-bezier(.2,.8,.2,1) forwards .15s;
}
.hero-tagline{
  font-family:var(--font-body);
  font-size:clamp(0.95rem, 1.4vw, 1.15rem);
  color:var(--steel);
  letter-spacing:0.01em;
  max-width:460px;
  margin:0 auto;
  opacity:0;
  animation:rise 1.1s cubic-bezier(.2,.8,.2,1) forwards .4s;
}
@keyframes rise{
  from{opacity:0; transform:translateY(18px);}
  to{opacity:1; transform:translateY(0);}
}

.scroll-cue{
  position:absolute; bottom:38px; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:8px;
  color:var(--steel-dim);
  font-size:0.75rem;
  letter-spacing:0.08em;
}
.scroll-cue span.line{
  width:1px; height:34px;
  background:linear-gradient(to bottom, var(--sapphire-2), transparent);
}

/* ---------- Section shell ---------- */
section{position:relative; padding:140px 0;}
.section-head{
  max-width:640px;
  margin-bottom:64px;
}
.section-head h2{
  font-family:var(--font-display);
  font-weight:600;
  font-size:clamp(2.2rem, 5vw, 3.4rem);
  line-height:1.05;
  margin-bottom:20px;
}
.section-head p{
  color:var(--steel);
  font-size:1.05rem;
  line-height:1.65;
  max-width:52ch;
}
.kicker{
  display:inline-block;
  font-size:0.82rem;
  color:var(--sapphire-2);
  margin-bottom:14px;
  letter-spacing:0.02em;
}

section#stories{background:var(--surface);}
section#portfolio{background:var(--ink);}
section#about{background:var(--surface);}

/* ---------- Stories ---------- */
.story-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
  gap:28px;
}
.story-card{
  position:relative;
  border-radius:6px;
  overflow:hidden;
  aspect-ratio:3/4;
  background:var(--surface-2);
  border:1px solid var(--line);
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:28px 24px;
  transition:transform .4s cubic-bezier(.2,.8,.2,1), border-color .4s ease;
}
.story-card:hover, .story-card:focus-within{
  transform:translateY(-6px);
  border-color:var(--sapphire-2);
}
.story-art{
  position:absolute; inset:0;
  z-index:0;
}
.story-art img{width:100%; height:100%; object-fit:cover; object-position:center top;}
.story-card .story-body{position:relative; z-index:2;}
.story-card::after{
  content:'';
  position:absolute; inset:0;
  background:linear-gradient(to top, rgba(6,7,12,0.94) 10%, rgba(6,7,12,0.15) 65%);
  z-index:1;
}
.story-name{
  font-family:var(--font-display);
  font-size:1.5rem;
  font-weight:600;
  margin-bottom:4px;
}
.story-title{
  color:var(--steel);
  font-size:0.95rem;
  margin-bottom:18px;
}
.story-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:0.85rem;
  color:var(--paper);
  border-bottom:1px solid var(--sapphire-2);
  padding-bottom:2px;
  width:fit-content;
}
.story-link svg{width:12px; height:12px;}
.story-link.disabled{
  color:var(--steel-dim);
  border-bottom-color:var(--line);
  cursor:default;
}

/* ---------- Portfolio ---------- */
.folio-projects{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:32px;
}
.folio-card{
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:6px;
  overflow:hidden;
  transition:border-color .35s ease, transform .35s ease;
}
.folio-card:hover{border-color:var(--sapphire-2); transform:translateY(-4px);}
.folio-hero{
  aspect-ratio:16/9;
  overflow:hidden;
}
.folio-hero img{width:100%; height:100%; object-fit:cover;}
.folio-body{
  display:grid;
  grid-template-columns:88px 1fr;
  gap:18px;
  padding:22px 24px 26px;
}
.folio-thumb{
  width:88px; height:88px;
  border-radius:4px;
  overflow:hidden;
  border:1px solid var(--line);
}
.folio-thumb img{width:100%; height:100%; object-fit:cover;}
.folio-text h3{
  font-family:var(--font-display);
  font-weight:600;
  font-size:1.25rem;
  margin-bottom:8px;
}
.folio-text p{
  color:var(--steel);
  font-size:0.92rem;
  line-height:1.55;
}
.folio-credit{
  display:block;
  margin-top:8px;
  color:var(--steel-dim);
  font-size:0.8rem;
}

/* ---------- About ---------- */
.about-grid{
  display:grid;
  grid-template-columns:0.9fr 1.1fr;
  gap:80px;
  align-items:center;
}
.about-mark{
  width:100%;
  max-width:340px;
  opacity:0.92;
}
.about-copy p{
  font-size:1.15rem;
  line-height:1.75;
  color:#d6d9e6;
  max-width:56ch;
}
.about-copy p + p{margin-top:22px;}

/* ---------- Footer ---------- */
footer{
  background:var(--ink);
  border-top:1px solid var(--line);
  padding:56px 0 36px;
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:24px;
}
.footer-mark{display:flex; align-items:center; gap:12px; color:var(--steel);}
.footer-mark img{height:22px;}
.footer-copy{font-size:0.82rem; color:var(--steel-dim);}

/* ---------- Story reader page ---------- */
.story-hero{
  position:relative;
  padding:170px 0 90px;
  background:var(--surface);
  border-bottom:1px solid var(--line);
}
.story-hero .back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--sapphire-2);
  font-size:0.88rem;
  margin-bottom:28px;
}
.story-hero .back-link svg{width:14px; height:14px;}
.story-hero .kicker{margin-bottom:10px;}
.story-hero h1{
  font-family:var(--font-display);
  font-weight:700;
  font-size:clamp(2.4rem, 6vw, 4rem);
  line-height:1.05;
  margin-bottom:14px;
}
.story-hero .universe{
  color:var(--steel);
  font-style:italic;
  font-size:1rem;
}

.story-content{
  max-width:700px;
  margin:0 auto;
  padding:90px clamp(20px,5vw,0px) 60px;
}
.story-content h2{
  font-family:var(--font-display);
  font-weight:600;
  font-size:1.7rem;
  margin:64px 0 22px;
  color:var(--paper);
}
.story-content h2:first-child{margin-top:0;}
.story-content h3{
  font-family:var(--font-display);
  font-weight:600;
  font-size:1.25rem;
  margin:40px 0 16px;
  color:var(--sapphire-2);
}
.story-content p{
  font-size:1.08rem;
  line-height:1.85;
  color:#dcdfea;
  margin-bottom:22px;
}
.story-content em{color:var(--steel); font-style:italic;}
.story-content strong{color:var(--paper);}
.story-content hr{
  border:none;
  border-top:1px solid var(--line);
  margin:52px 0;
}
.story-content ul, .story-content ol{
  margin:0 0 22px 22px;
  color:#dcdfea;
  line-height:1.85;
}
.story-content li{margin-bottom:6px;}
.story-content blockquote{
  border-left:2px solid var(--sapphire-2);
  padding-left:20px;
  color:var(--steel);
  font-style:italic;
  margin:0 0 22px;
}

.story-appendix{
  margin-top:60px;
  padding:32px clamp(20px,5vw,36px);
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:6px;
}
.story-appendix h2{margin-top:0 !important;}
.story-appendix p{font-size:0.98rem; color:var(--steel);}

.story-footer-nav{
  max-width:700px;
  margin:0 auto;
  padding:0 clamp(20px,5vw,0px) 120px;
}
.story-footer-nav .back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--sapphire-2);
  font-size:0.92rem;
}

/* ---------- Coming soon page ---------- */
.coming-soon{
  min-height:70vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:170px 20px 100px;
}
.coming-soon h1{
  font-family:var(--font-display);
  font-weight:700;
  font-size:clamp(2.4rem, 6vw, 4rem);
  margin-bottom:16px;
}
.coming-soon p{color:var(--steel); font-size:1.05rem; max-width:44ch; margin-bottom:32px;}

/* ---------- Responsive ---------- */
@media (max-width:860px){
  .story-grid{grid-template-columns:1fr;}
  .about-grid{grid-template-columns:1fr; gap:40px;}
  .about-mark{margin:0 auto; max-width:220px;}
  .about-copy p{margin-left:auto; margin-right:auto;}
  .folio-projects{grid-template-columns:1fr;}
}
@media (max-width:680px){
  .nav-links{
    position:fixed; top:0; right:0; height:100vh; width:min(260px,78vw);
    background:var(--surface); border-left:1px solid var(--line);
    flex-direction:column; padding:100px 28px; gap:26px;
    transform:translateX(100%); transition:transform .35s ease;
  }
  .nav-links.open{transform:translateX(0);}
  .nav-toggle{
    display:flex; flex-direction:column; gap:5px;
    background:none; border:none; cursor:pointer; z-index:200;
    padding:6px;
  }
  .nav-toggle span{width:22px; height:1px; background:var(--paper);}
  section{padding:96px 0;}
  .story-content{padding-top:60px;}
}

@media (prefers-reduced-motion: reduce){
  .hero-logo, .hero-tagline{animation:none; opacity:1;}
  html{scroll-behavior:auto;}
}
