/* --- Core Design System: Algorithmic Precision (Scroll Edition) --- */

:root {
  --c-void: #0B0C10;
  --c-surface: #14151A;
  --c-signal: #FF4F00;
  --c-data: #F5F5F5;
  --c-noise: #333740;
  --c-focus: #DAFF00;
  --c-dim: #888;
  
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', monospace;

  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  margin: 0;
  background-color: var(--c-void);
  color: var(--c-data);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  /* Crucial for scroll triggers */
  overflow-x: hidden;
  overflow-y: auto; 
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}
.font-mono { font-family: var(--font-mono); }

/* --- 3D Canvas --- */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

/* --- Header --- */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 64px;
  border-bottom: 1px solid rgba(51, 55, 64, 0.5);
  background-color: rgba(11, 12, 16, 0.7);
  backdrop-filter: blur(8px);
}

.logo-area { display: flex; align-items: center; gap: 1rem; }
.logo-symbol {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  color: var(--c-signal); border: 1px solid var(--c-signal); padding: 0.2rem 0.5rem;
}
.logo-text h1 { font-size: 1.1rem; }
.logo-text .subtitle { font-family: var(--font-mono); font-size: 0.65rem; color: var(--c-dim); letter-spacing: 0.08em; }

.header-controls { display: flex; align-items: center; gap: 1.5rem; }
.stat-item { display: flex; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.75rem; }
.stat-lbl { color: var(--c-dim); }
.stat-val { color: var(--c-signal); font-weight: 600; min-width: 30px; text-align: right;}

.ctrl-btn {
  background: none; border: 1px solid var(--c-noise); color: var(--c-data);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition-fast);
}
.ctrl-btn:hover { border-color: var(--c-focus); color: var(--c-focus); }
.ctrl-btn svg { width: 16px; height: 16px; }

/* Scroll Hint */
.scroll-instruction {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  opacity: 0.8;
  animation: pulseHint 2s infinite;
}
.scroll-instruction p {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--c-signal); letter-spacing: 0.1em;
}
@keyframes pulseHint {
  0% { opacity: 0.4; transform: translate(-50%, 0); }
  50% { opacity: 1; transform: translate(-50%, 5px); }
  100% { opacity: 0.4; transform: translate(-50%, 0); }
}

/* --- Scroll Container --- */
#scroll-container {
  position: relative;
  z-index: 10;
  width: 100%;
}

.scroll-section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 80px 10% 80px 10%; /* Header offset */
  pointer-events: none; /* Let canvas get clicks where empty */
}

/* Alternate sides for visual rhythm */
.scroll-section:nth-child(even) { justify-content: flex-end; }
.scroll-section:first-child { min-height: 120vh; justify-content: center; }

/* Panel Styling */
.content-panel {
  width: 100%;
  max-width: 500px;
  border: 1px solid var(--c-noise);
  background-color: rgba(11, 12, 16, 0.8);
  backdrop-filter: blur(12px);
  pointer-events: auto; /* Re-enable clicks inside panel */
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transform: translateY(30px);
  opacity: 0; /* Animated by GSAP */
}

.panel-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--c-noise);
  display: flex; flex-direction: column; gap: 0.35rem;
}
.section-indicator { font-family: var(--font-mono); font-size: 0.7rem; color: var(--c-signal); }
.panel-title { font-size: 1.75rem; letter-spacing: 0.08em; }

.panel-body-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Content specific */
.content-highlight {
  font-size: 1rem; line-height: 1.5; color: var(--c-signal);
  border-left: 2px solid var(--c-signal); padding-left: 0.75rem; margin-bottom: 0.25rem;
}
.content-paragraph { font-size: 0.9rem; line-height: 1.65; color: #999; }

.specs-table { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; }
.spec-row { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(51, 55, 64, 0.5); padding-bottom: 0.3rem; }
.spec-row-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--c-dim); }
.spec-row-value { font-family: var(--font-mono); font-size: 0.7rem; color: var(--c-focus); }

.skills-grid { display: flex; flex-direction: column; gap: 1.25rem; }
.skill-category h4 { font-size: 0.8rem; color: var(--c-data); margin-bottom: 0.6rem; border-bottom: 1px solid rgba(51, 55, 64, 0.5); padding-bottom: 0.2rem; }
.skill-items { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skill-tag {
  font-family: var(--font-mono); font-size: 0.7rem; padding: 0.2rem 0.5rem;
  border: 1px solid var(--c-noise); background-color: rgba(20, 21, 26, 0.8); color: var(--c-data);
}

.timeline { display: flex; flex-direction: column; gap: 1.5rem; border-left: 1px solid var(--c-noise); padding-left: 1.25rem; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.5rem; top: 0.3rem; width: 7px; height: 7px; background-color: var(--c-signal);
}
.timeline-date { font-family: var(--font-mono); font-size: 0.7rem; color: var(--c-signal); margin-bottom: 0.2rem; }
.timeline-role { font-family: var(--font-display); font-size: 1rem; color: var(--c-data); margin-bottom: 0.15rem; }
.timeline-company { font-size: 0.8rem; color: var(--c-dim); margin-bottom: 0.5rem; }
.timeline-desc { font-size: 0.8rem; line-height: 1.5; color: #999; }

.projects-grid { display: flex; flex-direction: column; gap: 1rem; }
.project-card {
  border: 1px solid var(--c-noise); padding: 1.25rem; background-color: rgba(20, 21, 26, 0.6);
}
.project-card h3 { color: var(--c-signal); font-size: 0.95rem; margin-bottom: 0.4rem; display: flex; align-items: center; }
.project-card h3 a { margin-left: 0.5rem; color: var(--c-dim); }
.project-card p { font-size: 0.85rem; line-height: 1.5; color: #999; margin-bottom: 0.75rem; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tech span { font-family: var(--font-mono); font-size: 0.65rem; color: var(--c-focus); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 0.75rem; }
.form-field { display: flex; flex-direction: column; gap: 0.2rem; }
.form-field label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--c-dim); }
.form-field input, .form-field textarea {
  background: var(--c-void); border: 1px solid var(--c-noise); color: var(--c-data);
  padding: 0.65rem; font-family: var(--font-body); font-size: 0.85rem; outline: none;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--c-signal); }
.form-field textarea { min-height: 80px; resize: vertical; }
.form-submit-btn {
  background: var(--c-surface); border: 1px solid var(--c-noise); color: var(--c-signal);
  padding: 0.65rem; font-family: var(--font-mono); cursor: pointer;
}

.social-links { display: flex; gap: 1rem; border-top: 1px solid var(--c-noise); padding-top: 1rem; margin-top: 1rem;}
.social-links a { color: var(--c-dim); display: flex; align-items: center; gap: 0.4rem; text-decoration: none; font-family: var(--font-mono); font-size: 0.7rem; }

/* Responsive */
@media (max-width: 768px) {
  .logo-text .subtitle { display: none; }
  .hud-stat-grid { display: none !important; }
  .scroll-section { justify-content: center !important; padding: 80px 1rem !important; }
}
