/* ==========================================================================
   HAOQI.DESIGN — PIXEL PERFECT 100% REPLICA
   Exact layout, typography, proportions, padding, and positioning
   ========================================================================== */

:root {
  --bg: #faf9f6;
  --l1: #000000;
  --l2: #666666;
  --l3: #999999;
  --l4: #e5e5e5;
  --border: #e6e4df;
  --neon: #c0fe04;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, Monaco, "Courier New", monospace;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --l1: #ffffff;
  --l2: #a1a1aa;
  --l3: #71717a;
  --l4: #27272a;
  --border: #222222;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg);
  color: var(--l1);
  font-family: var(--font-sans);
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.3;
}

::selection {
  background: var(--neon);
  color: #000000;
}

/* Background WebGL / Particle Canvas */
#webgl-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0.4;
}

/* Dotted Hover Frame */
.dotted-link {
  position: relative;
  display: inline-block;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--l1);
  background: transparent;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.dotted-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dotted transparent;
  pointer-events: none;
  transition: border-color 0.15s ease;
}

.dotted-link:hover::before {
  border-color: var(--l1);
}

/* FIXED HUD (OVERLAY TOP & BOTTOM) */
.fixed-hud-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  pointer-events: none;
}

.fixed-hud-top * { pointer-events: auto; }

.hud-brand {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--l1);
}

.hud-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fixed-hud-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--l1);
}

.fixed-hud-bottom * { pointer-events: auto; }

.hud-center-coords {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-variant-numeric: tabular-nums;
}

/* PAGE WRAPPER */
.page-container {
  position: relative;
  z-index: 10;
  width: 100%;
}

/* 1. HERO SECTION (EXACT 100vh FULL VIEWPORT SCREEN) */
.hero-viewport-section {
  width: 100%;
  height: 100vh;
  min-height: 700px;
  padding: 120px 48px 100px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
}

.hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.45;
}

.hero-meta-col-1 {
  grid-column: 1 / span 3;
}

.hero-meta-col-1 h1 {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--l1);
}

.hero-meta-col-2 {
  grid-column: 4 / span 3;
  color: var(--l2);
}

.hero-meta-col-3 {
  grid-column: 8 / span 5;
  color: var(--l1);
}

.hero-giant-headline {
  font-family: var(--font-sans);
  font-size: clamp(48px, 6.8vw, 115px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.93;
  letter-spacing: -0.04em;
  color: var(--l1);
}

/* 2. MANIFESTO & SIGNATURE SECTION */
.manifesto-section {
  width: 100%;
  padding: 140px 48px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
  max-width: 1600px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  align-items: flex-start;
}

.manifesto-left-col {
  grid-column: 1 / span 4;
}

.svg-signature {
  width: 100%;
  max-width: 280px;
}

.svg-sign-path {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: drawHaoqi 2.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes drawHaoqi {
  to { stroke-dashoffset: 0; }
}

.manifesto-right-col {
  grid-column: 5 / span 8;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.manifesto-p1 {
  font-family: var(--font-sans);
  font-size: clamp(24px, 3.2vw, 48px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--l1);
}

.manifesto-p2 {
  font-family: var(--font-sans);
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--l2);
}

.manifesto-p2 a {
  color: var(--l1);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 3. SELECTED WORK SECTION (12-COL ASYMMETRICAL GRID) */
.selected-work-section {
  width: 100%;
  padding: 80px 48px 160px 48px;
  max-width: 1600px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
  row-gap: 80px;
}

.work-item-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--l1);
}

.col-span-8 { grid-column: span 8; }
.col-span-6 { grid-column: span 6; }
.col-span-4 { grid-column: span 4; }
.col-start-5 { grid-column-start: 5; }
.col-start-7 { grid-column-start: 7; }

.work-image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--l4);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-image-box.square {
  aspect-ratio: 1 / 1;
}

.work-item-wrapper:hover .work-image-box {
  transform: translateY(-4px);
}

.work-image-box img, .work-image-box svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.corner-tag {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--neon);
  color: #000000;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  z-index: 10;
}

.work-caption-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
}

.work-name { font-weight: 700; }
.work-year { color: var(--l3); font-variant-numeric: tabular-nums; }

/* 4. INNOVATE WITH PURPOSE SECTION */
.purpose-divider {
  width: 100%;
  padding: 120px 48px;
  text-align: center;
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: clamp(40px, 6vw, 90px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  color: var(--l1);
}

/* 5. FOOTER (100vh FULLSCREEN) */
.fullscreen-footer {
  width: 100%;
  height: 100vh;
  min-height: 700px;
  padding: 100px 48px 120px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.footer-huge-typography {
  font-family: var(--font-sans);
  font-size: clamp(48px, 7.5vw, 125px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.94;
  letter-spacing: -0.04em;
  color: var(--l1);
  margin-top: auto;
  margin-bottom: 60px;
}

.footer-huge-typography .row-split {
  display: flex;
  justify-content: space-between;
}

.footer-huge-typography .row-right {
  text-align: right;
}

.footer-bottom-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* RESPONSIVE */
@media (max-width: 990px) {
  .fixed-hud-top, .fixed-hud-bottom { padding: 16px 24px; }
  .hero-viewport-section { height: auto; min-height: 100vh; padding: 90px 24px 60px 24px; }
  .hero-meta-grid { grid-template-columns: 1fr; }
  .hero-meta-col-1, .hero-meta-col-2, .hero-meta-col-3 { grid-column: span 1; }
  .manifesto-section { padding: 80px 24px; grid-template-columns: 1fr; }
  .manifesto-left-col, .manifesto-right-col { grid-column: span 1; }
  .selected-work-section { padding: 60px 24px; }
  .work-grid { grid-template-columns: 1fr; gap: 40px; }
  .col-span-8, .col-span-6, .col-span-4 { grid-column: span 1; }
  .col-start-5, .col-start-7 { grid-column-start: auto; }
  .fullscreen-footer { height: auto; min-height: 100vh; padding: 80px 24px 60px 24px; }
}
