/* ---------- tokens ---------- */
:root {
  --bg: #000000;
  --elevated: #1c1c1e;
  --secondary-surface: #2c2c2e;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --text-secondary: #86868b;

  --blue: #0a84ff;
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --purple: #bf5af2;
  --teal: #64d2ff;

  --shadow: none;
  --orb-opacity: 0.12;

  --sidebar-w: 260px;
  --sidebar-w-collapsed: 72px;
  --topbar-h: 52px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", sans-serif;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --elevated: #f5f5f7;
  --secondary-surface: #ebebed;
  --glass: rgba(255, 255, 255, 0.6);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --hairline: rgba(0, 0, 0, 0.08);
  --hairline-strong: rgba(0, 0, 0, 0.14);
  --text: #1d1d1f;
  --text-secondary: #86868b;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
  --orb-opacity: 0.1;

  color-scheme: light;
}

/* ---------- base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 24px);
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
}

/* visible keyboard focus — the one place accent blue is unavoidable */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- background orbs ---------- */
.orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  opacity: var(--orb-opacity);
  filter: blur(110px);
  will-change: transform;
}

.orb--blue {
  width: 620px;
  height: 620px;
  top: -180px;
  left: 12%;
  background: var(--blue);
  animation: drift 26s var(--ease) infinite alternate;
}

.orb--teal {
  width: 520px;
  height: 520px;
  bottom: -140px;
  left: 42%;
  background: var(--teal);
  animation: drift 32s var(--ease) infinite alternate-reverse;
}

.orb--purple {
  width: 460px;
  height: 460px;
  top: 34%;
  right: -120px;
  background: var(--purple);
  animation: drift 38s var(--ease) infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(40px, -50px, 0) scale(1.12);
  }
}

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  height: 100vh;
  padding: 18px 14px;
  background: var(--bg);
  border-right: 0.5px solid var(--hairline);
  transition: width 0.45s var(--ease), transform 0.45s var(--ease),
    background 0.5s var(--ease);
}

body[data-collapsed="true"] .sidebar {
  width: var(--sidebar-w-collapsed);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 8px;
  margin-bottom: 26px;
}

.mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0.5px solid var(--hairline-strong);
  border-radius: 9px;
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sidebar__name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-link svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.nav-link:hover {
  background: var(--glass);
  color: var(--text);
}

.nav-link[aria-current="true"] {
  background: var(--glass-strong);
  color: var(--text);
}

.sidebar__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 10px;
}

.status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}

.status__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 7px rgba(48, 209, 88, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(48, 209, 88, 0);
  }
}

/* label text that disappears when the rail collapses */
.collapsible {
  opacity: 1;
  transition: opacity 0.3s var(--ease);
}

body[data-collapsed="true"] .collapsible {
  opacity: 0;
  pointer-events: none;
}

body[data-collapsed="true"] .sidebar__foot {
  align-items: center;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-w);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--topbar-h);
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-bottom: 0.5px solid var(--hairline);
  transition: left 0.45s var(--ease), background 0.5s var(--ease);
}

body[data-collapsed="true"] .topbar {
  left: var(--sidebar-w-collapsed);
}

.topbar__title {
  margin-right: auto;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0.5px solid var(--hairline);
  border-radius: 10px;
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.icon-btn:hover {
  background: var(--glass-strong);
  border-color: var(--hairline-strong);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* the theme button swaps which glyph is shown */
[data-theme="light"] .icon-sun,
.icon-moon {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: block;
}

.menu-btn {
  display: none;
}

/* ---------- layout ---------- */
.main {
  position: relative;
  z-index: 10;
  margin-left: var(--sidebar-w);
  padding: calc(var(--topbar-h) + 56px) 32px 0;
  transition: margin-left 0.45s var(--ease);
}

body[data-collapsed="true"] .main {
  margin-left: var(--sidebar-w-collapsed);
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
}

.section {
  padding: 56px 0;
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}

.section + .section {
  border-top: 0.5px solid var(--hairline);
}

.section__label {
  margin-bottom: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section h2 {
  margin-bottom: 20px;
  font-size: 22px;
}

.section p {
  color: var(--text-secondary);
  font-size: 15px;
}

.section p + p {
  margin-top: 14px;
}

/* ---------- hero ---------- */
.hero {
  padding: 24px 0 64px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  margin-bottom: 26px;
  border: 0.5px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.hero h1 {
  font-size: 56px;
  letter-spacing: -0.03em;
}

.hero__sub {
  max-width: 520px;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 0.5px solid var(--hairline);
  border-radius: 10px;
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--shadow);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), opacity 0.25s var(--ease);
}

.btn:hover {
  background: var(--glass-strong);
  border-color: var(--hairline-strong);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn--primary {
  background: var(--text);
  border-color: transparent;
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--text);
  opacity: 0.86;
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  list-style: none;
}

.card {
  position: relative;
  padding: 20px;
  border: 0.5px solid var(--hairline);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  background: var(--glass-strong);
  border-color: var(--hairline-strong);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border: 0.5px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass-strong);
  color: var(--text-secondary);
}

.card__icon svg {
  width: 17px;
  height: 17px;
}

.card h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.card p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

/* one soft accent note, used sparingly */
.note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 18px;
  border: 0.5px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  color: var(--text-secondary);
  font-size: 13px;
}

.note__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

/* ---------- contact ---------- */
.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.contact__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 0.5px solid var(--hairline);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--shadow);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

a.contact__row:hover {
  background: var(--glass-strong);
  border-color: var(--hairline-strong);
}

.contact__k {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.contact__v {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  word-break: break-all;
}

.contact__row svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: transform 0.3s var(--ease);
}

a.contact__row:hover svg {
  transform: translate(2px, -2px);
}

/* ---------- footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding: 28px 0 40px;
  border-top: 0.5px solid var(--hairline);
  color: var(--text-secondary);
  font-size: 13px;
}

.footer a {
  transition: color 0.25s var(--ease);
}

.footer a:hover {
  color: var(--text);
}

/* ---------- legal page ---------- */
.legal h1 {
  font-size: 34px;
}

.legal__meta {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 13px;
}

.legal__body {
  margin-top: 34px;
  padding: 8px 28px;
  border: 0.5px solid var(--hairline);
  border-radius: 20px;
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--shadow);
}

.legal__body section {
  padding: 26px 0;
}

.legal__body section + section {
  border-top: 0.5px solid var(--hairline);
}

.legal__body h2 {
  margin-bottom: 10px;
  font-size: 17px;
}

.legal__body p {
  color: var(--text-secondary);
}

.legal__body ul {
  margin-top: 14px;
  padding-left: 18px;
  list-style: none;
}

.legal__body li {
  position: relative;
  color: var(--text-secondary);
  font-size: 15px;
}

.legal__body li + li {
  margin-top: 10px;
}

.legal__body li::before {
  content: "";
  position: absolute;
  top: 11px;
  left: -18px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hairline-strong);
}

.legal__body li strong {
  color: var(--text);
  font-weight: 500;
}

.legal__contact {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 15px;
  font-style: normal;
  line-height: 1.8;
}

.legal__contact strong {
  display: block;
  color: var(--text);
  font-weight: 500;
}

.legal__body a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--text-secondary);
}

/* ---------- entrance motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .sidebar {
    width: var(--sidebar-w);
    transform: translateX(-100%);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  }

  body[data-menu="open"] .sidebar {
    transform: none;
  }

  body[data-collapsed="true"] .sidebar {
    width: var(--sidebar-w);
  }

  body[data-collapsed="true"] .collapsible {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar,
  body[data-collapsed="true"] .topbar {
    left: 0;
  }

  .main,
  body[data-collapsed="true"] .main {
    margin-left: 0;
    padding: calc(var(--topbar-h) + 36px) 20px 0;
  }

  .menu-btn {
    display: grid;
  }

  .collapse-btn {
    display: none;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero__sub {
    font-size: 17px;
  }

  .legal__body {
    padding: 4px 20px;
  }

  .scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
  }

  body[data-menu="open"] .scrim {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
