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


html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar nav ──────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0 0 24px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 2px 0 12px rgba(0,0,0,0.06);
}

#sidebar .brand {
  padding: 28px 20px 20px;
  border-bottom: 1px solid var(--border);
}
#sidebar .brand h1 {
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#sidebar .brand p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

#sidebar nav { padding: 16px 10px; }

#sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
#sidebar nav a:hover,
#sidebar nav a.active {
  background: var(--surface2);
  color: var(--text);
}
#sidebar nav a.active {
  color: var(--accent);
  font-weight: 600;
}
#sidebar nav a .icon { font-size: 1rem; width: 20px; text-align: center; }

/* ── Main content ─────────────────────────────────────── */
#main {
  margin-left: var(--nav-w);
  flex: 1;
  padding: 48px 40px;
  max-width: 1100px;
}

/* ── Hero ─────────────────────────────────────────────── */
#hero {
  padding: 3.5rem 0 3.5rem;
  margin-bottom: 4rem;
  text-align: center;
  background:
    radial-gradient(ellipse 110% 70% at 50% -5%, rgba(90,61,232,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(0,153,204,0.06) 0%, transparent 60%);
  border-radius: var(--radius);
}

.hero-badge {
  display: inline-block;
  background: rgba(90,61,232,0.10);
  border: 1px solid rgba(90,61,232,0.25);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

#hero h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.2rem;
}

#hero p {
  max-width: 580px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* ── Section ──────────────────────────────────────────── */
.section {
  margin-bottom: 72px;
  scroll-margin-top: 24px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.section-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-top: 3px;
}
.section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}
.section-header p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 680px;
}

/* ── Chart pills ──────────────────────────────────────── */
.chart-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.tag .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.tag .dot.purple { background: var(--accent2); }
.tag .dot.green  { background: #2e9e6b; }
.tag .dot.orange { background: #d97706; }

/* ── Photo grid ───────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.photo-card {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(58,114,232,0.15);
}
.photo-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.photo-card .caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  padding: 20px 8px 8px;
  font-size: 0.72rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s;
}
.photo-card:hover .caption { opacity: 1; }

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  padding: 32px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.empty-state code {
  display: block;
  margin-top: 8px;
  font-family: "SF Mono", monospace;
  font-size: 0.8rem;
  color: var(--accent);
}

/* ── About section ────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-card--accent {
  border-color: var(--accent);
  box-shadow: 0 2px 16px rgba(58,114,232,0.1);
}

.about-card--brand {
  background: linear-gradient(135deg, #f0f4ff 0%, #f7f0ff 100%);
  border-color: var(--accent2);
}

.about-card__icon {
  font-size: 1.8rem;
  line-height: 1;
}

.about-card__logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.about-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.about-card p strong {
  color: var(--text);
  font-weight: 600;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  align-items: start;
}

.tech-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}

.tech-card h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.tech-table th,
.tech-table td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
}

.tech-table th {
  background: var(--surface2);
  color: var(--text);
  font-weight: 700;
}

.stack-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 1rem 0 0.75rem;
  justify-content: center;
}

.stack-step {
  flex: 1 1 130px;
  min-width: 130px;
  padding: 16px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
  color: var(--text);
}

.stack-arrow {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.tech-card--full {
  grid-column: 1 / -1;
}

.about-contact {
  margin-top: 4px;
  font-size: 0.85rem !important;
}

.about-contact a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.about-contact a:hover {
  text-decoration: underline;
}

/* ── Lightbox ─────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15,17,30,0.82);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
#lightbox.open { display: flex; }

#lightbox img {
  max-height: 82vh;
  max-width: 90vw;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  object-fit: contain;
}
#lightbox .lb-caption {
  color: #e0e4f0;
  font-size: 0.875rem;
  max-width: 500px;
  text-align: center;
}
#lightbox .lb-close {
  position: fixed;
  top: 20px; right: 24px;
  font-size: 1.8rem;
  color: #aab0c8;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
  transition: color 0.15s;
}
#lightbox .lb-close:hover { color: #ffffff; }
#lightbox .lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ffffff;
  border-radius: 50%;
  width: 42px; height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
#lightbox .lb-nav:hover { background: rgba(255,255,255,0.22); }
#lightbox .lb-prev { left: 16px; }
#lightbox .lb-next { right: 16px; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  body { flex-direction: column; }
  #sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
  #sidebar .brand { flex: 1 0 100%; }
  #sidebar nav { display: flex; flex-wrap: wrap; padding: 8px; flex: 1 0 100%; }
  #sidebar nav a { font-size: 0.78rem; padding: 6px 10px; }
  #main { margin-left: 0; padding: 24px 16px; }
  #hero { padding: 2.5rem 0; }
  #hero h2 { font-size: 1.6rem; }
}
