/*
  OBSIDIAN - portfolio visual refresh
  A quieter, editorial system built around typography, spacing and evidence.
  The Three.js canvas remains untouched behind the interface.
*/
:root {
  color-scheme: dark;
  --primary: #f5f5f4;
  --secondary: #050505;
  --bg-obsidian: #050505;
  --bg-navy: #080808;
  --bg-surface: #0d0d0d;
  --bg-card: rgba(12, 12, 12, 0.94);
  --accent: #d3e3a1;
  --accent-cyan: #d3e3a1;
  --accent-violet: #a3a3a3;
  --accent-emerald: #d3e3a1;
  --accent-light: #f1f5e8;
  --glass-bg: rgba(10, 10, 10, 0.9);
  --glass-bg-hover: #111111;
  --glass-border: rgba(255, 255, 255, 0.11);
  --glass-border-hover: rgba(255, 255, 255, 0.26);
  --border-hud: rgba(255, 255, 255, 0.16);
  --border-subtle: rgba(255, 255, 255, 0.075);
  --text-primary: #f5f5f4;
  --text-secondary: #a1a1aa;
  --text-tertiary: #68686e;
  --gradient-1: linear-gradient(135deg, #f5f5f4 0%, #a1a1aa 100%);
  --gradient-2: linear-gradient(135deg, rgba(255,255,255,.025), rgba(255,255,255,0));
  --gradient-3: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  --shadow-xl: 0 24px 80px rgba(0, 0, 0, .55);
  --shadow-glow: 0 18px 55px rgba(0, 0, 0, .48);
  --surface-0: #050505;
  --surface-1: #090909;
  --surface-2: #101010;
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.18);
  --muted: #8b8b91;
  --content-width: 1180px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: #050505;
}

body,
body.command-center-theme {
  background-color: #050505 !important;
  background-image:
    radial-gradient(ellipse at 50% -18%, rgba(255,255,255,.055), transparent 48%),
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px) !important;
  background-size: auto, 72px 72px, 72px 72px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  cursor: auto !important;
  letter-spacing: -0.012em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::selection,
body *::selection {
  color: #050505;
  background: #d3e3a1;
}

a,
button,
.clickable,
input,
select,
textarea,
.timeline-media-container {
  cursor: pointer !important;
}

input,
select,
textarea {
  cursor: text !important;
}

.cursor,
.cursor-follower {
  display: none !important;
}

/* Preserve the live Three.js background; keep it atmospheric, not dominant. */
#canvas-container {
  opacity: .88;
  filter: none;
  pointer-events: none;
}

#navbar,
nav {
  top: 0;
  padding: 22px 28px;
  background: linear-gradient(180deg, rgba(5,5,5,.92), rgba(5,5,5,.52));
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

nav.scrolled {
  padding: 15px 28px;
  background: rgba(5,5,5,.9);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 35px rgba(0,0,0,.22);
}

.nav-container {
  max-width: var(--content-width);
  gap: 28px;
}

.logo,
.footer-logo {
  color: #f5f5f4 !important;
  background: none !important;
  -webkit-text-fill-color: #f5f5f4 !important;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -.08em !important;
}

.logo {
  font-size: 1.55rem !important;
  position: relative;
}

.logo::after {
  content: '.';
  color: var(--accent);
}

.nav-links {
  align-items: center;
  gap: clamp(16px, 2.1vw, 30px);
  margin: 0;
}

.nav-link,
.nav-links li a.nav-link {
  color: #a1a1aa;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .035em;
  transition: color .22s ease;
}

.nav-link::before,
.nav-links li a.nav-link::before {
  height: 1px;
  background: #f5f5f4;
}

.nav-link:hover,
.nav-link.active,
.nav-links li a.nav-link:hover,
.nav-links li a.nav-link.active {
  color: #fff;
}

.nav-cta,
.nav-cta-btn,
.nav-secondary-btn {
  border-radius: 7px !important;
  box-shadow: none !important;
  font-size: .76rem !important;
  font-weight: 600 !important;
  letter-spacing: .015em;
  padding: 10px 15px !important;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease !important;
}

.nav-cta,
.nav-cta-btn {
  color: #050505 !important;
  background: #f5f5f4 !important;
  border: 1px solid #f5f5f4 !important;
}

.nav-cta:hover,
.nav-cta-btn:hover {
  color: #050505 !important;
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  transform: translateY(-1px);
}

.nav-secondary-btn {
  color: #d4d4d8 !important;
  background: transparent !important;
  border: 1px solid var(--line-strong) !important;
}

.nav-secondary-btn:hover {
  color: #fff !important;
  border-color: rgba(255,255,255,.42) !important;
  background: rgba(255,255,255,.045) !important;
}

.menu-toggle {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: #0c0c0c;
}

.menu-toggle span {
  background: #f5f5f4;
}

/* Hero: editorial hierarchy, one clear focal point. */
.hero {
  min-height: min(900px, 100vh);
  padding: 150px 28px 96px;
  position: relative;
  overflow: clip;
}

.hero::after {
  content: '';
  position: absolute;
  left: max(28px, calc((100% - var(--content-width)) / 2));
  right: max(28px, calc((100% - var(--content-width)) / 2));
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 18%, var(--line-strong) 82%, transparent);
  pointer-events: none;
}

.hero-container {
  max-width: var(--content-width);
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  gap: clamp(48px, 7vw, 100px);
}

.hero-content {
  max-width: 690px;
}

.hero-badge {
  margin-bottom: 30px;
  padding: 0;
  gap: 11px;
  color: #a1a1aa;
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  font-size: .69rem;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.6;
  text-transform: uppercase;
}

.hud-ping-dot,
.hud-dot {
  width: 6px;
  height: 6px;
  background: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(211,227,161,.09) !important;
}

.hero h1,
.hero-headline {
  max-width: 780px;
  margin-bottom: 25px;
  color: #f5f5f4;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3.1rem, 6.2vw, 5.65rem);
  font-weight: 500;
  letter-spacing: -.075em;
  line-height: .99;
  text-wrap: balance;
}

.hero .gradient-text {
  color: #f5f5f4 !important;
  background: none !important;
  -webkit-text-fill-color: #f5f5f4 !important;
}

.hero .subtitle {
  max-width: 610px;
  margin-bottom: 34px;
  color: #a1a1aa;
  font-size: clamp(.98rem, 1.2vw, 1.08rem);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: -.018em;
}

.hero-buttons {
  gap: 10px;
}

.btn {
  min-height: 48px;
  padding: 13px 19px;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .005em;
  gap: 10px;
  transition: transform .22s ease, background .22s ease, border-color .22s ease, color .22s ease;
}

.btn-primary {
  color: #050505;
  background: #f5f5f4;
  border: 1px solid #f5f5f4;
  box-shadow: none;
}

.btn-primary:hover {
  color: #050505;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
  transform: translateY(-2px);
}

.btn-secondary {
  color: #e4e4e7;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line-strong);
  backdrop-filter: none;
  box-shadow: none;
}

.btn-secondary:hover {
  color: #fff;
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.38);
  transform: translateY(-2px);
}

.hero-proof-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 20px;
  margin-top: 38px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.proof-pill {
  padding: 0;
  color: #85858c;
  background: none;
  border: 0;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .025em;
}

.proof-pill i {
  margin-right: 6px;
  color: #d4d4d8 !important;
}

/* The profile panel becomes a quiet technical snapshot, not a glowing HUD. */
.hero-card,
.hud-panel {
  max-width: 470px;
  min-height: 0;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  background: rgba(9,9,9,.86);
  box-shadow: 0 25px 70px rgba(0,0,0,.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-card::before {
  display: none !important;
  content: none !important;
}

.hero-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.24);
  box-shadow: 0 28px 76px rgba(0,0,0,.5);
}

.hud-corner {
  width: 10px;
  height: 10px;
  border-color: rgba(255,255,255,.42);
}

.hud-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.hud-id {
  color: #86868d;
  font-size: .62rem;
  letter-spacing: .13em;
}

.hud-pulse-icon {
  color: #d4d4d8 !important;
  animation: none !important;
}

.hud-status-badge,
.hud-status-badge.status-live {
  color: #c5d3a0;
  background: rgba(211,227,161,.07);
  border: 1px solid rgba(211,227,161,.2);
  border-radius: 4px;
  font-size: .59rem;
  letter-spacing: .08em;
}

.hero-profile-container {
  margin: 20px auto 22px !important;
}

.profile-reticle {
  padding: 2px !important;
  background: #272727 !important;
  box-shadow: none !important;
}

.profile-reticle:hover {
  transform: none;
  box-shadow: 0 0 0 5px rgba(255,255,255,.035) !important;
}

.hero-profile-img {
  width: 104px !important;
  height: 104px !important;
  border: 2px solid #0a0a0a !important;
  filter: saturate(.82);
}

.profile-name {
  color: #f5f5f4;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -.035em;
}

.profile-title {
  margin-top: 4px;
  color: #77777e;
  font-size: .72rem;
  letter-spacing: .025em;
}

.hero-stats {
  gap: 1px;
  padding: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.stat-item,
.hud-stat {
  min-width: 0;
  padding: 16px 10px;
  border: 0;
  border-radius: 0;
  background: #0b0b0b;
  box-shadow: none;
  backdrop-filter: none;
}

.hud-stat:hover {
  background: #111;
  transform: none;
}

.stat-number,
.hud-stat .stat-number {
  color: #f5f5f4;
  background: none;
  -webkit-text-fill-color: #f5f5f4;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 500;
  letter-spacing: -.065em;
}

.stat-label,
.hud-stat .stat-label {
  color: #b5b5bb;
  font-size: .65rem;
  font-weight: 600;
}

.stat-sub,
.hud-stat .stat-sub {
  color: #66666d;
  font-size: .58rem;
}

.hud-terminal-readout {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.terminal-line {
  color: #7e7e85;
  font-size: .62rem;
  line-height: 1.8;
}

.term-prefix,
.term-key {
  color: #b5b5bb;
}

.term-ok {
  color: var(--accent);
}

/* Sections and typography */
main > section:not(.hero) {
  position: relative;
  padding: clamp(76px, 9vw, 124px) 28px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}

main > section:not(.hero) > .section-header,
main > section:not(.hero) > .projects-container,
main > section:not(.hero) > .services-grid,
main > section:not(.hero) > .process-container,
main > section:not(.hero) > .about-grid,
main > section:not(.hero) > .skills-container,
main > section:not(.hero) > .achievements-container,
main > section:not(.hero) > .testimonials-wrapper,
main > section:not(.hero) > .contact-container {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  max-width: var(--content-width);
  margin: 0 auto 42px;
  text-align: left;
}

.section-label {
  margin-bottom: 15px;
  color: #8e8e95;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1.5;
}

.section-title {
  max-width: 760px;
  margin-bottom: 14px;
  color: #f5f5f4;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -.065em;
  line-height: 1.06;
  text-wrap: balance;
}

.section-subtitle {
  max-width: 650px;
  color: #85858c;
  font-size: .93rem;
  line-height: 1.8;
  letter-spacing: -.01em;
}

/* Flagship work: case-study layouts with clear content hierarchy. */
.projects-container {
  width: 100%;
}

.flagship-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.flagship-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #090909;
  box-shadow: none;
  isolation: isolate;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}

.flagship-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(280px,.82fr) minmax(0,1.18fr);
}

.flagship-card:hover {
  border-color: rgba(255,255,255,.27);
  background: #0c0c0c;
  box-shadow: none;
  transform: translateY(-3px);
}

.flagship-media {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  background: #111;
  border-bottom: 1px solid var(--line);
}

.flagship-card:first-child .flagship-media {
  min-height: 100%;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.flagship-img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  filter: saturate(.68) contrast(1.04) brightness(.82);
  transition: filter .45s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}

.flagship-card:hover .flagship-img {
  filter: saturate(.9) contrast(1.04) brightness(.94);
  transform: scale(1.035);
}

.flagship-media-overlay {
  background: linear-gradient(180deg, transparent 56%, rgba(0,0,0,.72));
  padding: 16px;
}

.status-badge {
  padding: 6px 9px;
  color: #e4e4e7;
  background: rgba(5,5,5,.86);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 4px;
  font-size: .61rem;
  font-weight: 600;
  letter-spacing: .04em;
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.status-badge.status-demo,
.status-badge.status-bench,
.status-badge.status-proto,
.status-badge.status-deployed,
.status-badge.status-nasa {
  color: #e4e4e7;
  background: rgba(5,5,5,.86);
  border-color: rgba(255,255,255,.16);
}

.flagship-body {
  padding: 26px;
}

.flagship-category,
.lab-card-category {
  margin-bottom: 11px;
  color: #9a9aa1;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .13em;
  line-height: 1.5;
}

.flagship-title {
  margin-bottom: 12px;
  color: #f5f5f4;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.2;
}

.flagship-description {
  margin-bottom: 22px;
  color: #a1a1aa;
  font-size: .85rem;
  line-height: 1.75;
}

.case-study-details {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0 20px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-field {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.055);
}

.case-field:nth-last-child(-n+2) {
  border-bottom: 0;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: #dedee2 !important;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .045em;
}

.field-label i {
  color: #97979e !important;
}

.field-content {
  color: #85858c;
  font-size: .73rem;
  line-height: 1.65;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0;
}

.tag,
.stack-tag {
  padding: 5px 8px;
  color: #aaaab1;
  background: #101010;
  border: 1px solid rgba(255,255,255,.095);
  border-radius: 4px;
  font-size: .65rem;
  font-weight: 500;
  line-height: 1.35;
}

.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-action-btn,
.project-link,
.lab-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  color: #dedee2;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: .69rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.project-action-btn:hover,
.project-link:hover,
.lab-link:hover {
  color: #fff;
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.38);
  transform: none;
}

.btn-action-github,
.btn-action-demo,
.btn-action-arch,
.lab-link-demo {
  color: #dedee2;
  background: transparent;
  border-color: var(--line-strong);
}

/* Services and process */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
}

.service-card,
.process-card,
.skills-cat-card,
.achievement-card,
.testimonial-card,
.contact-card,
.contact-form {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #090909;
  box-shadow: none;
  backdrop-filter: none;
  isolation: isolate;
  transition: border-color .24s ease, transform .24s ease, background .24s ease;
}

.service-card {
  padding: 26px;
}

.service-card::before,
.testimonial-card::before {
  display: none !important;
  content: none !important;
}

.service-card:hover,
.process-card:hover,
.skills-cat-card:hover,
.achievement-card:hover,
.testimonial-card:hover,
.contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.25);
  background: #0d0d0d;
  box-shadow: none;
}

.service-badge {
  top: 20px;
  right: 20px;
  color: #aeb0a7;
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: .58rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: none;
}

.service-icon,
.process-step-icon,
.skills-cat-icon,
.achievement-icon,
.contact-icon,
.highlight-icon {
  color: #e5e5e5;
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: none;
}

.service-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  font-size: 1.08rem;
}

.service-card:hover .service-icon,
.achievement-card:hover .achievement-icon {
  color: var(--accent);
  background: #151711;
  border-color: rgba(211,227,161,.25);
  transform: none;
}

.service-title,
.process-title,
.skills-cat-title,
.achievement-title,
.contact-title {
  color: #f1f1ef;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.3;
}

.service-desc,
.process-desc,
.achievement-description,
.contact-description {
  color: #929299;
  font-size: .8rem;
  line-height: 1.75;
}

.service-deliverables {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.service-deliverables li {
  color: #a1a1aa;
  font-size: .72rem;
  line-height: 1.65;
}

.service-deliverables li i {
  color: var(--accent);
}

.process-container {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 10px;
}

.process-card {
  padding: 20px;
}

.process-step-num {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  color: #76767d;
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
}

.process-step-num span {
  color: #a1a1aa;
}

.process-step-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: .85rem;
}

.process-title {
  font-size: .98rem;
}

.process-desc {
  font-size: .73rem;
}

.process-card:hover .process-step-num {
  color: var(--accent);
}

/* About and skills */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0,1.08fr) minmax(300px,.92fr);
  gap: clamp(35px,6vw,76px);
  align-items: start;
}

.about-text {
  color: #a1a1aa;
  font-size: .92rem;
  line-height: 1.9;
}

.about-text strong {
  color: #f5f5f4;
  font-weight: 600;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
  margin-top: 28px;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.highlight-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  font-size: .85rem;
}

.highlight-text h4 {
  margin: 1px 0 5px;
  color: #e7e7e9;
  font-size: .78rem;
  font-weight: 600;
}

.highlight-text p {
  margin: 0;
  color: #85858c;
  font-size: .72rem;
  line-height: 1.65;
}

.about-image-container {
  border: 1px solid var(--line);
  border-radius: 9px !important;
  background: #111;
  box-shadow: none;
}

.about-image,
.about-image-slide {
  filter: saturate(.7) brightness(.85);
  transition: filter .4s ease, transform .7s ease;
}

.about-image-container:hover .about-image,
.about-image-container:hover .about-image-slide {
  filter: saturate(.95) brightness(.95);
}

.about-image-overlay {
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.8));
}

.about-quote {
  color: #f5f5f4;
  background: rgba(5,5,5,.88);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: none;
}

.skills-container,
.skills-evidence-grid {
  gap: 14px;
}

.skills-cat-card {
  padding: 22px;
}

.skills-cat-header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.skills-cat-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.skills-cat-title {
  font-size: .96rem;
}

.skills-cat-focus,
.skills-capability-list li {
  color: #929299;
  font-size: .75rem;
  line-height: 1.7;
}

.skills-capability-list li i {
  color: var(--accent);
}

/* Lab: structured archive, not another neon dashboard. */
.lab-controls-panel {
  padding: 15px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090909;
  box-shadow: none;
}

.lab-search-wrapper {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #050505;
}

.lab-search-icon {
  color: #77777e;
}

.lab-search-input {
  color: #f5f5f4;
  background: transparent;
  font-size: .8rem;
}

.lab-search-input::placeholder {
  color: #66666d;
}

.lab-search-input:focus {
  outline: none;
  box-shadow: none;
  border-color: rgba(255,255,255,.35);
}

.lab-count-pill {
  color: #b7b7bd;
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: .63rem;
}

.lab-filters {
  gap: 7px;
  margin-top: 12px;
}

.lab-filter-btn {
  padding: 8px 12px;
  color: #929299;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: .68rem;
  font-weight: 600;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.lab-filter-btn:hover,
.lab-filter-btn.active {
  color: #050505;
  background: #f0f0ed;
  border-color: #f0f0ed;
  box-shadow: none;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
}

.lab-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #090909;
  box-shadow: none;
  isolation: isolate;
  transition: border-color .24s ease, transform .24s ease, background .24s ease;
}

.lab-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.25);
  background: #0d0d0d;
  box-shadow: none;
}

.lab-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
  border-bottom: 1px solid var(--line);
}

.lab-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.7) brightness(.82);
  transition: transform .6s ease, filter .4s ease;
}

.lab-card:hover .lab-card-image img {
  transform: scale(1.035);
  filter: saturate(.92) brightness(.94);
}

.lab-status-badge {
  color: #e4e4e7;
  background: rgba(5,5,5,.88);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 4px;
  box-shadow: none;
  font-size: .59rem;
}

.lab-card-content {
  padding: 20px;
}

.lab-card-title {
  color: #f1f1ef;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .98rem;
  font-weight: 500;
  letter-spacing: -.03em;
}

.lab-card-desc {
  color: #929299;
  font-size: .75rem;
  line-height: 1.7;
}

.lab-card-actions {
  border-top-color: var(--line);
}

.lab-link,
.lab-link-demo {
  color: #d4d4d8;
}

/* Timeline / proof / testimonials */
.timeline::before {
  background: rgba(255,255,255,.13);
}

.timeline-item::before {
  background: #d3e3a1;
  border: 3px solid #090909;
  box-shadow: 0 0 0 1px rgba(211,227,161,.35);
}

.timeline-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090909;
  box-shadow: none;
}

.timeline-date {
  color: #b4b4bb;
  font-size: .68rem;
  letter-spacing: .08em;
}

.timeline-title {
  color: #f1f1ef;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
}

.timeline-subtitle,
.timeline-description {
  color: #929299;
}

.timeline-media-container {
  border: 1px solid var(--line);
  border-radius: 7px;
}

.achievements-container {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
}

.achievement-card {
  padding: 22px;
}

.achievement-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.achievement-date {
  color: #808087;
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem;
}

.achievement-title {
  font-size: .95rem;
}

.achievement-description {
  font-size: .73rem;
}

.testimonials-wrapper {
  margin-top: 28px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}

.testimonial-card {
  padding: 23px;
}

.testimonial-text {
  color: #b4b4bb;
  font-size: .82rem;
  line-height: 1.8;
}

.testimonial-avatar {
  background: #1b1b1b !important;
  color: #f5f5f4;
  border: 1px solid var(--line);
}

/* Contact and footer */
.contact-container {
  display: grid;
  grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr);
  gap: 16px;
  align-items: stretch;
}

.contact-card,
.contact-form {
  height: 100%;
  padding: clamp(22px,3vw,32px);
}

.contact-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.contact-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
}

.contact-text h4 {
  color: #e7e7e9;
  font-size: .76rem;
  font-weight: 600;
}

.contact-text p {
  color: #8b8b92;
  font-size: .76rem;
}

.contact-title {
  font-size: 1.25rem;
}

.contact-description {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #b8b8be;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .035em;
}

.form-group input,
.form-group select,
.form-group textarea,
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  color: #f5f5f4;
  background: #050505;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 5px;
  box-shadow: none;
  font: inherit;
  font-size: .8rem;
  padding: 13px 14px;
  transition: border-color .2s ease, background .2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #626269;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,.42);
  background: #080808;
  box-shadow: 0 0 0 3px rgba(255,255,255,.035);
}

.form-submit {
  min-height: 46px;
  padding: 12px 18px;
  color: #050505;
  background: #f5f5f4;
  border: 1px solid #f5f5f4;
  border-radius: 5px;
  font-size: .78rem;
  font-weight: 700;
  box-shadow: none;
  transition: background .2s ease, transform .2s ease;
}

.form-submit:hover {
  color: #050505;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: none;
}

.form-guarantee {
  color: #77777e;
  font-size: .66rem;
}

footer {
  padding: 52px 28px 24px;
  color: #a1a1aa;
  background: #050505;
  border-top: 1px solid var(--line);
}

.footer-content {
  max-width: var(--content-width);
  margin: 0 auto;
}

.footer-logo {
  font-size: 2rem;
}

.footer-text {
  max-width: 520px;
  color: #85858c;
  font-size: .78rem;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 24px 0;
}

.footer-link {
  color: #929299;
  font-size: .72rem;
  text-decoration: none;
  transition: color .2s ease;
}

.footer-link:hover {
  color: #f5f5f4;
}

.footer-bottom {
  padding-top: 18px;
  color: #65656c;
  border-top: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
}

/* Global focus, dialogs and small interface details. */
:focus-visible {
  outline: 2px solid #d3e3a1 !important;
  outline-offset: 3px !important;
}

.image-modal {
  background: rgba(0,0,0,.94);
  backdrop-filter: blur(14px);
}

.modal-content {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 25px 80px rgba(0,0,0,.7);
}

.close-modal,
.modal-prev,
.modal-next {
  color: #f5f5f4;
  text-shadow: none;
  transition: color .2s ease;
}

.close-modal:hover,
.modal-prev:hover,
.modal-next:hover {
  color: var(--accent);
}

.skip-link {
  background: #f5f5f4;
  color: #050505;
  border-radius: 4px;
}

/* Subtle mouse-following light, limited to fine-pointer devices. */
.flagship-card::after,
.lab-card::after,
.service-card::after,
.process-card::after,
.skills-cat-card::after,
.achievement-card::after,
.testimonial-card::after,
.contact-card::after {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(340px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(255,255,255,.055), transparent 48%);
  transition: opacity .25s ease;
}

.flagship-card > *,
.lab-card > *,
.service-card > *,
.process-card > *,
.skills-cat-card > *,
.achievement-card > *,
.testimonial-card > *,
.contact-card > * {
  position: relative;
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  .flagship-card:hover::after,
  .lab-card:hover::after,
  .service-card:hover::after,
  .process-card:hover::after,
  .skills-cat-card:hover::after,
  .achievement-card:hover::after,
  .testimonial-card:hover::after,
  .contact-card:hover::after {
    opacity: 1;
  }
}

/* Scroll reveal only for the dense project archive; no hidden content on fallback. */
body.motion-ready [data-motion="reveal"] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  filter: blur(3px);
  transition:
    opacity .65s cubic-bezier(.2,.7,.2,1),
    transform .65s cubic-bezier(.2,.7,.2,1),
    filter .65s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--motion-delay, 0ms);
}

body.motion-ready [data-motion="reveal"].is-visible {
  opacity: 1;
  transform: translate3d(0,0,0);
  filter: blur(0);
}

#scroll-progress {
  position: fixed;
  z-index: 10002;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
  background: #d3e3a1;
  box-shadow: 0 0 12px rgba(211,227,161,.16);
}

/* Responsive tuning */
@media (max-width: 1100px) {
  .hero-container {
    gap: 42px;
    grid-template-columns: minmax(0,1fr) minmax(320px,.85fr);
  }

  .process-container {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .achievements-container {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .lab-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 850px) {
  #navbar,
  nav {
    padding: 16px 20px;
  }

  nav.scrolled {
    padding: 12px 20px;
  }

  .nav-links {
    gap: 0;
    background: rgba(7,7,7,.98);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
  }

  .nav-links li a.nav-link {
    color: #c4c4ca;
    padding: 14px 18px;
  }

  .hero {
    min-height: auto;
    padding: 130px 22px 76px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .hero-content {
    max-width: 760px;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .hero-card {
    max-width: 560px;
    margin: 0;
  }

  main > section:not(.hero) {
    padding: 78px 22px;
  }

  .flagship-card:first-child {
    grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr);
  }

  .services-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .about-grid,
  .contact-container {
    grid-template-columns: 1fr;
  }

  .about-visual {
    max-width: 620px;
  }
}

@media (max-width: 620px) {
  #navbar,
  nav {
    padding: 13px 16px;
  }

  nav.scrolled {
    padding: 11px 16px;
  }

  .nav-container > div {
    gap: 7px !important;
  }

  .nav-secondary-btn,
  .nav-cta-btn {
    display: none !important;
  }

  .hero {
    padding: 118px 18px 62px;
  }

  .hero::after {
    left: 18px;
    right: 18px;
  }

  .hero h1,
  .hero-headline {
    font-size: clamp(2.7rem, 12vw, 4rem);
    letter-spacing: -.075em;
    line-height: 1.02;
  }

  .hero .subtitle {
    font-size: .92rem;
    line-height: 1.75;
  }

  .hero-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-buttons .btn:first-child {
    grid-column: 1 / -1;
  }

  .btn {
    justify-content: center;
    padding: 12px 13px;
  }

  .hero-proof-bar {
    gap: 10px 14px;
  }

  .proof-pill {
    font-size: .61rem;
  }

  .hero-card,
  .hud-panel {
    padding: 20px 16px;
    border-radius: 9px;
  }

  .hero-stats {
    gap: 1px;
  }

  .stat-item,
  .hud-stat {
    padding: 12px 7px;
  }

  .stat-number,
  .hud-stat .stat-number {
    font-size: 1.5rem;
  }

  main > section:not(.hero) {
    padding: 68px 18px;
  }

  .section-header {
    margin-bottom: 30px;
  }

  .section-title {
    font-size: clamp(1.85rem, 9vw, 2.6rem);
  }

  .section-subtitle {
    font-size: .84rem;
  }

  .flagship-grid,
  .flagship-card:first-child {
    display: grid;
    grid-template-columns: 1fr;
  }

  .flagship-card:first-child {
    grid-column: auto;
  }

  .flagship-card:first-child .flagship-media {
    min-height: 205px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .flagship-media,
  .flagship-img {
    min-height: 205px;
  }

  .flagship-body {
    padding: 20px 17px;
  }

  .case-study-details {
    grid-template-columns: 1fr;
  }

  .case-field:nth-last-child(-n+2) {
    border-bottom: 1px solid rgba(255,255,255,.055);
  }

  .case-field:last-child {
    border-bottom: 0;
  }

  .services-grid,
  .process-container,
  .lab-grid,
  .achievements-container,
  .testimonials-grid,
  .about-highlights {
    grid-template-columns: 1fr;
  }

  .service-card,
  .process-card,
  .skills-cat-card,
  .achievement-card,
  .testimonial-card {
    padding: 20px;
  }

  .lab-controls-panel {
    padding: 11px;
  }

  .lab-search-wrapper {
    flex-wrap: wrap;
  }

  .lab-count-pill {
    margin: 4px 0 8px 38px;
  }

  .lab-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 3px;
  }

  .lab-filter-btn {
    flex: 0 0 auto;
  }

  .contact-card,
  .contact-form {
    padding: 20px 17px;
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  footer {
    padding: 42px 18px 20px;
  }

  .footer-links {
    gap: 11px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  #canvas-container {
    opacity: .2;
  }

  body.motion-ready [data-motion="reveal"] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  #scroll-progress {
    display: none;
  }
}


/* ==========================================================================
   HOTFIX v2 - restore the black-hole scene and correct mobile layout
   These rules intentionally override the earlier refresh layer.
   ========================================================================== */

/* The canvas must sit ABOVE the body's black paint layer and BELOW the UI.
   A negative z-index puts it behind the opaque body background (invisible). */
html,
body {
  min-height: 100%;
  background-color: #050505 !important;
}

body.command-center-theme {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background-image:
    radial-gradient(ellipse at 50% -18%, rgba(255,255,255,.035), transparent 48%),
    linear-gradient(rgba(255,255,255,.009) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.009) 1px, transparent 1px) !important;
  background-size: auto, 72px 72px, 72px 72px;
}

#canvas-container {
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  display: block !important;
  width: 100vw !important;
  height: 100vh !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

#canvas-container canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

body.command-center-theme > header,
body.command-center-theme > main,
body.command-center-theme > footer,
body.command-center-theme > .image-modal,
body.command-center-theme > .skip-link {
  position: relative;
  z-index: 1;
}

/* Do not clip the hero when the telemetry card becomes taller on a phone. */
.hero {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  clip-path: none !important;
  contain: none !important;
}

.hero-container {
  min-height: 0 !important;
  height: auto !important;
  align-items: start !important;
  overflow: visible !important;
}

.hero-content,
.hero-visual {
  min-width: 0;
  height: auto !important;
  overflow: visible !important;
}

.hero-card,
.hud-panel {
  width: 100% !important;
  max-width: 470px !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.hero-card-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: visible;
}

.hero-stats,
.hud-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1px !important;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden;
  box-sizing: border-box;
}

.stat-item,
.hud-stat {
  min-width: 0;
  min-height: 112px;
  height: auto !important;
  box-sizing: border-box;
}

.stat-number {
  white-space: nowrap;
}

.stat-label,
.stat-sub {
  overflow-wrap: anywhere;
}

/* Remove the inherited glass capsule around section headings.
   Keep only the small typographic eyebrow label. */
.section-header {
  width: 100% !important;
  max-width: var(--content-width) !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 auto 38px !important;
  padding: 0 !important;
  text-align: left !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.section-label {
  display: block !important;
  width: fit-content;
  margin: 0 0 14px !important;
  padding: 0 !important;
  color: #a1a1aa !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  font-size: .65rem !important;
  font-weight: 600 !important;
  letter-spacing: .16em !important;
  line-height: 1.5 !important;
}

@media (max-width: 850px) {
  .hero {
    padding-top: 118px !important;
    padding-bottom: 70px !important;
  }

  .hero-container {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 34px !important;
  }

  .hero-visual {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
  }

  .hero-card,
  .hud-panel {
    max-width: 620px !important;
    padding: 22px !important;
  }

  main > section:not(.hero) {
    padding-top: 72px !important;
    padding-bottom: 72px !important;
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 112px 18px 58px !important;
  }

  .hero-card,
  .hud-panel {
    max-width: none !important;
    padding: 18px 15px !important;
    border-radius: 10px !important;
  }

  .hud-header {
    gap: 10px;
    flex-wrap: wrap;
  }

  .hud-id {
    font-size: .58rem !important;
    letter-spacing: .08em !important;
  }

  .hero-profile-container {
    margin: 18px auto 20px !important;
  }

  .hero-profile-img {
    width: 104px !important;
    height: 104px !important;
  }

  .hero-stats,
  .hud-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .stat-item,
  .hud-stat {
    min-height: 108px !important;
    padding: 13px 7px !important;
  }

  .stat-number,
  .hud-stat .stat-number {
    font-size: clamp(1.35rem, 7vw, 1.8rem) !important;
  }

  .stat-label,
  .hud-stat .stat-label {
    font-size: .65rem !important;
    line-height: 1.35 !important;
  }

  .stat-sub,
  .hud-stat .stat-sub {
    font-size: .59rem !important;
    line-height: 1.4 !important;
  }

  .hud-terminal-readout {
    margin-top: 16px !important;
    padding: 12px !important;
    overflow-wrap: anywhere;
  }

  .terminal-line {
    font-size: .58rem !important;
    line-height: 1.65 !important;
  }

  main > section:not(.hero) {
    padding: 64px 18px !important;
  }

  .section-header {
    margin-bottom: 28px !important;
  }

  .section-label {
    font-size: .6rem !important;
    letter-spacing: .13em !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #canvas-container {
    opacity: .85 !important;
  }
}


/* ==========================================================================
   OBSIDIAN v3 - mobile repair, monochrome surface system and curated content
   ========================================================================== */
:root {
  --accent: #d4d4d4;
  --accent-cyan: #d4d4d4;
  --accent-emerald: #d4d4d4;
  --accent-light: #f4f4f5;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.16);
  --bg-obsidian: #050505;
  --bg-navy: #070707;
  --bg-surface: #0b0b0b;
  --bg-card: #0a0a0a;
}

html {
  scroll-padding-top: 94px !important;
  background: #050505 !important;
}

body.command-center-theme {
  overflow-x: hidden !important;
  background: #050505 !important;
  background-image: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.035), transparent 38%) !important;
}

/* The animated accretion-disk scene produced bright orange/gold bleed behind
   transparent content cards. The minimal theme uses a static black canvas. */
#canvas-container {
  display: block !important;
  visibility: visible !important;
  opacity: .92 !important;
  filter: none !important;
  pointer-events: none !important;
}

header {
  position: relative;
  z-index: 10020 !important;
}

#navbar,
nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-height: 74px;
  padding: 11px 24px !important;
  box-sizing: border-box !important;
  z-index: 10020 !important;
  background: rgba(5,5,5,.96) !important;
  border-bottom: 1px solid rgba(255,255,255,.09) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}

#navbar .nav-container,
nav .nav-container {
  min-height: 50px;
  align-items: center !important;
}

#navbar .logo,
nav .logo {
  line-height: 1 !important;
}

.nav-links {
  z-index: 10021 !important;
}

.menu-toggle {
  position: relative;
  z-index: 10022 !important;
  min-width: 48px;
  min-height: 46px;
  display: grid;
  place-content: center;
  gap: 5px;
}

main#main {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0;
}

main#main > section {
  width: 100%;
  min-width: 0;
  order: 20;
  scroll-margin-top: 98px !important;
}

#home { order: 0 !important; }
#work { order: 1 !important; }
#services { order: 2 !important; }
#process { order: 3 !important; }
#about { order: 4 !important; }
#skills { order: 5 !important; }
#achievements { order: 6 !important; }
#lab { order: 7 !important; }
#contact { order: 8 !important; }

.hero {
  min-height: 0 !important;
  height: auto !important;
  padding: 148px 28px 76px !important;
  background: transparent !important;
  overflow: visible !important;
}

.hero::after {
  display: none !important;
}

.hero-container {
  align-items: center !important;
  gap: clamp(28px,5vw,72px) !important;
}

.hero-headline,
.hero h1 {
  max-width: 760px;
  font-size: clamp(2.55rem,5.4vw,5rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -.065em !important;
  overflow-wrap: normal;
}

.hero .subtitle {
  color: #a7a7ad !important;
  max-width: 640px;
}

.hero-proof-bar {
  gap: 10px 18px !important;
  margin-top: 26px !important;
}

.hero-card,
.hud-panel {
  background: #090909 !important;
  border-color: rgba(255,255,255,.12) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.32) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.hud-corners {
  display: none !important;
}

.hero .hud-terminal-readout {
  display: none !important;
}

main > section:not(.hero) {
  padding: clamp(52px,6vw,82px) 28px !important;
  background: transparent !important;
}

.section-header {
  max-width: var(--content-width) !important;
  margin: 0 auto 26px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.section-label {
  color: #8e8e95 !important;
}

.section-title {
  color: #f5f5f5 !important;
  font-size: clamp(1.9rem,4vw,3rem) !important;
  line-height: 1.1 !important;
  letter-spacing: -.055em !important;
}

.section-subtitle {
  color: #8f8f96 !important;
  line-height: 1.7 !important;
}

/* Uniform black cards: no background show-through and no coloured glass. */
.flagship-card,
.service-card,
.process-card,
.skills-cat-card,
.achievement-card,
.testimonial-card,
.contact-card,
.contact-form,
.lab-card,
.highlight-item {
  background: #090909 !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.service-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  min-width: 0;
  min-height: 100%;
  padding: 24px !important;
}

.service-badge {
  position: static !important;
  inset: auto !important;
  display: inline-flex !important;
  align-items: center;
  max-width: 100%;
  margin: 0 0 18px !important;
  padding: 5px 9px !important;
  color: #c3c3c8 !important;
  background: #111 !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 4px !important;
  line-height: 1.4;
  white-space: normal;
}

.service-icon {
  position: static !important;
  flex: 0 0 44px;
  width: 44px !important;
  height: 44px !important;
  margin: 0 0 18px !important;
  color: #ededed !important;
  background: #121212 !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 8px !important;
  transform: none !important;
}

.service-title {
  margin: 0 0 10px !important;
  color: #f1f1f1 !important;
  font-size: 1.12rem !important;
  line-height: 1.3 !important;
}

.service-desc,
.service-deliverables li {
  color: #a2a2a8 !important;
}

.service-deliverables {
  width: 100%;
  margin-top: 16px !important;
  padding-top: 15px !important;
  border-top: 1px solid rgba(255,255,255,.08) !important;
}

.service-deliverables li {
  padding: 5px 0;
  line-height: 1.55 !important;
}

.service-deliverables li i,
.skills-capability-list li i {
  color: #d1d1d1 !important;
}

/* About: readable prose first, quiet proof points second. */
.about-grid {
  align-items: start !important;
  gap: clamp(24px,4vw,54px) !important;
}

.about-text {
  margin: 0 0 16px !important;
  padding: 0 !important;
  color: #b0b0b6 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  font-size: .94rem !important;
  line-height: 1.8 !important;
}

.about-highlights {
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 10px !important;
  margin-top: 24px !important;
}

.highlight-item {
  align-items: flex-start !important;
  min-width: 0;
  padding: 15px !important;
  border-radius: 8px !important;
}

.highlight-icon {
  flex: 0 0 34px !important;
  width: 34px !important;
  height: 34px !important;
  color: #ededed !important;
  background: #151515 !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 7px !important;
  font-size: .85rem !important;
}

.highlight-text h4 {
  color: #ededed !important;
  font-size: .79rem !important;
  line-height: 1.4 !important;
}

.highlight-text p {
  color: #929299 !important;
  font-size: .72rem !important;
  line-height: 1.6 !important;
}

.about-image-container {
  max-height: 340px !important;
  height: 340px !important;
  border-radius: 9px !important;
  background: #0b0b0b !important;
}

/* Details disclosures keep the first screen useful without a never-ending page. */
.content-disclosure,
.case-study-accordion {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 18px 0 0;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 8px;
  background: #080808;
  overflow: clip;
}

.content-disclosure > summary,
.case-study-accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 14px 16px;
  color: #e6e6e8;
  background: #0b0b0b;
  cursor: pointer;
  list-style: none;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.45;
}

.content-disclosure > summary::-webkit-details-marker,
.case-study-accordion > summary::-webkit-details-marker {
  display: none;
}

.content-disclosure > summary::after,
.case-study-accordion > summary::after {
  content: '+';
  flex: 0 0 auto;
  color: #bcbcc2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 400;
}

.content-disclosure[open] > summary::after,
.case-study-accordion[open] > summary::after {
  content: '−';
}

.content-disclosure > summary span,
.case-study-accordion > summary span {
  margin-left: auto;
  color: #74747c;
  font-size: .66rem;
  font-weight: 500;
  text-align: right;
}

.content-disclosure[open],
.case-study-accordion[open] {
  border-color: rgba(255,255,255,.18);
}

.content-disclosure[open] > summary,
.case-study-accordion[open] > summary {
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.content-disclosure > .process-container,
.content-disclosure > .skills-evidence-grid,
.content-disclosure > .achievements-container,
.content-disclosure > .projects-container {
  padding: 14px !important;
  margin: 0 !important;
}

.case-study-accordion {
  margin: 20px 0 4px;
  border-radius: 6px;
}

.case-study-accordion > summary {
  min-height: 44px;
  padding: 11px 13px;
  font-size: .74rem;
  background: #0c0c0c;
}

.case-study-details {
  padding: 8px 13px !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 0 16px !important;
}

.case-field {
  padding: 10px 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
}

.case-field:last-child {
  border-bottom: 0 !important;
}

.field-content {
  color: #9b9ba2 !important;
  line-height: 1.65 !important;
}

.project-tags {
  gap: 6px !important;
}

.tag,
.stack-tag {
  color: #b5b5bb !important;
  background: #111 !important;
  border-color: rgba(255,255,255,.10) !important;
}

/* Smaller, coherent cards on the contact end-state. */
.contact-container {
  gap: 14px !important;
  align-items: start !important;
}

.contact-card,
.contact-form {
  height: auto !important;
  padding: 22px !important;
  border-radius: 9px !important;
}

.contact-item {
  gap: 12px !important;
}

.form-group input,
.form-group select,
.form-group textarea,
.contact-form input,
.contact-form select,
.contact-form textarea {
  color: #f3f3f3 !important;
  background: #050505 !important;
  border-color: rgba(255,255,255,.13) !important;
  border-radius: 6px !important;
}

footer {
  background: #050505 !important;
}

/* Remove coloured overlays and keep all cards in the same visual system. */
.flagship-card::after,
.lab-card::after,
.service-card::after,
.process-card::after,
.skills-cat-card::after,
.achievement-card::after,
.testimonial-card::after,
.contact-card::after {
  background: none !important;
}

/* Narrow-screen geometry: one consistent gutter and no content under the nav. */
@media (max-width: 850px) {
  #navbar,
  nav {
    min-height: 70px !important;
    padding: 9px 18px !important;
  }

  #navbar .nav-container,
  nav .nav-container {
    min-height: 50px !important;
  }

  .hero {
    padding: 132px 20px 54px !important;
  }

  .hero-container {
    grid-template-columns: minmax(0,1fr) !important;
    gap: 30px !important;
  }

  .hero-content {
    text-align: left !important;
    margin: 0 !important;
  }

  .hero-headline,
  .hero h1 {
    font-size: clamp(2.45rem,8.6vw,3.5rem) !important;
    line-height: 1.06 !important;
  }

  .hero-visual {
    justify-content: stretch !important;
  }

  .hero-card,
  .hud-panel {
    max-width: 100% !important;
  }

  main > section:not(.hero) {
    padding: 54px 20px !important;
  }

  .services-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 12px !important;
  }

  .process-container {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }

  .lab-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 82px !important;
  }

  main > section {
    scroll-margin-top: 82px !important;
  }

  #navbar,
  nav {
    min-height: 66px !important;
    padding: 8px 16px !important;
  }

  #navbar .nav-container,
  nav .nav-container {
    min-height: 48px !important;
  }

  .logo {
    font-size: 1.45rem !important;
  }

  .menu-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 8px !important;
  }

  .hero {
    padding: 112px 18px 44px !important;
  }

  .hero-badge {
    margin-bottom: 18px !important;
    font-size: .61rem !important;
    letter-spacing: .1em !important;
  }

  .hero-headline,
  .hero h1 {
    font-size: clamp(2.25rem,10.5vw,3.1rem) !important;
    line-height: 1.04 !important;
    margin-bottom: 17px !important;
  }

  .hero .subtitle {
    font-size: .88rem !important;
    line-height: 1.7 !important;
    margin-bottom: 22px !important;
  }

  .hero-buttons {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .hero-buttons .btn:first-child {
    grid-column: 1 / -1;
  }

  .hero-buttons .btn {
    min-height: 44px !important;
    padding: 11px 10px !important;
    font-size: .76rem !important;
  }

  .hero-proof-bar {
    margin-top: 22px !important;
    padding-top: 14px !important;
    gap: 9px 12px !important;
  }

  .proof-pill {
    font-size: .59rem !important;
  }

  .hero-card,
  .hud-panel {
    padding: 16px 13px !important;
  }

  .hero-stats,
  .hud-stats-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }

  .stat-item,
  .hud-stat {
    min-height: 96px !important;
    padding: 11px 6px !important;
  }

  .stat-number,
  .hud-stat .stat-number {
    font-size: clamp(1.25rem,7vw,1.7rem) !important;
  }

  main > section:not(.hero) {
    padding: 46px 18px !important;
  }

  .section-header {
    margin-bottom: 20px !important;
  }

  .section-title {
    font-size: clamp(1.7rem,8.2vw,2.35rem) !important;
  }

  .section-subtitle {
    font-size: .82rem !important;
  }

  .flagship-grid,
  .flagship-card:first-child {
    grid-template-columns: 1fr !important;
  }

  .flagship-card:first-child .flagship-media,
  .flagship-media,
  .flagship-img {
    min-height: 180px !important;
  }

  .flagship-body {
    padding: 18px 15px !important;
  }

  .case-study-details {
    grid-template-columns: 1fr !important;
  }

  .services-grid,
  .process-container,
  .lab-grid,
  .achievements-container {
    grid-template-columns: 1fr !important;
  }

  .service-card {
    padding: 18px !important;
  }

  .service-badge {
    margin-bottom: 13px !important;
  }

  .service-icon {
    margin-bottom: 14px !important;
  }

  .about-grid,
  .contact-container {
    grid-template-columns: 1fr !important;
  }

  .about-text {
    font-size: .88rem !important;
  }

  .about-highlights {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .highlight-item {
    padding: 13px !important;
  }

  .about-image-container {
    height: 250px !important;
    max-height: 250px !important;
  }

  .content-disclosure > summary,
  .case-study-accordion > summary {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 5px 10px;
  }

  .content-disclosure > summary span,
  .case-study-accordion > summary span {
    flex: 1 1 100%;
    margin-left: 0;
    text-align: left;
  }

  .content-disclosure > summary::after,
  .case-study-accordion > summary::after {
    margin-left: auto;
  }

  .contact-card,
  .contact-form {
    padding: 18px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* Restored black-hole scene behind the restrained monochrome interface */
#canvas-container {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  opacity: .92 !important;
  visibility: visible !important;
  filter: none !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
#canvas-container canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}
body.command-center-theme > header,
body.command-center-theme > main,
body.command-center-theme > footer,
body.command-center-theme > .image-modal,
body.command-center-theme > .skip-link {
  position: relative;
  z-index: 1;
}
@media (max-width: 620px) {
  #canvas-container {
    opacity: .88 !important;
    filter: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #canvas-container {
    opacity: .82 !important;
  }
}


/* Crisp black-hole rendering: no CSS blur, no double dimming */
#canvas-container,
#canvas-container canvas {
  filter: none !important;
  -webkit-filter: none !important;
  image-rendering: auto;
}
#canvas-container {
  opacity: .92 !important;
}
@media (max-width: 620px) {
  #canvas-container { opacity: .88 !important; }
}


/* FINAL BLACK HOLE QUALITY OVERRIDE */
#canvas-container {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  opacity: 1 !important;
  filter: none !important;
  -webkit-filter: none !important;
  visibility: visible !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
#canvas-container canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  filter: none !important;
  -webkit-filter: none !important;
  image-rendering: auto;
}
.blackhole-fallback {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, #10131c 0, #040509 52%, #020203 100%);
}
.blackhole-fallback-stars {
  position: absolute;
  inset: 0;
  opacity: .7;
  background-image: radial-gradient(1px 1px at 12% 22%, #fff 98%, transparent), radial-gradient(1px 1px at 70% 14%, #fff 98%, transparent), radial-gradient(1px 1px at 86% 61%, #fff 98%, transparent), radial-gradient(1.5px 1.5px at 31% 78%, #fff 98%, transparent), radial-gradient(1px 1px at 53% 34%, #fff 98%, transparent), radial-gradient(1px 1px at 91% 88%, #fff 98%, transparent);
  background-size: 320px 280px;
}
.blackhole-fallback-disk {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(78vw, 900px);
  aspect-ratio: 2.65 / 1;
  transform: translate(-50%,-50%) rotate(-12deg);
  border-radius: 50%;
  background: conic-gradient(from 12deg, transparent 0 9%, rgba(82,106,157,.04) 14%, rgba(150,177,223,.35) 22%, rgba(238,226,189,.7) 26%, rgba(255,246,225,.8) 29%, rgba(98,129,186,.35) 35%, transparent 44% 59%, rgba(110,141,190,.24) 68%, rgba(245,221,168,.6) 75%, transparent 88%);
  filter: none;
  box-shadow: 0 0 36px rgba(161,184,226,.16), 0 0 90px rgba(103,139,199,.1);
  animation: fallback-orbit 22s linear infinite;
}
.blackhole-fallback-core {
  position: absolute;
  left: 50%;
  top: 54%;
  width: clamp(115px, 22vw, 250px);
  aspect-ratio: 1;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #000 0 58%, rgba(0,0,0,.86) 61%, rgba(8,9,13,.2) 73%, transparent 76%);
  box-shadow: 0 0 42px 18px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.04);
}
@keyframes fallback-orbit { to { transform: translate(-50%,-50%) rotate(348deg); } }
@media (max-width: 620px) {
  #canvas-container { opacity: 1 !important; }
  .blackhole-fallback-disk { width: 104vw; }
}
