/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
  /* Brand colors — exact values from brand guidelines */
  --color-navy-900: #0D1220; /* primary background */
  --color-navy-800: #121A2C; /* elevated surface */
  --color-navy-700: #182238; /* floating surface, chip backgrounds */
  --color-royal: #0A66FF;      /* filled buttons, borders, structural accents */
  --color-royal-dark: #084EC1; /* button hover */
  --color-electric: #00B2FF;   /* readable accent/link text, focus rings, glow */
  --color-slate: #64748B;      /* brand slate gray — decorative/non-text use only */
  --color-slate-light: #94A3B8; /* Accessibility neutral — derived for readable secondary text, not a new brand accent */
  --color-offwhite: #F3F4F6;   /* primary body text on dark backgrounds */
  --color-white: #FFFFFF;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --container-wide: 1100px;
  --container-narrow: 720px;
  --container-hero: 860px;
  --space-section-y: 6rem;
  --space-section-y-lg: 8rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 999px;

  /* Motion */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 200ms;
  --duration-base: 300ms;
  --duration-reveal: 600ms;

  color-scheme: dark;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--color-navy-900);
  color: var(--color-offwhite);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  position: relative;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

/* Subtle grain texture for depth (avoids a flat, generic dark background) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, header, footer { position: relative; z-index: 1; }

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

.container {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
@media (min-width: 1024px) {
  .container { padding-inline: 3rem; }
}
.container--narrow { max-width: var(--container-narrow); }
.container--hero { max-width: var(--container-hero); }

/* ==========================================================================
   MOTION: scroll reveal (progressive enhancement — see index.html bootstrap)
   ========================================================================== */
.js-motion .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-reveal) var(--ease-spring),
              transform var(--duration-reveal) var(--ease-spring);
}
.js-motion .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js-motion .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   SHARED PRIMITIVES: buttons, links, tags, sections
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: color var(--duration-fast) ease,
              background-color var(--duration-fast) ease,
              border-color var(--duration-fast) ease;
}
.btn--primary { background: var(--color-royal); color: var(--color-white); }
.btn--primary:hover { background: var(--color-royal-dark); }
.btn--outline { background: transparent; border-color: var(--color-electric); color: var(--color-electric); }
.btn--outline:hover { color: var(--color-white); border-color: var(--color-white); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-electric);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color var(--duration-fast) ease;
}
.link-arrow:hover { color: var(--color-white); }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-slate-light);
  background: var(--color-navy-700);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  display: inline-block;
}
.tag--sm { font-size: 0.6875rem; padding: 0.125rem 0.625rem; }

.section { padding-block: var(--space-section-y); padding-inline: 1.5rem; }
@media (min-width: 1024px) {
  .section { padding-inline: 3rem; padding-block: var(--space-section-y-lg); }
}
.section--alt { background: rgba(18, 26, 44, 0.4); }
.section__heading {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-offwhite);
}
.section__heading--lg { font-size: 1.875rem; margin-bottom: 4rem; }
@media (min-width: 1024px) { .section__heading--lg { font-size: 2.25rem; } }
.section__heading--sm { font-size: 1.5rem; margin-bottom: 3rem; }
@media (min-width: 1024px) { .section__heading--sm { font-size: 1.875rem; } }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  transition: background-color var(--duration-base) ease, border-color var(--duration-base) ease;
}
.nav--scrolled {
  background: rgba(13, 18, 32, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-navy-700);
}
.nav__bar {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 1024px) { .nav__bar { padding-inline: 3rem; height: 5rem; } }

.nav__logo { display: flex; align-items: center; gap: 0.5rem; }
.nav__logo-mark {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-navy-800);
  border: 1px solid var(--color-navy-700);
}
.nav__logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transform: scale(2.1) translateY(6%);
}
.nav__logo-text { font-family: var(--font-heading); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.nav__logo-dot { color: var(--color-electric); }

.nav__links {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(243, 244, 246, 0.8);
}
@media (min-width: 768px) { .nav__links { display: flex; } }
.nav__link {
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.nav__link:hover { color: var(--color-offwhite); }
.nav__link--active { color: var(--color-offwhite); border-color: var(--color-royal); }

.nav__contact { display: none; }
@media (min-width: 768px) { .nav__contact { display: block; } }

.nav__menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-right: -0.5rem;
  background: none;
  border: none;
  color: var(--color-offwhite);
  cursor: pointer;
}
@media (min-width: 768px) { .nav__menu-toggle { display: none; } }
.nav__menu-icon--close { display: none; }

.mobile-menu {
  position: fixed;
  inset: 4rem 0 0 0;
  background: var(--color-navy-900);
  transform: translateX(100%);
  transition: transform var(--duration-base) ease-out;
}
@media (min-width: 768px) { .mobile-menu { display: none; } }
.mobile-menu[hidden] { display: none; }
.mobile-menu--open { transform: translateX(0); }
.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.5rem 2rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
}
.mobile-menu__links a { transition: color var(--duration-fast) ease; }
.mobile-menu__links a:hover { color: var(--color-electric); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-inline: 1.5rem;
  padding-top: 4rem;
  overflow: hidden;
}
@media (min-width: 1024px) { .hero { padding-inline: 3rem; } }
.hero__visual {
  /* Reserved slot for a future 3D/interactive visual (e.g. Three.js canvas).
     Currently holds only the decorative glow. Kept as its own layer, decoupled
     from the text column, so a future visual can be dropped in here without
     restructuring the Hero. Not implemented now — no canvas, no dependency added. */
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  max-width: 180vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,178,255,0.16) 0%, rgba(10,102,255,0.08) 35%, rgba(13,18,32,0) 70%);
}
.hero__eyebrow { font-size: 0.9375rem; color: var(--color-slate-light); margin-bottom: 1rem; }
.hero__headline {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-offwhite);
  max-width: 40rem;
}
@media (min-width: 640px) { .hero__headline { font-size: 3.25rem; } }
@media (min-width: 1024px) { .hero__headline { font-size: 3.75rem; } }
.hero__subhead {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--color-slate-light);
  max-width: 34rem;
  line-height: 1.6;
}
.hero__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

/* ==========================================================================
   FEATURED PROJECTS
   ========================================================================== */
.featured-list { display: flex; flex-direction: column; gap: 2rem; }
.featured-card {
  background: var(--color-navy-800);
  border: 1px solid var(--color-navy-700);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow var(--duration-base) ease, border-color var(--duration-base) ease;
}
@media (min-width: 1024px) { .featured-card { padding: 2.5rem; } }
.featured-card:hover { box-shadow: 0 20px 50px -20px rgba(0, 178, 255, 0.2); }

/* Flagship treatment (Sentra): composition/typography/border only — no badge copy,
   no heavier glow. A left accent stripe + slightly larger title is enough to read
   as "lead item" without inventing a "Flagship" label the spec never approved. */
.featured-card--flagship {
  border-left: 3px solid var(--color-electric);
  padding-left: 1.75rem;
}
@media (min-width: 1024px) { .featured-card--flagship { padding-left: 2.25rem; } }

/* Reserved wrapper for future richer project visuals/case-study media — same pattern
   as .hero__visual. Holds only text content today; a sibling .featured-card__media
   could be added later without restructuring the card. */
.featured-card__body { display: flex; flex-direction: column; }

.featured-card__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--color-offwhite);
  margin-bottom: 1rem;
}
.featured-card--flagship .featured-card__title { font-size: 1.75rem; }
@media (min-width: 1024px) {
  .featured-card__title { font-size: 1.625rem; }
  .featured-card--flagship .featured-card__title { font-size: 2rem; }
}
.featured-card__status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-slate-light);
  margin-bottom: 1rem;
}
.featured-card__qualifier { font-style: italic; color: var(--color-slate-light); margin-bottom: 1rem; }
.featured-card__desc {
  color: rgba(243, 244, 246, 0.9);
  line-height: 1.7;
  max-width: 42rem;
  margin-bottom: 1.5rem;
}
.featured-card__role { font-weight: 500; font-size: 0.875rem; color: var(--color-electric); margin-bottom: 1.5rem; }
.featured-card__link { margin-top: 1.5rem; }

/* ==========================================================================
   SELECTED WORK
   ========================================================================== */
.selected-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .selected-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .selected-grid { grid-template-columns: repeat(3, 1fr); } }

.selected-card {
  background: var(--color-navy-800);
  border: 1px solid var(--color-navy-700);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: box-shadow var(--duration-base) ease;
}
/* Deliberately quieter than Featured Projects' hover (no transform/lift, softer glow) —
   Selected Work is secondary and must not compete with Featured for attention. */
.selected-card:hover { box-shadow: 0 14px 32px -16px rgba(0, 178, 255, 0.15); }
.selected-card__title { font-family: var(--font-heading); font-weight: 500; font-size: 1.125rem; color: var(--color-offwhite); margin-bottom: 0.5rem; }
.selected-card__desc { font-size: 0.875rem; color: rgba(243, 244, 246, 0.8); line-height: 1.6; margin-bottom: 1rem; }

/* "More on GitHub" is a continuation/exit link below the grid, not a sixth card —
   deliberately lighter weight than the five real project tiles. */
.more-github-row { margin-top: 3rem; text-align: center; }
.more-github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-electric);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--duration-fast) ease;
}
.more-github-link:hover { color: var(--color-white); }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.service-list { border-top: 1px solid var(--color-navy-700); border-bottom: 1px solid var(--color-navy-700); }
.service-row { padding-block: 2rem; border-bottom: 1px solid var(--color-navy-700); display: flex; flex-direction: column; gap: 0.5rem; }
.service-row:last-child { border-bottom: none; }
@media (min-width: 640px) { .service-row { flex-direction: row; align-items: baseline; gap: 2rem; } }
.service-row__title { font-family: var(--font-heading); font-weight: 500; font-size: 1.125rem; color: var(--color-offwhite); }
@media (min-width: 640px) { .service-row__title { width: 16rem; flex-shrink: 0; } }
.service-row__desc { color: var(--color-slate-light); line-height: 1.7; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about__text { display: flex; flex-direction: column; gap: 1.25rem; max-width: 42rem; color: rgba(243, 244, 246, 0.9); line-height: 1.7; }
.about__tags { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
/* A touch more breathing room than the standard .section padding — Contact is the
   closing statement of the page, not just another mid-page section. */
.contact { text-align: center; padding-block: 7rem; }
@media (min-width: 1024px) { .contact { padding-block: 10rem; } }
.contact__heading { margin-bottom: 1.5rem; }
.contact__text { font-size: 1.125rem; color: var(--color-slate-light); line-height: 1.7; margin-bottom: 2.5rem; }
.contact__links { margin-top: 2rem; display: flex; align-items: center; justify-content: center; gap: 1.5rem; font-size: 0.875rem; color: var(--color-slate-light); }
.contact__links a { transition: color var(--duration-fast) ease; }
.contact__links a:hover { color: var(--color-offwhite); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { padding: 2rem 1.5rem; border-top: 1px solid var(--color-navy-700); }
@media (min-width: 1024px) { .footer { padding-inline: 3rem; } }
.footer__inner {
  max-width: var(--container-wide);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--color-slate-light);
}
@media (min-width: 640px) { .footer__inner { flex-direction: row; } }
.footer__inner a { transition: color var(--duration-fast) ease; }
.footer__inner a:hover { color: var(--color-offwhite); }

/* COMPONENT-STYLES-ANCHOR */
