/* ==========================================================================
   Apple-Inspired Scrollytelling Portfolio System
   ========================================================================== */

:root {
  /* Color Palette - Design-Apple Tokens */
  --color-primary: #0066cc;
  --color-primary-hover: #0071e3;
  --color-primary-dark: #2997ff;
  
  --color-ink: #1d1d1f;
  --color-ink-muted: #6e6e73;
  --color-ink-subtle: #86868b;
  
  --color-canvas-light: #ffffff;
  --color-canvas-parchment: #f5f5f7;
  --color-surface-pearl: #fafafc;
  
  --color-canvas-dark: #000000;
  --color-surface-dark-1: #161617;
  --color-surface-dark-2: #212124;
  --color-surface-dark-3: #2c2c30;
  
  --color-border-light: rgba(0, 0, 0, 0.08);
  --color-border-dark: rgba(255, 255, 255, 0.12);
  --color-glass-light: rgba(255, 255, 255, 0.72);
  --color-glass-dark: rgba(22, 22, 23, 0.78);
  
  /* Global Variables */
  --apple-blue: #0071e3;
  --apple-dark: #1d1d1f;
  --apple-light: #f5f5f7;
  --font-family-display: "Space Grotesk", sans-serif;
  --font-family-body: "Inter", sans-serif;
  --font-family-mono: "SF Mono", "Fira Code", "JetBrains Mono", monospace;
  
  /* Layout & Spacing */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 9999px;
  
  --container-max: 1240px;
  --header-height: 54px;
  
  /* Transitions & Ease */
  --ease-apple: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-apple);
  --transition-smooth: 0.4s var(--ease-apple);
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --color-ink: #f5f5f7;
  --color-ink-muted: #a1a1a6;
  --color-ink-subtle: #86868b;
  --color-canvas-light: #000000;
  --color-canvas-parchment: #0d0d0e;
  --color-border-light: rgba(255, 255, 255, 0.12);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Removed global pin-spacer background to prevent black flashes between light sections */

html {
  font-family: var(--font-family-body);
  background-color: var(--color-canvas-light);
  color: var(--color-ink);
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  position: relative;
  background-color: #ffffff;
  color: #1d1d1f;
  overflow-x: hidden;
}

/* ==========================================================================
   Preloader
   ========================================================================== */
.global-preloader {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background-color: #f5f5f7;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}
.global-preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.preloader-icon {
  width: 80px;
  height: 80px;
}

/* Mechanical: Gear Animation */
.gear-ring {
  transform-origin: 50px 50px;
  animation: spinGear 4s linear infinite;
}
@keyframes spinGear {
  100% { transform: rotate(360deg); }
}

/* Robotics: Node Pulse */
.node-dot {
  animation: pulseNode 1.5s ease-in-out infinite alternate;
}
.node-dot:nth-child(4) { animation-delay: 0s; }
.node-dot:nth-child(5) { animation-delay: 0.5s; }
.node-dot:nth-child(6) { animation-delay: 1.0s; }

@keyframes pulseNode {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 1; }
}
.network-nodes line {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: drawNetwork 2s ease-in-out forwards infinite alternate;
}
@keyframes drawNetwork {
  to { stroke-dashoffset: 0; }
}

/* Software: Bracket pulse */
.bracket-left {
  animation: floatBracketLeft 2s ease-in-out infinite alternate;
}
.bracket-right {
  animation: floatBracketRight 2s ease-in-out infinite alternate;
}
@keyframes floatBracketLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-4px); }
}
@keyframes floatBracketRight {
  0% { transform: translateX(0); }
  100% { transform: translateX(4px); }
}

.preloader-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.loading-label {
  font-family: var(--font-family-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #1d1d1f;
  opacity: 0.7;
}

.loading-bar-container {
  width: 140px;
  height: 2px;
  background-color: rgba(29, 29, 31, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar-progress {
  height: 100%;
  width: 0%;
  background-color: #0071e3;
  transition: width 0.3s ease-out;
}

/* Selection */
::selection {
  background: rgba(0, 102, 204, 0.2);
  color: var(--color-primary);
}

/* Links & Buttons reset */
a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
}

/* ==========================================================================
   Section 2: WHO I AM Scrollytelling Section (#who-i-am)
   ========================================================================== */

.whoiam-pin-wrapper {
  position: relative;
  width: 100%;
  height: 100vh; /* Replaced tall height with 100vh, GSAP ScrollTrigger padding will handle scroll depth */
  background-color: #000000;
  color: #ffffff;
}

.whoiam-sticky-viewport {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Canvas Container */
.whoiam-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #000000;
  overflow: hidden;
}

#whoiam-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  will-change: transform, opacity;
}

.whoiam-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 50%, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.85) 100%),
              linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
}

/* Content Container & Story Card */
.whoiam-content-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.whoiam-segment {
  position: absolute;
  max-width: 800px;
  width: 100%;
  padding: 0 32px;
  text-align: center;
  opacity: 0; /* Hidden by default */
  pointer-events: none; /* Let clicks pass through */
  display: flex;
  flex-direction: column;
  gap: 24px;
  will-change: opacity, transform;
}

.whoiam-eyebrow-huge {
  font-family: var(--font-family-display);
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
  text-transform: uppercase;
  margin: 0;
}

.whoiam-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.whoiam-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
}

.whoiam-headline {
  font-family: var(--font-family-display);
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.whoiam-headline-accent {
  background: linear-gradient(135deg, #ffffff 0%, #2997ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none; /* Text shadow can mess up background-clip on some browsers */
}

.whoiam-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.whoiam-paragraph {
  font-size: clamp(18px, 1.4vw, 22px); /* Slightly larger since there's no card */
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.whoiam-paragraph strong {
  font-weight: 600;
  color: #ffffff;
}

/* Premium Multidisciplinary Intersection Grid */
.intersection-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 900px;
  margin: 10px auto;
}

.intersection-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(18, 18, 20, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform var(--transition-smooth), border-color var(--transition-fast);
}

.intersection-field:hover {
  transform: translateY(-4px);
  border-color: rgba(41, 151, 255, 0.4);
}

.field-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-dark);
}

.intersection-field span {
  font-family: var(--font-family-mono);
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.01em;
}

.intersection-node {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.4);
}

.cross-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(41, 151, 255, 0.2) 0%, rgba(0,0,0,0) 70%);
  animation: nodePulse 2s infinite ease-out;
}

@keyframes nodePulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

/* White Outro Transition Layer */
.whoiam-white-outro {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #f5f5f7; /* Apple classic off-white */
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 24px;
  opacity: 0; /* Hidden by default */
  pointer-events: none;
}

.whoiam-goal-quote {
  font-family: var(--font-family-display);
  font-size: clamp(32px, 4vw, 56px); /* slightly larger for impact */
  font-weight: 600; /* 600 often looks cleaner and more premium than 700 */
  line-height: 1.15;
  letter-spacing: -0.03em; /* tighter tracking */
  color: #1d1d1f; /* Dark apple typography */
  max-width: 960px;
  text-align: center;
  margin: 0;
  position: relative;
}

/* ==========================================================================
   Section 1: Skills Scrollytelling Pinned Section (#skills-section)
   ========================================================================== */

.skills-pin-wrapper {
  position: relative;
  width: 100%;
  height: 100vh; /* Handled by GSAP pin */
  background-color: #000000;
  color: #ffffff;
}

.skills-sticky-viewport {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Canvas Container & Layer */
.skills-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #000000;
  overflow: hidden;
}

#skills-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 30% 60%; /* Center zoom focus near extended right hand */
  will-change: transform, opacity;
}

.skills-canvas-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at 70% 50%, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.85) 100%),
              linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.8) 100%);
}

/* Floating Palm Hologram Orb Overlay */
.palm-hologram {
  position: absolute;
  left: 24%;
  top: 50%;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  will-change: opacity, transform;
}

.hologram-pulse-ring {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1px solid rgba(41, 151, 255, 0.4);
  animation: hologramPulse 2.4s infinite ease-out;
}

@keyframes hologramPulse {
  0% { transform: translateX(-50%) scale(0.8); opacity: 0.8; }
  100% { transform: translateX(-50%) scale(1.6); opacity: 0; }
}

.hologram-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 24, 40, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(41, 151, 255, 0.5);
  box-shadow: 0 0 30px rgba(41, 151, 255, 0.5), inset 0 0 15px rgba(41, 151, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-dark);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.hologram-label {
  font-family: var(--font-family-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Right Side Panel & Skills Category Card */
.skills-panel-container {
  position: relative;
  z-index: 10;
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.skills-category-card {
  max-width: 540px;
  width: 100%;
  pointer-events: auto;
  background: rgba(18, 18, 20, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateX(40px);
  will-change: opacity, transform;
}

.skills-card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skills-eyebrow-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skills-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
}

.skills-step-pill {
  font-family: var(--font-family-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(41, 151, 255, 0.12);
  color: var(--color-primary-dark);
  border: 1px solid rgba(41, 151, 255, 0.25);
}

.skills-headline {
  font-family: var(--font-family-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

/* Primary Language Badge */
.skills-primary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.2) 0%, rgba(0, 102, 204, 0.1) 100%);
  border: 1px solid rgba(41, 151, 255, 0.35);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}

.primary-star {
  color: #ffbd2e;
}

/* Skills Tags Cloud */
.skills-tags-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 10px;
  margin-top: 6px;
  min-height: 100px;
}

.skill-tag-pill {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.skill-tag-pill:hover {
  background: rgba(41, 151, 255, 0.2);
  border-color: rgba(41, 151, 255, 0.4);
  color: #ffffff;
  transform: translateY(-2px);
}

.skill-tag-pill.tag-primary {
  background: rgba(41, 151, 255, 0.15);
  border-color: rgba(41, 151, 255, 0.35);
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* Indicator Dots */
.skills-cat-dots {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.cat-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--color-primary-dark);
  box-shadow: 0 0 10px rgba(41, 151, 255, 0.6);
}

/* Outro Curtain */
.skills-outro-curtain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 25;
  background: #000000;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

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

.global-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.global-nav.nav-dark {
  background: rgba(10, 10, 12, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-container {
  max-width: var(--container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--color-ink);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 102, 204, 0.08);
  color: var(--color-primary);
  border: 1px solid rgba(0, 102, 204, 0.15);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #34c759;
  box-shadow: 0 0 8px #34c759;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-ink-muted);
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-ink);
}

.nav-dark .nav-link {
  color: rgba(255, 255, 255, 0.7);
}

.nav-dark .nav-link:hover, .nav-dark .nav-link.active {
  color: #ffffff;
}

.cta-button-nav {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.cta-button-nav:hover {
  background-color: var(--color-primary-hover);
  transform: scale(1.03);
}

/* ==========================================================================
   Hero Scrollytelling Pinned Section (#hero-pin-section)
   ========================================================================== */

.hero-pin-wrapper {
  position: relative;
  width: 100%;
  height: 100vh; /* Exactly viewport height to avoid gaps */
  background-color: #ffffff;
}

.hero-sticky-viewport {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Hero Background Layer */
.hero-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  background-color: #ffffff;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center; /* Person starts on the right side */
  transform-origin: 12% 50%; /* Zoom origin set towards the clean left side */
  will-change: transform, opacity;
  transition: filter 0.3s ease;
}

/* Digital Grid / Ambient Glow overlay on left canvas */
.hero-ambient-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 20% 50%, rgba(0, 102, 204, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  will-change: opacity, transform;
}

.digital-circuit-pattern {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%) scale(0.9);
  width: 500px;
  height: 500px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,102,204,0.08) 0%, rgba(0,102,204,0) 70%);
  border: 1px dashed rgba(0, 102, 204, 0.2);
  will-change: opacity, transform;
}

/* Hero Content Layer */
.hero-content-container {
  position: relative;
  z-index: 10;
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  pointer-events: none; /* Let scroll pass seamlessly */
}

.hero-story-card {
  max-width: 620px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hero Tagline Badge */
.hero-tagline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  width: fit-content;
  opacity: 0;
  transform: translateY(20px);
}

.hero-tagline-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-ink);
  text-transform: uppercase;
}

.hero-tagline-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-primary);
}

/* Hero Title */
.hero-title {
  font-family: var(--font-family-display);
  font-size: clamp(38px, 4.8vw, 62px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.035em;
  color: var(--color-ink);
  opacity: 0;
  transform: translateY(30px);
}

.hero-title-gradient {
  background: linear-gradient(135deg, #1d1d1f 0%, #0066cc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero Description Paragraphs */
.hero-body-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-paragraph {
  font-size: clamp(17px, 1.35vw, 21px);
  font-weight: 400;
  line-height: 1.48;
  color: #1d1d1f;
  letter-spacing: -0.015em;
  opacity: 0;
  transform: translateY(30px);
}

.hero-paragraph strong {
  font-weight: 600;
  color: var(--color-primary);
}

/* Scroll Hint / Indicator */
.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  opacity: 0;
  transform: translateY(15px);
}

.mouse-icon {
  width: 20px;
  height: 30px;
  border: 2px solid var(--color-primary);
  border-radius: 12px;
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.mouse-wheel {
  width: 3px;
  height: 6px;
  background-color: var(--color-primary);
  border-radius: 2px;
  animation: mouseWheel 1.6s infinite ease-in-out;
}

@keyframes mouseWheel {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(10px); }
}

/* Zoom Transition Curtain Overlay */
.hero-curtain-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  background: radial-gradient(circle at 15% 50%, rgba(10, 10, 12, 0.96) 0%, rgba(0, 0, 0, 1) 100%);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* ==========================================================================
   Section 2: Engineering The Future Overview (#engineering-future)
   ========================================================================== */

.section-dark-canvas {
  position: relative;
  z-index: 20;
  background-color: #000000;
  color: #ffffff;
  padding: 120px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  max-width: 800px;
  margin-bottom: 72px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary-dark);
  margin-bottom: 14px;
}

.section-headline {
  font-family: var(--font-family-display);
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 20px;
}

.section-lead-paragraph {
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

/* 4-Pillar Grid Cards */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}

.pillar-card {
  background: var(--color-surface-dark-1);
  border: 1px solid var(--color-surface-dark-3);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  transition: transform 0.3s var(--ease-apple), border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pillar-card:hover {
  transform: translateY(-6px);
  border-color: rgba(41, 151, 255, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 102, 204, 0.15);
}

.pillar-number {
  font-family: var(--font-family-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 24px;
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(41, 151, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-dark);
  margin-bottom: 20px;
}

.pillar-title {
  font-family: var(--font-family-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #ffffff;
  margin-bottom: 12px;
}

.pillar-desc {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.pillar-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Section 3: Apple Bento Grid Projects (#featured-works)
   ========================================================================== */

.section-parchment-canvas {
  position: relative;
  z-index: 20;
  background-color: var(--color-canvas-parchment);
  color: var(--color-ink);
  padding: 120px 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.bento-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s var(--ease-apple), box-shadow 0.3s ease;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.bento-span-8 { grid-column: span 8; }
.bento-span-4 { grid-column: span 4; }
.bento-span-6 { grid-column: span 6; }
.bento-span-12 { grid-column: span 12; }

.bento-badge {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.bento-title {
  font-family: var(--font-family-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin-bottom: 12px;
}

.bento-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-ink-muted);
  margin-bottom: 20px;
}

.bento-graphic-box {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1d1d1f 0%, #0066cc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-family-mono);
  font-size: 13px;
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   Section 4: Interactive Hardware & Code Lab (#interactive-lab)
   ========================================================================== */

.lab-terminal-card {
  background: #111113;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.terminal-header {
  height: 40px;
  background: #1c1c1e;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.terminal-title {
  font-family: var(--font-family-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-family-mono);
  font-size: 14px;
  line-height: 1.6;
  color: #a9b7c6;
  overflow-x: auto;
}

.code-keyword { color: #cc7832; font-weight: bold; }
.code-fn { color: #ffbf67; }
.code-string { color: #6a8759; }
.code-comment { color: #808080; font-style: italic; }
.code-num { color: #6897bb; }

/* ==========================================================================
   Footer & Contact Modal (#contact-footer)
   ========================================================================== */

.footer-section {
  background-color: var(--color-canvas-dark);
  color: #ffffff;
  padding: 80px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}

.footer-headline {
  font-family: var(--font-family-display);
  font-size: clamp(32px, 3.8vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.footer-cta-btn {
  padding: 16px 36px;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary-dark);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(41, 151, 255, 0.3);
  transition: transform 0.3s var(--ease-apple), box-shadow 0.3s ease;
}

.footer-cta-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(41, 151, 255, 0.5);
}

.footer-legal {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   Section 4: Projects Scrollytelling Pinned Section (#projects-section)
   ========================================================================== */

.projects-pin-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  background-color: #0d0d0e; /* Deep Apple Dark */
  color: #ffffff;
}

.projects-sticky-viewport {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Intro Title Screen */
.projects-intro-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
  padding: 0 24px;
  z-index: 10;
}

.projects-eyebrow-huge {
  font-family: var(--font-family-display);
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #ffffff;
  margin: 0 0 16px 0;
  opacity: 0;
}

.projects-headline-huge {
  font-family: var(--font-family-display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  opacity: 0;
}

/* Split Layout */
.projects-split-layout {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  opacity: 0;
  z-index: 5;
}

/* Left Column (Image) */
.projects-left-column {
  width: 50%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 40px;
}
.projects-left-column > * {
  grid-area: 1 / 1;
}

.projects-image-container {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 4/5;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.9);
}

.projects-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iphone-mockup {
  width: 320px;
  height: 650px;
  background-color: #000;
  border: 14px solid #1a1a1c;
  border-radius: 48px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 0 2px #333;
  opacity: 0;
  transform: scale(0.9);
}

.iphone-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 30px;
  background-color: #1a1a1c;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  z-index: 10;
}

.iphone-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Right Column (Info) */
.projects-right-column {
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 80px 40px 40px;
}

.project-info-block {
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(40px);
  position: absolute; /* They will fade in/out in place */
  max-width: 500px;
}

.project-tag-pill {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(41, 151, 255, 0.15);
  border: 1px solid rgba(41, 151, 255, 0.3);
  border-radius: 100px;
  color: var(--color-primary-light);
  font-family: var(--font-family-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.project-title {
  font-family: var(--font-family-display);
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 24px;
}

.project-subtitle {
  font-family: var(--font-family-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 20px;
}

.project-desc {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.project-tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tech-badge {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 500;
}

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

@media (max-width: 1024px) {
  .bento-span-8, .bento-span-4, .bento-span-6 {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Hide top links on mobile, keep CTA */
  }

  .hero-story-card {
    max-width: 100%;
    padding: 0 8px;
  }

  .hero-bg-image {
    object-position: 80% center;
    transform-origin: 20% 50%;
  }

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

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

.github-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.github-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* ==========================================================================
   Section 7: Contact Modal Overlay
   ========================================================================== */

.contact-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-apple);
}

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

.contact-modal-card {
  position: relative;
  width: 90%;
  max-width: 460px;
  background: rgba(30, 30, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.4s var(--ease-apple);
  color: #fff;
}

.contact-modal-overlay.active .contact-modal-card {
  transform: translateY(0) scale(1);
}

.contact-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease;
}

.contact-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.contact-modal-title {
  font-family: var(--font-family-display);
  font-size: 32px;
  font-weight: 600;
  margin: 16px 0 8px;
  letter-spacing: -0.02em;
}

.contact-modal-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 32px;
}

.contact-modal-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: transform 0.3s var(--ease-apple), filter 0.3s ease;
}

.contact-option-btn:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.whatsapp-btn {
  background-color: #25D366; /* WhatsApp Green */
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.email-btn {
  background-color: var(--color-primary-dark);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(41, 151, 255, 0.3);
}

/* ==========================================================================
   Mobile Responsiveness Overrides
   ========================================================================== */

@media (max-width: 768px) {
  /* Global Adjustments */
  h1 { font-size: 3rem; }
  h2 { font-size: 2.2rem; }
  .section-headline { font-size: 2.5rem; }
  
  /* Hero Section */
  .hero-story-card {
    max-width: 100%;
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  }
  .hero-metrics {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  .metric-item {
    padding: 0 20px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
  }
  .metric-item:last-child {
    border-bottom: none;
  }
  
  /* Skills Panel */
  .skills-panel-container {
    justify-content: center;
    padding: 0 16px;
    margin-top: 15vh; /* Push down to avoid covering center hologram completely */
  }
  .skills-category-card {
    padding: 24px 20px;
  }
  .palm-hologram {
    display: none !important;
  }

  /* Projects Scrollytelling - Stack layout, split 45/55 */
  .projects-split-layout {
    flex-direction: column;
  }
  .projects-left-column {
    width: 100%;
    height: 45vh;
    padding: 24px 16px;
    padding-top: 100px; /* Leave space for nav */
    align-items: flex-start;
  }
  .projects-right-column {
    width: 100%;
    height: 55vh;
    padding: 16px;
    justify-content: center;
  }
  .projects-image-container {
    height: 100%;
    width: auto;
    aspect-ratio: auto;
  }
  .project-info-block {
    padding-right: 0;
    text-align: center;
  }
  .project-stats {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  
  /* System Lab / Footer */
  .footer-bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-span-4, .bento-span-8, .bento-span-6 {
    grid-column: span 1;
  }
  .bento-status-indicator {
    bottom: -10px;
    right: -10px;
  }
  
  /* Mobile mockups */
  .iphone-mockup {
    width: 220px;
    height: 447px;
    border-width: 10px;
  }
}
