:root {
  color-scheme: dark;
  --bg: #111214;
  --panel: #191a1d;
  --panel-raised: #202125;
  --ink: #f1f1f2;
  --muted: #a3a5aa;
  --line: #303237;
  --soft-line: #25272b;
  --neutral-accent: #cfd1d4;
  --ashline: #b87543;
  --ashline-bright: #d39a68;
  --fwob-cyan: #45c9ed;
  --fwob-blue: #2470c8;
  --fwob-navy: #111d63;
  --minecraft-green: #68a94a;
  --minecraft-green-bright: #8fc56b;
  --display: "Inter", "Segoe UI", sans-serif;
  --body: "Inter", "Segoe UI", sans-serif;
}

/* Shared page accents. Use the same data-accent value on a card and its page. */
[data-accent="ashline"] {
  --page-accent: #b87543;
  --page-accent-bright: #d39a68;
  --page-accent-rgb: 184, 117, 67;
  --page-accent-dark: #4d2d1b;
}

[data-accent="minecraft"] {
  --page-accent: #68a94a;
  --page-accent-bright: #8fc56b;
  --page-accent-rgb: 104, 169, 74;
  --page-accent-dark: #274623;
}

[data-accent="fwob"] {
  --page-accent: #2470c8;
  --page-accent-bright: #45c9ed;
  --page-accent-rgb: 69, 201, 237;
  --page-accent-dark: #111d63;
}

[data-accent="red"] {
  --page-accent: #bd4545;
  --page-accent-bright: #e16a62;
  --page-accent-rgb: 189, 69, 69;
  --page-accent-dark: #541e1e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 30px 24px 92px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.035), transparent 26rem),
    linear-gradient(180deg, #151619 0%, var(--bg) 38rem);
  font-family: var(--body);
}

a { color: inherit; }

.home-shell,
.rankings-shell {
  width: min(1110px, 100%);
  margin: 0 auto;
}

.home-nav,
.rank-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 28px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #dedfe1;
  font: 600 0.95rem var(--display);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid #4a4c51;
  border-radius: 9px;
  color: #d8d9db;
  background: #1b1c1f;
  font-size: 0.95rem;
}

[data-accent] .wordmark-mark {
  border-color: rgba(var(--page-accent-rgb), 0.52);
  color: var(--page-accent-bright);
  background: rgba(var(--page-accent-rgb), 0.08);
  box-shadow: 0 0 14px rgba(var(--page-accent-rgb), 0.16);
}

.home-nav nav { display: flex; gap: 28px; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.theme-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #44464b;
  border-radius: 6px;
  color: #c5c7ca;
  background: transparent;
  font: 600 0.72rem var(--body);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: #74777d;
  color: #fff;
}

.home-nav nav a {
  color: #b8babf;
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 180ms ease;
}

.home-nav nav a:hover,
.home-footer a:hover { color: #fff; }
.home-nav nav a span { color: #8f9298; }

.home-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 500px;
  align-items: center;
  padding: clamp(36px, 6vw, 74px);
  overflow: hidden;
  border: 1px solid #34363b;
  border-radius: 14px;
  background: linear-gradient(112deg, rgba(34, 35, 39, 0.98), rgba(24, 25, 28, 0.95) 58%, rgba(29, 30, 34, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.hero-copy { position: relative; z-index: 2; max-width: 630px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: #afb1b6;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #bfc1c4;
  box-shadow: 0 0 12px rgba(218, 220, 223, 0.28);
}

.home-hero h1 {
  margin: 0;
  font: 600 clamp(3.2rem, 8vw, 6.6rem) / 0.98 var(--display);
  letter-spacing: -0.08em;
}

.home-hero h1 span { color: #bfc1c5; }

.home-intro {
  max-width: 530px;
  margin: 24px 0 0;
  color: #b7b9bd;
  font-size: clamp(1.04rem, 1.6vw, 1.2rem);
  line-height: 1.72;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 29px; }

.button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  gap: 12px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.87rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover { transform: translateY(-2px); }
.button-bright { color: #18191b; background: #d6d7d9; }
.button-bright:hover { background: #f2f2f3; }
.button-glass { border-color: #46484d; color: #dedfe1; background: rgba(255, 255, 255, 0.025); }
.button-glass:hover { border-color: #777a80; background: rgba(255, 255, 255, 0.06); }
.button span { font-size: 1rem; }

.hero-glow {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}

.hero-glow-one {
  top: -190px;
  right: -80px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.065), transparent 68%);
}

.hero-glow-two {
  right: 110px;
  bottom: -285px;
  width: 420px;
  height: 380px;
  background: radial-gradient(circle, rgba(150, 154, 160, 0.07), transparent 70%);
}

.hero-orbit {
  position: absolute;
  top: 50%;
  right: 6%;
  display: grid;
  width: 315px;
  height: 315px;
  place-items: center;
  opacity: 0.82;
  transform: translateY(-53%);
}

.orbit-ring {
  position: absolute;
  display: block;
  border: 1px solid rgba(194, 196, 201, 0.22);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.ring-a { width: 270px; height: 105px; }
.ring-b { width: 242px; height: 242px; border-color: rgba(194, 196, 201, 0.14); border-style: dashed; }

.orbit-core {
  display: grid;
  width: 100px;
  height: 100px;
  place-items: center;
  border: 1px solid #56585e;
  border-radius: 10px;
  color: #e2e3e4;
  background: linear-gradient(145deg, #313338, #202125);
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.06);
  font: 600 3.3rem var(--display);
  transform: rotate(-9deg);
}

.orbit-star { position: absolute; color: #c9cbd0; }
.star-a { top: 43px; right: 57px; font-size: 1.5rem; }
.star-b { bottom: 39px; left: 43px; color: #8b8e94; font-size: 1.25rem; }

.orbit-label {
  position: absolute;
  right: 12px;
  bottom: 60px;
  color: #8f9197;
  font: 700 0.53rem / 1.5 var(--body);
  letter-spacing: 0.15em;
}

.hero-bottom {
  position: absolute;
  right: clamp(28px, 6vw, 74px);
  bottom: 23px;
  left: clamp(28px, 6vw, 74px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(220, 222, 225, 0.11);
  color: #7f8187;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.projects-section { padding: 72px 4px 12px; scroll-margin-top: 24px; }
.blogs-section { padding-top: 46px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading .eyebrow { margin-bottom: 8px; color: #9ea0a6; }

.section-heading h2 {
  margin: 0;
  font: 600 clamp(1.9rem, 4vw, 2.8rem) / 1.1 var(--display);
  letter-spacing: -0.055em;
}

.section-note { margin: 0 3px 5px; color: var(--muted); font-size: 0.92rem; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }

.project-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(150deg, #1d1e21, #17181a 72%);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card::before {
  position: absolute;
  z-index: -1;
  inset: -1px;
  pointer-events: none;
  border-radius: inherit;
  content: "";
  opacity: 0.55;
}

.project-card[data-accent]::before {
  background: radial-gradient(circle at 79% 14%, rgba(var(--page-accent-rgb), 0.2), transparent 42%);
}

.project-card[data-accent]:hover {
  border-color: rgba(var(--page-accent-rgb), 0.58);
  box-shadow: 0 16px 50px rgba(var(--page-accent-rgb), 0.14);
  transform: translateY(-3px);
}

.card-art {
  position: relative;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  padding: 19px 22px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.single-card-grid .project-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
}

.single-card-grid .card-art {
  min-height: 230px;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
  border-bottom: 0;
}

.single-card-grid .project-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 42px);
}

.art-ashline {
  background:
    radial-gradient(circle at 76% 42%, rgba(198, 126, 72, 0.28), transparent 37%),
    linear-gradient(120deg, #27221f, #1d1b1a 65%, #292019);
}

.art-fwob {
  background:
    radial-gradient(circle at 77% 35%, rgba(69, 201, 237, 0.28), transparent 38%),
    linear-gradient(120deg, #171f33, #141a29 58%, #101d43);
}

.art-minecraft {
  background:
    radial-gradient(circle at 76% 40%, rgba(126, 190, 89, 0.3), transparent 38%),
    linear-gradient(120deg, #1c2920, #172119 58%, #21351f);
}

.art-kicker,
.art-caption {
  position: relative;
  z-index: 1;
  color: rgba(236, 237, 239, 0.69);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.ashline-symbol {
  position: absolute;
  top: 15px;
  right: 44px;
  color: #e2c5ac;
  font: 500 8rem / 0.9 var(--display);
  letter-spacing: -0.1em;
  text-shadow: 0 9px 35px rgba(184, 117, 67, 0.25);
  transform: rotate(6deg);
}

.ashline-symbol span { color: var(--ashline-bright); }

.fwob-letters {
  position: absolute;
  top: 47px;
  left: 23px;
  color: var(--fwob-cyan);
  background: linear-gradient(180deg, #2470c8 0%, #45c9ed 54%, #8ce8f8 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.25px #70ddf4;
  font: 400 4.5rem / 0.9 "Luckiest Guy", var(--display);
  letter-spacing: -0.02em;
  paint-order: stroke fill;
  text-shadow:
    2px 3px 0 #111d63,
    5px 7px 0 rgba(10, 23, 74, 0.68),
    0 13px 30px rgba(21, 79, 153, 0.42);
  transform: rotate(6deg);
}

.fwob-letters span { color: inherit; }

.minecraft-symbol {
  position: absolute;
  top: 47px;
  right: 48px;
  display: grid;
  grid-template-columns: repeat(2, 42px);
  grid-template-rows: repeat(2, 42px);
  gap: 5px;
  filter: drop-shadow(0 12px 22px rgba(34, 79, 28, 0.35));
  transform: rotate(6deg);
}

.minecraft-symbol i {
  display: block;
  border: 1px solid rgba(216, 239, 202, 0.22);
  background: #5b963f;
}

.minecraft-symbol i:nth-child(2) { background: #77ad55; }
.minecraft-symbol i:nth-child(3) { background: #3f7337; }
.minecraft-symbol i:nth-child(4) { background: #8abd64; }
.project-body { padding: 20px 22px 23px; }
.project-label-row { display: flex; align-items: center; justify-content: space-between; }

.project-type {
  color: var(--ashline-bright);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-card[data-accent] .project-type { color: var(--page-accent-bright); }
.project-number { color: #74767c; font: 600 0.72rem var(--display); }
.project-body h3 { margin: 10px 0 7px; font: 600 1.4rem var(--display); letter-spacing: -0.04em; }

.project-body p {
  max-width: 48ch;
  min-height: 48px;
  margin: 0;
  color: #a5a7ac;
  font-size: 0.93rem;
  line-height: 1.62;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  margin-top: 20px;
  padding: 9px 12px;
  border: 1px solid #414349;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: #e8e9ea;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

.text-link:hover {
  background: rgba(255, 255, 255, 0.055);
}

.project-card[data-accent] .text-link:hover,
.project-card[data-accent] .text-link span { color: var(--page-accent-bright); }

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.home-footer {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 11px 14px;
  border: 0;
  border-top: 1px solid #34363b;
  border-radius: 0;
  color: #888a8f;
  background: rgba(22, 23, 26, 0.92);
  backdrop-filter: blur(14px);
  font-size: 0.76rem;
}

.home-footer > span:first-child { color: #ced0d3; font-weight: 700; }
.home-footer a { margin-left: auto; color: #a3a5aa; text-decoration: none; transition: color 180ms ease; }

.footer-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-actions a,
.home-footer .back-to-top { margin-left: 0; }

.home-footer .back-to-top { margin-left: 0; }

@media (max-width: 760px) {
  body { padding: 20px 15px 92px; }
  .home-nav { margin-bottom: 18px; }
  .home-hero { min-height: 455px; padding: 54px 27px; }
  .hero-orbit { top: 61%; right: -75px; opacity: 0.38; transform: translateY(-50%) scale(0.78); }
  .hero-copy { max-width: 560px; }
  .home-intro { max-width: 460px; }
  .hero-bottom { right: 25px; left: 25px; flex-wrap: wrap; font-size: 0.55rem; }
  .projects-section { padding-top: 55px; }
  .project-grid { gap: 12px; }
  .card-art { min-height: 165px; }
  .project-body { padding: 17px; }
  .project-body p { min-height: 72px; }
  .single-card-grid .project-card { grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr); }
}

@media (max-width: 540px) {
  body { padding-bottom: 138px; }
  .home-nav,
  .rank-nav { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .home-nav .nav-actions,
  .rank-nav .nav-actions { width: 100%; justify-content: space-between; }
  .nav-actions { gap: 10px; }
  .home-nav nav { align-items: center; gap: 13px; }
  .home-nav nav a { font-size: 0.78rem; }
  .wordmark { font-size: 0.82rem; }
  .wordmark-mark { width: 28px; height: 28px; }
  .home-hero { min-height: 430px; padding: 52px 22px; border-radius: 12px; }
  .home-hero h1 { font-size: clamp(3.3rem, 16vw, 5rem); }
  .home-intro { font-size: 1rem; line-height: 1.62; }
  .hero-orbit { top: 66%; right: -112px; opacity: 0.22; transform: translateY(-50%) scale(0.68); }
  .hero-bottom { right: 22px; bottom: 17px; left: 22px; }
  .hero-bottom span:last-child { display: none; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-note { font-size: 0.85rem; }
  .project-grid { grid-template-columns: 1fr; }
  .single-card-grid .project-card { display: block; }
  .single-card-grid .card-art { min-height: 180px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.055); }
  .card-art { min-height: 180px; }
  .project-body p { min-height: 0; }
  .home-footer { right: 0; bottom: 0; left: 0; flex-wrap: wrap; gap: 7px 14px; }
  .footer-actions { order: 3; width: 100%; justify-content: center; gap: 12px; }
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #e9eaec;
  --panel: #f5f5f6;
  --panel-raised: #fff;
  --ink: #202124;
  --muted: #666a70;
  --line: #cfd1d4;
  --soft-line: #d8dadd;
}

html[data-theme="light"] body {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.9), transparent 28rem),
    linear-gradient(180deg, #f0f1f2 0%, #e7e8ea 38rem);
}

html[data-theme="light"] .wordmark { color: #282a2d; }
html[data-theme="light"] .wordmark-mark { border-color: #b9bcc1; color: #33363a; background: #f4f4f5; }
html[data-theme="light"] [data-accent] .wordmark-mark {
  border-color: rgba(var(--page-accent-rgb), 0.58);
  color: var(--page-accent);
  background: rgba(var(--page-accent-rgb), 0.1);
  box-shadow: none;
}
html[data-theme="light"] .home-nav nav a { color: #55585e; }
html[data-theme="light"] .home-nav nav a:hover,
html[data-theme="light"] .home-footer a:hover { color: #111214; }
html[data-theme="light"] .theme-toggle { border-color: #bfc1c5; color: #45484d; }
html[data-theme="light"] .theme-toggle:hover { border-color: #777b81; color: #111214; }

html[data-theme="light"] .home-hero {
  border-color: #c8cacf;
  background: linear-gradient(112deg, rgba(249, 249, 250, 0.98), rgba(229, 230, 232, 0.96));
  box-shadow: 0 20px 54px rgba(37, 39, 43, 0.08);
}

html[data-theme="light"] .home-hero h1 span { color: #696c72; }
html[data-theme="light"] .home-intro { color: #5f6268; }
html[data-theme="light"] .eyebrow { color: #666a70; }
html[data-theme="light"] .status-dot { background: #6d7075; box-shadow: none; }
html[data-theme="light"] .button-bright { color: #f5f5f6; background: #292b2e; }
html[data-theme="light"] .button-bright:hover { background: #111214; }
html[data-theme="light"] .button-glass { border-color: #bfc1c5; color: #34373b; background: rgba(255, 255, 255, 0.32); }
html[data-theme="light"] .button-glass:hover { border-color: #85888e; background: rgba(255, 255, 255, 0.65); }
html[data-theme="light"] .orbit-ring { border-color: rgba(64, 67, 72, 0.2); }
html[data-theme="light"] .ring-b { border-color: rgba(64, 67, 72, 0.13); }
html[data-theme="light"] .orbit-core { border-color: #aeb1b6; color: #3e4145; background: linear-gradient(145deg, #f5f5f6, #dfe0e2); box-shadow: none; }
html[data-theme="light"] .orbit-star { color: #6f7277; }
html[data-theme="light"] .orbit-label { color: #777a80; }

html[data-theme="light"] .project-card {
  border-color: #c9cbd0;
  background: linear-gradient(150deg, #f7f7f8, #eceef0);
}

html[data-theme="light"] .project-body p { color: #5e6268; }
html[data-theme="light"] .project-number { color: #777a80; }
html[data-theme="light"] .text-link { border-color: #b9bcc1; color: #292c30; background: rgba(255, 255, 255, 0.42); }
html[data-theme="light"] .text-link:hover { background: #fff; }
html[data-theme="light"] .home-footer { color: #686b70; }
html[data-theme="light"] .home-footer { border-color: #c8cacf; background: rgba(244, 245, 246, 0.94); box-shadow: none; }
html[data-theme="light"] .home-footer > span:first-child { color: #292c30; }
html[data-theme="light"] .home-footer a { color: #55585e; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
