*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #060e1e;
  --navy-2: #0b1628;
  --navy-3: #0f1e38;
  --navy-4: #152340;
  --blue: #1a6fd4;
  --blue-mid: #2e8df0;
  --blue-light: #6db8ff;
  --blue-pale: #b8d9ff;
  --blue-dim: rgba(45, 141, 240, 0.12);
  --blue-dim2: rgba(45, 141, 240, 0.06);
  --border: rgba(45, 141, 240, 0.18);
  --border-strong: rgba(45, 141, 240, 0.4);
  --cream: #e8f0fb;
  --muted: rgba(184, 217, 255, 0.55);
  --muted2: rgba(184, 217, 255, 0.35);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(4.25rem + env(safe-area-inset-top, 0px));
}

body {
  font-family: "Syne", sans-serif;
  background: var(--navy);
  color: var(--cream);
  overflow-x: hidden;
  line-height: 1.6;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

a {
  color: inherit;
}

/* ─── NAV ─────────────────────────────────── */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: max(1rem, env(safe-area-inset-top)) 3rem 1.25rem;
  background: rgba(6, 14, 30, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 0.5px solid var(--border);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

#site-nav.nav-open .nav-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-logo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--cream);
  -webkit-tap-highlight-color: transparent;
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--blue-mid);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 4px;
}

.nav-logo-mark span {
  display: block;
  background: var(--blue-mid);
}

.nav-logo-mark span:nth-child(2),
.nav-logo-mark span:nth-child(3) {
  opacity: 0.3;
}

.nav-logo-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--blue-dim2);
  color: var(--cream);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

#site-nav.nav-open .nav-toggle-bars {
  background: transparent;
}

#site-nav.nav-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

#site-nav.nav-open .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-links {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.06em;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--blue-light);
}

.nav-cta {
  position: relative;
  z-index: 2;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--blue-light);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  padding: 0.5rem 1.25rem;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-cta:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* ─── HERO ─────────────────────────────────── */
#hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 3rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(45, 141, 240, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 141, 240, 0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 60% 50%, black 40%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 80% at 60% 50%, black 40%, transparent 80%);
}

.hero-glow {
  position: absolute;
  right: -5%;
  top: 5%;
  width: 700px;
  height: 700px;
  max-width: 90vw;
  background: radial-gradient(circle, rgba(26, 111, 212, 0.14) 0%, transparent 65%);
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  left: -10%;
  bottom: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 20, 50, 0.6) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--blue-light);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero-label::before {
  content: "";
  display: block;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
}

h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 1.75rem;
  font-weight: 400;
}

h1 em {
  font-style: italic;
  color: var(--blue-pale);
}

.hero-body {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--blue-mid);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--blue-light);
  color: var(--navy);
}

.btn-ghost {
  display: inline-block;
  padding: 0.85rem 2rem;
  border: 1px solid var(--border-strong);
  color: var(--cream);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: var(--blue-light);
  color: var(--blue-light);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual svg {
  width: 100%;
  max-width: 440px;
}

.hero-svg-pulse {
  animation: pulse-ring 4s ease-in-out infinite;
}

.hero-svg-dash {
  animation: dash-flow 3s linear infinite;
}

.hero-svg-dash-slow {
  animation-duration: 4s;
}

.hero-svg-dash-med {
  animation-duration: 3.5s;
}

.hero-svg-dash-slower {
  animation-duration: 4.5s;
}

.hero-svg-dash-alt {
  animation-duration: 3.8s;
}

.hero-svg-dash-bottom {
  animation-duration: 4.2s;
}

.hero-svg-float {
  animation: float-node 5s ease-in-out infinite;
}

.hero-svg-float-2 {
  animation-duration: 5.5s;
  animation-delay: 0.5s;
}

.hero-svg-float-3 {
  animation-duration: 6s;
  animation-delay: 1s;
}

.hero-svg-float-4 {
  animation-duration: 4.5s;
  animation-delay: 1.5s;
}

.hero-svg-float-5 {
  animation-duration: 5.8s;
  animation-delay: 0.8s;
}

.hero-svg-float-6 {
  animation-duration: 5.2s;
  animation-delay: 2s;
}

/* ─── SECTION COMMON ─────────────────────────────── */
section {
  padding: 6rem 3rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--blue-light);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-label::before {
  content: "";
  display: block;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
}

h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: var(--cream);
}

h2 em {
  font-style: italic;
  color: var(--blue-pale);
}

.section-intro {
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: 3.5rem;
}

/* ─── THESIS ─────────────────────────────────── */
#thesis {
  background: var(--navy);
  border-top: 0.5px solid var(--border);
}

.thesis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 0.5px solid var(--border);
  margin-top: 3rem;
  background: var(--border);
}

.thesis-card {
  background: var(--navy-2);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.thesis-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-mid), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.thesis-card:hover {
  background: var(--navy-3);
}

.thesis-card:hover::before {
  opacity: 1;
}

.thesis-num {
  font-size: 11px;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: rgba(109, 184, 255, 0.45);
  margin-bottom: 1.25rem;
}

.thesis-card h3 {
  font-family: "DM Serif Display", serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 0.85rem;
  line-height: 1.2;
}

.thesis-card p {
  font-size: 15px;
  color: var(--muted2);
  line-height: 1.75;
}

/* ─── FOCUS ─────────────────────────────────── */
#focus {
  background: var(--navy-2);
  border-top: 0.5px solid var(--border);
}

.focus-items {
  display: flex;
  flex-direction: column;
}

.focus-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: start;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 0.5px solid var(--border);
  transition: all 0.2s;
}

.focus-item:first-child {
  border-top: 0.5px solid var(--border);
}

.focus-item:hover .focus-icon {
  border-color: var(--blue-mid);
  background: var(--blue-dim);
}

.focus-icon {
  width: 56px;
  height: 56px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.focus-icon svg {
  width: 22px;
  height: 22px;
}

.focus-body h3 {
  font-family: "DM Serif Display", serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 0.6rem;
}

.focus-body p {
  font-size: 15px;
  color: var(--muted2);
  max-width: 560px;
  line-height: 1.75;
}

.focus-num {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(109, 184, 255, 0.35);
  padding-top: 4px;
  flex-shrink: 0;
}

/* ─── CONTACT ─────────────────────────────────── */
#contact {
  background: var(--navy);
  border-top: 0.5px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-left p {
  font-size: 15px;
  color: var(--muted2);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-note {
  font-size: 12px;
  color: rgba(109, 184, 255, 0.45);
  border-left: 1px solid var(--border);
  padding-left: 1rem;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--blue-light);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.label-optional {
  text-transform: none;
  font-weight: 500;
  color: var(--muted2);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(45, 141, 240, 0.06);
  border: 0.5px solid var(--border);
  color: var(--cream);
  font-family: "Syne", sans-serif;
  font-size: 16px;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted2);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue-mid);
  background: rgba(45, 141, 240, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(109,184,255,0.6)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-group select option {
  background: #0b1628;
}

.form-submit {
  width: 100%;
  padding: 1rem;
  background: var(--blue-mid);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: all 0.2s;
}

.form-submit:hover {
  background: var(--blue-light);
  color: var(--navy);
}

.form-disclaimer {
  font-size: 11px;
  color: var(--muted2);
  margin-top: 1rem;
  line-height: 1.6;
}

.contact-honeypot {
  position: absolute;
  left: -5000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact-form {
  position: relative;
}

.form-success-panel {
  padding: 2rem;
  border: 0.5px solid var(--border);
  background: var(--blue-dim);
  text-align: center;
}

.form-success-panel[hidden] {
  display: none !important;
}

.form-success-title {
  font-family: "DM Serif Display", serif;
  font-size: 1.2rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.form-success-text {
  font-size: 14px;
  color: var(--muted2);
}

/* ─── FOOTER ─────────────────────────────────── */
footer {
  padding: 2rem 3rem max(2rem, env(safe-area-inset-bottom));
  border-top: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted2);
  letter-spacing: 0.05em;
}

.footer-tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(109, 184, 255, 0.35);
  text-transform: uppercase;
}

/* ─── ANIMATIONS ─────────────────────────────── */
@keyframes pulse-ring {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.02);
  }
}

@keyframes float-node {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes dash-flow {
  from {
    stroke-dashoffset: 200;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-left > * {
  animation: fade-up 0.7s ease both;
}

.hero-left .hero-label {
  animation-delay: 0.1s;
}

.hero-left h1 {
  animation-delay: 0.2s;
}

.hero-left .hero-body {
  animation-delay: 0.35s;
}

.hero-left .hero-actions {
  animation-delay: 0.5s;
}

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

  .hero-left > *,
  .hero-svg-pulse,
  .hero-svg-dash,
  .hero-svg-float {
    animation: none !important;
  }
}

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 768px) {
  #site-nav {
    padding: max(0.75rem, env(safe-area-inset-top)) 1.5rem 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-links {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    margin-top: calc(max(0.75rem, env(safe-area-inset-top)) + 3.25rem);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1.25rem;
    background: rgba(6, 14, 30, 0.98);
    border-bottom: 0.5px solid var(--border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    max-height: min(320px, calc(100vh - 5rem));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links li {
    border-bottom: 0.5px solid rgba(45, 141, 240, 0.1);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 15px;
  }

  #site-nav.nav-open .nav-links {
    display: flex;
  }

  #hero {
    padding: 6rem 1.5rem 3rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  section {
    padding: 4rem 1.5rem;
  }

  .thesis-grid {
    grid-template-columns: 1fr;
  }

  .focus-item {
    grid-template-columns: 1fr;
  }

  .focus-num {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 1.5rem;
  }
}
