/* Shared styles for the sub-pages (about, coding, creativity, contact).
   Linked before each page's inline <style>, so pages can override anything here. */

/* ── Design Tokens ── */
:root {
  --bg: #090921;
  --surface: #0f0f2b;
  --surface-raised: #141436;
  --border: #1c1c3e;
  --border-hover: #2d2d58;
  --text: #f8f8fa;
  --text-muted: #9aa0b8;
  --accent: #c8b8ff;
  --accent-dim: rgba(200, 184, 255, 0.08);
  --accent-warm: #e2d9c6;
  --sans: 'Inter', sans-serif;
  --mono: 'Space Mono', monospace;
  --serif: 'Cormorant Garamond', serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0.5rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
/* Clear over the corner moon at the top; a solid bar once the page scrolls (menu.js) */
.nav.scrolled {
  background: rgba(9, 9, 33, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.back {
  font-family: var(--mono); text-decoration: none; color: var(--text-muted);
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em;
  transition: color 0.3s var(--ease-out); display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px;
}
.back:hover { color: var(--text); }
.back-arrow { display: inline-block; transition: transform 0.3s var(--ease-out); }
.back:hover .back-arrow { transform: translateX(-3px); }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-link {
  font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px;
  transition: color 0.3s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--accent); }

/* ── Mobile Menu ── */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 10px 12px; margin-right: -12px; min-width: 44px; min-height: 44px; }
.hamburger span {
  display: block; width: 20px; height: 1.5px; background: var(--text-muted);
  margin: 4px 0; transition: all 0.3s;
}
/* Open state: the three bars fold into a close cross */
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.hamburger[aria-expanded="true"] span { background: var(--text); }
.mobile-menu {
  display: none; position: fixed; inset: 0;
  background: rgba(9, 9, 33, 0.96); backdrop-filter: blur(20px);
  z-index: 99; flex-direction: column; align-items: center;
  justify-content: center; gap: 2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--sans); font-size: 1.5rem; color: var(--text); text-decoration: none;
  opacity: 0.7; transition: opacity 0.3s;
}
.mobile-menu a:hover { opacity: 1; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .nav { padding: 0.35rem 1.5rem; }
}

/* ── Corner moon: echoes the landing page's moon parked on the right edge.
   The wrapper clips it so the overhang can't make the page scroll sideways. ── */
.page-moon-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 0;
  height: min(40vw, 600px);
  overflow: hidden;
  pointer-events: none;
}
.page-moon {
  position: absolute;
  top: -12vw;
  right: -11vw;
  width: min(36vw, 560px);
  height: auto;
  opacity: 0.85;
  user-select: none;
}
@media (max-width: 768px) {
  .page-moon-wrap { height: 50vw; }
  .page-moon { top: -24vw; right: -26vw; width: 70vw; opacity: 0.5; }
}

/* ── Resume Button ── */
.resume-btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0.8rem 1.6rem;
  background: var(--accent-dim); border: 1px solid rgba(200, 184, 255, 0.2);
  border-radius: 8px; color: var(--accent); text-decoration: none;
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.1em; transition: all 0.3s var(--ease-out);
}
.resume-btn:hover {
  background: rgba(200, 184, 255, 0.15); border-color: rgba(200, 184, 255, 0.35);
  transform: translateY(-1px);
}
.resume-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); padding: 3rem; text-align: center; }
.footer p {
  font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--text-muted); margin: 0;
}

/* ── Browser surfaces ── */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
::selection { background: var(--accent); color: var(--bg); }

/* CI status badge in the footer: this site runs its own checks on every push */
.ci-badge { display: inline-flex; align-items: center; min-height: 44px; margin-top: 0.75rem; opacity: 0.8; }
.ci-badge:hover { opacity: 1; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
