@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&family=JetBrains+Mono:wght@400;700&family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@400;700&display=swap');

:root {
  --bg-asphalt: #0F1115;
  --bg-carbon: #161920;
  --border-slate: #1E232A;
  --soft-red: #FF2800;
  --medium-yellow: #FFF200;
  --hard-white: #F5F5F5;
  --wet-blue: #00A3E0;
  --drs-green: #00E676;

  /* Legacy variable mappings for safety */
  --navy-primary: var(--bg-asphalt);
  --navy-deep: var(--bg-asphalt);
  --yellow-accent: var(--medium-yellow);
  --red-bright: var(--soft-red);
  --white-hard: var(--hard-white);
  --gray-text: var(--hard-white);
  --gray-light: var(--hard-white);
  --tech-border: var(--border-slate);
}

.race-start-splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-asphalt);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.6s ease-out;
  pointer-events: auto;
}

/* Carbon mesh grid pattern */
.race-start-splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(0deg, transparent 24%, rgba(255, 40, 0, 0.02) 25%, rgba(255, 40, 0, 0.02) 26%, transparent 27%, transparent 74%, rgba(255, 40, 0, 0.02) 75%, rgba(255, 40, 0, 0.02) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(255, 40, 0, 0.02) 25%, rgba(255, 40, 0, 0.02) 26%, transparent 27%, transparent 74%, rgba(255, 40, 0, 0.02) 75%, rgba(255, 40, 0, 0.02) 76%, transparent 77%, transparent);
  background-size: 24px 24px;
  pointer-events: none;
}

.race-start-splash.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  text-align: center;
  z-index: 10;
  position: relative;
}

.race-title {
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  font-size: 4em;
  font-weight: 900;
  color: var(--soft-red);
  letter-spacing: 6px;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(255, 40, 0, 0.4), 0 0 80px rgba(255, 40, 0, 0.2);
  margin-bottom: 20px;
  animation: title-glow 1.5s ease-in-out infinite;
}

@keyframes title-glow {

  0%,
  100% {
    text-shadow: 0 0 40px rgba(255, 40, 0, 0.4), 0 0 80px rgba(255, 40, 0, 0.2);
    letter-spacing: 6px;
  }

  50% {
    text-shadow: 0 0 60px rgba(255, 40, 0, 0.6), 0 0 100px rgba(255, 40, 0, 0.3);
    letter-spacing: 8px;
  }
}

.race-subtitle {
  font-family: 'JetBrains Mono', 'Share Tech Mono', monospace;
  font-size: 1.2em;
  color: var(--medium-yellow);
  letter-spacing: 3px;
  margin-bottom: 60px;
  animation: blink-subtitle 1s ease-in-out infinite;
}

@keyframes blink-subtitle {

  0%,
  49%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.splash-grid-lights {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: center;
  margin: 60px 0;
}

.splash-light {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-carbon);
  border: 4px solid var(--border-slate);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.splash-light.red-active {
  background: var(--soft-red);
  border-color: var(--soft-red);
  box-shadow: 0 0 40px var(--soft-red), inset 0 0 20px rgba(255, 40, 0, 0.5), 0 0 60px rgba(255, 40, 0, 0.3);
  animation: red-pulse 0.5s ease-in-out infinite;
}

@keyframes red-pulse {

  0%,
  100% {
    box-shadow: 0 0 40px var(--soft-red), inset 0 0 20px rgba(255, 40, 0, 0.5), 0 0 60px rgba(255, 40, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 60px var(--soft-red), inset 0 0 30px rgba(255, 40, 0, 0.7), 0 0 90px rgba(255, 40, 0, 0.5);
    transform: scale(1.05);
  }
}

.splash-light.green-active {
  background: var(--drs-green);
  box-shadow: 0 0 40px var(--drs-green), inset 0 0 20px rgba(0, 230, 118, 0.5), 0 0 60px rgba(0, 230, 118, 0.3);
  animation: green-flash 0.3s ease-in-out;
  border-color: var(--drs-green);
}

@keyframes green-flash {

  0%,
  100% {
    box-shadow: 0 0 40px var(--drs-green), inset 0 0 20px rgba(0, 230, 118, 0.5), 0 0 60px rgba(0, 230, 118, 0.3);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 80px var(--drs-green), inset 0 0 40px rgba(0, 230, 118, 0.8), 0 0 120px rgba(0, 230, 118, 0.6);
    transform: scale(1.1);
  }
}

.race-status {
  font-family: 'JetBrains Mono', 'Share Tech Mono', monospace;
  font-size: 2.5em;
  font-weight: bold;
  color: var(--drs-green);
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(0, 230, 118, 0.6);
  margin-top: 40px;
  opacity: 0;
  animation: status-appear 0.3s ease-out 3.5s forwards;
}

@keyframes status-appear {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.racing-line {
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--soft-red), transparent);
  animation: racing-line-flow 2s ease-in-out infinite;
  box-shadow: 0 0 20px var(--soft-red);
}

@keyframes racing-line-flow {
  0% {
    bottom: 50%;
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    bottom: -50px;
    opacity: 0;
  }
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-asphalt);
  color: var(--hard-white);
  line-height: 1.6;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow-x: hidden;
  position: relative;
}

/* Subtle dark grid background overlay mimicking telemetry monitor */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(0deg, transparent 24%, rgba(30, 35, 42, 0.25) 25%, rgba(30, 35, 42, 0.25) 26%, transparent 27%, transparent 74%, rgba(30, 35, 42, 0.25) 75%, rgba(30, 35, 42, 0.25) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(30, 35, 42, 0.25) 25%, rgba(30, 35, 42, 0.25) 26%, transparent 27%, transparent 74%, rgba(30, 35, 42, 0.25) 75%, rgba(30, 35, 42, 0.25) 76%, transparent 77%, transparent);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
}

.pit-wall-header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 84%;
  max-width: 1000px;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  padding: 10px 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.pit-wall-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  gap: 20px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
}

.logo-title {
  font-weight: 700;
  font-size: 1.1em;
  color: var(--hard-white);
  letter-spacing: 1px;
}

.logo-sub {
  font-size: 0.6em;
  color: var(--medium-yellow);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0 auto;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  font-size: 0.75em;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  font-family: 'JetBrains Mono', monospace;
}

.nav-links a:hover,
.nav-links a.active {
  color: #00E5FF;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.nav-cta-wrapper {
  display: flex;
  align-items: center;
}

.nav-cta {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(90deg, #00E5FF 0%, #00A3E0 100%);
  color: #0F1115 !important;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.8em;
  font-family: 'JetBrains Mono', monospace;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--soft-red);
  opacity: 1;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--hard-white);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: #00E5FF;
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: #00E5FF;
}

.pit-wall-hero {
  padding: 0;
  background: linear-gradient(135deg, rgba(4, 13, 26, 0.97) 0%, rgba(11, 31, 63, 0.95) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-direction: column;
}

.spark-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.speed-lines-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.speed-line {
  position: absolute;
  top: var(--top);
  right: 0;
  width: var(--width);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 204, 0, var(--opacity)) 60%, transparent 100%);
  animation: speed-streak 2.4s linear infinite;
  animation-delay: var(--delay);
}

@keyframes speed-streak {
  0% {
    transform: translateX(0) scaleX(1);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    transform: translateX(-110vw) scaleX(0.3);
    opacity: 0;
  }
}

.hero-bg-stripes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.rb-stripe {
  position: absolute;
  height: 100%;
  width: 180px;
  transform: skewX(-15deg);
  animation: stripe-drift 8s ease-in-out infinite;
}

.rb-stripe-1 {
  background: var(--red-bright);
  right: 12%;
  opacity: 0.04;
  animation-delay: 0s;
}

.rb-stripe-2 {
  background: var(--yellow-accent);
  right: 20%;
  width: 80px;
  opacity: 0.03;
  animation-delay: 2s;
}

.rb-stripe-3 {
  background: var(--red-bright);
  right: 5%;
  width: 60px;
  opacity: 0.06;
  animation-delay: 4s;
}

@keyframes stripe-drift {

  0%,
  100% {
    transform: skewX(-15deg) translateY(0);
  }

  50% {
    transform: skewX(-15deg) translateY(-20px);
  }
}

.hud-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  z-index: 5;
  pointer-events: none;
}

.hud-tl {
  top: 16px;
  left: 16px;
  border-top: 2px solid var(--medium-yellow);
  border-left: 2px solid var(--medium-yellow);
  box-shadow: -4px -4px 10px rgba(255, 242, 0, 0.3);
}

.hud-tr {
  top: 16px;
  right: 16px;
  border-top: 2px solid var(--medium-yellow);
  border-right: 2px solid var(--medium-yellow);
  box-shadow: 4px -4px 10px rgba(255, 242, 0, 0.3);
}

.hud-bl {
  bottom: 16px;
  left: 16px;
  border-bottom: 2px solid var(--soft-red);
  border-left: 2px solid var(--soft-red);
  box-shadow: -4px 4px 10px rgba(255, 40, 0, 0.3);
}

.hud-br {
  bottom: 16px;
  right: 16px;
  border-bottom: 2px solid var(--soft-red);
  border-right: 2px solid var(--soft-red);
  box-shadow: 4px 4px 10px rgba(255, 40, 0, 0.3);
}

.telemetry-hud {
  position: absolute;
  top: 80px;
  left: 30px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(22, 25, 32, 0.85);
  border: 1px solid var(--border-slate);
  border-radius: 6px;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.telem-panel {
  display: flex;
  gap: 12px;
  align-items: center;
}

.telem-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.telem-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55em;
  color: rgba(245, 245, 245, 0.6);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.telem-value {
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  font-size: 1.2em;
  font-weight: 700;
  color: var(--medium-yellow);
  text-shadow: 0 0 10px rgba(255, 242, 0, 0.3);
  line-height: 1;
}

.telem-unit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.48em;
  color: rgba(245, 245, 245, 0.5);
  letter-spacing: 0.5px;
}

.gear-num {
  font-size: 1.2em !important;
  color: var(--soft-red) !important;
  text-shadow: 0 0 15px rgba(255, 40, 0, 0.5) !important;
}

.drs-on .telem-label {
  color: rgba(0, 230, 118, 0.7);
}

.drs-status {
  color: var(--drs-green) !important;
  text-shadow: 0 0 10px rgba(0, 230, 118, 0.6) !important;
  animation: drs-blink 1.2s ease-in-out infinite;
  font-size: 1em !important;
}

@keyframes drs-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.telem-divider {
  width: 1px;
  height: 36px;
  background: var(--border-slate);
}

.rev-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.rev-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55em;
  color: rgba(245, 245, 245, 0.5);
  letter-spacing: 1px;
  min-width: 24px;
}

.rev-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  border: 1px solid var(--border-slate);
  overflow: hidden;
  min-width: 120px;
}

.rev-bar-fill {
  height: 100%;
  width: 93%;
  background: linear-gradient(90deg, var(--drs-green) 0%, var(--medium-yellow) 60%, var(--soft-red) 90%);
  border-radius: 3px;
  animation: rev-fluctuate 1.8s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(255, 242, 0, 0.4);
}

@keyframes rev-fluctuate {

  0%,
  100% {
    width: 93%;
  }

  30% {
    width: 97%;
  }

  60% {
    width: 89%;
  }

  80% {
    width: 95%;
  }
}

.sector-times-panel {
  position: absolute;
  top: 80px;
  right: 30px;
  z-index: 6;
  background: rgba(22, 25, 32, 0.85);
  border: 1px solid var(--border-slate);
  border-radius: 6px;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  min-width: 180px;
}

.sector-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55em;
  color: rgba(255, 204, 0, 0.5);
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-align: center;
}

.sector-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.sector-id {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7em;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  min-width: 22px;
  text-align: center;
}

.s1 {
  background: rgba(225, 6, 0, 0.3);
  color: #ff6666;
  border: 1px solid rgba(225, 6, 0, 0.4);
}

.s2 {
  background: rgba(255, 204, 0, 0.2);
  color: var(--yellow-accent);
  border: 1px solid rgba(255, 204, 0, 0.3);
}

.s3 {
  background: rgba(100, 150, 200, 0.2);
  color: #88bbff;
  border: 1px solid rgba(100, 150, 200, 0.3);
}

.sector-time {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85em;
  color: var(--gray-text);
  flex: 1;
}

.sector-delta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6em;
  letter-spacing: 0.5px;
  color: rgba(203, 213, 225, 0.5);
}

.delta-purple {
  color: #df00ff;
  text-shadow: 0 0 8px rgba(223, 0, 255, 0.5);
}

.delta-green {
  color: #00FF41;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

.lap-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 204, 0, 0.15);
}

.lap-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6em;
  color: rgba(255, 204, 0, 0.5);
  letter-spacing: 1.5px;
}

.lap-time {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  color: var(--yellow-accent);
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.4);
}

.hero-content {
  display: flex;
  gap: 60px;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  width: 100%;
  z-index: 4;
  padding: 160px 50px 60px;
  position: relative;
  flex: 1;
}

.hero-left {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* FIA Superlicense Card Container */
.driver-license-card {
  width: 320px;
  background: var(--bg-carbon);
  border: 2px solid var(--border-slate);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
}

.driver-license-card::before {
  content: 'FIA SUPERLICENSE';
  position: absolute;
  top: 10px;
  right: -25px;
  background: var(--soft-red);
  color: var(--hard-white);
  font-size: 0.5em;
  font-weight: 700;
  padding: 4px 30px;
  transform: rotate(45deg);
  letter-spacing: 1px;
  box-shadow: 0 2px 10px rgba(255, 40, 0, 0.3);
}

.license-header {
  border-bottom: 1px solid var(--border-slate);
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.license-title {
  font-size: 0.7em;
  color: var(--medium-yellow);
  letter-spacing: 1.5px;
  font-weight: bold;
}

.license-id {
  font-size: 0.55em;
  color: rgba(245, 245, 245, 0.4);
}

.license-body {
  display: flex;
  gap: 15px;
}

.license-photo-container {
  position: relative;
  width: 100px;
  height: 125px;
  border: 1px solid var(--border-slate);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.license-photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.license-watermark {
  position: absolute;
  bottom: 5px;
  left: 5px;
  font-size: 0.4em;
  color: rgba(255, 40, 0, 0.6);
  border: 1px solid rgba(255, 40, 0, 0.6);
  padding: 1px 3px;
  border-radius: 2px;
  text-transform: uppercase;
  transform: rotate(-15deg);
}

.license-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.65em;
}

.license-row {
  display: flex;
  flex-direction: column;
}

.license-label {
  color: rgba(245, 245, 245, 0.4);
  font-size: 0.8em;
  text-transform: uppercase;
}

.license-value {
  color: var(--hard-white);
  font-weight: bold;
}

.license-value-active {
  color: var(--drs-green);
}

.license-footer {
  margin-top: 15px;
  border-top: 1px dashed var(--border-slate);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.license-barcode {
  height: 25px;
  width: 140px;
  background: repeating-linear-gradient(90deg,
      var(--hard-white),
      var(--hard-white) 2px,
      transparent 2px,
      transparent 6px,
      var(--hard-white) 6px,
      var(--hard-white) 7px);
  opacity: 0.7;
}

.license-class {
  font-size: 0.8em;
  font-weight: bold;
  color: var(--soft-red);
  border: 1px solid var(--soft-red);
  padding: 2px 6px;
  border-radius: 4px;
}

.hero-right {
  flex: 1;
  z-index: 3;
  max-width: 600px;
}

.team-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75em;
  color: var(--soft-red);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--soft-red);
  box-shadow: 0 0 6px rgba(255, 40, 0, 0.6);
}

.hero-title {
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  font-size: 3.5em;
  font-weight: 900;
  color: var(--hard-white);
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.typing-effect {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3em;
  color: var(--medium-yellow);
  margin-bottom: 16px;
  min-height: 40px;
  letter-spacing: 2px;
}

.cursor {
  display: inline-block;
  width: 3px;
  height: 24px;
  background: var(--medium-yellow);
  margin-left: 5px;
  animation: blink 0.7s infinite;
}

@keyframes blink {

  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.hero-subtitle {
  font-size: 1.0em;
  color: var(--hard-white);
  margin-bottom: 20px;
  letter-spacing: 1px;
  opacity: 0.8;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--bg-carbon);
  border: 1px solid var(--border-slate);
  border-radius: 6px;
  backdrop-filter: blur(5px);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.hero-stat-num {
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  font-size: 1.8em;
  font-weight: 900;
  color: var(--medium-yellow);
  text-shadow: 0 0 15px rgba(255, 242, 0, 0.2);
  line-height: 1;
}

.hero-stat-lbl {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6em;
  color: rgba(203, 213, 225, 0.5);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hero-stat-sep {
  width: 1px;
  height: 40px;
  background: rgba(255, 204, 0, 0.2);
}

.hero-cta-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(90deg, var(--soft-red) 0%, #B00400 100%);
  color: white !important;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 20px rgba(255, 40, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(255, 40, 0, 0.6);
}

.btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  background: transparent;
  color: var(--medium-yellow);
  text-decoration: none;
  border: 2px solid var(--medium-yellow);
  border-radius: 4px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 15px rgba(255, 242, 0, 0.15), inset 0 0 15px rgba(255, 242, 0, 0.05);
}

.btn-secondary:hover {
  background: rgba(255, 242, 0, 0.1);
  box-shadow: 0 0 30px rgba(255, 242, 0, 0.35), inset 0 0 20px rgba(255, 242, 0, 0.1);
  transform: translateY(-3px);
  color: var(--medium-yellow);
}

.btn-github {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(90deg, var(--border-slate) 0%, var(--bg-carbon) 100%);
  color: var(--hard-white) !important;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.btn-github:hover {
  transform: translateY(-3px);
  border-color: var(--medium-yellow);
  box-shadow: 0 0 25px rgba(255, 242, 0, 0.25);
}

.hero-bottom-bar {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--bg-carbon);
  border-top: 2px solid var(--soft-red);
  box-shadow: 0 -4px 20px rgba(255, 40, 0, 0.2);
  z-index: 6;
  position: relative;
  overflow: hidden;
}

.hero-bottom-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 242, 0, 0.8), transparent);
  animation: scan-line 4s linear infinite;
}

@keyframes scan-line {
  0% {
    left: -60%;
  }

  100% {
    left: 110%;
  }
}

.bottom-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 28px;
  gap: 4px;
  border-right: 1px solid var(--border-slate);
  position: relative;
  flex: 1;
  max-width: 160px;
  transition: background 0.3s ease;
}

.bottom-bar-item:hover {
  background: rgba(255, 242, 0, 0.05);
}

.bottom-bar-item:last-child {
  border-right: none;
}

.bbar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55em;
  color: rgba(245, 245, 245, 0.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.bbar-value {
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  font-size: 0.95em;
  font-weight: 700;
  color: var(--medium-yellow);
  letter-spacing: 1px;
}

.gap-value {
  color: var(--drs-green);
  text-shadow: 0 0 8px rgba(0, 230, 118, 0.4);
}

.status-racing {
  color: var(--soft-red) !important;
  text-shadow: 0 0 10px rgba(255, 40, 0, 0.6);
  animation: status-pulse 1.5s ease-in-out infinite;
}

@keyframes status-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.contact-info-bar {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 30px 50px;
  background: var(--bg-carbon);
  border-bottom: 1px solid var(--border-slate);
  border-top: 1px solid var(--border-slate);
  max-width: 100%;
  z-index: 2;
  position: relative;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95em;
}

.contact-icon {
  font-size: 1.3em;
}

.contact-item a {
  color: var(--medium-yellow);
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}

.contact-item a:hover {
  color: var(--soft-red);
  text-shadow: 0 0 10px rgba(255, 40, 0, 0.5);
}

.flashcard-deck {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  z-index: 2;
  position: relative;
}

.flashcard-card {
  background: var(--bg-carbon);
  border: 2px solid var(--border-slate);
  border-radius: 8px;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  min-height: 180px;
  text-align: center;
  overflow: hidden;
}

.flashcard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--medium-yellow) 0%, var(--soft-red) 100%);
  opacity: 0.6;
}

.flashcard-card:hover {
  background: rgba(22, 25, 32, 0.8);
  border-color: var(--soft-red);
  box-shadow:
    0 15px 50px rgba(255, 40, 0, 0.15),
    inset 0 0 20px rgba(255, 40, 0, 0.05);
  transform: translateY(-8px);
}

.flashcard-card h3 {
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  font-size: 1.2em;
  font-weight: 700;
  color: var(--hard-white);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.card-arrow {
  font-size: 1.5em;
  color: var(--medium-yellow);
  margin-top: 15px;
  transition: transform 0.3s ease;
}

.flashcard-card:hover .card-arrow {
  transform: translateX(8px);
  color: var(--soft-red);
}

.section-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-asphalt);
  z-index: 999;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.4s ease;
  overflow: hidden;
  padding-top: 110px;
}

/* Grid overlay inside the overlay section viewer too */
.section-viewer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(0deg, transparent 24%, rgba(30, 35, 42, 0.15) 25%, rgba(30, 35, 42, 0.15) 26%, transparent 27%, transparent 74%, rgba(30, 35, 42, 0.15) 75%, rgba(30, 35, 42, 0.15) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(30, 35, 42, 0.15) 25%, rgba(30, 35, 42, 0.15) 26%, transparent 27%, transparent 74%, rgba(30, 35, 42, 0.15) 75%, rgba(30, 35, 42, 0.15) 76%, transparent 77%, transparent);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.5;
}

.section-viewer.active {
  display: flex;
  opacity: 1;
}

.section-viewer-header {
  display: none !important;
}

.floating-back {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--soft-red) 0%, #c20600 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: var(--hard-white);
  box-shadow: 0 10px 25px rgba(255, 40, 0, 0.4);
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 0.85em;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-back:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 30px rgba(255, 40, 0, 0.6);
}

/* Deprecated header layout removed */

.section-viewer-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 60px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-content {
  animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

.section-content p {
  color: var(--gray-text);
  margin-bottom: 15px;
  line-height: 1.8;
  font-size: 1.05em;
}

.section-content p:last-child {
  margin-bottom: 0;
}

.timeline-race {
  position: relative;
  padding: 30px 0;
}

.timeline-race::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--medium-yellow) 0%, var(--soft-red) 50%, var(--drs-green) 100%);
  box-shadow: 0 0 15px rgba(255, 40, 0, 0.2);
}

.timeline-checkpoint {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
  position: relative;
}

.checkpoint-marker {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  border: 3px solid var(--border-slate);
  color: var(--medium-yellow);
  text-shadow: 0 0 10px rgba(255, 242, 0, 0.3);
  font-size: 1.2em;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
  background: var(--bg-carbon);
}

.checkpoint-marker.sector-1 {
  border-color: var(--soft-red);
  color: var(--soft-red);
  box-shadow: 0 0 20px rgba(255, 40, 0, 0.2);
}

.checkpoint-marker.sector-2 {
  border-color: var(--medium-yellow);
  color: var(--medium-yellow);
  box-shadow: 0 0 20px rgba(255, 242, 0, 0.2);
}

.checkpoint-marker.sector-3 {
  border-color: var(--wet-blue);
  color: var(--wet-blue);
  box-shadow: 0 0 20px rgba(0, 163, 224, 0.2);
}

.checkpoint-marker:hover {
  transform: scale(1.15);
  background: var(--border-slate);
}

.checkpoint-content {
  flex: 1;
  padding-top: 8px;
}

.checkpoint-content h3 {
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  font-size: 1.3em;
  color: var(--hard-white);
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.checkpoint-content .institution {
  font-family: 'JetBrains Mono', monospace;
  color: var(--medium-yellow);
  font-weight: 600;
  margin-bottom: 8px;
}

.checkpoint-content .details {
  color: var(--hard-white);
  font-size: 0.95em;
  line-height: 1.6;
  opacity: 0.85;
}

/* Experiences Telemetry Log Styles */
.telemetry-log-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  margin-top: 15px;
}

.telemetry-log-row {
  border-bottom: 1px solid var(--border-slate);
  transition: background 0.2s ease;
}

.telemetry-log-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.telemetry-log-cell {
  padding: 10px 8px;
  vertical-align: top;
  color: rgba(245, 245, 245, 0.85);
}

.telemetry-log-cell.lap {
  color: var(--soft-red);
  font-weight: bold;
}

.telemetry-log-cell.timestamp {
  color: var(--medium-yellow);
}

.telemetry-log-cell.tag {
  color: var(--wet-blue);
  font-weight: bold;
}

.skills-container {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.skill-category {
  background: var(--bg-carbon);
  padding: 25px;
  border-radius: 6px;
  border: 1px solid var(--border-slate);
  border-left: 4px solid var(--border-slate);
  transition: all 0.3s ease;
}

.skill-category:hover {
  background: rgba(22, 25, 32, 0.8);
  border-left-color: var(--soft-red);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.skill-category.soft-compound {
  border-left-color: var(--soft-red);
}

.skill-category.medium-compound {
  border-left-color: var(--medium-yellow);
}

.skill-category.hard-compound {
  border-left-color: var(--hard-white);
}

.skill-category.pit-tooling {
  border-left-color: var(--wet-blue);
}

.skill-category h3 {
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  font-size: 1.1em;
  color: var(--hard-white);
  margin-bottom: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-pill {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 600;
  border: 1px solid var(--border-slate);
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
  letter-spacing: 0.5px;
}

.skill-pill.soft {
  border-color: var(--soft-red);
  color: var(--soft-red);
  background: rgba(255, 40, 0, 0.05);
}

.skill-pill.soft:hover {
  background: rgba(255, 40, 0, 0.15);
  box-shadow: 0 0 15px rgba(255, 40, 0, 0.3);
  transform: translateY(-2px);
}

.skill-pill.medium {
  border-color: var(--medium-yellow);
  color: var(--medium-yellow);
  background: rgba(255, 242, 0, 0.05);
}

.skill-pill.medium:hover {
  background: rgba(255, 242, 0, 0.15);
  box-shadow: 0 0 15px rgba(255, 242, 0, 0.3);
  transform: translateY(-2px);
}

.skill-pill.hard {
  border-color: var(--hard-white);
  color: var(--hard-white);
  background: rgba(245, 245, 245, 0.05);
}

.skill-pill.hard:hover {
  background: rgba(245, 245, 245, 0.15);
  box-shadow: 0 0 15px rgba(245, 245, 245, 0.3);
  transform: translateY(-2px);
}

.skill-pill.tool {
  border-color: var(--wet-blue);
  color: var(--wet-blue);
  background: rgba(0, 163, 224, 0.05);
}

.skill-pill.tool:hover {
  background: rgba(0, 163, 224, 0.15);
  box-shadow: 0 0 15px rgba(0, 163, 224, 0.4);
  transform: translateY(-2px);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Project Setup Specification Sheet Card */
.bento-item {
  background: var(--bg-carbon);
  border: 1px solid var(--border-slate);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.bento-item.wide {
  grid-column: span 2;
  min-height: 280px;
}

.bento-item h3 {
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  font-size: 1.3em;
  color: var(--hard-white);
  margin: 0;
  letter-spacing: 1px;
}

.bento-item p {
  color: var(--hard-white);
  font-size: 0.95em;
  line-height: 1.6;
  flex-grow: 1;
  opacity: 0.8;
}

/* Specs bar inside setup sheets */
.project-specs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68em;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-slate);
  border-radius: 4px;
  color: rgba(245, 245, 245, 0.6);
  margin: 4px 0 8px 0;
}

.project-spec-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-spec-val-high {
  color: var(--drs-green);
  font-weight: bold;
}

.project-spec-val-verify {
  color: var(--medium-yellow);
}

.bento-item a {
  color: var(--medium-yellow);
  text-decoration: none;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  font-size: 0.85em;
}

.bento-item a:hover {
  color: var(--soft-red);
  text-shadow: 0 0 10px rgba(255, 40, 0, 0.5);
}

.bento-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.5s;
  z-index: 1;
}

.bento-item:hover::before {
  left: 100%;
}

.bento-item:hover {
  border-color: var(--soft-red);
  box-shadow: 0 0 35px rgba(255, 40, 0, 0.15);
  transform: translateY(-5px);
}

.bento-item.featured {
  border: 1px solid var(--border-slate);
}

.bento-item.featured:hover {
  border-color: var(--drs-green);
  box-shadow: 0 0 35px rgba(0, 230, 118, 0.15);
}

.drs-indicator {
  align-self: flex-start;
  margin-bottom: 8px;
  display: inline-block;
  width: max-content;
  padding: 4px 10px;
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid var(--drs-green);
  color: var(--drs-green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65em;
  font-weight: 700;
  border-radius: 3px;
  letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
  animation: drs-flash 1.5s ease-in-out infinite;
}

@keyframes drs-flash {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.bento-item:hover .drs-indicator {
  box-shadow: 0 0 25px rgba(0, 230, 118, 0.4);
}

.certificates-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Technical Inspection Scrutineering passes */
.cert-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg-carbon);
  border: 1px solid var(--border-slate);
  border-left: 5px solid var(--medium-yellow);
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
}

.cert-item::after {
  content: 'SCRUTINEER APPROVED';
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55em;
  color: rgba(0, 230, 118, 0.4);
  border: 1px solid rgba(0, 230, 118, 0.4);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.cert-item:hover {
  background: rgba(22, 25, 32, 0.85);
  border-left-color: var(--soft-red);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
}

.cert-badge {
  font-size: 2em;
  flex-shrink: 0;
}

.cert-text h3 {
  font-family: 'Space Grotesk', 'Orbitron', sans-serif;
  color: var(--hard-white);
  margin-bottom: 5px;
  font-size: 1.1em;
  letter-spacing: 1px;
}

.cert-text p {
  color: var(--medium-yellow);
  font-size: 0.85em;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', monospace;
}

.cert-text a {
  color: var(--hard-white);
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0.8;
  font-size: 0.85em;
  font-family: 'JetBrains Mono', monospace;
}

.cert-text a:hover {
  color: var(--soft-red);
  opacity: 1;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 14px 16px;
  background: var(--bg-carbon);
  border: 1px solid var(--border-slate);
  border-radius: 4px;
  color: var(--hard-white);
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(245, 245, 245, 0.4);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--medium-yellow);
  background: var(--bg-carbon);
  box-shadow: 0 0 15px rgba(255, 242, 0, 0.15);
}

.contact-form button {
  padding: 14px 32px;
  background: linear-gradient(90deg, var(--soft-red) 0%, #B00400 100%);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 20px rgba(255, 40, 0, 0.3);
  margin-top: 10px;
}

.contact-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(255, 40, 0, 0.6);
}

.pit-wall-footer {
  text-align: center;
  padding: 40px 30px;
  background: var(--bg-carbon);
  border-top: 2px solid var(--border-slate);
  color: rgba(245, 245, 245, 0.6);
  position: relative;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
}

.pit-wall-footer p {
  margin: 0 0 8px 0;
}

.tagline {
  font-size: 0.85em;
  color: var(--medium-yellow);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.control-btn {
  position: fixed;
  right: 30px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--border-slate);
  background: var(--bg-carbon);
  color: var(--medium-yellow);
  font-size: 1.3em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background: var(--border-slate);
  border-color: var(--soft-red);
  color: var(--soft-red);
  box-shadow: 0 0 30px rgba(255, 40, 0, 0.3);
  transform: scale(1.1);
}



#go-to-top {
  bottom: 30px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

#go-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1024px) {
  .hero-content {
    flex-direction: column;
    gap: 40px;
  }

  .driver-license-card {
    width: 300px;
  }

  .hero-title {
    font-size: 2.4em;
  }

  .bento-item.wide {
    grid-column: span 1;
  }

  .pit-wall-header {
    padding: 15px 30px;
  }

  .telemetry-hud {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    margin: 90px auto 10px auto;
    width: 95%;
    max-width: 340px;
    z-index: 6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 12px 10px !important;
  }

  .telemetry-hud .telem-panel {
    gap: 6px !important;
  }

  .telemetry-hud .telem-value {
    font-size: 1.05em !important;
  }

  .telemetry-hud .drs-status {
    font-size: 0.85em !important;
  }

  .telemetry-hud .telem-label {
    font-size: 0.5em !important;
  }

  .sector-times-panel {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    margin: 10px auto;
    width: 90%;
    max-width: 320px;
    z-index: 6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .hero-content {
    flex-direction: column;
    gap: 30px;
    padding: 20px 30px 40px;
    align-items: center;
  }

  .hero-bottom-bar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .bottom-bar-item {
    max-width: none;
    min-width: 120px;
    flex: 1;
  }

  .flashcard-deck {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-viewer-content {
    padding: 40px 30px;
  }

  #sectionTitle {
    font-size: 1.5em;
  }
}

@media (max-width: 768px) {
  .pit-wall-header {
    padding: 8px 18px;
    top: 1rem;
    width: 90%;
    border-radius: 30px;
  }

  .race-title {
    font-size: 2em !important;
    letter-spacing: 2px !important;
  }

  .race-subtitle {
    font-size: 0.85em !important;
    letter-spacing: 1px !important;
    padding: 0 15px;
  }

  .splash-grid-lights {
    gap: 15px !important;
    margin: 30px 0 !important;
  }

  .splash-light {
    width: 25px !important;
    height: 25px !important;
    border-width: 2px !important;
  }

  .race-status {
    font-size: 1.5em !important;
    margin-top: 20px !important;
  }

  .hamburger {
    display: flex;
  }

  .nav-cta-wrapper {
    display: none;
  }

  .nav-links {
    position: fixed;
    top: 4.5rem;
    right: 5%;
    left: 5%;
    width: 90%;
    flex-direction: column;
    gap: 15px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    transform: translateY(-200%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .logo {
    font-size: 1.1em;
  }

  .logo-title {
    font-size: 0.9em;
  }

  .logo-sub {
    font-size: 0.5em;
  }

  .hero-title {
    font-size: 1.8em;
    letter-spacing: 2px;
  }

  .typing-effect {
    font-size: 1em;
  }

  .hero-stats-row {
    gap: 10px;
    padding: 12px 14px;
  }

  .hero-stat-num {
    font-size: 1.3em;
  }

  .hud-corner {
    display: none;
  }

  .contact-info-bar {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }

  .flashcard-deck {
    padding: 0 15px;
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .flashcard-card {
    min-height: 150px;
    padding: 30px 20px;
  }

  .flashcard-card h3 {
    font-size: 1.1em;
  }

  .timeline-race::before {
    left: 20px;
  }

  .checkpoint-marker {
    width: 60px;
    height: 60px;
    font-size: 1em;
  }

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

  .pit-wall-hero {
    min-height: 100vh;
  }

  .section-viewer {
    padding-top: 80px !important;
  }

  .section-viewer-content {
    padding: 30px 15px;
  }

  .pit-wall-footer {
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5em;
    letter-spacing: 2px;
  }

  .typing-effect {
    font-size: 0.9em;
  }

  .hero-subtitle {
    font-size: 0.9em;
  }

  .flashcard-header {
    padding: 15px 15px;
  }

  .flashcard-content {
    padding: 20px 15px;
  }

  .checkpoint-marker {
    width: 55px;
    height: 55px;
  }

  .flashcard-header h2 {
    font-size: 1em;
  }

  .skill-pills {
    gap: 8px;
  }

  .skill-pill {
    font-size: 0.8em;
    padding: 6px 12px;
  }

  .control-btn {
    width: 45px;
    height: 45px;
    right: 15px;
  }


}

/* Responsive adjustments for telemetry table & license card */
.telemetry-log-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-slate);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  margin-top: 15px;
}

@media (max-width: 480px) {
  .driver-license-card {
    width: 100%;
    max-width: 290px;
    padding: 12px;
  }

  .license-body {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .license-photo-container {
    width: 80px;
    height: 100px;
  }

  .license-details {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .license-barcode {
    width: 100px;
  }
}