/* ==========================================================================
   Colm Gwilliam Portfolio — Apple Blue Edition
   ========================================================================== */

:root {
  /* Colors - Obsidian Space Black */
  --bg: #08080a;
  --surface: #121214;
  --surface-elevated: #1a1a1e;
  --surface-hover: #222226;
  
  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-bright: rgba(255, 255, 255, 0.12);
  --border-active: rgba(0, 113, 227, 0.4);

  /* Text colors */
  --text: #f5f5f7;
  --text-mid: #86868b;
  --text-dim: #424245;

  /* Accent - Apple Blue */
  --accent: #0071e3;
  --accent-glow: rgba(0, 113, 227, 0.25);
  --accent-light: #47a0ff;

  /* Layout */
  --radius: 20px;
  --radius-lg: 28px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', -apple-system, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, "Liberation Mono", Menlo, monospace;
}

/* ==========================================================================
   Base Setup
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border-bright) var(--bg);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  cursor: none; /* Custom cursor override */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ==========================================================================
   Analog Grain & Noise Texture
   ========================================================================== */

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
}

/* ==========================================================================
   Custom Cursor
   ========================================================================== */

.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.15s, height 0.15s;
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, opacity 0.2s, border-color 0.2s;
}

body.hover-link .cursor-ring {
  width: 50px;
  height: 50px;
  border-color: var(--accent);
  background: rgba(0, 113, 227, 0.05);
}

body.hover-link .cursor {
  width: 4px;
  height: 4px;
  background: var(--accent-light);
}

/* Hide cursor on touch devices */
@media (hover: none) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(8, 8, 10, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-cta {
  padding: 6px 16px;
  border-radius: 980px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--text);
  transition: background 0.25s, color 0.25s, transform 0.15s, box-shadow 0.2s;
}

.nav-cta:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  min-height: 100vh;
  padding-top: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 50% 65%, rgba(0, 113, 227, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 20% 30%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
    var(--bg);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 65% 65% at 50% 50%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 65% 65% at 50% 50%, black 20%, transparent 75%);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 8px;
  border-radius: 980px;
  border: 1px solid rgba(0, 113, 227, 0.25);
  background: rgba(0, 113, 227, 0.06);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-light);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s 0.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 8px var(--accent-light);
  animation: pulse 2s ease infinite;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(48px, 8.5vw, 92px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.98;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title span.line1 {
  color: var(--text);
  display: block;
}

.hero-title span.line2 {
  display: block;
  background: linear-gradient(115deg, var(--text) 30%, var(--accent-light) 65%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  margin-top: 24px;
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.5;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: fadeUp 0.8s 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* macOS Interactive Dock in Hero */
.hero-dock-wrap {
  margin-top: 64px;
  display: flex;
  justify-content: center;
  width: 100%;
  opacity: 0;
  animation: fadeUp 0.8s 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 10;
}

.hero-dock {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(22, 22, 23, 0.4);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: padding 0.3s;
}

.dock-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  cursor: none;
  transition: width 0.15s ease, height 0.15s ease, transform 0.15s ease, background-color 0.2s;
}

.dock-item:hover {
  background: var(--surface-hover);
  border-color: var(--accent-light);
  transform: translateY(-8px);
}

.dock-item .dock-tooltip {
  position: absolute;
  bottom: 60px;
  background: rgba(22, 22, 23, 0.9);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-bright);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px) scale(0.95);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.dock-item:hover .dock-tooltip {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dock-dot {
  position: absolute;
  bottom: -6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-mid);
  opacity: 0.6;
}

.dock-item:hover .dock-dot {
  background: var(--accent-light);
  opacity: 1;
}

/* Scroll Hint */
.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-line {
  width: 1px;
  height: 30px;
  background: linear-gradient(var(--accent-light), transparent);
  animation: scrollLine 2.2s ease infinite;
}

/* ==========================================================================
   Buttons Setup
   ========================================================================== */

.btn-primary {
  padding: 12px 24px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
  padding: 12px 24px;
  border-radius: 980px;
  border: 1px solid var(--border-bright);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

/* ==========================================================================
   Section Standard Spacing & Header
   ========================================================================== */

.section {
  padding: 100px 24px 0;
  max-width: 980px;
  margin: 0 auto;
  position: relative;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 6px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}

.section-link {
  font-size: 13px;
  color: var(--accent-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s, color 0.2s;
}

.section-link:hover {
  color: var(--text);
  gap: 8px;
}

/* ==========================================================================
   Bento Grid Layout
   ========================================================================== */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
  margin-bottom: 50px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, transform 0.3s;
}

.bento-card:hover {
  border-color: var(--border-bright);
}

/* Grid sizes */
.size-2x2 { grid-column: span 2; grid-row: span 2; }
.size-3x2 { grid-column: span 3; grid-row: span 2; }
.size-4x2 { grid-column: span 4; grid-row: span 2; }
.size-6x2 { grid-column: span 6; grid-row: span 2; }
.size-6x1 { grid-column: span 6; grid-row: span 1; }

/* Bento inner layouts */
.bento-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 2;
}

.bento-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 8px;
}

.bento-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}

.bento-desc {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.5;
}

.bento-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
}

.bento-card:hover .bento-footer {
  color: var(--text-mid);
}

/* Card Radial Glow Overlay on Hover */
.card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 120px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 113, 227, 0.12), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  z-index: 1;
}

.bento-card:hover .card-glow {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Widget 1: Code vs UI View (Bento 3x2)
   -------------------------------------------------------------------------- */

.widget-ide {
  height: 140px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ide-header {
  height: 28px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.ide-dots {
  display: flex;
  gap: 5px;
}

.ide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
}

.ide-dot:nth-child(1) { background: #ff5f56; }
.ide-dot:nth-child(2) { background: #ffbd2e; }
.ide-dot:nth-child(3) { background: #27c93f; }

.ide-tabs {
  display: flex;
  gap: 1px;
  background: rgba(0, 0, 0, 0.2);
}

.ide-tab {
  padding: 4px 10px;
  font-size: 10px;
  color: var(--text-mid);
  cursor: none;
  border-right: 1px solid var(--border);
  transition: background 0.2s, color 0.2s;
}

.ide-tab.active {
  background: var(--bg);
  color: var(--text);
}

.ide-body {
  flex: 1;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mid);
  overflow-y: hidden;
  position: relative;
}

.ide-code-view {
  display: block;
}

.ide-ui-view {
  display: none;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.ui-mockup-btn {
  padding: 6px 14px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  animation: pulse 2s infinite;
}

/* --------------------------------------------------------------------------
   Widget 2: 3D Parallax Spatial UI (Bento 3x2)
   -------------------------------------------------------------------------- */

.widget-spatial {
  flex: 1;
  margin-top: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0e1e38, #050a12);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 800px;
}

.spatial-glow {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.4) 0%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  animation: floatLight 8s ease-in-out infinite alternate;
}

.spatial-card-inner {
  width: 75%;
  height: 60%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  padding: 12px;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

.spatial-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  transform: translateZ(20px);
}

.spatial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
  flex: 1;
  transform: translateZ(10px);
}

.spatial-cell {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  transition: background 0.3s;
}

.spatial-cell:hover {
  background: rgba(0, 113, 227, 0.2);
  border-color: var(--accent-light);
}

/* --------------------------------------------------------------------------
   Widget 3: Terminal Console Widget (Bento 4x2)
   -------------------------------------------------------------------------- */

.widget-console {
  flex: 1;
  margin-top: 14px;
  background: #040405;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #34d399; /* Green color for console */
  padding: 14px;
  overflow-y: hidden;
  position: relative;
  text-align: left;
}

.console-line {
  line-height: 1.6;
  white-space: nowrap;
}

.console-prompt {
  color: var(--accent-light);
}

.console-cursor {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: #34d399;
  margin-left: 2px;
  animation: terminalCursor 1s infinite;
}

/* --------------------------------------------------------------------------
   Widget 4: Tech Stack (Bento 2x2)
   -------------------------------------------------------------------------- */

.stack-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.stack-icon-box {
  aspect-ratio: 1;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.2s, border-color 0.2s;
}

.stack-icon-box:hover {
  transform: translateY(-2px);
  border-color: var(--accent-light);
  color: var(--accent-light);
}

.stack-name {
  font-size: 9px;
  color: var(--text-mid);
  margin-top: 4px;
}

/* ==========================================================================
   Project Showcases — Sticky Stack Detail Pages
   ========================================================================== */

.projects-stack {
  position: relative;
  padding-bottom: 100px;
}

.project-card-wrap {
  position: sticky;
  top: 90px;
  padding-top: 20px;
  margin-bottom: 80px;
  z-index: 10;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 480px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s, filter 0.6s;
  transform-origin: top center;
}

.project-visual {
  background: linear-gradient(135deg, #090e18, #030509);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
}

.project-visual-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 75% 65% at var(--p-glow-x, 50%) var(--p-glow-y, 50%), rgba(0, 113, 227, 0.16), transparent 70%);
  pointer-events: none;
}

.project-visual-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.project-mockup {
  position: relative;
  width: 75%;
  height: 55%;
  background: rgba(22, 22, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.mockup-bar {
  height: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.mockup-circle {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.mockup-content {
  flex: 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-light);
  text-align: center;
}

.project-details {
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-light);
  margin-bottom: 16px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}

.project-desc {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 24px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.project-tag {
  padding: 4px 12px;
  border-radius: 980px;
  border: 1px solid var(--border-bright);
  font-size: 11px;
  color: var(--text-mid);
  background: rgba(255, 255, 255, 0.02);
}

.project-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s, color 0.2s;
}

.project-link:hover {
  color: var(--text);
  gap: 10px;
}

/* Stacking card scaling states (handled by scroll reveal JS) */
.project-card-wrap.stacked-1 .project-card {
  transform: scale(0.96) translateY(-10px);
  filter: blur(2px);
  opacity: 0.8;
}

.project-card-wrap.stacked-2 .project-card {
  transform: scale(0.92) translateY(-20px);
  filter: blur(4px);
  opacity: 0.6;
}

/* ==========================================================================
   Pull Quote & Statement Section
   ========================================================================== */

.statement-section {
  max-width: 800px;
  margin: 100px auto 0;
  text-align: center;
  padding: 0 24px;
}

.statement-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.statement-text {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--text);
}

.statement-text span.hl {
  color: var(--accent-light);
}

.statement-sub {
  margin-top: 24px;
  font-size: 18px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ==========================================================================
   Metrics Bar
   ========================================================================== */

.metrics-row {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  max-width: 800px;
  margin: 60px auto 0;
}

.metric-item {
  flex: 1;
  padding: 30px 20px;
  text-align: center;
  border-right: 1px solid var(--border);
}

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

.metric-num {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}

.metric-num .unit {
  font-size: 18px;
  font-weight: 400;
  color: var(--accent-light);
  margin-left: 2px;
}

.metric-label {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Ticker / Marquee
   ========================================================================== */

.marquee-section {
  overflow: hidden;
  margin-top: 100px;
}

.marquee-label {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.marquee-wrap {
  position: relative;
  width: 100%;
}

.marquee-wrap::before,
.marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.marquee-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}

.marquee-wrap::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg), transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 30px;
  font-size: 13px;
  color: var(--text-mid);
  white-space: nowrap;
  border-right: 1px solid var(--border);
}

.m-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
  flex-shrink: 0;
}

/* ==========================================================================
   Call to Action Card
   ========================================================================== */

.cta-section {
  padding-top: 100px;
}

.cta-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 113, 227, 0.2);
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.06), rgba(0, 113, 227, 0.01));
  padding: 64px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 113, 227, 0.15), transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1.15;
}

.cta-title span {
  color: var(--accent-light);
}

.cta-sub {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  margin-top: 100px;
  border-top: 1px solid var(--border);
  padding: 40px 40px;
}

.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.footer-brand span {
  color: var(--accent-light);
}

.footer-brand p {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 300;
  color: var(--text-mid);
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #34d399; /* green */
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse 2.5s infinite;
}

.footer-copy {
  font-size: 11px;
  color: var(--text-dim);
  width: 100%;
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 20px;
  text-align: center;
}

/* ==========================================================================
   Animations & Keyframes
   ========================================================================== */

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

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

@keyframes floatLight {
  0% {
    transform: translate(-10px, -10px);
  }
  100% {
    transform: translate(10px, 10px);
  }
}

@keyframes terminalCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Scroll Reveal base configuration */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Add custom layout child animation delays */
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.4s; }

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(180px, auto);
  }
  .size-2x2, .size-3x2, .size-4x2, .size-6x2, .size-6x1 {
    grid-column: span 2;
    grid-row: span 2;
  }
  .size-6x1 {
    grid-row: span 1;
  }
  .project-card {
    grid-template-columns: 1fr;
  }
  .project-visual {
    aspect-ratio: 16/10;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .project-details {
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 0 24px;
  }
  .nav-links {
    display: none; /* Hide links on mobile */
  }
  .section {
    padding-top: 80px;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .metrics-row {
    flex-direction: column;
  }
  .metric-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .metric-item:last-child {
    border-bottom: none;
  }
  .cta-card {
    padding: 40px 24px;
  }
  .cta-buttons {
    width: 100%;
    flex-direction: column;
  }
  .cta-buttons > * {
    text-align: center;
    width: 100%;
  }
  .hero-title {
    font-size: clamp(38px, 9vw, 56px);
  }
}
