/**
 * SHARED CSS — COMMON STYLES FOR INDEX.HTML AND ALL DETAIL-*.HTML PAGES
 * Neural grid, animations, layout utilities, and responsive breakpoints
 */

/* ═════════════════════════════════════════════════════════════════════ */
/* GLOBAL RESET & BASE */
/* ═════════════════════════════════════════════════════════════════════ */

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

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: auto;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-dm, 'DM Sans', system-ui, sans-serif);
  overflow-x: hidden;
}

/* ═════════════════════════════════════════════════════════════════════ */
/* NEURAL GRID BACKGROUND — FIXED POSITION LAYERED */
/* ═════════════════════════════════════════════════════════════════════ */

.neural-grid-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.neural-grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.neural-grid-cursor-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.neural-grid-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

/* ── Star animation ── */
.star {
  position: absolute;
  border-radius: 50%;
  animation: twinkle 3s infinite ease-in-out;
  will-change: transform;
}

@keyframes twinkle {
  0%, 100% {
    opacity: var(--star-opacity, 0.6);
  }
  50% {
    opacity: calc(var(--star-opacity, 0.6) * 0.3);
  }
}

/* ═════════════════════════════════════════════════════════════════════ */
/* STATS DISPLAY — HIDDEN */
/* ═════════════════════════════════════════════════════════════════════ */

.stats {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  color: #d1d5db;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  z-index: 100;
  display: none;
}

.stat-item {
  margin: 0.5rem 0;
}

.stat-label {
  color: #a78bfa;
}

/* ═════════════════════════════════════════════════════════════════════ */
/* PAGE PRELOADER — LOADING BAR */
/* ═════════════════════════════════════════════════════════════════════ */

#page-preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 9999;
  pointer-events: none;
  background: transparent;
}

.preloader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--theme-color-primary, #fff) 0%, var(--theme-color-secondary, #fff) 100%);
  box-shadow: 0 0 20px var(--theme-color-primary, #fff);
  transition: width 0.3s ease;
}

#page-preloader.hidden {
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

/* ═════════════════════════════════════════════════════════════════════ */
/* COMMON ANIMATIONS */
/* ═════════════════════════════════════════════════════════════════════ */

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes border-spin {
  to { --angle: 360deg; }
}

@keyframes glowBreathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .08; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: .28; }
}

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

/* ═════════════════════════════════════════════════════════════════════ */
/* BACK BUTTON — DETAIL PAGES */
/* ═════════════════════════════════════════════════════════════════════ */

.back-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 200;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-dm);
  cursor: pointer;
  transition: color .25s ease;
}

.back-btn:hover {
  color: #fff;
}

/* Override fixed position when back-btn is inside nav */
.nav-icons .back-btn,
.detail-nav-unified .back-btn,
.nav-pane-right .back-btn {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  background: transparent;
  border: none;
  padding: 0;
  width: 48px;
  height: 48px;
  border-radius: 70px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background .3s ease, color .3s ease, transform .2s ease;
  flex-shrink: 0;
}

.nav-icons .back-btn:hover,
.detail-nav-unified .back-btn:hover,
.nav-pane-right .back-btn:hover {
  background: rgba(255, 255, 255, .12);
  color: var(--theme-color);
  transform: translateY(2px);
}

/* Alias class for back button in nav context */
.detail-back-btn {
  position: static;
  background: transparent;
  border: none;
  padding: 0;
  width: 48px;
  height: 48px;
  border-radius: 70px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background .3s ease, color .3s ease, transform .2s ease;
  flex-shrink: 0;
}

.detail-back-btn:hover {
  background: rgba(255, 255, 255, .12);
  color: var(--theme-color);
  transform: translateY(2px);
}

/* ═════════════════════════════════════════════════════════════════════ */
/* DETAIL NAVIGATION — TWO PANE LAYOUT */
/* ═════════════════════════════════════════════════════════════════════ */

/* Navigation container — holds both panes */
.detail-nav-container {
  position: sticky;
  top: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 40px;
  margin-left: 24px;
  width: fit-content;
}

/* Left pane — logo and links */
.nav-pane-left {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 24px;
  background: rgba(24, 24, 24, .4);
  backdrop-filter: blur(10px);
}

/* Right pane — icon buttons */
.nav-pane-right {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 24px;
  background: rgba(24, 24, 24, .4);
  backdrop-filter: blur(10px);
}

/* Unified Navigation pane — logo, links, and icons all in one */
.detail-nav-unified {
  position: sticky;
  top: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 8px 24px;
  margin-top: 24px;
  margin-bottom: 40px;
  margin-left: 24px;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 24px;
  background: rgba(24, 24, 24, .4);
  backdrop-filter: blur(10px);
  width: fit-content;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.nav-logo {
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  transition: color .3s ease, transform .2s ease;
  white-space: nowrap;
  display: inline-block;
}

.nav-logo:hover {
  color: var(--theme-color);
  transform: translateY(2px);
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .3s ease, transform .2s ease;
  white-space: nowrap;
  display: inline-block;
}

.nav-link:hover {
  color: var(--theme-color);
  transform: translateY(2px);
}

/* Navigation icons container */
.nav-icons {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}

/* Detail navigation buttons — transparent bg, only colored on hover */
.detail-nav-btn {
  width: 48px;
  height: 48px;
  background: transparent !important;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-dm);
  border-radius: 70px;
  cursor: pointer;
  transition: background .3s ease, color .3s ease, transform .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  flex-shrink: 0;
}

.detail-nav-btn:hover {
  background: rgba(255, 255, 255, .12);
  color: var(--theme-color);
  transform: translateY(2px);
}

.detail-nav-btn:hover svg {
  color: var(--theme-color);
}

.detail-nav-btn:hover svg path,
.detail-nav-btn:hover svg line,
.detail-nav-btn:hover svg polyline {
  stroke: var(--theme-color);
}

.detail-nav-btn svg {
  color: var(--text-muted);
  transition: color .3s ease;
  width: 14px;
  height: 14px;
}

.detail-nav-btn svg path,
.detail-nav-btn svg line,
.detail-nav-btn svg polyline {
  stroke: currentColor;
  transition: stroke .3s ease;
}

.detail-nav-btn svg path {
  stroke: currentColor;
}

.detail-nav-right .detail-nav-btn.back-btn {
  position: static;
  top: auto;
  left: auto;
}

.detail-nav-btn.home-btn {
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-nav-btn.home-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

.detail-nav-btn .btn-label {
  display: none;
}

/* Tooltips for detail nav buttons */
.detail-nav-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .8);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1000;
}

.detail-nav-btn[data-tooltip]:hover::after {
  opacity: 1;
}

/* ═════════════════════════════════════════════════════════════════════ */
/* GLOW EFFECTS — BREATHING ANIMATIONS */
/* ═════════════════════════════════════════════════════════════════════ */

.page-glow {
  position: fixed;
  width: 1920vw;
  height: 1920vw;
  max-width: 1920px;
  max-height: 1920px;
  border-radius: 10%;
  pointer-events: none;
  z-index: -1;
  left: 50%;
  top: 50%;
  animation: glowBreathe 4s ease-in-out infinite;
}

.page-glow-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 232, 206, .35) 0%, transparent 45%);
  transition: background .6s cubic-bezier(.22, 1, .36, 1);
}

.page-glow.breathe-off {
  animation: none;
  transform: translate(-50%, -50%);
  opacity: .8;
}

@media (max-width: 768px) {
  .page-glow {
    width: 1200px;
    height: 1200px;
    max-width: none;
  }
}

.portfolio-glow {
  position: fixed;
  width: 1920vw;
  height: 1920vw;
  max-width: 1920px;
  max-height: 1920px;
  border-radius: 10%;
  pointer-events: none;
  z-index: -1;
  left: 50%;
  top: 50%;
  animation: glowBreathe 4s ease-in-out infinite;
}

.portfolio-glow.breathe-off {
  animation: none;
  transform: translate(-50%, -50%);
  opacity: .8;
}

.portfolio-glow-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 97, 255, .35) 0%, transparent 45%);
  transition: background .6s cubic-bezier(.22, 1, .36, 1);
}

@media (max-width: 768px) {
  .portfolio-glow {
    width: 1200px;
    height: 1200px;
    max-width: none;
  }
}

/* ═════════════════════════════════════════════════════════════════════ */
/* LAYOUT UTILITIES */
/* ═════════════════════════════════════════════════════════════════════ */

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.page-body {
  display: flex;
  flex-direction: column;
  gap: 120px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 220px 24px 0;
  position: relative;
  z-index: 10;
}

/* General reset for all lists */
ul {
  margin: 1rem 0 0 1rem ;  /* Remove default margin */
  padding: 0; /* Remove default padding */
  list-style: disc; /* Default bullet style */
}

/* Fix the first level */
ul > li {
  margin-bottom: 0.25em; /* Fix excessive bottom margin on the first level */
  padding-left: 1rem; /* Add indent for the first level */
}

/* Nested lists inside the first level (ul inside li) */
ul ul {
  margin: 0 0 0 2em;  /* Indent nested lists */
  padding: 0;     /* Remove any extra padding */
}

/* Nested list items */
ul ul li {
  padding-left: 1em;  /* Additional indent for nested items */
}

/* Deeper nested lists (ul inside ul inside li) */
ul ul ul {
  margin-left: 1.5em;
  padding-left: 0;
}

/* Optional: For a tighter list with no excessive space between items */
ul, li {
  line-height: 2; /* Adjust line height to control spacing between items */
}

/* ═════════════════════════════════════════════════════════════════════ */
/* EXPERIENCE CARD — SHARED STYLING (index + detail) */
/* ═════════════════════════════════════════════════════════════════════ */

.experience-card {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  border: 1px solid var(--border-color, rgba(255, 255, 255, .05));
  backdrop-filter: blur(5px);
  transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
}

.experience-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.experience-card:hover {
  transform: translateY(-4px);
}

.exp-company {
  font-family: var(--font-fig, 'Figtree', system-ui, sans-serif);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-high, #fff);
  margin-bottom: 24px;
}

.exp-grid {
  display: flex;
  gap: 16px;
  width: 100%;
}

.exp-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 160px;
  flex-shrink: 0;
}

.exp-meta-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-meta-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-dm);
}

.exp-meta-value {
  font-size: 14px;
  color: var(--text-high, #fff);
  font-family: var(--font-dm);
}

.exp-keypoints {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exp-keypoints-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-dm);
}

.exp-keypoints-text {
  font-size: 14px;
  color: var(--text-high);
  line-height: 1.71;
  font-family: var(--font-dm);
}

.exp-keypoints-text p {
  margin-bottom: 8px;
}

.exp-scope {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exp-scope-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-dm);
}

.exp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 8px 12px;
  border-radius: 70px;
  background: rgba(255, 255, 255, .07);
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-dm);
  white-space: nowrap;
  transition: background .3s ease, color .3s ease, transform .2s ease;
}

.pill:hover {
  background: rgba(255, 255, 255, .12);
  color: var(--theme-color);
  transform: translateY(2px);
}

/* ═════════════════════════════════════════════════════════════════════ */
/* OVERVIEW SECTION — DETAIL PAGES (meta 1/4 stacked | scope 3/4) */
/* ═════════════════════════════════════════════════════════════════════ */

.overview-grid {
  display: flex;
  gap: 24px;
  width: 100%;
  align-items: flex-start;
}

/* Left column: Year + Type + Role stacked (1/4) */
.overview-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Right column: Scope with pills (3/4) */
.overview-scope {
  flex: 3;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.overview-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.overview-col-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-dm);
}

.overview-col-value {
  font-size: 14px;
  color: var(--theme-color);
  font-family: var(--font-dm);
}

@media (max-width: 600px) {
  .overview-grid { flex-direction: column; gap: 24px; }
  .overview-meta { flex-direction: row; flex-wrap: wrap; gap: 16px; }
}

/* ═════════════════════════════════════════════════════════════════════ */
/* CAROUSEL — ARROW NAVIGATION */
/* ═════════════════════════════════════════════════════════════════════ */

.carousel-fullbleed {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
}

.carousel-track {
  display: flex;
  will-change: transform;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
  padding-left: max(24px, calc((100vw - 1140px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1140px) / 2 + 24px));
  box-sizing: content-box;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.carousel-track.dragging {
  cursor: grabbing;
  transition: none;
}

.carousel-arrows {
  display: flex;
  gap: 16px;
  align-items: center;
}

.arrow-btn {
  width: 48px;
  height: 48px;
  border-radius: 140px;
  background: rgba(255, 255, 255, .15);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, opacity .2s ease;
  flex-shrink: 0;
}

.arrow-btn:hover {
  background: rgba(255, 255, 255, .22);
}

.arrow-btn:disabled {
  opacity: .35;
  cursor: default;
}

.arrow-btn svg {
  display: block;
  pointer-events: none;
}

/* ═════════════════════════════════════════════════════════════════════ */
/* IMAGE HEIGHT MODES — FLEXIBLE CAROUSEL SIZING */
/* ═════════════════════════════════════════════════════════════════════ */

/* Fixed height mode: all images same size (default) */
.carousel-img-fixed {
  height: auto;
  aspect-ratio: 1.5;
}

.carousel-img-fixed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Full height mode: images maintain natural aspect ratio */
.carousel-img-full {
  height: auto;
  width: auto;
  min-width: 100%;
}

.carousel-img-full img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ═════════════════════════════════════════════════════════════════════ */
/* RESPONSIVE — MOBILE BREAKPOINTS */
/* ═════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .page-body {
    padding: 100px 16px 0;
    gap: 64px;
  }

  .exp-grid {
    flex-direction: column;
    gap: 24px;
  }

  .exp-meta {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
  }

  .exp-scope {
    width: 100%;
  }

  .carousel-arrows {
    display: none;
  }
}

/* ═════════════════════════════════════════════════════════════════════ */
/* TIMELINE/HISTORY CARDS */
/* ═════════════════════════════════════════════════════════════════════ */

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 0px;
  margin-top:16px;
}

.timeline-card {
  display: flex;
  align-items: center;
  gap: 0px;
  padding: 20px 0;
  background: transparent;
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-dm);
  transition: background .3s ease, border-color .3s ease;
}

.timeline-card:hover {
  background: var(--card-bg);
  border-color: rgba(255, 255, 255, .1);
}

.timeline-years {
  font-weight: 500;
  color: var(--text-high);
  white-space: nowrap;
  min-width: 100px;
}

.timeline-content {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
}

.timeline-divider {
  color: var(--text-muted);
  font-weight: 300;
}

.timeline-company {
  font-weight: 500;
  color: var(--text-primary);
}

.timeline-description {
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .detail-nav-unified {
    position: fixed;
    top: auto;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    padding: 12px;
  }

  .nav-logo {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .nav-icons {
    gap: 12px;
  }

  .detail-nav-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    font-size: 20px;
  }

  .detail-nav-btn svg {
    width: 20px;
    height: 20px;
  }

  .detail-nav-btn .btn-label {
    display: none;
  }

  .stats {
    font-size: 0.75rem;
    padding: 0.75rem;
    bottom: 10px;
    right: 10px;
  }

  .timeline-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    font-size: 13px;
  }

  .timeline-years {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .back-btn {
    font-size: 11px;
  }
}


p  { margin: 0 0 16px 0 }


