html {
  --bg: #fcfdff;
  --blue: #6f2cff;
  --blue-strong: #5c20ee;
  --heading: #6250ff;
  --subheading: #5967a2;
  --link: #6642ff;
  --text: #081124;
  --muted: #5b6781;
  --soft: rgba(245, 247, 252, 0.9);
  --border: rgba(11, 20, 40, 0.09);
  --footer: #6d7891;
  --brand-secondary: rgba(111, 44, 255, 0.72);
  --brand-secondary-line: rgba(111, 44, 255, 0.38);
  --toggle-icon: rgba(85, 61, 157, 0.54);
  --toggle-glow: rgba(111, 44, 255, 0.025);
  --toggle-glow-strong: rgba(111, 44, 255, 0.08);
  --shadow: 0 20px 44px rgba(28, 41, 73, 0.08);
  background: var(--bg);
}

html[data-theme="dark"] {
  --bg: #050814;
  --blue: #8f63ff;
  --blue-strong: #a585ff;
  --heading: #8d86ff;
  --subheading: #9aa8dc;
  --link: #9173ff;
  --text: #f5f7ff;
  --muted: #aab4ca;
  --soft: rgba(12, 18, 33, 0.9);
  --border: rgba(164, 178, 209, 0.14);
  --footer: #96a1b8;
  --brand-secondary: rgba(165, 133, 255, 0.76);
  --brand-secondary-line: rgba(165, 133, 255, 0.32);
  --toggle-icon: rgba(232, 236, 255, 0.72);
  --toggle-glow: rgba(143, 99, 255, 0.04);
  --toggle-glow-strong: rgba(143, 99, 255, 0.1);
  --shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Barlow", sans-serif;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  padding: 48px 22px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text);
  line-height: 1.6;
  background: transparent;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 32% 0%, rgba(111, 44, 255, 0.12), transparent 34%),
    var(--bg);
  pointer-events: none;
}

body > * {
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  flex: 0 0 auto;
}

[data-site-header] {
  margin-bottom: 36px;
}

.site-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
}

.site-brand-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.site-brand-link:hover {
  text-decoration: none;
}

.site-brand-lockup {
  display: block;
  width: min(100%, 360px);
  transform-origin: center 99%;
  transition: transform 0.22s ease;
}

.site-brand-mark {
  display: block;
  width: 68%;
  height: auto;
  margin-left: 16%;
}

.site-brand-wordmark {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 18px;
}

.site-brand-caption {
  display: flex;
  align-items: center;
  gap: 18px;
  width: calc(100% - 8px);
  margin: 14px 0 0 8px;
  color: var(--brand-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.site-brand-caption::before,
.site-brand-caption::after {
  content: "";
  flex: 1 1 auto;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-secondary-line);
  opacity: 1;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.site-brand-link:hover .site-brand-lockup {
  transform: scale(1.015);
}

.site-brand-link:hover .site-brand-caption {
  color: var(--blue);
}

.site-brand-link:hover .site-brand-caption::before,
.site-brand-link:hover .site-brand-caption::after {
  background: currentColor;
  opacity: 0.72;
}

.theme-toggle {
  flex: 0 0 auto;
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--toggle-icon);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--toggle-glow) 0%, rgba(111, 44, 255, 0.06) 38%, rgba(111, 44, 255, 0) 74%);
  opacity: 0.16;
  filter: blur(9px);
  transition:
    transform 0.22s ease,
    opacity 0.22s ease,
    filter 0.22s ease;
  pointer-events: none;
}

.theme-toggle:hover {
  transform: translateY(-1px) scale(1.03);
}

.theme-toggle:hover .theme-toggle-icon {
  transform: scale(1.12);
}

.theme-toggle:hover::before {
  opacity: 0.28;
  filter: blur(10px);
  transform: scale(1.03);
}

.theme-toggle:active {
  transform: scale(0.98);
}

.theme-toggle-icon {
  position: absolute;
  inset: 0;
  display: block;
  width: 22px;
  height: 22px;
  margin: auto;
  z-index: 1;
  transition:
    color 0.24s ease,
    transform 0.28s ease,
    opacity 0.24s ease;
  filter: none;
}

.theme-toggle-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.theme-toggle-outline,
.theme-toggle-rays,
.theme-toggle-crescent {
  transform-origin: 12px 12px;
  transition:
    opacity 0.24s ease,
    transform 0.32s ease,
    stroke-dashoffset 0.32s ease;
}

.theme-toggle-outline {
  opacity: 1;
}

.theme-toggle-rays {
  opacity: 1;
  stroke-dasharray: 24;
  stroke-dashoffset: 0;
}

.theme-toggle-crescent {
  opacity: 0;
  transform: scale(0.72) rotate(-16deg);
}

html[data-theme="dark"] .theme-toggle-outline {
  opacity: 0;
  transform: scale(0.72);
}

html[data-theme="dark"] .theme-toggle-rays {
  opacity: 0;
  stroke-dashoffset: 24;
  transform: scale(0.72) rotate(-20deg);
}

html[data-theme="dark"] .theme-toggle-crescent {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle:focus-visible {
  outline: none;
}

.theme-toggle:focus-visible::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--toggle-glow-strong);
  pointer-events: none;
}

.page-kicker,
.muted {
  color: var(--muted);
  margin-top: 14px;
}

.tagline {
  margin-top: 26px;
  margin-bottom: 20px;
  font-size: 1.35rem;
  font-weight: 600;
  max-width: 720px;
}

.subtagline {
  color: var(--subheading);
  max-width: 720px;
  font-size: 1.05rem;
  margin-bottom: 35px;
}

section {
  margin: 34px 0;
}

h2 {
  color: var(--heading);
  font-size: 1.25rem;
  margin: 30px 0 12px 0;
}

section h2 {
  margin-top: 0;
}

p {
  margin: 0 0 14px 0;
}

p:last-child {
  margin-bottom: 0;
}

ul {
  padding-left: 22px;
  margin: 0;
}

li {
  margin: 4px 0;
}

a {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.18s ease;
}

a:hover {
  text-decoration: underline;
}

.card {
  position: relative;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-top: 14px;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.project {
  margin-bottom: 18px;
}

.project:last-child {
  margin-bottom: 0;
}

.project-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.status {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(111, 44, 255, 0.1);
  color: var(--blue-strong);
  margin-left: 6px;
  vertical-align: middle;
}

.typewriter {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 42px;
  margin-bottom: 18px;
  text-align: left;
  opacity: 0.82;
  white-space: pre-wrap;
  user-select: none;
  letter-spacing: 0.15px;
  font-style: italic;
}

.typewriter a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.18s ease;
}

.typewriter a:hover {
  color: var(--blue);
  text-decoration: none;
}

[data-site-footer] {
  margin-top: 54px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--footer);
  font-size: 0.95rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--footer);
  font-weight: 500;
  margin-left: 16px;
}

.footer-copy a {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}

.footer-copy a:hover {
  text-decoration: underline;
}

.footer-links a:first-child {
  margin-left: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  body {
    padding: 34px 18px;
  }

  .site-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-brand-lockup {
    width: min(100%, 320px);
  }

  .site-brand-caption {
    gap: 12px;
    letter-spacing: 0.34em;
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
  }

  .tagline {
    font-size: 1.18rem;
    margin-top: 16px;
    margin-bottom: 20px;
  }

  .subtagline {
    margin-bottom: 24px;
  }

  .footer-row {
    display: block;
  }

  .footer-links {
    margin-top: 8px;
  }

  .footer-links a {
    margin-left: 0;
    margin-right: 14px;
  }

  .typewriter {
    font-size: 0.96rem;
  }
}
