:root {
  color-scheme: dark;

  --bg: #0d1420;
  --bg-gradient:
    radial-gradient(ellipse 800px 700px at 100% 100%, rgba(0, 41, 102, 0.85) 0%, transparent 70%),
    radial-gradient(ellipse 800px 700px at 0% 0%, rgba(0, 41, 102, 0.85) 0%, transparent 70%),
    radial-gradient(ellipse 560px 340px at 50% 0%, rgba(71, 169, 202, 0.10) 0%, transparent 70%);
  --text: #b4bfcd;
  --text-strong: #eef3f9;
  --text-muted: #8491a3;
  --accent: #47a9ca;
  --accent-hover: #8ad8f0;
  --accent-soft: rgba(71, 169, 202, 0.14);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(71, 169, 202, 0.50);
  --shadow: 0 16px 40px rgba(0, 8, 24, 0.45);
  --selection: rgba(71, 169, 202, 0.35);
  --name-glow: 0 0 36px rgba(71, 169, 202, 0.35);
  --brand-twitter: #ff6b6b;
  --brand-github: #7aa7ff;

  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-pill: 999px;

  --ctl-size: clamp(42px, 8vw, 48px);
  --ctl-top: max(20px, env(safe-area-inset-top));
  --ctl-edge: max(20px, env(safe-area-inset-right));

  --enter-duration: 750ms;
  --enter-stagger: 70ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f4f7fb;
  --bg-gradient:
    radial-gradient(ellipse 800px 700px at 100% 100%, #dce8ff 0%, transparent 70%),
    radial-gradient(ellipse 800px 700px at 0% 0%, #dce8ff 0%, transparent 70%),
    radial-gradient(ellipse 560px 340px at 50% 0%, rgba(14, 116, 144, 0.07) 0%, transparent 70%);
  --text: #3a4556;
  --text-strong: #0f1e33;
  --text-muted: #5d6a7e;
  --accent: #0e7490;
  --accent-hover: #0a5670;
  --accent-soft: rgba(14, 116, 144, 0.10);
  --surface: rgba(255, 255, 255, 0.70);
  --surface-hover: rgba(255, 255, 255, 0.96);
  --border: rgba(15, 30, 51, 0.12);
  --border-strong: rgba(14, 116, 144, 0.45);
  --shadow: 0 16px 36px rgba(0, 30, 80, 0.12);
  --selection: rgba(14, 116, 144, 0.25);
  --name-glow: none;
  --brand-twitter: #d62828;
  --brand-github: #1d4ed8;
}


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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--selection);
  color: var(--text-strong);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: 1.25;
  color: var(--text-strong);
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.main-stuff {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 100dvh;
  padding: clamp(5.5rem, 14vh, 8rem) 1.25rem 3rem;
}


.theme-toggle {
  position: fixed;
  top: var(--ctl-top);
  right: var(--ctl-edge);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--ctl-size);
  height: var(--ctl-size);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: var(--shadow);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.25s ease, border-color 0.3s ease, background-color 0.3s ease;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .theme-toggle,
  .nav-link {
    background: var(--bg);
  }
}

@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
  }
}

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

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}

.theme-toggle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-nav {
  position: fixed;
  top: var(--ctl-top);
  left: var(--ctl-edge);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--ctl-size);
  padding: 0 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--text);
}

.nav-link:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  color: var(--accent-hover);
}

.nav-link__dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: #ff5d5d;
  box-shadow: 0 0 8px #ff5d5d;
}

.nav-link__dot[hidden] {
  display: none;
}

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


.copyright {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-meta-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-meta-link:hover,
.footer-meta-link:focus-visible {
  opacity: 1;
  color: var(--accent-hover);
}


@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.animate-in {
  animation: pageEnter var(--enter-duration) var(--ease-out) backwards;
}

.stagger > * {
  animation: pageEnter var(--enter-duration) var(--ease-out) backwards;
}

.stagger > :nth-child(2) { animation-delay: 70ms; }
.stagger > :nth-child(3) { animation-delay: 140ms; }
.stagger > :nth-child(4) { animation-delay: 210ms; }
.stagger > :nth-child(5) { animation-delay: 280ms; }
.stagger > :nth-child(6) { animation-delay: 350ms; }
.stagger > :nth-child(7) { animation-delay: 420ms; }
.stagger > :nth-child(8) { animation-delay: 490ms; }

.stagger-auto > * {
  animation: pageEnter var(--enter-duration) var(--ease-out) backwards;
  animation-delay: calc(var(--enter-stagger) * var(--i, 0));
}

@media (prefers-reduced-motion: reduce) {
  .animate-in,
  .stagger > *,
  .stagger-auto > * {
    animation: none !important;
  }

  .theme-toggle,
  .nav-link {
    transition: none !important;
  }
}


@media (max-width: 480px) {
  :root {
    --ctl-edge: max(14px, env(safe-area-inset-right));
    --ctl-top: max(14px, env(safe-area-inset-top));
  }

  .top-nav {
    gap: 0.45rem;
  }

  .nav-link {
    padding: 0 0.85rem;
    font-size: 0.82rem;
  }
}


.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 40rem;
  text-align: center;
}

.profile__header {
  display: grid;
  justify-items: center;
  row-gap: 0.4rem;
  margin-bottom: 2.25rem;
}

@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes spin {
  to { --spin: 360deg; }
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

.profile__avatar-wrap {
  --av: 132px;
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--av) + 44px);
  height: calc(var(--av) + 44px);
  margin: 14px 14px 0.9rem;
  border-radius: 50%;
  box-shadow: 0 0 46px rgba(71, 169, 202, 0.30), 0 0 90px rgba(47, 107, 224, 0.18);
  isolation: isolate;
  transition: transform 0.5s var(--ease-out);
}

.profile__avatar-wrap::before,
.profile__avatar-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.profile__avatar-wrap::before {
  inset: 0;
  background: conic-gradient(from var(--spin), #47a9ca, #2f6be0, #8b5cf6, #5eead4, #47a9ca);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: spin 9s linear infinite;
}

.profile__avatar-wrap::after {
  inset: 0;
  background: radial-gradient(circle at 50% 2px, #ffffff 0 2.5px, transparent 3.5px);
  filter: drop-shadow(0 0 5px #8ad8f0) drop-shadow(0 0 10px #47a9ca);
  animation: orbit 14s linear infinite;
}

.profile__avatar {
  position: relative;
  z-index: 1;
  width: var(--av);
  height: var(--av);
  border: 5px solid var(--bg);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.profile__avatar-wrap:hover {
  transform: scale(1.04);
}

.profile__avatar-wrap:hover::before {
  animation-duration: 3s;
}

:root[data-theme="light"] .profile__avatar-wrap {
  box-shadow: 0 0 40px rgba(251, 146, 60, 0.30), 0 0 80px rgba(251, 191, 36, 0.20);
}

:root[data-theme="light"] .profile__avatar-wrap::before {
  background: conic-gradient(from var(--spin), #f59e0b, #fb7185, #fbbf24, #f97316, #f59e0b);
}

:root[data-theme="light"] .profile__avatar-wrap::after {
  inset: -14px;
  background: repeating-conic-gradient(from 0deg, rgba(245, 158, 11, 0.85) 0 3deg, transparent 3deg 15deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px));
  filter: none;
  animation: orbit 50s linear infinite;
}

.profile__name {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5.5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  background: linear-gradient(180deg, #ffffff 20%, #9fd6e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(71, 169, 202, 0.35));
  padding: 0 0.07em 0.1em 0.14em;
}

.profile__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 26rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.profile__tags li {
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--accent);
}

.profile__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 1.75rem auto 0;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #47a9ca, #2f6be0);
  box-shadow: 0 10px 28px rgba(47, 107, 224, 0.35);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.profile__cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(47, 107, 224, 0.50);
  color: #ffffff;
}

:root[data-theme="light"] .profile__name {
  background-image: linear-gradient(135deg, #0f1e33 20%, #0e7490 100%);
  filter: none;
}

:root[data-theme="light"] .profile__cta {
  background: linear-gradient(135deg, #0e7490, #1d4ed8);
}

.profile__handle {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.profile__handle::before {
  content: "@";
  opacity: 0.7;
}

.profile__content {
  width: 100%;
  text-align: left;
}

.profile__greeting {
  margin: 0 0 0.9rem 0.25rem;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
}

.profile__bio {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 300;
  line-height: 1.8;
  color: var(--text);
  overflow-wrap: break-word;
}

.profile__bio p {
  margin-bottom: 1.15em;
}

.profile__bio strong {
  font-weight: 600;
  color: var(--text-strong);
}

.profile__bio p:last-child {
  margin: 1.5rem 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dont,
.profile__bio a {
  padding-bottom: 1px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  font-weight: 500;
  color: var(--accent);
  transition: color 0.2s ease, background-size 0.25s ease;
}

.dont:hover,
.dont:focus-visible,
.profile__bio a:hover {
  background-size: 100% 2px;
  color: var(--accent-hover);
}


.profile__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  margin-top: 2.5rem;
}

.profile__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.profile__link {
  display: inline-block;
  padding: 0.6rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text);
}

.profile__link:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
  color: var(--text-strong);
}

.profile__link--twitter:hover {
  border-color: var(--brand-twitter);
  color: var(--brand-twitter);
}

.profile__link--github:hover {
  border-color: var(--brand-github);
  color: var(--brand-github);
}


@media (max-width: 480px) {
  .profile__avatar-wrap {
    --av: 112px;
  }

  .profile__header {
    margin-bottom: 1.75rem;
  }

  .profile__link {
    padding: 0.55rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile__avatar-wrap::before,
  .profile__avatar-wrap::after {
    animation: none !important;
  }
}