/* ── TOKENS ── */
:root {
  --phoenix:      #C8721A;
  --phoenix-light:#E8924A;
  --phoenix-glow: #F0A855;
  --dark:         #121212;
  --surface:      #1C1C1C;
  --surface2:     #242424;
  --border:       #2E2E2E;
  --text:         #E8E0D8;
  --text-muted:   #8A8078;
  --sidebar-w:    280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--dark);
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
#sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  overflow-y: auto;
}

.profile-block {
  padding: 40px 28px 28px;
  border-bottom: 1px solid var(--border);
}

.avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--surface2);
  border: 3px solid var(--phoenix);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin-bottom: 16px;
  overflow: hidden;
}

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

.profile-block h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
}

.profile-block .tagline {
  font-size: 0.78rem;
  color: var(--phoenix-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.socials {
  display: flex; gap: 10px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.18s;
}

.socials a svg { width: 16px; height: 16px; fill: currentColor; }

.socials a:hover {
  background: var(--phoenix);
  border-color: var(--phoenix);
  color: #fff;
}

nav { padding: 20px 0; flex: 1; }
nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 28px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  user-select: none;
}
nav a:hover { color: var(--text); background: var(--surface2); }
nav a.active { color: var(--phoenix-light); }

nav a .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.15s;
}
nav a.active .dot, nav a:hover .dot { background: var(--phoenix); }

/* ── MAIN ── */
main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 60px 64px;
  max-width: calc(100vw - var(--sidebar-w));
}

.section {
  display: none;
  animation: fadeIn 0.25s ease;
}
.section.active { display: block; }

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

.section-head {
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.section-head .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phoenix);
  font-weight: 600;
  margin-bottom: 8px;
}
.section-head h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--text);
  line-height: 1.1;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.about-bio p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.about-bio p strong { color: var(--text); }

.about-meta { display: flex; flex-direction: column; gap: 14px; }
.meta-row {
  display: flex; flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.meta-row .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--phoenix);
  font-weight: 600;
}
.meta-row .value { font-size: 0.9rem; color: var(--text); }
.meta-row a { color: var(--phoenix-light); text-decoration: none; }
.meta-row a:hover { text-decoration: underline; }

/* ── RESUME ── */
.resume-block { margin-bottom: 48px; }
.resume-block h3 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phoenix);
  font-weight: 600;
  margin-bottom: 24px;
}

.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0 28px;
  position: relative;
  padding-bottom: 32px;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-year {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 4px;
  text-align: right;
}

.tl-body {
  border-left: 2px solid var(--border);
  padding-left: 24px;
  position: relative;
}
.tl-body::before {
  content: '';
  position: absolute;
  left: -5px; top: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--phoenix);
  border: 2px solid var(--dark);
}

.tl-body h4 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.tl-body .where { font-size: 0.82rem; color: var(--phoenix-light); margin-bottom: 8px; }
.tl-body p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; }

/* skills */
.skills-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.15s;
}
.skill-tag:hover { border-color: var(--phoenix); color: var(--phoenix-light); }

/* ── PROJECT GALLERY ── */
.project-gallery { display: flex; flex-direction: column; gap: 48px; }

.project-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.category-header {
  padding: 16px 24px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.category-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--phoenix-light);
}
.category-header .badge {
  background: var(--phoenix);
  color: #fff;
  border-radius: 20px;
  padding: 2px 12px;
  font-size: 0.7rem;
  font-weight: 600;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  padding: 16px 20px;
}

.project-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  transition: border-color 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
}
.project-card:hover { border-color: var(--phoenix); transform: translateY(-2px); }
.project-card .tag {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--phoenix);
  font-weight: 600;
}
.project-card h4 { font-size: 0.9rem; font-weight: 600; color: var(--text); line-height: 1.2; }
.project-card p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
.project-card .project-links { display: flex; gap: 12px; margin-top: 6px; }
.project-card .project-links a { font-size: 0.7rem; color: var(--phoenix-light); text-decoration: none; font-weight: 500; }
.project-card .project-links a:hover { text-decoration: underline; }

/* ── HUB (Gallery + Projects) ── */
.hub-grid { display: flex; flex-direction: column; gap: 16px; }
.hub-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.hub-card:hover { border-color: var(--phoenix); transform: translateX(4px); }
.hub-thumb {
  font-size: 2rem;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2);
  border-radius: 8px;
  flex-shrink: 0;
}
.hub-info { flex: 1; }
.hub-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.hub-desc { font-size: 0.83rem; color: var(--text-muted); }
.hub-arrow { font-size: 1.1rem; color: var(--phoenix); flex-shrink: 0; }

/* ── STANDALONE SUB-PAGES (status pages, galleries) ── */
.subpage-body {
  display: block;
  margin-left: 0;
  padding: 48px 64px;
  max-width: 100%;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 28px;
}
.back-link:hover { color: var(--phoenix-light); }

.subpage-intro {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 720px;
}

/* filter tabs */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.filter-tab {
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.filter-tab:hover { border-color: var(--phoenix); color: var(--phoenix-light); }
.filter-tab.active {
  background: var(--phoenix);
  border-color: var(--phoenix);
  color: #fff;
}

.subpage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.project-card.hidden { display: none; }

/* --- Additional styles for roadmap enhancements --- */

/* Status Badges */
.badge-complete {
  background: #1a3a1a;
  color: #8fbc8f;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  margin-left: 4px;
}
.badge-progress {
  background: #3a2a0a;
  color: #d4b87a;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  margin-left: 4px;
}
.badge-hold {
  background: #0a1a3a;
  color: #7a9fd4;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  margin-left: 4px;
}
.badge-planned {
  background: #1a1a24;
  color: #7a7a94;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  margin-left: 4px;
}

/* Phase Cards */
.phase-card {
  background: rgba(255, 255, 255, 0.015);
  border-left: 3px solid var(--text-muted);
  padding: 0.5rem 1.5rem 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 6px 6px 0;
  transition: border-color 0.3s ease;
}
.phase-card.complete {
  border-left-color: #2d7a3a;
}
.phase-card.hold {
  border-left-color: #2a4a7a;
}
.phase-card.planned {
  border-left-color: #3a3a44;
}
.phase-card.progress {
  border-left-color: #b8860b;
}

/* Status Compass */
.compass {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto auto;
  gap: 4px 16px;
  justify-items: center;
  align-items: center;
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.015);
  border-radius: 12px;
  margin: 1.5rem 0 2rem 0;
  font-size: 0.8rem;
  letter-spacing: 1px;
}
.compass-axis {
  opacity: 0.3;
  font-weight: 300;
}
.compass-axis.active {
  opacity: 1;
  font-weight: 600;
  color: var(--phoenix-light);
}
.compass-dot {
  grid-column: 2;
  grid-row: 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--phoenix-light);
  box-shadow: 0 0 24px rgba(230, 184, 126, 0.25);
}
.compass-label {
  grid-column: 1 / -1;
  grid-row: 3;
  font-size: 0.75rem;
  opacity: 0.5;
  margin-top: 6px;
  letter-spacing: 2px;
}

/* Dependency Arrow */
.dep-arrow {
  text-align: center;
  opacity: 0.15;
  font-size: 1rem;
  margin: -0.5rem 0 0.2rem 0;
  letter-spacing: 6px;
  color: var(--text-muted);
}

/* Side Thread (marginalia) */
.side-thread {
  margin: 2rem 0 2rem 2rem;
  padding: 1rem 1.5rem;
  border-left: 2px dashed rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.side-thread h2,
.side-thread h3 {
  opacity: 0.7;
}
.side-thread h2:first-child {
  margin-top: 0;
}

/* Pulse glow */
.pulse {
  border-left: 3px solid var(--phoenix-light);
  box-shadow: -8px 0 40px rgba(230, 184, 126, 0.04);
}

/* Last updated */
.last-updated {
  margin-top: 40px;
  font-size: 0.65rem;
  opacity: 0.25;
  text-align: center;      
  letter-spacing: 2px;
  font-weight: 300;  
}

/* Responsive tweaks */
@media (max-width: 700px) {
  .side-thread {
    margin-left: 0.5rem;
    padding: 0.75rem 1rem;
  }
  .compass {
    font-size: 0.65rem;
    gap: 2px 8px;
    padding: 16px;
  }
  .phase-card {
    padding: 0.25rem 0.75rem 0.75rem 0.75rem;
  }
}


/* ── ARTICLE / WRITE-UP PAGES ── */
.article-body { max-width: 100%; }
.article-body .eyebrow { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--phoenix); font-weight: 600; margin-bottom: 8px; }
.article-body h1 { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--text); line-height: 1.2; margin-bottom: 6px; }
.article-body .subtitle { color: var(--text-muted); font-size: 1rem; margin-bottom: 28px; }
.article-body h2 { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--phoenix-light); margin: 40px 0 14px; }
.article-body h3 { font-size: 1.05rem; color: var(--text); margin: 28px 0 10px; }
.article-body p { font-size: 0.92rem; line-height: 1.75; color: var(--text-muted); margin-bottom: 14px; }
.article-body strong { color: var(--text); }
.article-body ul, .article-body ol { margin: 0 0 14px 22px; color: var(--text-muted); font-size: 0.92rem; line-height: 1.75; }

.abstract-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--phoenix);
  border-radius: 6px;
  padding: 18px 22px;
  margin-bottom: 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.abstract-box .kw { margin-top: 10px; font-size: 0.78rem; color: var(--text-muted); }
.abstract-box .kw strong { color: var(--phoenix-light); }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 0.85rem;
}
.article-body th, .article-body td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.article-body th { background: var(--surface2); color: var(--phoenix-light); font-weight: 600; }
.article-body td { color: var(--text-muted); }

.article-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.article-body code { font-family: 'Courier New', monospace; color: var(--text); }

.diagram-box {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
}
.diagram-col {
  flex: 1;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.diagram-col .diagram-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--phoenix);
  font-weight: 600;
  margin-bottom: 10px;
}
.diagram-col ul { margin: 0; padding-left: 18px; font-size: 0.82rem; color: var(--text-muted); line-height: 1.7; }

.glossary dt { color: var(--phoenix-light); font-weight: 600; font-size: 0.88rem; margin-top: 12px; }
.glossary dd { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; margin-left: 0; margin-bottom: 6px; }

.photo-placeholder {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 16px 0 24px;
}

.deep-dive-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--phoenix-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}
.deep-dive-link:hover { border-color: var(--phoenix); }

.article-body img.site-photo {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 16px 0 24px;
  display: block;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 16px 0 24px;
}
.photo-grid img.site-photo {
  margin: 0;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.subpage-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.subpage-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}
.subpage-nav a:hover { border-color: var(--phoenix); color: var(--phoenix-light); }
.subpage-nav a.current {
  background: var(--phoenix);
  border-color: var(--phoenix);
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.photo-card {
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.photo-card:hover { transform: translateY(-3px); border-color: var(--phoenix); }

.photo-card .thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--border);
  position: relative;
}
.photo-card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.photo-card:hover .thumb img { transform: scale(1.04); }
.photo-card .thumb img:not(:first-child) { display: none; }

.photo-card .caption { padding: 12px 14px; }
.photo-card .caption .place { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.photo-card .caption .date { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

#lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 90vw; max-height: 80vh; border-radius: 8px; object-fit: contain; }
#lightbox-caption { color: var(--text-muted); font-size: 0.88rem; text-align: center; }
#lightbox-close {
  position: absolute; top: 20px; right: 28px;
  font-size: 1.8rem; color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  transition: color 0.15s;
}
#lightbox-close:hover { color: var(--text); }

.lb-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.4rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.lb-nav:hover { border-color: var(--phoenix); color: var(--phoenix-light); }
#lb-prev { left: 20px; }
#lb-next { right: 20px; }

@media (max-width: 600px) { .lb-nav { display: none; } }

/* ── MOBILE ── */
#menu-toggle {
  display: none;
  position: fixed; top: 16px; left: 16px;
  z-index: 200;
  background: var(--phoenix);
  border: none; border-radius: 6px;
  color: #fff; font-size: 1.2rem;
  padding: 8px 12px; cursor: pointer;
}

@media (max-width: 768px) {
  #menu-toggle { display: block; }
  #sidebar { transform: translateX(-100%); transition: transform 0.25s; }
  #sidebar.open { transform: translateX(0); }
  main { margin-left: 0; padding: 72px 20px 40px; max-width: 100vw; }
  .about-grid { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 70px 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .subpage-body { padding: 72px 20px 40px; }
}
