/* Single dark theme — the whole site lives on navy. */
:root {
  --bg: #0a192f;
  --surface: #112240;
  --text: #ccd6f6;
  --muted: #8892b0;
  --border: #233554;
  --accent: #64ffda;
  --accent-soft: #12303c;
  --accent-text: #0a192f;
  --shadow: 0 4px 16px rgb(0 0 0 / 0.4);
  --radius: 10px;
  --max: 720px;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --cat-finance: #38d9a9;
  --cat-games: #da77f2;
  --cat-geoscience: #ffa94d;
  --cat-dashboards: #4dabf7;
}

/* Per-category accent, shared by filter tabs and card badges. */
[data-cat] {
  --cat: var(--muted);
}
[data-cat="Finance"] {
  --cat: var(--cat-finance);
}
[data-cat="Games"] {
  --cat: var(--cat-games);
}
[data-cat="Geoscience"] {
  --cat: var(--cat-geoscience);
}
[data-cat="Dashboards"] {
  --cat: var(--cat-dashboards);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(ellipse at 50% 110%, #12304f 0%, transparent 55%), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Page-wide animated seismic background (see bg-waves.js). */
.bg-waves {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  padding: 0.75rem clamp(1rem, 5vw, 2rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.brand {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}
.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Layout */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

/* Hero — full-bleed, transparent over the page-wide wave field. */
.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  place-items: center;
  padding: 4rem clamp(1rem, 5vw, 2rem) 3.5rem;
  text-align: center;
}
.hero-inner {
  position: relative;
}
.eyebrow {
  color: #64ffda;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #e6f1ff;
  font-size: clamp(2.2rem, 7vw, 4rem);
  margin: 0 0 1rem;
  line-height: 1.1;
}
.tagline {
  font-size: 1.02rem;
  color: #8892b0;
  max-width: 48ch;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

/* Hero menu — one line per category, its apps beneath, GitHub/Email below. */
.hero-menu {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin: 0 0 2.25rem;
}
.menu-cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
}
.menu-cat::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--cat, var(--accent));
}
.menu-cat:hover {
  color: var(--accent);
  text-decoration: none;
}
.menu-apps {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.menu-app {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}
.menu-app:hover {
  color: var(--accent);
  text-decoration: none;
}
.menu-empty {
  color: #4a5878;
  font-size: 0.85rem;
  font-style: italic;
}

.scroll-hint {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #64ffda;
  font-size: 1.3rem;
  line-height: 1;
}
.scroll-hint:hover {
  text-decoration: none;
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-hint {
    animation: bob 2.2s ease-in-out infinite;
  }
  @keyframes bob {
    0%,
    100% {
      transform: translate(-50%, 0);
    }
    50% {
      transform: translate(-50%, 7px);
    }
  }
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.4;
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
}

/* Sections */
main {
  counter-reset: section;
}
.section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 4.5rem;
}
.section h2 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}
.section h2::before {
  counter-increment: section;
  content: "0" counter(section);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.6rem;
  vertical-align: 0.14rem;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.section-head h2 {
  margin: 0;
}
.count {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.section-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.4rem 0 1.25rem;
}

/* Category nav (header) */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}
.tab {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.tab[data-cat]:not([data-cat="All"])::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  margin-right: 0.45rem;
  background: var(--cat);
  vertical-align: 0.05rem;
}
.tab:hover {
  color: var(--text);
  border-color: var(--cat, var(--accent));
  text-decoration: none;
}
.tab.is-active {
  color: var(--accent-text);
  background: var(--cat, var(--accent));
  border-color: var(--cat, var(--accent));
}
.tab.is-active::before {
  background: var(--accent-text);
}
.tab[data-cat="All"].is-active {
  background: var(--accent);
  border-color: var(--accent);
}

/* Skills */
.skill-groups {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.skill-group h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.chips li {
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.22rem 0.6rem;
}

/* Cards */
.cards {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.cards:hover .card:not(:hover) {
  opacity: 0.7;
}
.card {
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.15s ease, opacity 0.15s
    ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.card-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cat, var(--accent));
  margin-bottom: 0.45rem;
}
.card-cat::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
}
.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  line-height: 1.35;
}
.card p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 0.9rem;
  flex: 1;
}

.tags {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tags li {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
}

.card-actions {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}
.card-link {
  font-weight: 600;
  font-size: 0.85rem;
}
.card-link:not(.card-link-muted)::after {
  content: "→";
  display: inline-block;
  margin-left: 0.3em;
  transition: transform 0.15s ease;
}
.card:hover .card-link:not(.card-link-muted)::after {
  transform: translateX(3px);
}
.card-link-muted {
  color: var(--muted);
}
.card-link-muted:hover {
  color: var(--accent);
}

.empty-state {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.9rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1rem;
  text-align: center;
}

.links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.copy-email {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}
.copy-email:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: 1.5rem auto 0;
  padding: 1.5rem clamp(1rem, 5vw, 2rem) 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}
.site-footer p {
  margin: 0;
}
