* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Font Variables */
  --headline-font: 'Share Tech Mono', monospace;
  --body-font: 'Metrophobic', sans-serif;
  --h2-size: 1;

  /* Monochromatic Palette */
  --black: #000000;
  --dark-gray: #1a1a1a;
  --medium-gray: #4a4a4a;
  --light-gray: #9a9a9a;
  --off-white: #f5f5f5;
  --white: #ffffff;
  --accent: #0066ff;

  /* Typography - Mobile Sizes */
  --h1-mobile: calc(5rem);
  --h2-mobile: calc(2.5rem * var(--h2-size));
  --h3-mobile: calc(1.2rem);
  --body-mobile: calc(1rem);

  /* Typography - Desktop Sizes */
  --h1-desktop: calc(clamp(80px, 10vw, 180px));
  --h2-desktop: calc(clamp(60px, 8vw, 120px) * var(--h2-size));
  --h3-desktop: calc(36px);
  --h4-desktop: calc(24px);
  --body-desktop: calc(20px);

  /* Spacing */
  --grid-unit: 8px;
  --container-max: 1400px;

  /* Animation */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme='dark'] {
  --black: #ffffff;
  --dark-gray: #e5e5e5;
  --medium-gray: #b5b5b5;
  --light-gray: #656565;
  --off-white: #1a1a1a;
  --white: #000000;
  --accent: rgb(0, 255, 251);
}

[data-theme='dark'] body {
  background: #000000;
  color: #ffffff;
}

body {
  font-family: var(--body-font);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  transition: var(--transition);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--headline-font);
}

/* Typography Utility Classes */
.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-base {
  font-size: 1rem;
}

.text-md {
  font-size: 1.125rem;
}

.text-lg {
  font-size: 1.2rem;
}

.text-xl {
  font-size: 1.5rem;
}

.text-2xl {
  font-size: 1.5rem;
}

@media (min-width: 768px) {
  .text-2xl {
    font-size: 2rem;
  }
}

/* Heading utility classes using existing variables */
.heading-1 {
  font-size: var(--h1-mobile);
  font-family: var(--headline-font);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.heading-2 {
  font-size: var(--h2-mobile);
  font-family: var(--headline-font);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.heading-3 {
  font-size: var(--h3-mobile);
  font-family: var(--headline-font);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .heading-1 {
    font-size: var(--h1-desktop);
  }

  .heading-2 {
    font-size: var(--h2-desktop);
  }

  .heading-3 {
    font-size: var(--h3-desktop);
  }
}

/* Matrix Background */
.matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.1;
}

/* Dot Matrix Canvas */
.dot-matrix {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* keep behind hero content but above page background */
  pointer-events: none;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 calc(var(--grid-unit) * 3);
}

/* Sticky Header */
header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 2px solid var(--black);
  z-index: 1000;
  transition: var(--transition);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: calc(var(--grid-unit) * 8);
  padding: 0 calc(var(--grid-unit) * 3);
}

.logo {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--black);
  text-decoration: none;
  transition: var(--transition);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: calc(var(--grid-unit) * 2);
}

/* Dropdown Menu */
.dropdown {
  /* TODO: unhide when ready */
  display: none;
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: 2px solid var(--black);
  color: var(--black);
  padding: calc(var(--grid-unit) * 1) calc(var(--grid-unit) * 2);
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: calc(var(--grid-unit) * 1);
}

.dropdown-toggle:hover {
  background: var(--black);
  color: var(--white);
}

.dropdown-toggle::after {
  content: '▼';
  font-size: 0.6em;
  transition: transform 0.3s;
}

.dropdown.active .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + var(--grid-unit));
  left: 0;
  background: var(--white);
  border: 2px solid var(--black);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
}

.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: calc(var(--grid-unit) * 2);
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid var(--off-white);
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: var(--black);
  color: var(--white);
  padding-left: calc(var(--grid-unit) * 3);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 2px solid var(--black);
  width: calc(var(--grid-unit) * 6);
  height: calc(var(--grid-unit) * 4);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.theme-toggle-indicator {
  position: absolute;
  width: calc(var(--grid-unit) * 2);
  height: calc(var(--grid-unit) * 2);
  background: var(--black);
  top: calc(var(--grid-unit) * 0.5);
  left: calc(var(--grid-unit) * 0.5);
  transition: var(--transition);
}

[data-theme='dark'] .theme-toggle-indicator {
  left: calc(var(--grid-unit) * 3.5);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: calc(var(--grid-unit) * 10) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: calc(var(--grid-unit) * 3);
  align-items: center;
}

.hero-content {
  grid-column: 1 / 9;
  z-index: 1;
}

.hero h1 {
  margin-bottom: calc(var(--grid-unit) * 4);
  color: var(--black);
  animation: glitchText 10s infinite;
}

@keyframes glitchText {
  0%,
  100% {
    text-shadow: none;
  }

  95% {
    text-shadow: 2px 2px var(--accent), -2px -2px var(--accent);
  }

  96% {
    text-shadow: -2px 2px var(--accent), 2px -2px var(--accent);
  }
}

/* Glitch effect for POWER */
.glitch {
  position: relative;
  color: var(--black);
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 0.5s infinite;
  color: var(--accent);
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.5s infinite;
  color: var(--accent);
  z-index: -2;
}

@keyframes glitch-1 {
  0%,
  100% {
    clip-path: inset(0 0 0 0);
  }

  20% {
    clip-path: inset(20% 0 30% 0);
    transform: translate(-2px, 2px);
  }

  40% {
    clip-path: inset(50% 0 20% 0);
    transform: translate(2px, -2px);
  }

  60% {
    clip-path: inset(10% 0 60% 0);
    transform: translate(-2px, 0);
  }

  80% {
    clip-path: inset(80% 0 5% 0);
    transform: translate(2px, 0);
  }
}

@keyframes glitch-2 {
  0%,
  100% {
    clip-path: inset(0 0 0 0);
  }

  20% {
    clip-path: inset(60% 0 10% 0);
    transform: translate(2px, -2px);
  }

  40% {
    clip-path: inset(10% 0 70% 0);
    transform: translate(-2px, 2px);
  }

  60% {
    clip-path: inset(40% 0 40% 0);
    transform: translate(2px, 0);
  }

  80% {
    clip-path: inset(5% 0 85% 0);
    transform: translate(-2px, 0);
  }
}

.hero-tagline {
  font-size: var(--body-mobile);
  margin-bottom: calc(var(--grid-unit) * 6);
  max-width: 600px;
  color: var(--accent);
}

/* Desktop Styles */
@media (min-width: 768px) {
  .hero-tagline {
    font-size: var(--h4-desktop);
  }
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--black);
  padding: calc(var(--grid-unit) * 1);
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--black);
  margin: 4px 0;
  transition: var(--transition);
}

/* Who We Are Section */
.who-we-are {
  padding: calc(var(--grid-unit) * 15) 0;
  position: relative;
  background: var(--off-white);
  overflow: hidden;
}

.section-header {
  margin-bottom: calc(var(--grid-unit) * 6);
  position: relative;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: calc(var(--grid-unit) * 10);
  }
}

.who-content {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: calc(var(--grid-unit) * 6);
  align-items: center;
}

.who-text {
  grid-column: 1 / 7;
}

.who-text h3 {
  margin-bottom: calc(var(--grid-unit) * 3);
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.who-text h3::before,
.who-text h3::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 2px;
  background: var(--accent);
  top: 50%;
  transform: translateY(-50%);
}

.who-text h3::before {
  left: -40px;
}

.who-text h3::after {
  right: -40px;
}

.who-text p {
  line-height: 1.8;
  margin-bottom: calc(var(--grid-unit) * 3);
}

/* Character Container */
.character-container {
  grid-column: 8 / 13;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding-top: 0;
}

.chinese-character {
  width: 300px;
  height: 300px;
}

.stroke {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  filter: drop-shadow(0 0 6px rgba(0, 255, 251, 0.6));
  transition: opacity 0.3s ease;
}

/* Stroke animations */
@keyframes drawStroke {
  0% {
    stroke-dashoffset: 300;
    opacity: 0;
    stroke-width: 2;
  }

  5% {
    opacity: 0.8;
    stroke-width: 3;
  }

  50% {
    opacity: 1;
    stroke-width: 3;
  }

  100% {
    stroke-dashoffset: 0;
    opacity: 0.95;
    stroke-width: 3;
  }
}

/* Apply animations to each stroke with delays */
.stroke-1 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 0s forwards;
}

.stroke-2 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 0.3s forwards;
}

.stroke-3 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 0.6s forwards;
}

.stroke-4 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 0.9s forwards;
}

.stroke-5 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 1.2s forwards;
}

.stroke-6 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 1.5s forwards;
}

.stroke-7 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 1.8s forwards;
}

.stroke-8 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 2.1s forwards;
}

.stroke-9 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 2.4s forwards;
}

.stroke-10 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 2.7s forwards;
}

.stroke-11 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 3s forwards;
}

.stroke-12 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 3.3s forwards;
}

.stroke-13 {
  animation: drawStroke 0.8s cubic-bezier(0.4, 0, 0.3, 1) 3.6s forwards;
}

/* Loop animation */
.chinese-character {
  animation: fadeReset 10s infinite;
}

@keyframes fadeReset {
  0%,
  70% {
    opacity: 1;
  }

  80% {
    opacity: 0;
  }

  90% {
    opacity: 1;
  }
}

@media (min-width: 768px) {
  .who-text p {
    font-size: var(--body-desktop);
  }
}

/* Services Section */
.services {
  padding: calc(var(--grid-unit) * 15) 0;
  position: relative;
  background: var(--white);
  overflow: hidden;
}

[data-theme='dark'] .services {
  background: #000000;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--grid-unit) * 4);
  margin-bottom: calc(var(--grid-unit) * 10);
}

.service-card {
  padding: calc(var(--grid-unit) * 5);
  border: 2px solid var(--black);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.1;
  transition: all 0.5s;
  transform: translate(-50%, -50%);
}

.service-card:hover::before {
  width: 200%;
  height: 200%;
}

.service-card p {
  margin-bottom: 1rem;
  color: var(--accent);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.service-icon {
  width: calc(var(--grid-unit) * 8);
  height: calc(var(--grid-unit) * 8);
  margin-bottom: calc(var(--grid-unit) * 3);
  position: relative;
}

/* Service Icons */

/* Foundation - Single Meridian Point with Expanding Rings */
.icon-foundation {
  position: absolute;
  width: 100%;
  height: 100%;
}

.meridian-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px var(--accent);
}

.energy-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.energy-ring:nth-child(2) {
  width: 30px;
  height: 30px;
  animation: expandRing 3s ease-out infinite;
}

.energy-ring:nth-child(3) {
  width: 30px;
  height: 30px;
  animation: expandRing 3s ease-out infinite 1s;
}

.energy-ring:nth-child(4) {
  width: 30px;
  height: 30px;
  animation: expandRing 3s ease-out infinite 2s;
}

@keyframes expandRing {
  0% {
    width: 20px;
    height: 20px;
    opacity: 0.8;
  }

  100% {
    width: 60px;
    height: 60px;
    opacity: 0;
  }
}

/* Growth - Multiple Channels Flowing Upward */
.icon-growth {
  position: absolute;
  width: 100%;
  height: 100%;
}

.growth-channel {
  position: absolute;
  bottom: 20%;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
  animation: channelGrow 3s ease-out infinite;
}

.growth-channel:nth-child(1) {
  left: 30%;
  animation-delay: 0s;
}

.growth-channel:nth-child(2) {
  left: 40%;
  animation-delay: 0.3s;
}

.growth-channel:nth-child(3) {
  left: 50%;
  animation-delay: 0.6s;
}

.growth-channel:nth-child(4) {
  left: 60%;
  animation-delay: 0.9s;
}

.growth-channel:nth-child(5) {
  left: 70%;
  animation-delay: 1.2s;
}

.energy-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
}

.energy-particle:nth-child(6) {
  left: 30%;
  animation: particleRise 3s ease-out infinite;
}

.energy-particle:nth-child(7) {
  left: 40%;
  animation: particleRise 3s ease-out infinite 0.3s;
}

.energy-particle:nth-child(8) {
  left: 50%;
  animation: particleRise 3s ease-out infinite 0.6s;
}

.energy-particle:nth-child(9) {
  left: 60%;
  animation: particleRise 3s ease-out infinite 0.9s;
}

.energy-particle:nth-child(10) {
  left: 70%;
  animation: particleRise 3s ease-out infinite 1.2s;
}

@keyframes channelGrow {
  0% {
    height: 0;
    opacity: 0;
  }

  50% {
    height: 60%;
    opacity: 1;
  }

  100% {
    height: 60%;
    opacity: 0.3;
  }
}

@keyframes particleRise {
  0% {
    bottom: 20%;
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    bottom: 80%;
    opacity: 0;
  }
}

/* Transformation - Morphing Meridian Constellation */
.icon-transformation {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: rotateConstellation 8s linear infinite;
}

@keyframes rotateConstellation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.morph-point {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent);
}

.morph-point:nth-child(1) {
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  animation: morphPoint1 4s ease-in-out infinite;
}

.morph-point:nth-child(2) {
  top: 35%;
  left: 25%;
  animation: morphPoint2 4s ease-in-out infinite;
}

.morph-point:nth-child(3) {
  top: 35%;
  right: 25%;
  animation: morphPoint3 4s ease-in-out infinite;
}

.morph-point:nth-child(4) {
  top: 50%;
  left: 15%;
  animation: morphPoint4 4s ease-in-out infinite;
}

.morph-point:nth-child(5) {
  top: 50%;
  right: 15%;
  animation: morphPoint5 4s ease-in-out infinite;
}

.morph-point:nth-child(6) {
  bottom: 35%;
  left: 25%;
  animation: morphPoint6 4s ease-in-out infinite;
}

.morph-point:nth-child(7) {
  bottom: 35%;
  right: 25%;
  animation: morphPoint7 4s ease-in-out infinite;
}

.morph-point:nth-child(8) {
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  animation: morphPoint8 4s ease-in-out infinite;
}

@keyframes morphPoint1 {
  0%,
  100% {
    top: 20%;
    left: 50%;
  }

  50% {
    top: 15%;
    left: 50%;
  }
}

@keyframes morphPoint2 {
  0%,
  100% {
    top: 35%;
    left: 25%;
  }

  50% {
    top: 30%;
    left: 20%;
  }
}

@keyframes morphPoint3 {
  0%,
  100% {
    top: 35%;
    right: 25%;
  }

  50% {
    top: 30%;
    right: 20%;
  }
}

@keyframes morphPoint4 {
  0%,
  100% {
    top: 50%;
    left: 15%;
  }

  50% {
    top: 50%;
    left: 10%;
  }
}

@keyframes morphPoint5 {
  0%,
  100% {
    top: 50%;
    right: 15%;
  }

  50% {
    top: 50%;
    right: 10%;
  }
}

@keyframes morphPoint6 {
  0%,
  100% {
    bottom: 35%;
    left: 25%;
  }

  50% {
    bottom: 30%;
    left: 20%;
  }
}

@keyframes morphPoint7 {
  0%,
  100% {
    bottom: 35%;
    right: 25%;
  }

  50% {
    bottom: 30%;
    right: 20%;
  }
}

@keyframes morphPoint8 {
  0%,
  100% {
    bottom: 20%;
    left: 50%;
  }

  50% {
    bottom: 15%;
    left: 50%;
  }
}

.service-card h3 {
  margin-bottom: calc(var(--grid-unit) * 1);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.service-card li {
  color: var(--medium-gray);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* Process Section */
.process {
  padding: calc(var(--grid-unit) * 15) 0;
  position: relative;
  background: var(--off-white);
  overflow: hidden;
}

.process-constellation {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--grid-unit) * 4);
  position: relative;
  margin-top: calc(var(--grid-unit) * 5);
}

.process-star {
  text-align: left;
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.6s forwards;
}

.process-star:nth-child(1) {
  animation-delay: 0.2s;
}

.process-star:nth-child(2) {
  animation-delay: 0.4s;
}

.process-star:nth-child(3) {
  animation-delay: 0.6s;
}

.process-star:nth-child(4) {
  animation-delay: 0.8s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }

  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

.star-number {
  width: 80px;
  height: 80px;
  margin: 0 0 calc(var(--grid-unit) * 3) 0;
  background: var(--white);
  border: 3px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
  transition: all 0.3s;
  cursor: pointer;
  font-family: var(--headline-font);
  color: var(--black);
}

.star-number::before,
.star-number::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s;
}

.star-number::before {
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
}

.star-number::after {
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
}

.process-star:hover .star-number {
  background: var(--accent);
  color: var(--black);
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(0, 255, 251, 0.5);
}

[data-theme='dark'] .process-star:hover .star-number {
  color: var(--black);
}

.process-star:hover .star-number::before,
.process-star:hover .star-number::after {
  opacity: 1;
}

.process-star h4 {
  margin-bottom: calc(var(--grid-unit) * 2);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.process-star p {
  color: var(--medium-gray);
}

/* Connecting lines */
.process-constellation::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--light-gray) 10%,
    var(--light-gray) 90%,
    transparent 100%
  );
  opacity: 0.3;
}

/* Portfolio Slider Section */
.portfolio-slider-section {
  padding: calc(var(--grid-unit) * 15) 0;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

[data-theme='dark'] .portfolio-slider-section {
  background: #000000;
}

.portfolio-slider-section .section-header {
  margin-bottom: calc(var(--grid-unit) * 8);
}

/* Full-width Slider Container */
.slider-container {
  position: relative;
  width: 100%;
  overflow: visible; /* Allow overflow for hover effects */
}

/* Edge Fade Effect */
.slider-container::before,
.slider-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.slider-container::before {
  left: 0;
  background: linear-gradient(90deg, var(--white) 0%, transparent 100%);
}

[data-theme='dark'] .slider-container::before {
  background: linear-gradient(90deg, #000000 0%, transparent 100%);
}

.slider-container::after {
  right: 0;
  background: linear-gradient(270deg, var(--white) 0%, transparent 100%);
}

[data-theme='dark'] .slider-container::after {
  background: linear-gradient(270deg, #000000 0%, transparent 100%);
}

/* Slider Track */
.slider-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: visible; /* Allow vertical overflow for hover */
  padding: 12px 0; /* Add vertical padding for hover space */
  margin: -12px 0; /* Compensate for padding to maintain layout */
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.slider-track::-webkit-scrollbar {
  display: none;
}

/* Project Slide Wrapper */
.project-slide {
  flex: 0 0 500px;
  width: 500px;
  scroll-snap-align: start;
  position: relative;
}

/* Add padding to first slide */
.project-slide:first-child {
  padding-left: 120px;
  flex: 0 0 620px;
  width: 620px;
}

/* Add padding to last slide */
.project-slide:last-child {
  padding-right: 120px;
  flex: 0 0 620px;
  width: 620px;
}

/* If a slide is both first AND last (only one slide) */
.project-slide:first-child:last-child {
  flex: 0 0 740px;
  width: 740px;
}

/* The actual card with border and styling */
.project-card {
  background: var(--off-white);
  border: 2px solid var(--medium-gray);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  height: 100%;
  width: 500px;
  max-width: 500px;
}

[data-theme='dark'] .project-card {
  background: #000000;
  border: 2px solid var(--medium-gray);
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 255, 251, 0.2);
}

[data-theme='dark'] .project-card:hover {
  box-shadow: 0 20px 40px rgba(0, 255, 251, 0.2);
}

/* Project Image */
.project-image {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

/* Image Overlay Gradient */
.project-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  /* background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%); */
  pointer-events: none;
}

/* Project Content */
.project-content {
  padding: calc(var(--grid-unit) * 3);
  position: relative;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.project-category {
  font-family: var(--body-font);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.project-year {
  font-family: var(--headline-font);
  font-size: 12px;
  color: var(--light-gray);
}

[data-theme='dark'] .project-year {
  color: #656565;
}

.project-title {
  font-family: var(--headline-font);
  font-size: 24px;
  color: var(--black);
  margin-bottom: 12px;
  line-height: 1.2;
}

[data-theme='dark'] .project-title {
  color: #ffffff;
}

.project-description {
  font-family: var(--body-font);
  font-size: 14px;
  color: var(--light-gray);
  line-height: 1.6;
  margin-bottom: 20px;
}

[data-theme='dark'] .project-description {
  color: #b5b5b5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tech-tag {
  font-family: var(--body-font);
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(0, 255, 251, 0.1);
  border: 1px solid rgba(0, 255, 251, 0.3);
  color: var(--accent);
  border-radius: 2px;
  transition: all 0.3s ease;
}

[data-theme='light'] .tech-tag {
  background: rgba(0, 102, 255, 0.1);
  border: 1px solid rgba(0, 102, 255, 0.3);
}

.project-card:hover .tech-tag {
  background: rgba(0, 255, 251, 0.2);
  border-color: var(--accent);
}

[data-theme='light'] .project-card:hover .tech-tag {
  background: rgba(0, 102, 255, 0.2);
}

.project-link {
  font-family: var(--body-font);
  font-size: 14px;
  color: var(--black);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s ease;
}

[data-theme='dark'] .project-link {
  color: #ffffff;
}

.project-link:hover {
  gap: 12px;
  color: var(--accent);
}

/* Navigation Arrows */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(245, 245, 245, 0.9);
  border: 2px solid var(--medium-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

[data-theme='dark'] .slider-nav {
  background: rgba(26, 26, 26, 0.9);
  border: 2px solid var(--medium-gray);
}

.slider-nav:hover {
  background: rgba(0, 255, 251, 0.1);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

[data-theme='light'] .slider-nav:hover {
  background: rgba(0, 102, 255, 0.1);
}

.slider-nav.prev {
  left: 20px;
}

.slider-nav.next {
  right: 20px;
}

.slider-nav svg {
  width: 24px;
  height: 24px;
  stroke: var(--black);
  stroke-width: 2;
  fill: none;
  transition: stroke 0.3s ease;
}

[data-theme='dark'] .slider-nav svg {
  stroke: #ffffff;
}

.slider-nav:hover svg {
  stroke: var(--accent);
}

/* Progress Indicators */
.slider-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: calc(var(--grid-unit) * 4);
}

.progress-dot {
  width: 40px;
  height: 2px;
  background: var(--medium-gray);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.progress-dot.active {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 255, 251, 0.5);
}

[data-theme='light'] .progress-dot.active {
  box-shadow: 0 0 10px rgba(0, 102, 255, 0.5);
}

.progress-dot:hover {
  background: var(--light-gray);
}

/* Loading Animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-slide {
  animation: slideIn 0.6s ease forwards;
  animation-delay: calc(var(--slide-index) * 0.1s);
}

/* Responsive adjustments for portfolio slider */
@media (max-width: 1400px) {
  .project-slide {
    flex: 0 0 450px;
    width: 450px;
  }
  .project-slide:first-child {
    flex: 0 0 570px;
    width: 570px;
  }
  .project-slide:last-child {
    flex: 0 0 570px;
    width: 570px;
  }
  .project-slide:first-child:last-child {
    flex: 0 0 690px;
    width: 690px;
  }
  .project-card {
    width: 450px;
    max-width: 450px;
  }
}

@media (max-width: 1200px) {
  .project-slide {
    flex: 0 0 420px;
    width: 420px;
  }
  .project-slide:first-child {
    flex: 0 0 540px;
    width: 540px;
  }
  .project-slide:last-child {
    flex: 0 0 540px;
    width: 540px;
  }
  .project-slide:first-child:last-child {
    flex: 0 0 660px;
    width: 660px;
  }
  .project-card {
    width: 420px;
    max-width: 420px;
  }
}

@media (max-width: 1024px) {
  .project-slide {
    flex: 0 0 380px;
    width: 380px;
  }
  .project-slide:first-child {
    flex: 0 0 500px;
    width: 500px;
  }
  .project-slide:last-child {
    flex: 0 0 500px;
    width: 500px;
  }
  .project-slide:first-child:last-child {
    flex: 0 0 620px;
    width: 620px;
  }
  .project-card {
    width: 380px;
    max-width: 380px;
  }
}

@media (max-width: 768px) {
  .portfolio-slider-section .section-header {
    margin-bottom: calc(var(--grid-unit) * 4);
  }

  .slider-track {
    gap: 16px;
  }

  .project-slide {
    flex: 0 0 320px;
    width: 320px;
  }

  .project-slide:first-child {
    padding-left: 40px;
    flex: 0 0 360px;
    width: 360px;
  }

  .project-slide:last-child {
    padding-right: 40px;
    flex: 0 0 360px;
    width: 360px;
  }

  .project-slide:first-child:last-child {
    flex: 0 0 400px;
    width: 400px;
  }

  .project-card {
    width: 320px;
    max-width: 320px;
  }

  .slider-nav {
    width: 40px;
    height: 40px;
  }

  .slider-nav.prev {
    left: 10px;
  }

  .slider-nav.next {
    right: 10px;
  }

  .slider-nav svg {
    width: 20px;
    height: 20px;
  }

  .slider-container::before,
  .slider-container::after {
    width: 30px;
  }
}

@media (max-width: 480px) {
  .project-slide {
    flex: 0 0 280px;
    width: 280px;
  }

  .project-slide:first-child {
    flex: 0 0 320px;
    width: 320px;
  }

  .project-slide:last-child {
    flex: 0 0 320px;
    width: 320px;
  }

  .project-slide:first-child:last-child {
    flex: 0 0 360px;
    width: 360px;
  }

  .project-card {
    width: 280px;
    max-width: 280px;
  }
}

/* Contact Section */
.contact {
  background: #000000 !important;
  color: #ffffff !important;
  padding: calc(var(--grid-unit) * 20) 0;
  position: relative;
  overflow: hidden;
}

/* Starfield background */
.contact-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.contact-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #00fffb;
  border-radius: 50%;
  animation: shootingStar 5s linear infinite;
}

@keyframes shootingStar {
  0% {
    transform: translateX(0) translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateX(-200px) translateY(200px);
    opacity: 0;
  }
}

.contact-star:nth-child(1) {
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.contact-star:nth-child(2) {
  top: 30%;
  right: 20%;
  animation-delay: 1s;
}

.contact-star:nth-child(3) {
  top: 50%;
  right: 5%;
  animation-delay: 2s;
}

.contact-star:nth-child(4) {
  top: 20%;
  right: 30%;
  animation-delay: 3s;
}

.contact-star:nth-child(5) {
  top: 60%;
  right: 15%;
  animation-delay: 4s;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--grid-unit) * 10);
  position: relative;
  z-index: 1;
}

.contact-info h3 {
  margin-bottom: calc(var(--grid-unit) * 4);
  color: var(--accent);
  font-family: var(--headline-font);
}

.contact-info p {
  margin-bottom: calc(var(--grid-unit) * 2);
  color: #ffffff;
}

.contact-form {
  display: grid;
  gap: calc(var(--grid-unit) * 3);
}

.form-group {
  display: grid;
  gap: calc(var(--grid-unit) * 1);
}

.form-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9a9a9a;
  font-family: var(--headline-font);
}

.form-input,
.form-textarea {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: calc(var(--grid-unit) * 2);
  font-family: var(--body-font);
  transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 20px rgba(0, 255, 251, 0.2);
}

.form-textarea {
  min-height: calc(var(--grid-unit) * 20);
  resize: vertical;
}

.submit-button {
  background: var(--accent);
  color: #000000;
  border: none;
  padding: calc(var(--grid-unit) * 2) calc(var(--grid-unit) * 6);
  font-family: var(--headline-font);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.submit-button::before,
.submit-button::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s;
}

.submit-button::before {
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
}

.submit-button::after {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

.submit-button:hover::before,
.submit-button:hover::after {
  opacity: 1;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 255, 251, 0.3);
}

/* Footer */
footer {
  background: var(--accent);
  padding: calc(var(--grid-unit) * 3) 0;
  color: var(--black);
  position: relative;
}

[data-theme='dark'] footer {
  color: #000000;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(var(--grid-unit) * 4);
}

.footer-brand {
  flex: 1;
}

.footer-logo {
  font-family: var(--headline-font);
  font-weight: bold;
  letter-spacing: -0.02em;
  margin: 0;
}

.footer-info {
  flex: 1;
  text-align: right;
}

.footer-info p {
  margin: 0;
}

@media (max-width: 768px) {
  .nav-controls {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    grid-column: 1;
  }

  .who-content {
    grid-template-columns: 1fr;
    gap: calc(var(--grid-unit) * 4);
  }

  .who-text {
    grid-column: 1;
  }

  .who-text h3::before,
  .who-text h3::after {
    display: none;
  }

  .character-container {
    grid-column: 1;
    display: flex;
    margin-top: calc(var(--grid-unit) * 6);
    transform: scale(0.7);
    /* Show character on mobile below content */
  }

  .chinese-character {
    width: 250px;
    height: 250px;
  }

  .services-grid,
  .process-constellation,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .process-constellation::before {
    display: none;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-info {
    text-align: center;
  }
}

/* Google Map Styles */
.map-container {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: 2px solid var(--accent);
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  filter: grayscale(0%);
}

@media (max-width: 768px) {
  .map-container {
    height: 300px;
    margin-top: calc(var(--grid-unit) * 4);
  }
}
