/* =========================
   1. RESET
   ========================= */

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

html,
body {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  display: block;
}

button,
a {
  font: inherit;
  text-decoration: none;
  color: inherit;
}

/* =========================
   2. ROOT VARIABLES
   ========================= */

:root {
  /* Layout */
  --max-width: 1200px;
  --section-padding: 6rem;

  /* Pixel portfolio palette */
  --bg: #0b1220;          /* deep navy */
  --bg-2: #08101c;        /* darker navy */
  --text: #e9eef7;        /* soft off-white */
  --muted: #b7c2d6;       /* calm gray-blue */
  --outline: #2a3550;     /* muted outline */
  --shadow: #050812;      /* deep shadow */

  --amber: #ffb35c;       /* warm desk light */
  --amber-2: #ffcc85;     /* highlight amber */
  --blue-glow: #5aa7ff;   /* subtle cool accent (sparingly) */
}

/* =========================
   3. GLOBAL
   ========================= */

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

/* =========================
   4. SKIP LINK (ACCESSIBILITY)
   ========================= */

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 999;
}

/* =========================
   5. HEADER + NAV
   ========================= */

.site-header {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 50;
}

.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 2rem;

  display: flex;
  justify-content: flex-end;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--muted);
}

.nav-link:hover {
  color: var(--text);
  text-decoration: underline;
}

/* =========================
   6. HERO STRUCTURE
   ========================= */

.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
}

.hero-stack {
  position: relative;
  width: 100%;
  height: 100vh;
}

/* Shared layer base */
.hero-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Base scene image layer */
.hero-layer--scene {
  z-index: 1;
}

.hero-scene {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  image-rendering: pixelated;
}

/* Glow overlay */
.hero-layer--glow {
  z-index: 2;
  pointer-events: none;
}

/* Particles overlay */
.hero-layer--particles {
  z-index: 3;
  pointer-events: none;
}

.particles-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Content layer */
.hero-layer--content {
  z-index: 4;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-text {
  max-width: 500px;
}

.hero-title {
  font-size: 2.5rem;
  margin: 0 0 1rem 0;
}

.hero-subtitle {
  font-size: 1.1rem;
  margin: 0 0 1.5rem 0;
  color: var(--muted);
}

.hero-lines {
  margin: 0 0 2rem 0;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin: 0 0 1.5rem 0;
}

.hero-links {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

.hero-right {
  flex: 1;
}

/* =========================
   7. GENERIC SECTIONS
   ========================= */

.section {
  padding: var(--section-padding) 2rem;
}

.section-header {
  max-width: 800px;
  margin: 0 auto 3rem auto;
  text-align: center;
}

.section-header h2 {
  margin: 0 0 1rem 0;
  font-size: 2rem;
}

.section-header p {
  margin: 0 auto;
  max-width: 60ch;
  color: var(--muted);
}

/* =========================
   8. JOURNEY + HIGHLIGHTS LAYOUT
   ========================= */

.journey-list,
.highlights-grid {
  max-width: 1000px;
  margin: 0 auto;

  display: grid;
  gap: 2rem;
}

/* Optional: Journey card layout (thumbnail left, content right) */
.journey-card-inner {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 720px) {
  .journey-card-inner {
    grid-template-columns: 1fr;
  }
}

/* Readable typography inside cards (no visual styling here) */
.journey-card h3,
.highlight-card h3 {
  margin: 0 0 0.75rem 0;
  line-height: 1.25;
}

.journey-dates {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.journey-blurb {
  margin: 0.75rem 0 1rem 0;
  color: var(--text);
}

.journey-highlights {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
}

/* =========================
   Journey Progress (section-only)
   ========================= */

.section--journey {
  position: relative;
}

/* Main Journey layout:
   left column = progress bar
   right column = cards */
.section--journey .journey-wrap {
  max-width: 1000px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 720px) {
  .section--journey .journey-wrap {
    grid-template-columns: 1fr;
  }
}

/* Sticky progress bar (lives in its own grid column, never creates vertical gap) */
.journey-progress {
  position: sticky;
  top: 110px;
  height: calc(100vh - 140px);

  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms ease, transform 220ms ease;

  pointer-events: none;
}

.journey-progress.is-active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .journey-progress {
    display: none;
  }
}

.journey-progress-track {
  width: 10px;
  height: 100%;
  border-radius: 0;
  position: relative;
}

.journey-progress-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0%;
}

/* =========================
   9. SKILLS LAYOUT
   ========================= */

.skills-grid {
  max-width: 1000px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 720px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

.skill-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
}

.skills-cta {
  max-width: 1000px;
  margin: 2rem auto 0 auto;

  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* =========================
   10. CONTACT
   ========================= */

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* =========================
   11. FOOTER
   ========================= */

.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

/* =========================
   12. SCROLL REVEAL (CALM)
   ========================= */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

/* =========================
   13. PROJECTS
   ========================= */

.projects-grid {
  max-width: 1000px;
  margin: 0 auto;

  display: grid;
  gap: 2rem;
}

.project-dates {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.project-desc {
  margin: 0.75rem 0 1rem 0;
}

.project-highlights {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.project-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  align-items: center;
}

.project-why {
  margin: 0.6rem 0 0 0;
  color: var(--muted);
  font-style: italic;
  max-width: 70ch;
}

/* Projects inner spacing + readability */
.project-header h3 {
  margin: 0 0 0.5rem 0;
  line-height: 1.25;
}

.project-desc {
  margin: 0.75rem 0 0.75rem 0;
}

.project-highlights li {
  color: var(--muted);
}

/* Project card layout: thumbnail left, content right */
.project-card-inner {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 720px) {
  .project-card-inner {
    grid-template-columns: 1fr;
  }
}