:root {
  color-scheme: dark;
  --bg: #030303;
  --text: #f7f7f2;
  --muted: #a7adb7;
  --accent: #35d0ff;
  --accent-yellow: #ffd84d;
  --accent-green: #44d47e;
  --line: rgba(255, 255, 255, 0.12);
  --page-x: clamp(20px, 5vw, 64px);
  --section-top: clamp(96px, 16vh, 148px);
  --section-bottom: clamp(64px, 12vh, 112px);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

body[data-active-section="about"] {
  --accent: var(--accent-yellow);
}

body[data-active-section="contact"] {
  --accent: var(--accent-green);
}

main {
  view-transition-name: page;
}

::view-transition-old(page),
::view-transition-new(page) {
  animation-duration: 420ms;
  animation-timing-function: ease;
}

::view-transition-old(page) {
  animation-name: page-fade-out;
}

::view-transition-new(page) {
  animation-name: page-fade-in;
}

@keyframes page-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes page-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#edge-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 66px;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  pointer-events: auto;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 650;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  pointer-events: auto;
}

.site-nav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border-radius: 8px;
  padding: 0 13px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.07);
  color: var(--accent);
  outline: none;
}

.home-page {
  position: relative;
  z-index: 1;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
}

.home-section {
  position: absolute;
  inset: 0;
  opacity: 0;
  overflow-x: hidden;
  overflow-y: auto;
  pointer-events: none;
  transform: translateY(14px);
  transition:
    opacity 360ms ease,
    transform 360ms ease;
}

.home-section.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100%;
  align-items: center;
  justify-items: center;
  padding: clamp(112px, 17vh, 150px) clamp(20px, 5vw, 64px) 16vh;
  text-align: left;
}

.contact-page {
  --accent: var(--accent-green);
  position: relative;
  z-index: 1;
  display: grid;
  min-height: calc(100svh - 88px);
  align-items: center;
  justify-items: center;
  padding: 32px clamp(20px, 5vw, 64px) 10vh;
}

.contact-layout {
  display: grid;
  width: min(640px, 100%);
  justify-self: center;
}

.contact-form {
  position: relative;
  display: grid;
  gap: 18px;
  width: 100%;
  padding: clamp(20px, 3vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
    rgba(7, 13, 18, 0.78);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.contact-form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(255, 255, 255, 0.28));
  pointer-events: none;
}

.form-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 4px;
}

.form-heading .eyebrow {
  margin: 0;
}

.form-heading h1,
.form-heading h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form span {
  color: rgba(247, 247, 242, 0.86);
  font-size: 0.82rem;
  font-weight: 700;
}

.contact-form small {
  color: var(--muted);
  font-size: 0.78rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
  color: var(--text);
  font: inherit;
  line-height: 1.4;
  outline: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.contact-form input {
  min-height: 46px;
  padding: 0 13px;
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
  padding: 12px 13px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.44);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
}

.contact-form .button {
  width: fit-content;
  cursor: pointer;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 24%, transparent);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.contact-form .button:hover,
.contact-form .button:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 32%, transparent);
}

.form-alert,
.form-success {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.form-alert {
  border-color: rgba(255, 92, 92, 0.45);
  background: rgba(255, 92, 92, 0.12);
  color: #ffdada;
}

.form-success {
  border-color: rgba(68, 212, 126, 0.45);
  background: rgba(68, 212, 126, 0.12);
  color: #d9ffe7;
}

.inline-form {
  margin: 0;
}

.inline-form button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 0;
  border-radius: 8px;
  padding: 0 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
}

.inline-form button:hover,
.inline-form button:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  outline: none;
}

.admin-dashboard {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  padding: clamp(104px, 14vh, 132px) clamp(20px, 5vw, 64px) 10vh;
}

.admin-shell {
  display: grid;
  gap: 26px;
  width: min(900px, 100%);
}

.admin-heading {
  display: grid;
  gap: 8px;
}

.admin-heading .eyebrow {
  margin: 0;
}

.admin-heading h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 6.25rem);
  line-height: 0.95;
}

.message-list {
  display: grid;
  gap: 14px;
}

.message-item {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(16px, 3vw, 24px);
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(14px);
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: start;
  justify-content: space-between;
}

.message-meta h2 {
  margin: 0 0 5px;
  font-size: 1.1rem;
}

.message-meta a,
.message-meta time {
  color: var(--muted);
  font-size: 0.9rem;
}

.message-meta a {
  display: block;
}

.message-item p {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.message-item form {
  margin: 0;
}

.button.danger {
  color: #ffdada;
}

.empty-state {
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
}

.hero-copy {
  width: min(760px, 100%);
  max-width: 760px;
}

.hero h1,
.hero .lede {
  margin-right: 0;
  margin-left: 0;
}

.about-section {
  --accent: var(--accent-yellow);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100%;
  align-items: center;
  padding: 13vh clamp(20px, 5vw, 64px) 13vh;
}

.about-copy {
  max-width: 760px;
}

.about-heading {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 2vw, 24px);
}

.about-copy h2 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.55rem, 5vw, 5.5rem);
  line-height: 1;
  letter-spacing: 0;
}

.about-copy p {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.65;
}

.about-photo {
  flex: 0 0 clamp(82px, 10vw, 128px);
  margin: 0;
}

.about-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.88;
}

.about-photo figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.home-contact {
  --accent: var(--accent-green);
  display: grid;
  min-height: 100%;
  align-items: center;
  padding: 13vh clamp(20px, 5vw, 64px) 14vh;
}

.home-contact .contact-form {
  border-color: rgba(68, 212, 126, 0.34);
  background:
    linear-gradient(145deg, rgba(68, 212, 126, 0.16), rgba(255, 255, 255, 0.055)),
    rgba(7, 18, 13, 0.82);
}

.home-contact .contact-form input:focus,
.home-contact .contact-form textarea:focus {
  border-color: var(--accent-green);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(4rem, 13vw, 10.5rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.lede {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--text);
  font-size: clamp(1.35rem, 2.7vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
}

.hero-support {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #001018;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 640px) {
  .site-header {
    top: 0;
    width: 100%;
    min-height: 60px;
    padding: 8px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand {
    gap: 10px;
  }

  .brand-name {
    max-width: 88px;
    font-size: 0.86rem;
    line-height: 1.1;
  }

  .site-nav {
    position: static;
    display: flex;
    min-width: 0;
    gap: 4px;
    pointer-events: auto;
  }

  .site-nav a {
    min-height: 40px;
    justify-content: flex-start;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .inline-form button {
    width: 100%;
    min-height: 40px;
    justify-content: flex-start;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .hero {
    min-height: 100%;
    padding-top: 104px;
    padding-bottom: 12vh;
  }

  .about-section {
    grid-template-columns: 1fr;
    min-height: 100%;
    padding-top: 10vh;
    padding-bottom: 12vh;
  }

  .about-copy h2 {
    font-size: clamp(2.7rem, 12vw, 4.5rem);
  }

  .contact-page {
    min-height: calc(100svh - 76px);
    padding-top: 24px;
    padding-bottom: 8vh;
  }

  .home-contact {
    min-height: 100%;
    padding-top: 10vh;
    padding-bottom: 10vh;
  }

  .form-heading h1,
  .form-heading h2 {
    font-size: clamp(2.25rem, 13vw, 4rem);
  }

  .admin-dashboard {
    padding-top: 92px;
  }

  h1 {
    font-size: clamp(3.6rem, 19vw, 6.5rem);
  }
}

/* Mobile-first layout pass */
html {
  scroll-padding-top: 104px;
}

@media (max-width: 759px) {
  :root {
    --section-top: clamp(112px, 16vh, 148px);
  }
}

body {
  background:
    radial-gradient(circle at 50% 0%, rgba(53, 208, 255, 0.08), transparent 32rem),
    var(--bg);
}

.site-header {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 64px;
  padding: 8px var(--page-x);
  background: linear-gradient(180deg, rgba(3, 3, 3, 0.88), rgba(3, 3, 3, 0.48) 72%, transparent);
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.brand {
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
}

.brand-name {
  max-width: 112px;
  font-size: 0.9rem;
  line-height: 1.05;
}

.site-nav {
  position: static;
  display: flex;
  min-width: 0;
  gap: 4px;
  padding: 8px 0 0;
  pointer-events: auto;
}

.site-nav a,
.inline-form button {
  min-height: 42px;
  justify-content: flex-start;
  padding: 0 12px;
  font-size: 0.9rem;
}

.hero {
  min-height: 100%;
  align-items: start;
  justify-items: start;
  padding: var(--section-top) var(--page-x) var(--section-bottom);
}

.hero-copy,
.about-copy,
.contact-layout {
  width: 100%;
  max-width: none;
  justify-self: start;
}

.eyebrow {
  margin-bottom: 14px;
  font-size: 0.78rem;
  line-height: 1.3;
}

h1 {
  max-width: 9ch;
  font-size: clamp(3.35rem, 17vw, 5rem);
  line-height: 0.9;
}

.lede {
  margin-top: 22px;
  font-size: clamp(1.12rem, 5.4vw, 1.45rem);
  line-height: 1.28;
}

.hero-support {
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.58;
}

.hero-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 28px;
}

.button {
  min-height: 48px;
  padding: 0 14px;
}

.about-section {
  grid-template-columns: 1fr;
  min-height: 100%;
  align-items: start;
  padding: var(--section-top) var(--page-x) var(--section-bottom);
}

.about-heading {
  gap: 12px;
}

.about-copy h2 {
  max-width: 13ch;
  font-size: clamp(2.25rem, 9.4vw, 3.15rem);
  line-height: 1.04;
}

.about-copy p {
  margin-top: 18px;
  font-size: 1rem;
  line-height: 1.62;
}

.about-photo {
  flex-basis: 76px;
}

.home-contact {
  min-height: 100%;
  align-items: start;
  padding: var(--section-top) var(--page-x) var(--section-bottom);
}

.contact-page {
  min-height: 100svh;
  align-items: start;
  padding: var(--section-top) var(--page-x) var(--section-bottom);
}

.contact-form {
  gap: 16px;
  padding: clamp(22px, 6vw, 28px);
}

.form-heading h1,
.form-heading h2 {
  max-width: 10ch;
  font-size: clamp(2.15rem, 9.6vw, 3.15rem);
  line-height: 1.02;
}

.contact-form input {
  min-height: 48px;
}

.contact-form textarea {
  min-height: 138px;
}

.contact-form .button {
  width: 100%;
}

@media (max-width: 380px) {
  .brand-name {
    max-width: 86px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.25rem);
  }
}

@media (min-width: 760px) {
  html {
    scroll-padding-top: 88px;
  }

  .site-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 12px var(--page-x);
    background: linear-gradient(180deg, rgba(3, 3, 3, 0.72), rgba(3, 3, 3, 0.22) 78%, transparent);
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-name {
    max-width: none;
    font-size: 1rem;
  }

  .site-nav {
    position: static;
    display: flex;
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    backdrop-filter: none;
  }

  .site-nav a {
    justify-content: center;
  }

  .hero {
    align-items: center;
    justify-items: start;
    padding: var(--section-top) var(--page-x) var(--section-bottom);
  }

  .hero-copy {
    width: min(760px, 100%);
  }

  h1 {
    max-width: 11ch;
    font-size: clamp(5rem, 10vw, 10.5rem);
    line-height: 0.88;
  }

  .lede {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
  }

  .hero-support {
    font-size: clamp(1rem, 1.45vw, 1.18rem);
  }

  .hero-actions {
    display: flex;
    width: auto;
    gap: 12px;
  }

  .button {
    padding: 0 18px;
  }

  .about-section {
    grid-template-columns: minmax(0, 1fr);
    min-height: 100%;
    align-items: center;
    justify-items: start;
    padding: var(--section-top) var(--page-x) var(--section-bottom);
  }

  .about-copy {
    max-width: 760px;
  }

  .about-copy h2 {
    max-width: 13ch;
    font-size: clamp(3.25rem, 5vw, 5.5rem);
  }

  .about-copy p {
    max-width: 650px;
    font-size: clamp(1rem, 1.35vw, 1.16rem);
  }

  .home-contact {
    min-height: 100%;
    align-items: center;
    justify-items: start;
    padding: var(--section-top) var(--page-x) var(--section-bottom);
  }

  .contact-layout {
    width: min(640px, 100%);
  }

  .contact-page {
    align-items: center;
    justify-items: start;
    padding: var(--section-top) var(--page-x) var(--section-bottom);
  }

  .contact-form {
    gap: 18px;
    padding: clamp(24px, 3vw, 30px);
  }

  .form-heading h1,
  .form-heading h2 {
    font-size: clamp(2.75rem, 5.2vw, 4.5rem);
  }

  .contact-form .button {
    width: fit-content;
  }
}
