@import url('https://fonts.googleapis.com/css2?family=Mrs+Saint+Delafield&family=Alex+Brush&family=Caveat:wght@700&family=Yellowtail&family=Great+Vibes&family=Allura&family=Architects+Daughter&family=Shadows+Into+Light&family=Reenie+Beanie&family=Homemade+Apple&display=swap');

@font-face {
  font-family: 'Orbitron';
  src: url('../mywebsite/HMI/仪表动效/assets/fonts/orbitron-400.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Orbitron';
  src: url('../mywebsite/HMI/仪表动效/assets/fonts/orbitron-500.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

:root {
  /* Curated Cyber-Cockpit Dark Color Palette - inspired by haoqi.design */
  --canvas: #06080B;        /* Pure obsidian black cockpit background */
  --paper: #06080B;         
  --ink: #F2F5F7;           /* High-contrast off-white cockpit text */
  --muted: #7E8B99;         /* Radar-gray muted text */
  --line: rgba(242, 245, 247, 0.05); /* Ultra-faint grid line */
  --line-strong: rgba(242, 245, 247, 0.12); /* Solid border lines */
  --signal: #C0FE04;        /* Technical Neon Lime-Green */
  --signal-glow: rgba(192, 254, 4, 0.15);
  
  /* Animations */
  --ease: cubic-bezier(0.16, 1, 0.3, 1); /* Snappy premium easing */
  --duration: 400ms;
}

/* CSS Reset & Dark Defaults */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", PingFang SC, Microsoft YaHei, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  position: relative;
  background-color: var(--paper);
  color: var(--ink);
}

/* Core Font stacks */
.font-mono {
  font-family: SFMono-Regular, Menlo, Consolas, Monaco, monospace;
}
.font-orbitron {
  font-family: 'Orbitron', monospace;
}

/* -------------------------------------------------------------
   Background Blueprint Grid Paper Texture
------------------------------------------------------------- */
.container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: calc((100% - 160px) / 12) 100px; /* Faint 12-column grid matching container padding */
  background-position: 80px 0;
  pointer-events: none;
  z-index: 0;
}

.container-home::before {
  background-size: calc((100% - 48px) / 12) 100px !important;
  background-position: 24px 0 !important;
}

/* Ensure container children float above the background grid lines */
.container > * {
  position: relative;
  z-index: 1;
}

/* -------------------------------------------------------------
   Pulsing Cockpit Status Indicator
------------------------------------------------------------- */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: SFMono-Regular, Menlo, monospace;
  font-size: 14px; /* Minimum font-size 14px */
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--signal);
  background-color: rgba(192, 254, 4, 0.05);
  border: 1px solid rgba(192, 254, 4, 0.15);
  padding: 4px 10px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--signal);
  box-shadow: 0 0 8px var(--signal);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(192, 254, 4, 0.5);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(192, 254, 4, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(192, 254, 4, 0);
  }
}

/* -------------------------------------------------------------
   Staggered Entry Animations
------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  opacity: 0;
  animation: fadeInUp 650ms var(--ease) forwards;
}

.delay-1 { animation-delay: 80ms; }
.delay-2 { animation-delay: 160ms; }
.delay-3 { animation-delay: 240ms; }
.delay-4 { animation-delay: 320ms; }
.delay-5 { animation-delay: 400ms; }

/* -------------------------------------------------------------
   Visual Grid Layout & Technical Border System
------------------------------------------------------------- */
.border-grid-v {
  position: relative;
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
}

.editorial-section {
  position: relative;
  border-bottom: 1px solid var(--line-strong);
}

.cell-marker {
  position: absolute;
  color: var(--signal);
  font-family: SFMono-Regular, Menlo, monospace;
  font-size: 14px; /* Minimum font-size 14px */
  line-height: 1;
  pointer-events: none;
  z-index: 10;
  user-select: none;
}
.cell-marker.top-left { top: -6px; left: -6px; }
.cell-marker.top-right { top: -6px; right: -6px; }
.cell-marker.bottom-left { bottom: -6px; left: -6px; }
.cell-marker.bottom-right { bottom: -6px; right: -6px; }

.container {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 80px;
  padding-right: 80px;
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  position: relative;
}

.container-home {
  max-width: 1720px !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 0;
}

.grid-cell {
  position: relative;
  border-right: 1px solid var(--line-strong);
  padding: 80px 40px;
}
.grid-cell:last-child {
  border-right: none;
}

/* Typography - Ultra-impact editorial headings */
h1, h2, h3, h4, h5 {
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.text-hero-h1 {
  font-size: clamp(52px, 6.8vw, 116px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.05em;
  margin-left: -4px; /* Optical adjustment for heavy fonts */
}

.text-hmi-h1 {
  font-size: clamp(48px, 6vw, 102px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin-left: -3px;
}

.text-other-h1 {
  font-size: clamp(40px, 5vw, 84px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin-left: -2px;
}

.text-h2 {
  font-size: clamp(34px, 4vw, 68px);
  letter-spacing: -0.03em;
  line-height: 1.22; /* Increased line-height from 0.90 */
}

.text-h3 {
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.20; /* Increased line-height from 0.92 */
}

.text-large-body {
  font-size: 16.5px; /* Decreased font-size from 19px */
  line-height: 1.70; /* Increased line-height from 1.55 */
  letter-spacing: -0.01em;
  color: var(--ink);
}

.text-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.text-label {
  font-family: SFMono-Regular, Menlo, Consolas, Monaco, monospace;
  font-size: 14px; /* Minimum font-size 14px */
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  font-weight: 700;
}

/* -------------------------------------------------------------
   Navigation Bar
------------------------------------------------------------- */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  z-index: 100;
  border-bottom: 1px solid var(--line-strong);
  background-color: rgba(6, 8, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--duration) var(--ease);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding-left: 40px;
  padding-right: 40px;
  border-left: none;
  border-right: none;
}

.nav-logo {
  text-decoration: none;
  color: var(--ink);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.nav-logo span {
  font-weight: 400;
  color: var(--muted);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px; /* Increased gap to give links breathing room */
}

.nav-link-item a,
.btn-secondary,
.case-back-link {
  position: relative;
  text-decoration: none;
}

/* Dotted hover box for back links */
.case-back-link::before {
  content: '';
  position: absolute;
  inset: -4px -8px;
  border: 1px dotted transparent;
  pointer-events: none;
  transition: border-color 200ms var(--ease);
  z-index: 5;
}

.case-back-link:hover::before {
  border-color: var(--signal);
}

.case-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink) !important; /* High contrast off-white */
  font-family: SFMono-Regular, Menlo, monospace;
  font-size: 14px; /* Minimum font-size 14px */
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 32px; /* Pull away from text below */
  transition: color 200ms var(--ease);
}

.case-back-link:hover {
  color: var(--signal) !important; /* Accent neon lime on hover */
}

.case-hero-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-link-item a {
  color: var(--ink);
  font-family: SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  font-weight: 700;
  padding: 6px 16px;
  border: 1px solid transparent; /* default transparent border */
  transition: all 200ms var(--ease);
  text-transform: uppercase;
  display: block;
}

.nav-link-item a:hover {
  color: var(--signal);
  border: 1px dotted var(--signal); /* Dotted border directly on the link tag on hover */
}

.nav-link-item.active a {
  border: 1px solid var(--ink);
  background-color: var(--ink);
  color: var(--canvas);
}
.nav-link-item.active a:hover {
  color: var(--canvas);
  border-color: var(--ink);
}

/* Mobile Hamburger Menu */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  padding: 8px 12px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--ink);
  margin-bottom: 4px;
}
.menu-toggle span:last-child {
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  text-decoration: none;
  font-family: SFMono-Regular, Menlo, monospace;
  font-size: 14px; /* Minimum font-size 14px */
  font-weight: 700;
  text-transform: uppercase;
  transition: all var(--duration) var(--ease);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--signal);
  color: var(--canvas);
  border: 1px solid var(--signal);
  box-shadow: 0 4px 16px rgba(192, 254, 4, 0.15);
}
.btn-primary:hover {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--canvas);
  box-shadow: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover {
  color: var(--signal);
  border-color: var(--signal);
}

button:focus-visible,
a:focus-visible,
.focusable:focus-visible {
  outline: 2px solid var(--signal) !important;
  outline-offset: 3px !important;
}

/* -------------------------------------------------------------
   Page: Homepage - Hero Section
------------------------------------------------------------- */
.hero-section {
  position: relative;
  background-color: var(--canvas);
  margin-top: 72px;
  border-bottom: 1px solid var(--line-strong);
  overflow: hidden;
  height: 820px;
}

.hero-cell-left {
  grid-column: span 7;
  border-right: 1px solid var(--line-strong);
  padding: 120px 48px 120px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-cell-right {
  grid-column: span 5;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: rgba(255, 255, 255, 0.01);
}

.hero-cell-right [data-unicorn-project],
.hero-section [data-unicorn-project] {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  top: 0;
  left: 0;
}

.hero-meta-technical {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 12px;
}

.hero-title {
  margin-bottom: 32px;
}

.hero-desc {
  max-width: 620px;
  margin-bottom: 48px;
  color: var(--muted);
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-bottom: 64px;
}
.hero-ctas .btn {
  flex: 1;
  max-width: 200px;
  text-align: center;
}

.hero-tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-strong);
  padding-top: 24px;
  gap: 16px;
}

.tech-spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tech-val {
  font-family: SFMono-Regular, Menlo, monospace;
  font-size: 14px; /* Minimum font-size 14px */
  font-weight: 700;
  color: var(--ink);
}

.hero-img-box {
  width: 88%;
  aspect-ratio: 16/9;
  border: 1px solid var(--line-strong);
  background-color: #000;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.hero-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -------------------------------------------------------------
   Homepage: Featured HMI Work
------------------------------------------------------------- */
.featured-section {
  background-color: var(--paper);
}

.featured-cell-text {
  grid-column: span 4;
  border-right: 1px solid var(--line-strong);
  padding: 120px 48px 120px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.featured-cell-visual {
  grid-column: span 8;
  padding: 120px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-card {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
}



.featured-img-frame {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background-color: #000;
  position: relative;
}

.featured-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration) var(--ease);
}

.featured-card:hover .featured-img-frame img {
  transform: scale(1.025);
}

.featured-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 12px;
  transition: all var(--duration) var(--ease);
}

.featured-footer h3 {
  font-size: 24px;
  letter-spacing: -0.02em;
  transition: color var(--duration) var(--ease);
}

.featured-footer .arrow {
  font-size: 24px;
  transition: transform var(--duration) var(--ease);
}

.featured-card:hover .featured-footer {
  border-bottom-color: var(--signal);
  color: var(--signal);
}
.featured-card:hover .featured-footer .arrow {
  transform: translateX(8px);
}

/* -------------------------------------------------------------
   Marquee Banner
------------------------------------------------------------- */
.ability-band {
  background-color: #000;
  color: var(--signal);
  height: 72px;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
}

.marquee-content {
  display: flex;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  gap: 60px;
}

.marquee-item {
  font-size: 14px; /* Minimum font-size 14px */
  letter-spacing: 0.15em;
  font-weight: 700;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* -------------------------------------------------------------
   Homepage: Other Work Grid (2-columns)
------------------------------------------------------------- */
.other-work-section {
  background-color: var(--paper);
}

.other-work-intro-cell {
  grid-column: span 12;
  border-bottom: 1px solid var(--line-strong);
  padding: 100px 40px;
}

.other-work-intro-cell h2,
.other-work-intro-cell p {
  max-width: 900px;
}

.other-work-grid {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.other-work-cell {
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 80px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.other-work-cell:nth-child(2n) {
  border-right: none;
}

.other-work-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.other-work-img-frame {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background-color: #000;
  margin-bottom: 24px;
  position: relative; /* Support absolute hover layer placement */
}

.other-work-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.other-work-img-frame .cover-default {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.other-work-img-frame .cover-default img {
  transform: scale(1.0);
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.other-work-img-frame:hover .cover-default img {
  transform: scale(1.06); /* Default cover zooms in slightly */
}

.other-work-img-frame .cover-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.other-work-img-frame .cover-hover img {
  transform: scale(1.12); /* Hover cover starts larger for parallax depth */
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.other-work-img-frame:hover .cover-hover {
  opacity: 1;
}

.other-work-img-frame:hover .cover-hover img {
  transform: scale(1.0); /* Hover cover zooms out to normal, creating 3D camera effect */
}

/* Glass Sheen Glare Sweep Effect */
.other-work-img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3;
  pointer-events: none;
}

.other-work-img-frame:hover::after {
  transform: translateX(100%);
}

.other-work-card h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-top: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--duration) var(--ease);
}

.other-work-card h3 .arrow {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s ease;
}

.other-work-card:hover h3 {
  color: var(--signal);
}

.other-work-card:hover h3 .arrow {
  transform: translate(4px, -4px) scale(1.15);
}

/* -------------------------------------------------------------
   Homepage: Profile Summary & Contact Block
------------------------------------------------------------- */
.home-profile-section {
  background-color: var(--paper);
}

.home-profile-left {
  grid-column: span 4;
  border-right: 1px solid var(--line-strong);
  padding: 120px 40px;
}

.home-profile-right {
  grid-column: span 8;
  padding: 120px 48px 120px 60px;
  max-width: 900px;
}

.home-profile-right h3 {
  font-size: clamp(20px, 2.5vw, 32px); /* Decreased font-size from 44px max to 32px */
  line-height: 1.62; /* Increased line-height from 1.15 */
  text-transform: none;
  font-weight: 700;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.contact-section {
  background-color: var(--canvas);
}

.contact-cell {
  grid-column: span 12;
  padding: 140px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-cell h2 {
  font-size: clamp(32px, 4vw, 56px); /* Decreased slogan font size */
  margin-bottom: 32px;
  line-height: 1.25; /* Increased line-height */
}

.contact-cell p {
  max-width: 580px;
  margin-bottom: 56px;
}

.contact-email-link {
  font-size: clamp(20px, 3vw, 36px); /* Decreased email font size */
  font-family: SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 8px;
  transition: all var(--duration) var(--ease);
}

.contact-email-link:hover {
  color: var(--signal);
  border-color: var(--signal);
}

/* Site Footer */
.site-footer {
  background-color: var(--canvas);
  border-top: 1px solid var(--line-strong);
  padding: 40px;
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  font-family: SFMono-Regular, Menlo, monospace;
  font-size: 14px; /* Minimum font-size 14px */
  color: var(--muted);
}

.footer-left {
  font-weight: 700;
  color: var(--ink);
}

/* -------------------------------------------------------------
   Page Details & Immersive layouts
------------------------------------------------------------- */
.case-hero {
  padding-top: 160px;
  padding-bottom: 100px;
  border-bottom: 1px solid var(--line-strong);
}

.case-hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-strong);
  padding-top: 40px;
  margin-top: 48px;
  gap: 24px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-label {
  color: var(--muted);
}

.meta-value {
  font-weight: 700;
}

.case-large-cover {
  margin-top: 80px;
  border: 1px solid var(--line-strong);
  width: 100%;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}
.case-large-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.case-body {
  padding-top: 120px;
  padding-bottom: 120px;
}

.case-section {
  margin-bottom: 140px;
}

.case-section-title {
  font-size: clamp(32px, 4vw, 56px);
  margin-bottom: 24px;
  text-transform: none;
}

.case-section-text {
  max-width: 800px;
  margin-bottom: 64px;
}

/* Principles Cards grid */
.hmi-principles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.principle-card {
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.principle-card h4 {
  font-size: 20px;
}

.principle-card p {
  font-size: 14px;
  line-height: 1.6;
}

/* Image grid vertical alignment */
.image-showcase {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.image-item {
  position: relative;
}

.image-container {
  width: 100%;
  border: 1px solid var(--line-strong);
  background-color: #000;
  overflow: hidden;
  margin-bottom: 20px;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.image-container img.loaded {
  opacity: 1;
  transform: translateY(0);
}

.image-caption {
  font-family: SFMono-Regular, Menlo, monospace;
  font-size: 14px; /* Minimum font-size 14px */
  color: var(--muted);
  border-left: 2px solid var(--signal);
  padding-left: 16px;
}

/* Horizontal slide carousels for drive modes & aromas on mobile */
.scroll-sequence {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.scroll-sequence.col-4 {
  grid-template-columns: repeat(4, 1fr);
}
.scroll-sequence.col-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* VPA Split Layout */
.vpa-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 48px;
  align-items: center;
}
.vpa-desc-col {
  grid-column: span 7;
}
.vpa-video-col {
  grid-column: span 5;
}

@media (max-width: 1199px) {
  .vpa-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .vpa-desc-col, .vpa-video-col {
    grid-column: span 1;
  }
}

/* Dynamic media / Video layout */
.video-container {
  width: 100%;
  border: 1px solid var(--line-strong);
  background-color: #000;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.video-container video {
  width: 100%;
  display: block;
}

.video-controls {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 10;
  display: flex;
  gap: 12px;
}

.video-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(7, 9, 12, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.video-btn:hover {
  background-color: var(--signal);
  border-color: var(--signal);
}

/* Interactive Motion Dashboard inside HMI study page */
.interactive-prototype-wrapper {
  width: 100%;
  border: 1px solid var(--line-strong);
  background-color: #000;
  margin-top: 48px;
  margin-bottom: 20px;
  position: relative;
}

.prototype-aspect-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 720;
}

.prototype-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.prototype-controls-overlay {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 10;
  display: flex;
  gap: 12px;
}

.prototype-btn {
  background-color: rgba(7, 9, 12, 0.85);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 10px 20px;
  font-family: SFMono-Regular, Menlo, monospace;
  font-size: 14px; /* Minimum font-size 14px */
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 200ms var(--ease);
}
.prototype-btn:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.next-case-band {
  background-color: var(--canvas);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 100px 0;
  text-align: center;
}

.next-case-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.next-case-link h3 {
  font-size: clamp(32px, 4vw, 56px);
  transition: color var(--duration);
}
.next-case-link:hover h3 {
  color: var(--signal);
}

/* -------------------------------------------------------------
   Page: Profile
------------------------------------------------------------- */
.profile-hero {
  padding-top: 180px;
  padding-bottom: 100px;
  border-bottom: 1px solid var(--line-strong);
  background-color: var(--paper);
}

.profile-hero-content {
  max-width: 960px;
}

.profile-hero-content h1 {
  margin-top: 24px;
  margin-bottom: 32px;
  text-transform: none;
}

.profile-body-section {
  padding: 0;
  background-color: var(--paper);
}

.profile-section-grid {
  border-bottom: 1px solid var(--line-strong);
}

.profile-sec-title {
  grid-column: span 4;
  border-right: 1px solid var(--line-strong);
  padding: 100px 40px;
}

.profile-sec-content {
  grid-column: span 8;
  padding: 100px 48px 100px 60px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 48px;
  row-gap: 48px;
}

.skill-card h4 {
  font-size: 20px;
  margin-bottom: 16px;
}

.skill-card p {
  color: var(--muted);
  line-height: 1.6;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
}

.timeline-date {
  font-family: SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--signal);
}

.timeline-info h4 {
  font-size: 24px;
  margin-bottom: 12px;
}

.timeline-info p {
  color: var(--muted);
  line-height: 1.6;
}

.edu-text {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 700;
}

/* Helper details images container */
.helper-images-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.helper-img-container {
  width: 100%;
  border: 1px solid var(--line-strong);
  background-color: #0b0f19;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.helper-img-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* -------------------------------------------------------------
   Responsive Breakpoints
------------------------------------------------------------- */
@media (max-width: 1199px) {
  .container {
    padding-left: 48px;
    padding-right: 48px;
  }
  .container::before {
    background-size: calc((100% - 96px) / 8) 100px;
    background-position: 48px 0;
  }
  .container-home {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  .container-home::before {
    background-size: calc((100% - 48px) / 8) 100px !important;
    background-position: 24px 0 !important;
  }
  
  .grid-12 {
    grid-template-columns: repeat(8, 1fr);
  }
  
  .grid-cell {
    padding: 60px 30px;
  }
  
  .hero-cell-left {
    grid-column: span 8;
    border-right: none;
    border-bottom: 1px solid var(--line-strong);
    padding: 80px 32px;
  }
  .hero-cell-right {
    grid-column: span 8;
    padding: 80px 32px;
  }
  
  .featured-cell-text {
    grid-column: span 8;
    border-right: none;
    border-bottom: 1px solid var(--line-strong);
    padding: 80px 32px;
  }
  .featured-cell-visual {
    grid-column: span 8;
    padding: 80px 32px;
  }
  
  .other-work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .home-profile-left {
    grid-column: span 8;
    border-right: none;
    border-bottom: 1px solid var(--line-strong);
    padding: 80px 32px;
  }
  .home-profile-right {
    grid-column: span 8;
    padding: 80px 32px;
  }
  
  .profile-sec-title {
    grid-column: span 8;
    border-right: none;
    border-bottom: 1px solid var(--line-strong);
    padding: 60px 32px;
  }
  .profile-sec-content {
    grid-column: span 8;
    padding: 60px 32px;
  }
  
  .hmi-principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .scroll-sequence {
    grid-template-columns: repeat(2, 1fr);
  }
  .scroll-sequence.col-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
    border-left: none;
    border-right: none;
  }
  .container::before {
    display: none; /* Hide background grid lines on mobile for cleaner look */
  }
  
  .grid-12 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .header-nav {
    height: 60px;
  }
  
  .menu-toggle {
    display: block;
    z-index: 101;
  }
  
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background-color: var(--paper);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    transform: translateY(-100%);
    opacity: 0;
    transition: all var(--duration) var(--ease);
    z-index: 99;
    border-top: 1px solid var(--line-strong);
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }
  
  .nav-link-item a {
    font-size: 20px;
    border: none;
    padding: 12px 24px;
  }
  .nav-link-item a:hover {
    border-color: transparent;
    background: none;
  }
  
  .hero-section {
    margin-top: 60px;
  }
  .hero-cell-left {
    grid-column: span 4;
    padding: 56px 20px;
  }
  .hero-cell-right {
    grid-column: span 4;
    padding: 56px 20px;
  }
  .hero-tech-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 24px;
  }
  
  .featured-cell-text {
    grid-column: span 4;
    padding: 56px 20px;
  }
  .featured-cell-visual {
    grid-column: span 4;
    padding: 56px 20px;
  }
  .featured-footer h3 {
    font-size: 18px;
  }
  
  .other-work-intro-cell {
    padding: 56px 20px;
  }
  .other-work-grid {
    grid-template-columns: 1fr;
  }
  .other-work-cell {
    grid-column: span 4;
    border-right: none;
    padding: 56px 20px;
  }
  
  .home-profile-left {
    grid-column: span 4;
    padding: 56px 20px;
  }
  .home-profile-right {
    grid-column: span 4;
    padding: 56px 20px;
  }
  
  .profile-hero {
    padding-top: 120px;
    padding-bottom: 56px;
  }
  .profile-sec-title {
    grid-column: span 4;
    padding: 40px 20px;
  }
  .profile-sec-content {
    grid-column: span 4;
    padding: 40px 20px;
  }
  .skills-grid {
    grid-template-columns: 1fr;
    row-gap: 32px;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .case-hero {
    padding-top: 100px;
    padding-bottom: 56px;
  }
  .case-hero-meta {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 24px;
    margin-top: 32px;
  }
  .case-large-cover {
    margin-top: 48px;
  }
  
  .case-body {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .case-section {
    margin-bottom: 80px;
  }
  .hmi-principles-grid {
    grid-template-columns: 1fr;
  }
  .principle-card {
    padding: 32px 20px;
  }
  
  .scroll-sequence {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 16px;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    scrollbar-width: none;
  }
  .scroll-sequence::-webkit-scrollbar {
    display: none;
  }
  .scroll-sequence .image-item {
    flex: 0 0 calc(100vw - 40px);
    scroll-snap-align: start;
    margin-bottom: 0;
  }
  .scroll-sequence-indicator {
    display: block;
    text-align: right;
    font-size: 14px;
    color: var(--muted);
    margin-top: 8px;
  }
  
  .nav-logo span {
    display: none;
  }
}

/* Reduced Motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *, *::before, *::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  img, video {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
  .marquee-content {
    animation: none !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
  }
}

/* Custom Scrollbar matching haoqi.design */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: transparent; /* Invisible track */
}

::-webkit-scrollbar-thumb {
  background-color: var(--signal); /* Neon lime floating pill */
  border: 4px solid transparent; /* Padding around thumb */
  background-clip: padding-box; /* Restricts color within border */
  border-radius: 6px;
  transition: background-color var(--duration) var(--ease);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--ink); /* High contrast white on hover */
}

/* -------------------------------------------------------------
   Vibe Coding / Cockpit HMI Theme & Interaction Styling
------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.18) 50%);
  background-size: 100% 4px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05; /* Subtle analog cockpit monitor scanline texture */
}

.ambient-glow {
  position: fixed;
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  transform: translate(-50%, -50%);
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(192, 254, 4, 0.045) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  will-change: top, left;
}

.sys-hud {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid var(--line-strong);
  padding: 6px 12px;
  font-size: 10px;
  color: var(--muted);
  z-index: 999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  letter-spacing: 0.15em;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.sys-hud .hud-indicator {
  color: var(--signal);
  font-size: 8px;
  animation: hud-blink 1s infinite alternate;
}

@keyframes hud-blink {
  0% { opacity: 0.25; }
  100% { opacity: 1; }
}

.sys-hud .hud-coords {
  color: var(--ink);
  font-weight: 700;
}

/* Subtle Technical Drafting/Blueprint Grid Overlay for Editorial Sections */
.editorial-section {
  background-image: 
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 120px 120px;
  background-position: center;
}

/* Interactive Rotating/Glowing Corner Markers */
.cell-marker {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s ease, text-shadow 0.4s ease;
}

.other-work-cell:hover .cell-marker,
.contact-cell:hover .cell-marker,
.featured-cell:hover .cell-marker,
.marquee-section:hover .cell-marker {
  color: var(--signal) !important;
  transform: rotate(90deg) scale(1.2);
  text-shadow: 0 0 6px rgba(192, 254, 4, 0.8);
}

/* --- Lightbox Modal --- */
.zoomable-img {
  cursor: zoom-in;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.zoomable-img:hover {
  transform: scale(1.015);
  opacity: 0.92;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(6, 8, 11, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: zoom-out;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}




