/* ════════════════════════════════════════════════════════════
   style.css — Aibao personal site
   Dark editorial aesthetic · Lora + Inter · Gold accent
   ════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; }

body {
  background: #0a0a12;
  color: #cfc7bf;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
}

em {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
}

a { color: #c98b4d; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.75; }

/* ── Fixed Background Layers ─────────────────────────────── */

#bgGrain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.glow {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90vw;
  height: 90vh;
  background: radial-gradient(ellipse at center,
    rgba(35, 20, 78, 0.32) 0%,
    rgba(20, 12, 48, 0.12) 55%,
    transparent 72%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

#wireframe {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ── Door Flash ───────────────────────────────────────────── */

#doorFlash {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle,
    #fff 0%,
    #e8c07a 20%,
    #c98b4d 40%,
    transparent 68%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 500;
  opacity: 0;
}

#doorFlash.bang {
  animation: bang 700ms ease-out forwards;
}

@keyframes bang {
  0%   { width: 0;       height: 0;       opacity: 0.95; }
  100% { width: 380vmax; height: 380vmax; opacity: 0; }
}

/* ── Contact Overlay ──────────────────────────────────────── */

#contactOverlay {
  position: fixed;
  inset: 0;
  background: #0a0a12;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#contactOverlay.show {
  opacity: 1;
  pointer-events: all;
}

.co-close {
  position: absolute;
  top: 1.6rem;
  left: 1.6rem;
  background: none;
  border: none;
  color: rgba(207, 199, 191, 0.35);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.2s;
}
.co-close:hover { color: rgba(207, 199, 191, 0.8); }

.co-eye {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201, 139, 77, 0.45);
}

.co-head {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  color: #c98b4d;
  text-align: center;
  line-height: 1.15;
}

.co-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.co-links li a {
  font-size: 0.92rem;
  color: rgba(207, 199, 191, 0.65);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.co-links li a:hover { color: #c98b4d; opacity: 1; }

/* ── Fixed Chrome ─────────────────────────────────────────── */

.back-arrow {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 100;
  background: none;
  border: none;
  color: rgba(207, 199, 191, 0.3);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.04em;
}
.back-arrow:hover { color: rgba(207, 199, 191, 0.7); }

.dot-nav {
  position: fixed;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-end;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(207, 199, 191, 0.2);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  position: relative;
  flex-shrink: 0;
}

.dot.active {
  background: #c98b4d;
  transform: scale(1.6);
}

.dot::after {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c98b4d;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.dot:hover::after { opacity: 1; }

.next-btn {
  position: fixed;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(201, 139, 77, 0.3);
  background: none;
  color: #c98b4d;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s;
}
.next-btn:hover { opacity: 1; border-color: #c98b4d; }

.sec-label {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  z-index: 100;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(201, 139, 77, 0.55);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.sec-label.on { opacity: 1; }

/* ── Scroller & Steps ─────────────────────────────────────── */

.scroller {
  position: fixed;
  inset: 0;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  z-index: 10;
  background: transparent;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scroller::-webkit-scrollbar { display: none; }

.step {
  height: 100vh;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 5rem 7rem 4rem;
  background: transparent;
}

.inner {
  width: 100%;
  max-width: 840px;
}

/* ── Typography ───────────────────────────────────────────── */

.eye {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201, 139, 77, 0.48);
  margin-bottom: 1rem;
}

.dh {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  font-weight: 600;
  color: #c98b4d;
  line-height: 1.14;
  margin-bottom: 1.8rem;
}
.dh em { font-weight: 400; }

p { line-height: 1.75; font-size: 0.88rem; color: rgba(207, 199, 191, 0.68); }

blockquote {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: clamp(0.95rem, 1.7vw, 1.2rem);
  line-height: 1.65;
  color: rgba(207, 199, 191, 0.6);
  border-left: 2px solid #c98b4d;
  padding-left: 1.4rem;
  margin-bottom: 1.2rem;
}

/* ── ① Cover ─────────────────────────────────────────────── */

#s-cover {
  justify-content: center;
  align-items: center;
  padding: 0;
}

.wordmark {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(207, 199, 191, 0.42);
  font-weight: 300;
  z-index: 2;
}

#heroRaster {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(78vw, 680px);
  height: min(28vh, 185px);
  cursor: none;
}

.cover-sub {
  position: absolute;
  bottom: 8.8rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(207, 199, 191, 0.3);
  white-space: nowrap;
}

.cover-cta {
  position: absolute;
  bottom: 5.6rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: 1px solid rgba(201, 139, 77, 0.38);
  color: #c98b4d;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 1.7rem;
  cursor: pointer;
  transition: border-color 0.22s, background 0.22s;
}
.cover-cta:hover {
  border-color: #c98b4d;
  background: rgba(201, 139, 77, 0.05);
}

.cover-status {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(207, 199, 191, 0.22);
  white-space: nowrap;
}

/* ── ② Belief ────────────────────────────────────────────── */

.belief-body { max-width: 500px; }

/* ── ③ About ─────────────────────────────────────────────── */

.g22 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.2rem 4rem;
}

.gi h3 {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.9rem;
  color: #c98b4d;
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.gin {
  display: block;
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(201, 139, 77, 0.4);
  margin-bottom: 0.22rem;
}

/* ── ④ Projects ──────────────────────────────────────────── */

.dc-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.dc {
  width: 132px;
  height: 192px;
  border: 1px solid rgba(44, 58, 100, 0.65);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  cursor: pointer;
  transition: border-color 0.22s;
  padding: 0.7rem 0.5rem;
}
.dc:hover { border-color: rgba(201, 139, 77, 0.55); }

.dcn {
  position: absolute;
  top: 0.5rem;
  left: 0.6rem;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  color: rgba(201, 139, 77, 0.38);
}

.dch {
  position: absolute;
  left: 0.44rem;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(44, 58, 100, 0.9);
}
.dch.t { top: 17%; }
.dch.b { bottom: 17%; }

.dck {
  position: absolute;
  right: 0.52rem;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(201, 139, 77, 0.32);
}

.dct {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cfc7bf;
  text-align: center;
}

.dctag {
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(207, 199, 191, 0.28);
  text-align: center;
}

.dc-open {
  background: none;
  border: 1px solid rgba(201, 139, 77, 0.22);
  color: rgba(201, 139, 77, 0.65);
  font-family: 'Inter', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  margin-top: 0.3rem;
}
.dc-open:hover { border-color: #c98b4d; color: #c98b4d; }

.dp {
  display: none;
  padding: 1.1rem 1.4rem;
  border-left: 2px solid #c98b4d;
  position: relative;
  max-width: 580px;
  animation: slideIn 0.28s ease;
}
.dp.open { display: block; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dp-x {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  background: none;
  border: none;
  color: rgba(207, 199, 191, 0.3);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s;
}
.dp-x:hover { color: #cfc7bf; }

#dpT {
  font-family: 'Lora', Georgia, serif;
  color: #c98b4d;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#dpD { font-size: 0.83rem; margin-bottom: 0.65rem; }
#dpL { font-size: 0.75rem; letter-spacing: 0.04em; }

/* ── ⑤ Works Timeline ─────────────────────────────────────── */

.tl-wrap {
  position: relative;
  width: 100%;
  max-width: 740px;
  height: 70px;
  margin-top: 1rem;
}

.tl-track {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(44, 58, 100, 0.5);
}

.tl-mkrs {
  position: absolute;
  inset: 0;
}

.tl-mk {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(201, 139, 77, 0.38);
  background: transparent;
  margin-top: 12px;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.tl-mk:hover .tl-dot,
.tl-mk.active .tl-dot {
  background: #c98b4d;
  border-color: #c98b4d;
}

.tl-lbl {
  font-size: 0.54rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(207, 199, 191, 0.32);
  margin-top: 7px;
  text-align: center;
  white-space: nowrap;
  transition: color 0.2s;
}

.tl-mk:hover .tl-lbl,
.tl-mk.active .tl-lbl { color: #c98b4d; }

.tl-det { margin-top: 2.2rem; max-width: 480px; }

#tlT {
  font-family: 'Lora', Georgia, serif;
  color: #c98b4d;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

#tlD { font-size: 0.83rem; margin-bottom: 0.5rem; }
.tl-lnk { font-size: 0.75rem; }

/* ── ⑥ Skills ────────────────────────────────────────────── */

.rb {
  display: flex;
  width: 100%;
  max-width: 740px;
  height: 30px;
  margin-top: 0.3rem;
  margin-bottom: 2.8rem;
}

.rbs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 500;
  color: rgba(0,0,0,0.52);
  position: relative;
  letter-spacing: 0.04em;
}
.rbs:nth-child(1) { background: #c98b4d; }
.rbs:nth-child(2) { background: #aa7245; }
.rbs:nth-child(3) { background: #7c5848; }
.rbs:nth-child(4) { background: #4b4360; }
.rbs:nth-child(5) { background: #2c3a64; }

.rbs::after {
  content: attr(data-l);
  position: absolute;
  bottom: -1.6rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(207, 199, 191, 0.32);
  white-space: nowrap;
}

.rbl {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 680px;
}

.rbl li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(207, 199, 191, 0.62);
}

.rbn {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.9rem;
  color: #c98b4d;
  flex-shrink: 0;
  min-width: 2.2rem;
}
.rbl strong { color: #cfc7bf; font-weight: 500; }

/* ── ⑦ Interests ─────────────────────────────────────────── */

.tk-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(207, 199, 191, 0.34);
}

.tk-bar {
  flex: 1;
  max-width: 175px;
  height: 1.5px;
  background: rgba(44, 58, 100, 0.5);
}

.tk-fill {
  height: 100%;
  background: #c98b4d;
  width: 0;
  transition: width 0.4s ease;
}

.cl { list-style: none; }

.ci {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(44, 58, 100, 0.28);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s;
}
.ci:hover { border-color: rgba(201, 139, 77, 0.22); }

.cib {
  width: 15px;
  height: 15px;
  border: 1px solid rgba(44, 58, 100, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  color: transparent;
  flex-shrink: 0;
  margin-top: 2px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.ci.on .cib {
  color: #c98b4d;
  border-color: #c98b4d;
  background: rgba(201, 139, 77, 0.06);
}

.cit {
  font-size: 0.86rem;
  line-height: 1.6;
  color: rgba(207, 199, 191, 0.68);
  transition: color 0.2s;
}

.ci.on .cit {
  color: rgba(207, 199, 191, 0.3);
  text-decoration: line-through;
  text-decoration-color: rgba(201, 139, 77, 0.22);
}

/* ── ⑧ Two Worlds ────────────────────────────────────────── */

.twc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  margin-top: 0.3rem;
}

.twh {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.82rem;
  font-weight: 400;
  color: #c98b4d;
  margin-bottom: 1.1rem;
  letter-spacing: 0.02em;
}

.twi { margin-bottom: 0.95rem; }

.twl {
  display: block;
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 139, 77, 0.4);
  margin-bottom: 0.22rem;
}

.twi p { font-size: 0.82rem; }

/* ── ⑨ Reach Out ─────────────────────────────────────────── */

.il {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
}

.il li {
  display: flex;
  gap: 1.4rem;
  align-items: baseline;
  font-size: 0.92rem;
  color: rgba(207, 199, 191, 0.68);
  line-height: 1.6;
}

.iln {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.7rem;
  color: rgba(201, 139, 77, 0.42);
  flex-shrink: 0;
  min-width: 1.8rem;
}

.cdl {
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 139, 77, 0.42);
  margin-bottom: 0.5rem;
}

.cdd {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.65rem);
  color: #c98b4d;
  letter-spacing: 0.04em;
}

.cds {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(207, 199, 191, 0.22);
  margin-top: 0.4rem;
}

/* ── ⑩ The Door ──────────────────────────────────────────── */

.door-sub {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.8rem;
  color: rgba(207, 199, 191, 0.38);
  margin-bottom: 1.1rem;
}

.dsl {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.dsl li {
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
  font-size: 0.9rem;
  color: rgba(207, 199, 191, 0.5);
}

.dhint {
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(201, 139, 77, 0.38);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.85; }
}

.door-hit {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 210px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 20;
  pointer-events: none;
  /* Slight glow ring on hover for discoverability */
  outline: none;
}
.door-hit:focus-visible {
  outline: 1px dashed rgba(201, 139, 77, 0.4);
  outline-offset: 4px;
}

/* ── Reduced Motion ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .dhint { animation: none; opacity: 0.6; }
  #doorFlash.bang { animation: none; opacity: 0; }
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 860px) {
  .step { padding: 4.5rem 2.8rem 3rem; }
  .g22  { grid-template-columns: 1fr; gap: 1.5rem; }
  .twc  { grid-template-columns: 1fr; gap: 1.8rem; }
  .dc   { width: 116px; height: 172px; }
  .dc-row { gap: 0.7rem; }
  .tl-wrap { max-width: 100%; }
  .dot-nav { right: 0.6rem; }
  .dh { font-size: clamp(1.5rem, 5.5vw, 2.2rem); }
  .rb { max-width: 100%; }
  .rbl { max-width: 100%; }
}

@media (max-width: 500px) {
  .step { padding: 4rem 1.6rem 2.5rem; }
  .dc { width: 100px; height: 152px; }
  .dct { font-size: 0.7rem; }
}
