/* Theme tokens */
:root {
  --bg: #1b1b1b;
  --panel: #252525;
  --panel2: #303030;
  --text: #f7f4ee;
  --muted: #c7c2b6;
  --accent: #f5a927;
  --border: #181818;
  --shadow: 0 14px 28px rgba(0, 0, 0, 0.6);
  --bg-deep: #1b1b1b;
  --bg-slate: #202020;
  --bg-charcoal: #282828;
  --bg-iron: #333333;
  --star-cool: rgba(255, 255, 255, 0.7);
  --star-warm: rgba(255, 220, 170, 0.6);
  --decal-black: #000000;
  --decal-white: #ffffff;
  --decal-yellow: #ffd400;
  --decal-black-rgb: 0, 0, 0;
  --decal-white-rgb: 255, 255, 255;
  --decal-yellow-rgb: 255, 212, 0;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: "Inter", "Nunito", sans-serif;
  color: var(--text);
  background-color: var(--bg-deep);
  min-height: 100vh;
  overflow-y: scroll;
}

/* Gradient and constellation background layers. */
.decal-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
      1200px 800px at 18% 18%,
      rgba(58, 58, 58, 0.55),
      transparent 60%
    ),
    radial-gradient(
      900px 700px at 80% 12%,
      rgba(38, 38, 38, 0.85),
      transparent 55%
    ),
    radial-gradient(
      1000px 800px at 70% 82%,
      rgba(28, 28, 28, 0.95),
      transparent 65%
    ),
    linear-gradient(
      140deg,
      var(--bg-deep) 0%,
      var(--bg-slate) 40%,
      var(--bg-charcoal) 70%,
      var(--bg-iron) 100%
    );
  overflow: hidden;
}

.decal-layer {
  position: absolute;
  inset: -30% -30%;
  background-repeat: repeat;
  will-change: background-position, opacity;
  display: none;
}

.constellation-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.12));
}

.decal-stripes {
  display: none;
}

.decal-accents {
  display: none;
}

body.ui-hidden > *:not(.decal-bg) {
  display: none;
}

body > header,
body > main,
body > footer {
  animation: page-pop 0.6s ease-out both;
  transform-origin: center top;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font-family: inherit;
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(27, 27, 27, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: "Fredoka", sans-serif;
  font-size: 1.25rem;
}

.home-link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 18px rgba(6, 6, 10, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(6, 6, 10, 0.5);
}

.home-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.topbar-link:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(6, 6, 10, 0.4);
}

.brand-name {
  position: relative;
  padding-bottom: 4px;
  text-shadow: 0 0 12px rgba(245, 169, 39, 0.25);
}

.brand-name::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(245, 169, 39, 0.5);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.95rem;
  color: var(--muted);
}

.topbar-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.topbar-nav a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  padding: 48px 0 36px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero-card {
  width: 100%;
  max-width: 880px;
  background: linear-gradient(145deg, var(--panel), var(--panel2));
  border-radius: 24px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow), 0 0 0 1px rgba(245, 169, 39, 0.08);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 10% 0%,
    rgba(245, 169, 39, 0.1),
    transparent 50%
  );
  pointer-events: none;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid #1a1a24;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(7, 7, 10, 0.55);
}

.discord-card {
  width: fit-content;
  max-width: min(520px, 100%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(145deg, var(--panel), var(--panel2));
  border-radius: 24px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow), 0 0 0 1px rgba(245, 169, 39, 0.08);
  text-align: left;
  --status-color: #76808f;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.glow-card::before {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.6) 48%,
    rgba(255, 255, 255, 0) 56%
  );
  opacity: 0;
  transform: translateX(-120%);
  pointer-events: none;
  z-index: 0;
}

.glow-card:hover::before,
.glow-card:focus-visible::before {
  animation: card-sweep 0.6s ease-out;
}

.discord-card:hover,
.discord-card:focus-visible {
  box-shadow: 0 16px 30px rgba(5, 5, 8, 0.55),
    0 0 18px rgba(245, 169, 39, 0.28);
}

.discord-card[data-status="online"] {
  --status-color: #3ba55d;
}

.discord-card[data-status="idle"] {
  --status-color: #f0b232;
}

.discord-card[data-status="dnd"] {
  --status-color: #ed4245;
}

.discord-card[data-status="offline"],
.discord-card[data-status="unknown"] {
  --status-color: #76808f;
}

.avatar-wrap {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  overflow: visible;
}

.discord-avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 3px solid #1a1a24;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(7, 7, 10, 0.55);
  position: relative;
  z-index: 1;
}

.presence-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #1c1c24;
  border: 2px solid #14141b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.presence-icon {
  width: 16px;
  height: 16px;
  color: var(--status-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px var(--status-color));
}

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

.presence-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--status-color);
  box-shadow: 0 0 6px var(--status-color);
}

.presence-badge.is-fallback {
  background: var(--status-color);
  border: 3px solid #14141b;
  width: 22px;
  height: 22px;
  right: 5px;
}

.presence-badge.is-fallback .presence-icon {
  filter: none;
}

.presence-badge.is-fallback .presence-dot {
  display: none;
}

.discord-text {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.discord-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.discord-activity {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.1vw, 1.4rem);
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.discord-spotify,
.discord-activity-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.discord-spotify.no-art,
.discord-activity-block.no-image {
  grid-template-columns: 1fr;
}

.spotify-art,
.activity-image {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(8, 8, 12, 0.35);
}

.spotify-meta,
.activity-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spotify-title,
.activity-name {
  margin: 0;
  font-weight: 600;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.spotify-artist,
.activity-details,
.activity-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.activity-elapsed {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.activity-details:empty,
.activity-state:empty,
.spotify-artist:empty {
  display: none;
}

.spotify-progress {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.spotify-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: inherit;
}

.spotify-time {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-text h1 {
  font-family: "Fredoka", sans-serif;
  font-size: 2.4rem;
  margin: 6px 0 10px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px;
}

.tagline {
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  border: none;
  background: var(--accent);
  color: #1b1200;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(245, 169, 39, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(245, 169, 39, 0.5);
}

.btn:active {
  animation: press-bounce 0.18s ease-out;
}

.btn-ghost {
  background: #22212a;
  color: var(--text);
  border: 2px solid rgba(245, 169, 39, 0.35);
  box-shadow: 0 0 0 1px rgba(245, 169, 39, 0.08);
}

.btn-ghost:hover {
  box-shadow: 0 12px 22px rgba(5, 5, 8, 0.5),
    0 0 18px rgba(245, 169, 39, 0.25);
}

#contact-button {
  padding: 14px 32px;
  font-size: 1.05rem;
  border-radius: 999px;
}

#contact-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(5, 5, 8, 0.45),
    0 0 16px rgba(245, 169, 39, 0.2);
}

#contact-button:active {
  animation: none;
  transform: translateY(0);
}

#support-button {
  position: relative;
  padding: 14px 32px;
  font-size: 1.05rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #33e27c, #1fb35d 55%, #2fe389);
  color: #0e1c13;
  border: 1px solid rgba(68, 237, 149, 0.55);
  box-shadow: 0 12px 24px rgba(17, 120, 61, 0.45),
    0 0 18px rgba(66, 232, 145, 0.35);
  overflow: hidden;
}

#support-button::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -40%;
  width: 60%;
  height: 220%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.75) 45%,
    rgba(255, 255, 255, 0) 80%
  );
  opacity: 0;
  transform: translateX(-120%);
  pointer-events: none;
}

#support-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(12, 110, 56, 0.5),
    0 0 20px rgba(78, 240, 157, 0.45);
}

#support-button:hover::after,
#support-button:focus-visible::after {
  opacity: 0.7;
  animation: shimmer 0.9s ease;
}

#support-button:active {
  animation: none;
  transform: translateY(0);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.8rem;
  margin: 0;
  text-shadow: 0 0 14px rgba(245, 169, 39, 0.35);
}

.underline {
  flex: 1;
  height: 2px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    rgba(245, 169, 39, 0.85) 0%,
    rgba(245, 169, 39, 0.45) 35%,
    rgba(245, 169, 39, 0.12) 65%,
    rgba(245, 169, 39, 0) 100%
  );
  border-radius: 999px;
  box-shadow: 0 0 6px rgba(245, 169, 39, 0.28);
  filter: drop-shadow(0 0 4px rgba(245, 169, 39, 0.2));
  animation: divider-breathe 8s ease-in-out infinite;
}

.underline::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32%;
  left: -32%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.85) 35%,
    rgba(255, 255, 255, 0.15) 100%
  );
  opacity: 0.8;
  animation: divider-glow 3.2s ease-in-out infinite;
}

.reveal-ready :where([data-reveal]) {
  opacity: 0;
  --reveal-y: 18px;
  --reveal-scale: 0.98;
  transform: translateY(var(--reveal-y)) scale(var(--reveal-scale));
  transition: opacity 0.6s ease var(--reveal-delay, 0ms),
    transform 0.6s ease 0ms;
  will-change: transform, opacity;
}

.reveal-ready :where([data-reveal]).is-visible {
  opacity: 1;
  --reveal-y: 0px;
  --reveal-scale: 1;
}

.reveal-ready .discord-card[data-reveal] {
  transition: opacity 0.18s ease var(--reveal-delay, 0ms),
    transform 0.18s ease 0ms;
}

.tilt-card {
  --tilt-rotate-x: 0deg;
  --tilt-rotate-y: 0deg;
  --tilt-lift: 0px;
  --tilt-scale: 1;
  --tilt-glow-x: 50%;
  --tilt-glow-y: 50%;
  --tilt-glow-opacity: 0;
  position: relative;
  transform: translateY(var(--reveal-y, 0px)) scale(var(--reveal-scale, 1))
    perspective(900px) rotateX(var(--tilt-rotate-x))
    rotateY(var(--tilt-rotate-y)) translateY(var(--tilt-lift))
    scale(var(--tilt-scale));
  transform-style: preserve-3d;
  transform-origin: center;
  backface-visibility: hidden;
  isolation: isolate;
}

.tilt-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--tilt-glow-x) var(--tilt-glow-y),
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0) 60%
  );
  opacity: var(--tilt-glow-opacity);
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 0;
}

.tilt-card > * {
  position: relative;
  z-index: 1;
}

.breathing-glow {
  filter: drop-shadow(0 0 0 rgba(245, 169, 39, 0));
  animation: card-breathe 8s ease-in-out infinite;
}

.links,
.tech {
  padding: 36px 0;
}

.projects {
  padding: 42px 0 54px;
}

.projects-layout {
  display: grid;
  gap: 34px;
}

.project-category {
  display: grid;
  gap: 18px;
}

.project-category-header {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.project-category-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.project-category-header h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-family: "Fredoka", sans-serif;
}

.project-category-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.view-section {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.28s ease, transform 0.28s ease;
  transform-origin: center top;
  will-change: transform, opacity;
}

.view-section.is-hidden {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

.projects-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--panel), var(--panel2));
  border: 2px solid var(--border);
  box-shadow: var(--shadow), 0 0 0 1px rgba(245, 169, 39, 0.08);
  transition: box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.project-card-link {
  display: grid;
  gap: 18px;
  color: inherit;
  text-decoration: none;
}

.project-demo {
  width: fit-content;
  padding: 10px 18px;
  font-size: 0.9rem;
  justify-self: start;
}

.project-card:hover,
.project-card:focus-visible {
  box-shadow: 0 18px 34px rgba(5, 5, 8, 0.6),
    0 0 24px rgba(245, 169, 39, 0.32);
}

.project-media {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #15151c;
  aspect-ratio: 16 / 9;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-body h3 {
  margin: 0;
  font-size: 1.25rem;
  font-family: "Fredoka", sans-serif;
}

.project-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.roblox-game-card {
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(100%, 420px);
}

.roblox-game-card .project-media {
  width: 96px;
  aspect-ratio: 1;
}

.roblox-game-card .project-media img:not([src]) {
  visibility: hidden;
}

.roblox-game-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.roblox-game-stats p {
  display: grid;
  gap: 1px;
  padding: 7px 8px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface-2);
}

.roblox-game-stats span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.roblox-game-stats strong {
  color: var(--color-text);
  font-size: 0.88rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-tag + .project-tag::before {
  content: "•";
  display: inline-block;
  margin: 0 8px;
  opacity: 0.6;
}

.links-grid {
  display: grid;
  gap: 18px;
}

.link-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--panel), var(--panel2));
  border: 2px solid var(--border);
  box-shadow: 0 10px 18px rgba(6, 6, 10, 0.4),
    0 0 0 1px rgba(245, 169, 39, 0.08);
  transition: opacity 0.6s ease var(--reveal-delay, 0ms),
    transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.link-card:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 0 16px 30px rgba(5, 5, 8, 0.6),
    0 0 22px rgba(245, 169, 39, 0.35);
}

.link-card:active {
  animation: press-bounce 0.18s ease-out;
}

.link-card.is-collapsed {
  display: none;
}

.links-toggle {
  grid-column: 1 / -1;
  justify-self: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.6s ease var(--reveal-delay, 0ms),
    color 0.2s ease, border-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.links-toggle:hover {
  color: var(--accent);
  border-color: rgba(245, 169, 39, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(6, 6, 10, 0.35);
}

.links-toggle.is-exiting {
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition-duration: 0.25s;
}

.logo-wrap {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #1d1d24;
  border: 2px solid #101014;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.logo-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.05)
  );
  animation: shimmer 1.3s infinite;
}

.logo-wrap img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: brightness(0) saturate(100%) invert(78%) sepia(42%)
    saturate(1163%) hue-rotate(347deg) brightness(102%) contrast(104%);
}

.logo-wrap.loaded img {
  opacity: 1;
}

.logo-fallback {
  width: 24px;
  height: 24px;
  display: none;
  color: var(--accent);
}

.logo-wrap.failed .logo-fallback {
  display: block;
}

.logo-wrap.failed .logo-skeleton,
.logo-wrap.loaded .logo-skeleton {
  display: none;
}

.link-text h3 {
  margin: 0;
  font-size: 1.1rem;
}

.link-text p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.external-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}


.tech-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.tech-list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  line-height: 1.4;
}

.tech-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tech-label {
  font-weight: 600;
  color: var(--text);
  margin-right: 6px;
}

.tech-list a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
  transform-origin: left center;
  text-shadow: none;
}

.tech-list a::after {
  content: "";
  width: 0.85em;
  height: 0.85em;
  flex: 0 0 auto;
  background-color: currentColor;
  opacity: 0.55;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M10 13a5 5 0 0 1 0-7l2-2a5 5 0 1 1 7 7l-1 1M14 11a5 5 0 0 1 0 7l-2 2a5 5 0 1 1-7-7l1-1'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M10 13a5 5 0 0 1 0-7l2-2a5 5 0 1 1 7 7l-1 1M14 11a5 5 0 0 1 0 7l-2 2a5 5 0 1 1-7-7l1-1'/></svg>") no-repeat center / contain;
}

.tech-list a:hover {
  color: var(--accent);
  border-bottom-color: rgba(245, 169, 39, 0.6);
  transform: translateY(-1px) rotate(-1deg) scale(1.02);
  box-shadow: 0 6px 12px rgba(8, 8, 12, 0.35);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 12, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 40;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.contact-modal {
  --contact-origin-x: 0px;
  --contact-origin-y: 0px;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 50;
}

.contact-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.contact-modal-inner {
  width: min(520px, 94vw);
  background: linear-gradient(145deg, var(--panel), var(--panel2));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(8, 8, 12, 0.35);
  padding: 24px;
  position: relative;
  transform: translate(var(--contact-origin-x), var(--contact-origin-y)) scale(0.2);
  opacity: 0;
  transform-origin: center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
  will-change: transform, opacity;
}

.contact-modal.open .contact-modal-inner {
  transform: translate(0, 0) scale(1);
  opacity: 1;
}

.contact-modal h2 {
  margin: 0 0 16px;
  font-family: "Fredoka", sans-serif;
  text-shadow: none;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1c1c24;
  color: var(--text);
  cursor: pointer;
}

.modal-close:hover {
  background: #242330;
}

.contact-modal .contact-form {
  display: grid;
  gap: 16px;
}

.contact-modal .contact-field {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

.contact-modal .contact-field span {
  font-weight: 600;
  color: var(--text);
}

.contact-modal .contact-field input,
.contact-modal .contact-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1c1c24;
  color: var(--text);
  font-family: "Inter", "Nunito", sans-serif;
  font-size: 0.95rem;
}

.contact-modal .contact-field textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-modal .contact-field input:focus,
.contact-modal .contact-field textarea:focus {
  outline: none;
  border-color: rgba(245, 169, 39, 0.45);
  box-shadow: 0 0 0 2px rgba(245, 169, 39, 0.15);
}

.contact-modal .contact-submit {
  width: fit-content;
  padding-inline: 22px;
}

.contact-modal .contact-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-modal .contact-status {
  margin: 0;
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-modal .contact-status.success {
  color: #8bd17c;
}

.contact-modal .contact-status.error {
  color: #f08f8f;
}

.support-modal .contact-modal-inner {
  width: min(460px, 92vw);
  border: 1px solid rgba(68, 237, 149, 0.25);
  box-shadow: 0 20px 40px rgba(8, 12, 10, 0.4),
    0 0 22px rgba(46, 210, 125, 0.2);
}

.support-modal h2 {
  color: #d7f7e2;
  text-shadow: 0 0 14px rgba(52, 226, 124, 0.22);
}

.support-copy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.support-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.support-list li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.95rem;
}

.support-label {
  font-weight: 600;
  color: var(--text);
}

.support-value {
  color: #bff2d0;
  font-weight: 500;
}

.support-list a.support-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.support-list a.support-value::after {
  content: "";
  width: 0.85em;
  height: 0.85em;
  flex: 0 0 auto;
  background-color: currentColor;
  opacity: 0.7;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M10 13a5 5 0 0 1 0-7l2-2a5 5 0 1 1 7 7l-1 1M14 11a5 5 0 0 1 0 7l-2 2a5 5 0 1 1-7-7l1-1'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M10 13a5 5 0 0 1 0-7l2-2a5 5 0 1 1 7 7l-1 1M14 11a5 5 0 0 1 0 7l-2 2a5 5 0 1 1-7-7l1-1'/></svg>") no-repeat center / contain;
}

.support-list a.support-value:hover,
.support-list a.support-value:focus-visible {
  color: #dff9ea;
  border-bottom-color: rgba(191, 242, 208, 0.6);
  transform: translateY(-1px);
}

body.modal-open {
  overflow: hidden;
  padding-right: var(--scrollbar-comp, 0px);
}

.site-footer {
  padding: 30px 0 40px;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #22212a;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 18px;
  border: 2px solid #121219;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

body.effects-paused .breathing-glow,
body.effects-paused .underline,
body.effects-paused .underline::after {
  animation-play-state: paused;
}

::selection {
  background: rgba(245, 169, 39, 0.3);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(245, 169, 39, 0.25);
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes press-bounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.96);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes page-pop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-breathe {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(245, 169, 39, 0));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(245, 169, 39, 0.18));
  }
}

@keyframes card-sweep {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }
  30% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes divider-glow {
  0% {
    transform: translateX(0);
    opacity: 0.85;
  }
  50% {
    transform: translateX(125%);
    opacity: 0.28;
  }
  100% {
    transform: translateX(0);
    opacity: 0.85;
  }
}

@keyframes divider-breathe {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(245, 169, 39, 0.22);
    filter: drop-shadow(0 0 3px rgba(245, 169, 39, 0.16));
  }
  50% {
    box-shadow: 0 0 10px rgba(245, 169, 39, 0.38);
    filter: drop-shadow(0 0 6px rgba(245, 169, 39, 0.28));
  }
}

@keyframes decal-slow {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -1400px 240px;
  }
}

@keyframes decal-mid {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -1800px 320px;
  }
}

@keyframes decal-fast {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -2200px 420px;
  }
}

@keyframes decal-pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 0.95;
  }
}


@media (min-width: 720px) {
  .links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero-card {
    padding: 22px;
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

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


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

  body > header,
  body > main,
  body > footer {
    animation: none;
  }

  .reveal-ready :where([data-reveal]) {
    transition: none;
    transform: none;
    opacity: 1;
  }

  .view-section {
    transition: none;
    transform: none;
    will-change: auto;
  }

  .view-section.is-hidden {
    transform: none;
  }

  .tilt-card {
    transform: none;
    transition: none;
  }

  .tilt-card::after {
    opacity: 0;
  }

  .breathing-glow {
    animation: none;
    filter: none;
  }

  .tech-list a {
    transition: color 0.2s ease, border-color 0.2s ease;
  }

  .tech-list a:hover {
    transform: none;
    box-shadow: none;
  }

  .contact-modal {
    transition: none;
  }

  .contact-modal-inner {
    transition: none;
    transform: none;
    opacity: 1;
  }

  .underline {
    animation: none;
    box-shadow: 0 0 8px rgba(245, 169, 39, 0.3);
    filter: drop-shadow(0 0 5px rgba(245, 169, 39, 0.22));
  }

  .underline::after {
    animation: none;
    opacity: 0.45;
    transform: translateX(25%);
  }

  .decal-layer {
    animation: none;
  }

  .constellation-canvas {
    display: none;
  }
}

/* Minimal retheme + simplification overrides */
:root,
:root[data-theme="dark"] {
  --color-bg: #1b1b1b;
  --color-surface: #252525;
  --color-surface-2: #303030;
  --color-text: #f5f5f2;
  --color-muted: #b8b8b3;
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-strong: rgba(255, 255, 255, 0.14);
  --color-accent: #ffa616;
  --color-accent-contrast: #231500;
  --color-overlay: rgba(10, 10, 10, 0.58);
  --color-topbar: rgba(27, 27, 27, 0.86);
  --color-input: rgba(255, 255, 255, 0.03);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.34);
  --ring: 0 0 0 3px rgba(255, 166, 22, 0.24);
  --theme-fade-duration: 280ms;
  --theme-fade-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --icon-accent-filter: brightness(0) saturate(100%) invert(73%) sepia(79%)
    saturate(1618%) hue-rotate(351deg) brightness(103%) contrast(102%);

  /* Alias existing tokens for broad compatibility */
  --bg: var(--color-bg);
  --bg-deep: var(--color-bg);
  --bg-slate: #202020;
  --bg-charcoal: #282828;
  --bg-iron: #333333;
  --panel: var(--color-surface);
  --panel2: var(--color-surface-2);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --accent: var(--color-accent);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: var(--shadow-md);
}

:root[data-theme="light"] {
  --color-bg: #dededb;
  --color-surface: #eeeeeb;
  --color-surface-2: #d4d4d0;
  --color-text: #202020;
  --color-muted: #5f5f5a;
  --color-border: rgba(32, 32, 32, 0.13);
  --color-border-strong: rgba(32, 32, 32, 0.2);
  --color-accent: #ffa616;
  --color-accent-contrast: #231500;
  --color-overlay: rgba(20, 20, 20, 0.2);
  --color-topbar: rgba(222, 222, 219, 0.86);
  --color-input: rgba(32, 32, 32, 0.03);
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.11);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.14);
  --ring: 0 0 0 3px rgba(255, 166, 22, 0.22);
  --icon-accent-filter: brightness(0) saturate(100%) invert(73%) sepia(79%)
    saturate(1618%) hue-rotate(351deg) brightness(103%) contrast(102%);

  --bg: var(--color-bg);
  --bg-deep: var(--color-bg);
  --bg-slate: #e4e4e1;
  --bg-charcoal: #d8d8d4;
  --bg-iron: #cececa;
  --panel: var(--color-surface);
  --panel2: var(--color-surface-2);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --accent: var(--color-accent);
  --border: rgba(15, 23, 42, 0.07);
  --shadow: var(--shadow-md);
}

html,
body {
  background: var(--color-bg);
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: "Inter", sans-serif;
}

body > header,
body > main,
body > footer {
  animation: none;
}

.decal-bg {
  background:
    radial-gradient(
      780px 520px at 12% 10%,
      rgba(255, 166, 22, 0.06),
      transparent 60%
    ),
    radial-gradient(
      700px 480px at 88% 14%,
      rgba(255, 255, 255, 0.04),
      transparent 62%
    ),
    linear-gradient(180deg, var(--bg-slate), var(--bg-deep));
}

:root[data-theme="light"] .decal-bg {
  background:
    radial-gradient(
      900px 580px at 14% 6%,
      rgba(255, 166, 22, 0.05),
      transparent 62%
    ),
    radial-gradient(
      700px 520px at 86% 12%,
      rgba(15, 23, 42, 0.03),
      transparent 64%
    ),
    linear-gradient(180deg, var(--bg-slate), var(--bg-deep));
}

.constellation-canvas {
  opacity: 0.32;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.06));
}

:root[data-theme="light"] .constellation-canvas {
  opacity: 0.2;
  filter: invert(1) opacity(0.22);
}

.container {
  width: min(1040px, 92vw);
}

.topbar {
  background: var(--color-topbar);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  gap: 12px;
  padding: 14px 0;
}

.brand {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  gap: 10px;
}

.topbar-nav {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-link,
.topbar-link,
.theme-toggle {
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
  border: 1px solid var(--color-border);
  box-shadow: none;
}

@supports not (background: color-mix(in srgb, black 50%, white 50%)) {
  .home-link,
  .topbar-link,
  .theme-toggle {
    background: var(--color-surface);
  }
}

.home-link {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.home-link:hover,
.home-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.topbar-link {
  padding: 8px 14px;
  color: var(--color-text);
  font-weight: 600;
}

.topbar-link:hover,
.topbar-link:focus-visible {
  color: var(--color-text);
  background: var(--color-surface-2);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color var(--theme-fade-duration) var(--theme-fade-ease),
    color var(--theme-fade-duration) var(--theme-fade-ease),
    border-color var(--theme-fade-duration) var(--theme-fade-ease);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  background: var(--color-surface-2);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05em;
  font-size: 0.95rem;
  color: var(--color-accent);
}

.theme-toggle-text {
  font-weight: 600;
}

.hero {
  padding: 56px 0 34px;
}

.hero-inner {
  align-items: center;
  gap: 16px;
}

.hero-card,
.discord-card,
.project-card,
.link-card,
.contact-modal-inner {
  background: linear-gradient(180deg, var(--color-surface), var(--color-surface-2));
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.hero-card,
.project-card,
.link-card,
.contact-modal-inner {
  border-radius: 20px;
}

.hero-card::after,
.glow-card::before,
#support-button::after {
  display: none;
}

.glow-card:hover::before,
.glow-card:focus-visible::before {
  animation: none;
}

.discord-card {
  max-width: 680px;
  border-radius: 18px;
  padding: 14px 16px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.discord-card:hover,
.discord-card:focus-visible {
  box-shadow: var(--shadow-md);
}

.discord-avatar,
.avatar {
  border-color: color-mix(in srgb, var(--color-border-strong) 100%, transparent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

@supports not (color: color-mix(in srgb, black 50%, white 50%)) {
  .discord-avatar,
  .avatar {
    border-color: var(--color-border-strong);
  }
}

.presence-badge {
  background: var(--color-surface);
  border-color: var(--color-bg);
}

.presence-badge.is-fallback {
  border-color: var(--color-bg);
}

.discord-activity {
  color: var(--color-muted);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
}

.hero-card {
  max-width: 880px;
  padding: 32px;
  text-align: center;
  align-items: center;
  gap: 14px;
}

.hero-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.hero-text h1 {
  margin: 0 0 12px;
  font-family: "Fredoka", sans-serif;
  font-size: clamp(2.3rem, 6vw, 3.3rem);
  line-height: 1;
  text-shadow: none;
}

.tagline {
  margin: 0 0 14px;
  width: min(56ch, 100%);
  color: var(--color-muted);
  line-height: 1.55;
  text-align: center;
}

.hero-actions {
  gap: 10px;
  justify-content: center;
  width: auto;
}

.btn,
.btn-ghost,
#contact-button,
#support-button,
.links-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-weight: 600;
  box-shadow: none;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color var(--theme-fade-duration) var(--theme-fade-ease),
    border-color var(--theme-fade-duration) var(--theme-fade-ease),
    color var(--theme-fade-duration) var(--theme-fade-ease);
}

.btn,
#support-button {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  border-color: color-mix(in srgb, var(--color-accent) 75%, black 25%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--color-accent) 20%, transparent);
}

@supports not (color: color-mix(in srgb, black 50%, white 50%)) {
  .btn,
  #support-button {
    border-color: var(--color-accent);
    box-shadow: 0 10px 24px rgba(255, 166, 22, 0.2);
  }
}

.btn:hover,
.btn:focus-visible,
#support-button:hover,
#support-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--color-accent) 26%, transparent);
}

@supports not (color: color-mix(in srgb, black 50%, white 50%)) {
  .btn:hover,
  .btn:focus-visible,
  #support-button:hover,
  #support-button:focus-visible {
    box-shadow: 0 14px 28px rgba(255, 166, 22, 0.28);
  }
}

.btn-ghost,
#contact-button,
.links-toggle {
  background: var(--color-surface);
  color: var(--color-text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible,
#contact-button:hover,
#contact-button:focus-visible,
.links-toggle:hover,
.links-toggle:focus-visible {
  transform: translateY(-1px);
  background: var(--color-surface-2);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

#contact-button,
#support-button {
  padding: 12px 18px;
  font-size: 0.95rem;
}

.btn:active,
.link-card:active,
.project-card:active {
  animation: none;
}

.section-title {
  gap: 10px;
  margin-bottom: 20px;
}

.section-title h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.55rem;
  text-shadow: none;
}

.underline {
  height: 1px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--color-accent) 55%, transparent) 0%,
    color-mix(in srgb, var(--color-border-strong) 100%, transparent) 100%
  );
  box-shadow: none;
  filter: none;
  animation: none;
}

.underline::after {
  display: none;
}

@supports not (background: color-mix(in srgb, black 50%, white 50%)) {
  .underline {
    background: linear-gradient(
      90deg,
      rgba(255, 166, 22, 0.45) 0%,
      rgba(255, 255, 255, 0.12) 100%
    );
  }
}

.links,
.tech {
  padding: 44px 0;
}

.projects {
  padding: 46px 0 58px;
}

.projects-layout {
  gap: 30px;
}

.project-category {
  gap: 16px;
}

.project-category-label {
  color: var(--color-accent);
}

.links-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.link-card,
.project-card {
  padding: 16px;
  transform-origin: center;
  filter: brightness(1);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 280ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 280ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color var(--theme-fade-duration) var(--theme-fade-ease),
    border-color var(--theme-fade-duration) var(--theme-fade-ease),
    color var(--theme-fade-duration) var(--theme-fade-ease);
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px) scale(1.012);
  box-shadow: var(--shadow-lg);
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.08);
}

.project-media {
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.project-body h3,
.link-text h3 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
}

.project-body p,
.link-text p,
.tech-list li,
.project-category-header p,
.support-copy,
.contact-modal .contact-note,
.contact-modal .contact-status {
  color: var(--color-muted);
}

.project-tags {
  gap: 6px;
}

.project-tag {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-input);
  color: var(--color-muted);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.project-tag + .project-tag::before {
  content: none;
}

.logo-wrap {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.logo-wrap img {
  filter: none;
}

.logo-fallback,
.external-icon {
  color: var(--color-accent);
}

.tech-list {
  gap: 2px;
}

.tech-list li {
  padding: 14px 0;
  border-bottom-color: var(--color-border);
}

.tech-list a,
.support-list a.support-value {
  color: var(--color-text);
  border-bottom-color: transparent;
  text-shadow: none;
}

.tech-list a:hover,
.tech-list a:focus-visible,
.support-list a.support-value:hover,
.support-list a.support-value:focus-visible {
  color: var(--color-accent);
  border-bottom-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
  transform: none;
  box-shadow: none;
}

.modal-backdrop {
  background: var(--color-overlay);
  transition: opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 220ms linear;
}

.contact-modal {
  transition: opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 220ms linear;
}

.contact-modal-inner {
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-lg);
}

.contact-modal h2,
.support-modal h2 {
  color: var(--color-text);
  text-shadow: none;
}

.modal-close {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  transition: background-color var(--theme-fade-duration) var(--theme-fade-ease),
    border-color var(--theme-fade-duration) var(--theme-fade-ease),
    color var(--theme-fade-duration) var(--theme-fade-ease),
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--color-surface-2);
  transform: translateY(-1px);
}

.contact-modal .contact-field input,
.contact-modal .contact-field textarea {
  background: var(--color-input);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.contact-modal .contact-field input:focus,
.contact-modal .contact-field textarea:focus {
  border-color: color-mix(in srgb, var(--color-accent) 55%, transparent);
  box-shadow: var(--ring);
}

.support-modal .contact-modal-inner {
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-lg);
}

.contact-modal:not(.support-modal).open .contact-modal-inner {
  animation: support-modal-pop 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.support-modal.open .contact-modal-inner {
  animation: support-modal-pop 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.support-value {
  color: var(--color-accent);
}

.site-footer {
  padding: 36px 0 44px;
  color: var(--color-muted);
}

.toast {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.reveal-ready :where([data-reveal]) {
  --reveal-y: 14px;
  --reveal-scale: 0.995;
  transition: opacity 560ms cubic-bezier(0.22, 1, 0.36, 1)
      var(--reveal-delay, 0ms),
    transform 660ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
}

.tilt-card {
  transform: translateY(var(--reveal-y, 0px)) scale(var(--reveal-scale, 1))
    perspective(1100px) rotateX(var(--tilt-rotate-x))
    rotateY(var(--tilt-rotate-y)) translateY(var(--tilt-lift))
    scale(var(--tilt-scale));
}

.tilt-card::after {
  background: radial-gradient(
    circle at var(--tilt-glow-x) var(--tilt-glow-y),
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0) 62%
  );
  transition: opacity 180ms ease;
}

body.effects-paused .underline,
body.effects-paused .underline::after {
  animation-play-state: running;
}

::selection {
  background: color-mix(in srgb, var(--color-accent) 28%, transparent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  box-shadow: var(--ring);
}

html.theme-transitions body,
html.theme-transitions .decal-bg,
html.theme-transitions .topbar,
html.theme-transitions .home-link,
html.theme-transitions .topbar-link,
html.theme-transitions .theme-toggle,
html.theme-transitions .hero-card,
html.theme-transitions .discord-card,
html.theme-transitions .project-card,
html.theme-transitions .link-card,
html.theme-transitions .project-media,
html.theme-transitions .logo-wrap,
html.theme-transitions .contact-modal-inner,
html.theme-transitions .modal-close,
html.theme-transitions .btn,
html.theme-transitions .btn-ghost,
html.theme-transitions #contact-button,
html.theme-transitions #support-button,
html.theme-transitions .links-toggle,
html.theme-transitions .toast,
html.theme-transitions .underline,
html.theme-transitions .contact-modal .contact-field input,
html.theme-transitions .contact-modal .contact-field textarea,
html.theme-transitions .project-tag,
html.theme-transitions .tech-list li,
html.theme-transitions .site-footer,
html.theme-transitions .discord-activity,
html.theme-transitions .project-body p,
html.theme-transitions .link-text p,
html.theme-transitions .tagline,
html.theme-transitions .support-copy,
html.theme-transitions .support-value,
html.theme-transitions .contact-modal .contact-note,
html.theme-transitions .contact-modal .contact-status,
html.theme-transitions .presence-badge,
html.theme-transitions .presence-badge.is-fallback,
html.theme-transitions .constellation-canvas {
  transition-property: background-color, color, border-color, box-shadow, filter,
    opacity;
  transition-duration: var(--theme-fade-duration);
  transition-timing-function: var(--theme-fade-ease);
}

html.theme-transitions .decal-bg,
html.theme-transitions .hero-card::after,
html.theme-transitions .tilt-card::after {
  transition-property: background, opacity, filter;
  transition-duration: var(--theme-fade-duration);
  transition-timing-function: var(--theme-fade-ease);
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .home-link,
  .topbar-link,
  .btn,
  .btn-ghost,
  #contact-button,
  #support-button,
  .links-toggle,
  .link-card,
  .project-card,
  .modal-close {
    transition: none;
  }

  html.theme-transitions body,
  html.theme-transitions .decal-bg,
  html.theme-transitions .topbar,
  html.theme-transitions .home-link,
  html.theme-transitions .topbar-link,
  html.theme-transitions .theme-toggle,
  html.theme-transitions .hero-card,
  html.theme-transitions .discord-card,
  html.theme-transitions .project-card,
  html.theme-transitions .link-card,
  html.theme-transitions .project-media,
  html.theme-transitions .logo-wrap,
  html.theme-transitions .contact-modal-inner,
  html.theme-transitions .modal-close,
  html.theme-transitions .btn,
  html.theme-transitions .btn-ghost,
  html.theme-transitions #contact-button,
  html.theme-transitions #support-button,
  html.theme-transitions .links-toggle,
  html.theme-transitions .toast,
  html.theme-transitions .underline,
  html.theme-transitions .contact-modal .contact-field input,
  html.theme-transitions .contact-modal .contact-field textarea,
  html.theme-transitions .project-tag,
  html.theme-transitions .tech-list li,
  html.theme-transitions .site-footer,
  html.theme-transitions .discord-activity,
  html.theme-transitions .project-body p,
  html.theme-transitions .link-text p,
  html.theme-transitions .tagline,
  html.theme-transitions .support-copy,
  html.theme-transitions .support-value,
  html.theme-transitions .contact-modal .contact-note,
  html.theme-transitions .contact-modal .contact-status,
  html.theme-transitions .presence-badge,
  html.theme-transitions .presence-badge.is-fallback,
  html.theme-transitions .constellation-canvas {
    transition: none;
  }

  .support-modal.open .contact-modal-inner {
    animation: none;
  }

  .contact-modal:not(.support-modal).open .contact-modal-inner {
    animation: none;
  }
}

@keyframes support-modal-pop {
  0% {
    transform: translate(var(--contact-origin-x), var(--contact-origin-y))
      scale(0.34);
    opacity: 0;
  }
  62% {
    transform: translate(0, 0) scale(1.03);
    opacity: 1;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
}
