/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.nav.scrolled {
  border-color: var(--border);
  background: rgba(248, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-inner {
  width: min(90%, var(--max-w));
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  transition: color 0.15s;
}
.nav-logo:hover { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s;
  position: relative;
  padding-bottom: 2px;
}
.nav-link:hover { color: var(--text); }
.nav-link.active {
  color: var(--text);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* theme toggle */
.theme-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--muted);
  padding: 0 0 2px;
  transition: color 0.15s;
  font-family: inherit;
}
.theme-btn:hover {
  color: var(--text);
}

/* hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   DROPDOWN NAV
   ============================================================ */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > .nav-link {
  cursor: default;
  display: inline-flex;
  align-items: center;
}
.dropdown-arrow {
  font-size: 0.6rem;
  margin-left: 3px;
  transition: transform 0.2s ease;
}
.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0;
  min-width: 130px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  box-shadow: var(--shadow);
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
}
.dropdown-menu li {
  width: 100%;
}
.dropdown-menu .nav-link {
  display: block;
  padding: 0.35rem 1.1rem;
  white-space: nowrap;
  border-radius: 0;
}
.dropdown-menu .nav-link:hover {
  color: var(--text);
  background: var(--bg);
}

/* ============================================================
   HERO (index.html only)
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 24px 5rem;
  width: min(90%, var(--max-w));
  margin: 0 auto;
}
.hero::before {
  content: '';
  position: absolute;
  width: min(500px, 50vw);
  height: min(500px, 50vw);
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.035;
  top: -200px;
  right: -200px;
  z-index: -1;
  animation: hero-float 8s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  width: min(200px, 25vw);
  height: min(200px, 25vw);
  border: 2px solid var(--accent);
  opacity: 0.06;
  border-radius: 0;
  transform: rotate(45deg);
  bottom: 60px;
  left: -80px;
  z-index: -1;
}
[data-theme="dark"] .hero::before {
  opacity: 0.07;
}
[data-theme="dark"] .hero::after {
  opacity: 0.12;
}
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-name {
  font-family: var(--font-display-title);
  font-weight: 800;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}
.hero-name .accent { color: var(--accent); }
.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--muted);
  margin-bottom: 1.75rem;
  min-height: 1.8em;
}
.hero-role::before {
  content: '// ';
  color: var(--border);
  user-select: none;
}
.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.hero-bio {
  max-width: min(500px, 90%);
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}
.hero-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hero-ctas-sub {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.hero-ctas-sub .btn {
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
  border-width: 1px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 2.75rem;
}

/* ============================================================
   PROJECT CARDS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}
/* colored top border using the language color */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-color, var(--border));
  border-radius: var(--radius) var(--radius) 0 0;
}
.card[data-color="python"] { --card-color: var(--c-python); }
.card[data-color="rust"] { --card-color: var(--c-rust); }
.card[data-color="csharp"] { --card-color: var(--c-csharp); }
.card[data-color="elk"] { --card-color: var(--c-elk); }
.card[data-color="web"] { --card-color: var(--c-web); }
.card[data-color="gcp"] { --card-color: var(--c-gcp); }
.card[data-color="vercel"] { --card-color: var(--c-vercel); }
.card[data-color="itch"] { --card-color: var(--c-itch); }
.card[data-color="thm"] { --card-color: var(--c-thm); }
.card[data-color="other"] { --card-color: var(--c-other); }
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.card-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 0.25rem;
}
.card-desc {
  font-size: 0.875rem;
  color: var(--muted);
  flex: 1;
  line-height: 1.55;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.card-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  white-space: nowrap;
}
.card-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
  transition: gap 0.15s ease;
}
.card-link:hover { gap: 0.45rem; }
/* FILTER BAR */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.5rem 0.9rem;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.filter-btn:hover {
  color: var(--text);
  border-color: var(--text);
}
.filter-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface);
}
.card.hidden {
  display: none;
}

.card-more {
  margin-top: 2.25rem;
  text-align: center;
}

/* Active/touch press states for mobile feedback */
.card:active, .btn:active, .contact-card:active, .pill:active {
  transform: scale(0.97);
}

/* ============================================================
   PROFILE CARDS (profiles.html) — extends .card
   ============================================================ */
.profile-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.profile-badge-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ============================================================
   BADGE GALLERY (cloud.html)
   ============================================================ */
#badgeList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.badge-item {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.badge-item:hover {
  border-color: var(--accent);
}
.badge-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}
.badge-date {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}
.badge-count {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1.5rem;
}

/* ============================================================
   PAGE HEADER (sub-pages)
   ============================================================ */
.page-header {
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.page-header-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: min(480px, 90%);
  margin-top: 0.75rem;
  line-height: 1.65;
}
.page-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
}
.page-header-text {
  flex: 1;
}

/* ============================================================
   VISITOR INFO (cyber page) — floating top-right widget
   ============================================================ */
.visitor-info {
  position: fixed;
  top: calc(var(--nav-h) + 0.75rem);
  right: 1.25rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  transition: border-color 0.3s, background 0.3s, opacity 0.55s ease, transform 0.55s ease;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}
.visitor-info.vi-ready {
  border-color: var(--accent);
  background: rgba(14, 165, 233, 0.06);
}
.vi-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
}
.vi-icon {
  color: var(--accent);
  font-size: 0.45rem;
  flex-shrink: 0;
}
.vi-icon-placeholder {
  width: 0.45rem;
  flex-shrink: 0;
}
.vi-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.6rem;
  min-width: 3.6rem;
  flex-shrink: 0;
}
.vi-val {
  color: var(--text);
  font-weight: 600;
}
.vi-loc,
.vi-org {
  font-weight: 400;
  color: var(--muted);
}
.vi-error { color: var(--accent); }

.vi-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.vi-toggle {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.15rem 0.3rem;
  margin-left: auto;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
  flex-shrink: 0;
}
.vi-toggle:hover {
  opacity: 1;
  color: var(--accent);
}
.vi-collapsed .vi-toggle {
  opacity: 0.7;
}
.vi-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* opt-in state */
.visitor-info.vi-optin {
  border-color: var(--border);
  background: var(--surface);
  cursor: default;
}
.vi-optin-hint {
  margin-top: 0.15rem;
}
.vi-optin-text {
  font-size: 0.6rem;
  color: var(--muted);
  line-height: 1.3;
  opacity: 0.7;
}
.vi-reveal-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.15rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.5;
  transition: background 0.15s;
  margin-left: auto;
  flex-shrink: 0;
}
.vi-reveal-btn:hover {
  background: var(--accent-hover);
}

/* ============================================================
   NODE INFO PANEL (cyber page)
   ============================================================ */
.node-info {
  position: fixed;
  z-index: 89;
  padding: 0.4rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, border-color 0.3s;
}
.node-info.ni-flip-x {
  transform: translateX(-100%);
}
.node-info.ni-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  border-color: var(--accent);
}
.ni-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.ni-icon {
  color: var(--accent);
  font-size: 0.4rem;
  flex-shrink: 0;
}
.ni-id {
  color: var(--text);
  font-weight: 700;
  font-size: 0.7rem;
}
.ni-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  margin-left: auto;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}
.ni-close:hover {
  opacity: 1;
  color: var(--accent);
}
.ni-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.ni-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
}
.ni-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.6rem;
  min-width: 2.8rem;
  flex-shrink: 0;
}
.ni-val {
  font-weight: 600;
  color: var(--text);
}
.ni-val.status-up { color: #22C55E; }
.ni-val.status-down { color: #EF4444; }

/* ============================================================
   PAGE-SPECIFIC ACCENT OVERRIDES
   ============================================================ */
[data-page="cloud"] { --accent: #4285F4; --accent-hover: #3367D6; }
[data-page="cyber"] { --accent: #0EA5E9; --accent-hover: #0284C7; }
[data-page="ml"]    { --accent: #22C55E; --accent-hover: #16A34A; }

/* ============================================================
   UTILITY CLASSES (replaces inline style="" attributes)
   ============================================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: 1.5rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 2rem; }
.section--no-pt { padding-top: 0; }
.hero--centered { align-items: center; text-align: center; }
.hero-bio-404 { max-width: 600px; text-align: center; }
.hero-title-404 { font-family: var(--font-display); font-size: clamp(5rem, 15vw, 10rem); }
.hero-role-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); align-self: center; }

/* ============================================================
   3D BACKGROUND (cyber page)
   ============================================================ */
.page-header.has-bg {
  position: relative;
  overflow: hidden;
  min-height: clamp(300px, 50vh, 500px);
  display: flex;
  align-items: center;
  background: var(--bg);
}
.page-header.has-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, transparent 50%, var(--bg) 100%);
  pointer-events: none;
}
.bg-3d {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.bg-3d canvas {
  display: block;
}
.page-header.has-bg .container {
  position: relative;
  z-index: 2;
}

/* ML page: text left, network right */
[data-page="ml"] .page-header.has-bg {
  justify-content: flex-start;
}
[data-page="ml"] .page-header.has-bg .container {
  width: 40%;
  max-width: none;
  margin: 0;
  padding: 0 0 0 5%;
}
[data-page="ml"] .bg-3d {
  left: 30%;
  top: 0;
  right: 0;
  bottom: 0;
}

/* Cyber page: text left, globe right */
[data-page="cyber"] .page-header.has-bg {
  justify-content: flex-start;
  min-height: clamp(350px, 55vh, 500px);
}
[data-page="cyber"] .page-header.has-bg .container {
  width: 30%;
  max-width: none;
  margin: 0;
  padding: 0 0 0 5%;
}
[data-page="cyber"] .bg-3d {
  left: 30%;
  top: 0;
  right: 0;
  bottom: 0;
}

/* ============================================================
   3D BACKGROUND FULL-PAGE (ML page)
   ============================================================ */
.bg-3d-full {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
[data-page="ml"] .bg-3d-full {
  overflow: hidden;
}
[data-page="ml"] main,
[data-page="cloud"] main {
  position: relative;
  z-index: 1;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-photo-wrapper {
  flex-shrink: 0;
}
.about-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}
.skills-group {
  margin-bottom: 2rem;
}
.skills-group:last-child { margin-bottom: 0; }
.skills-group-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.65rem;
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pill {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  transition: border-color 0.15s;
}
.pill:hover { border-color: var(--accent); }

.bio-para {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.bio-para:last-of-type { margin-bottom: 0; }
.bio-para strong {
  color: var(--text);
  font-weight: 600;
}

.currently-box {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.currently-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.currently-text {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-wrapper {
  max-width: min(620px, 92%);
  padding: 5rem 0;
}
.contact-intro {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
  margin-top: 0.75rem;
}
.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.75rem;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.contact-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.contact-card-platform {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.contact-card-handle {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.contact-card-cta {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ============================================================
   CUSTOM CURSORS
   ============================================================ */

/* Cyber: red crosshair with two concentric circles */
[data-page="cyber"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='14' fill='none' stroke='%23EF4444' stroke-width='1' opacity='0.3'/%3E%3Ccircle cx='16' cy='16' r='9' fill='none' stroke='%23EF4444' stroke-width='1.5' opacity='0.5'/%3E%3Cline x1='16' y1='5' x2='16' y2='27' stroke='%23EF4444' stroke-width='2'/%3E%3Cline x1='5' y1='16' x2='27' y2='16' stroke='%23EF4444' stroke-width='2'/%3E%3C/svg%3E") 16 16, auto;
}

/* ML: neural node with connections */
[data-page="ml"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='12' fill='none' stroke='%23E04D20' stroke-width='1' opacity='0.3'/%3E%3Cline x1='16' y1='16' x2='8' y2='8' stroke='%23E04D20' stroke-width='0.8' opacity='0.35'/%3E%3Cline x1='16' y1='16' x2='24' y2='8' stroke='%23E04D20' stroke-width='0.8' opacity='0.35'/%3E%3Cline x1='16' y1='16' x2='8' y2='24' stroke='%23E04D20' stroke-width='0.8' opacity='0.35'/%3E%3Cline x1='16' y1='16' x2='24' y2='24' stroke='%23E04D20' stroke-width='0.8' opacity='0.35'/%3E%3Ccircle cx='8' cy='8' r='2.5' fill='%23E04D20' opacity='0.5'/%3E%3Ccircle cx='24' cy='8' r='2.5' fill='%23E04D20' opacity='0.5'/%3E%3Ccircle cx='8' cy='24' r='2.5' fill='%23E04D20' opacity='0.5'/%3E%3Ccircle cx='24' cy='24' r='2.5' fill='%23E04D20' opacity='0.5'/%3E%3Ccircle cx='16' cy='16' r='4' fill='%23E04D20'/%3E%3C/svg%3E") 16 16, auto;
}

/* Hide default cursor on generic pages (JS adds class) */
body.custom-cursor-active {
  cursor: none !important;
}
body.custom-cursor-active a,
body.custom-cursor-active button,
body.custom-cursor-active input,
body.custom-cursor-active select,
body.custom-cursor-active textarea,
body.custom-cursor-active [role="button"],
body.custom-cursor-active [tabindex]:not([tabindex="-1"]) {
  cursor: pointer !important;
}

/* ============================================================
   FOCUS INDICATORS
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Dot + Ring cursor (generic pages) */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
}
.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  opacity: 0.6;
  transition: width 0.25s, height 0.25s, opacity 0.25s;
}
.cursor-ring--hover {
  width: 52px;
  height: 52px;
  opacity: 1;
}

/* ============================================================
   NEURAL NETWORK TOOLTIP (ML page)
   ============================================================ */
.nn-tooltip {
  position: fixed;
  z-index: 999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
}
.nn-tooltip.visible {
  opacity: 1;
}
.nn-tooltip .tt-layer {
  color: #22D3EE;
  font-weight: 700;
  font-size: 14px;
}
.nn-tooltip .tt-neuron {
  color: #94A3B8;
}
.nn-tooltip .tt-conns {
  color: #22D3EE;
  font-size: 12px;
  margin-top: 2px;
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
  body.custom-cursor-active,
  body.custom-cursor-active * {
    cursor: auto !important;
  }
}

/* ============================================================
   SKELETON LOADING — shows while Three.js / fonts load
   ============================================================ */
.bg-3d::before,
.bg-3d-full::before,
#cloud-globe::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, transparent 25%, rgba(128,128,128,0.04) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s ease-in-out infinite;
}
.bg-3d-full::before {
  z-index: 0;
}
.bg-3d.loaded::before,
.bg-3d-full.loaded::before,
#cloud-globe.loaded::before {
  animation: none;
  opacity: 0;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
