:root {
  --home-content-width: 1120px;
  --home-border: var(--panel-border);
  --home-surface: var(--panel-background);
  --home-surface-hover: var(--panel-hover);
  --home-muted: #a4a59e;
  --home-copy: #c4c5bf;
  --home-accent-glow: rgba(154, 182, 107, 0.8);
  --home-button-background: var(--control-active-background);
  --home-button-color: var(--control-active-text);
  --home-button-hover: #a0b476;
  --home-button-glow: rgba(154, 182, 107, 0.22);
  --home-decoration: rgba(154, 182, 107, 0.08);
}

:root[data-theme="light"] {
  --home-muted: #65685d;
  --home-copy: #4d5046;
  --home-accent-glow: rgba(90, 112, 67, 0.45);
  --home-decoration: rgba(90, 112, 67, 0.08);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body[data-page="home"] {
  display: block;
  min-height: 100vh;
  padding: 0;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body[data-page="home"] a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 5px;
}

body[data-page="home"] .site-header {
  width: 100%;
  min-height: 72px;
  margin: 0;
  border-color: var(--home-border);
  padding-inline: max(24px, calc((100% - var(--home-content-width)) / 2));
}

body[data-page="home"] .site-header nav {
  gap: clamp(20px, 4vw, 48px);
}

body[data-page="home"] .site-header nav a {
  color: var(--main-text-color) !important;
  font-size: 0.875rem !important;
  text-decoration: none;
  text-transform: none !important;
  transition: color 160ms ease;
}

body[data-page="home"] .site-header nav a:hover {
  color: var(--accent-color) !important;
}

body[data-page="home"] .brand,
body[data-page="home"] .footer-brand {
  gap: 12px;
  font-size: 1.05rem !important;
  letter-spacing: -0.035em !important;
}

body[data-page="home"] .brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.home-main,
.site-footer {
  width: min(var(--home-content-width), calc(100% - 48px));
  margin-inline: auto;
}

.home-main {
  padding-block: 34px 100px;
}

.glass-panel {
  border: 1px solid var(--home-border);
  background: var(--home-surface);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}

:root[data-theme="light"] .glass-panel {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.07);
}

.hero {
  position: relative;
  display: grid;
  min-height: 480px;
  overflow: hidden;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  border-radius: 20px;
  padding: clamp(32px, 7vw, 88px);
}

.hero::after {
  position: absolute;
  z-index: -1;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(154, 182, 107, 0.13);
  content: "";
  filter: blur(100px);
  right: 2%;
  top: 0;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

body[data-page="home"] .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--accent-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

body[data-page="home"] .eyebrow-divider {
  color: var(--home-muted);
}

body[data-page="home"] .eyebrow > span:not(.eyebrow-divider):not(.status-dot) {
  color: inherit;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 12px var(--home-accent-glow);
}

body[data-page="home"] h1,
body[data-page="home"] h2,
body[data-page="home"] h3 {
  margin-top: 0;
}

body[data-page="home"] h1,
body[data-page="home"] h2 {
  margin-bottom: 20px;
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

body[data-page="home"] h1 {
  background: none;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  -webkit-text-fill-color: currentColor;
}

body[data-page="home"] .accent-text {
  color: var(--accent-color);
}

body[data-page="home"] .hero-description {
  max-width: 480px;
  margin-bottom: 30px;
  color: var(--home-copy);
  font-size: 1rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}

body[data-page="home"] .button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  margin: 0;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
  text-transform: none;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

body[data-page="home"] .button-primary {
  background: var(--home-button-background);
  color: var(--home-button-color) !important;
}

body[data-page="home"] .button-primary:hover {
  transform: translateY(-2px);
  background: var(--home-button-hover);
  box-shadow: 0 8px 26px var(--home-button-glow);
}

body[data-page="home"] .text-link,
body[data-page="home"] .back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--home-copy) !important;
  font-size: 0.875rem !important;
  text-decoration: none;
  text-transform: none;
  transition: color 160ms ease;
}

body[data-page="home"] .text-link:hover,
body[data-page="home"] .back-to-top:hover {
  color: var(--accent-color) !important;
}

.hero-art {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
}

.logo-frame {
  z-index: 1;
  width: clamp(180px, 25vw, 280px);
  overflow: hidden;
  border: 1px solid var(--home-border);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36), 0 0 55px rgba(154, 182, 107, 0.12);
  transform: rotate(3deg);
}

.logo-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.orbit {
  position: absolute;
  width: 350px;
  height: 220px;
  border: 1px solid rgba(154, 182, 107, 0.3);
  border-radius: 50%;
  transform: rotate(-31deg);
}

.orbit-two {
  width: 300px;
  height: 260px;
  border-color: var(--home-border);
  transform: rotate(40deg);
}

.art-caption {
  position: absolute;
  right: 0;
  bottom: -24px;
  color: var(--home-muted);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.15em;
}

.art-caption span {
  color: var(--accent-color);
}

.hero-index {
  position: absolute;
  right: 28px;
  top: 22px;
  color: var(--home-muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.content-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(32px, 8vw, 110px);
  padding-block: 130px 40px;
}

.section-heading .eyebrow {
  margin-bottom: 18px;
}

body[data-page="home"] h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

body[data-page="home"] .muted-text {
  color: var(--home-muted);
}

.info-copy {
  border-radius: 12px;
  padding: clamp(24px, 4vw, 42px);
  color: var(--home-copy);
}

body[data-page="home"] .home-main p {
  border: 0;
  border-radius: 0;
  margin-top: 0;
  padding: 0 !important;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  color: inherit;
  line-height: 1.7;
  transition: none;
}

body[data-page="home"] .home-main p:last-child {
  margin-bottom: 0;
}

.info-copy p {
  margin-bottom: 16px;
}

.coding-section {
  align-items: start;
}

body[data-page="home"] .section-intro {
  max-width: 420px;
  margin-bottom: 0;
  color: var(--home-muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.skill-card {
  min-width: 0;
  border-radius: 12px;
  padding: 22px;
}

body[data-page="home"] .skill-card h3 {
  margin-bottom: 8px;
  color: var(--accent-color);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-page="home"] .skill-card p {
  margin: 0;
  color: var(--home-copy);
  font-size: 0.88rem;
}

.projects-panel {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: 1fr 0.8fr auto;
  align-items: center;
  gap: 32px;
  margin-top: 100px;
  border-radius: 16px;
  padding: clamp(30px, 6vw, 64px);
}

.projects-panel .eyebrow {
  margin-bottom: 16px;
}

body[data-page="home"] .projects-panel h2 {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}

body[data-page="home"] body[data-page="home"] .projects-panel > p {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: var(--home-copy);
  font-size: 0.92rem;
}

.projects-panel .button {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.projects-decoration {
  position: absolute;
  right: 14%;
  bottom: -0.75em;
  color: var(--home-decoration);
  font-size: 15rem;
  font-weight: 750;
  letter-spacing: -0.12em;
  line-height: 1;
  pointer-events: none;
}

.home-legal {
  width: 100%;
  margin-top: 40px;
  scroll-margin-top: 100px;
}

body[data-page="home"] .legal-content {
  color: var(--home-copy);
}

.site-footer {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--home-border);
}

body[data-page="home"] .footer-brand {
  color: var(--main-text-color) !important;
  font-size: 0.94rem !important;
  text-decoration: none;
}

body[data-page="home"] .site-footer p {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.8rem;
}

body[data-page="home"] .back-to-top {
  color: var(--home-muted) !important;
  font-size: 0.8rem !important;
}

@media (max-width: 820px) {
  .hero {
    min-height: 420px;
    grid-template-columns: 1fr 0.7fr;
    padding: 42px;
  }

  .hero-art {
    min-height: 250px;
  }

  .orbit {
    width: 280px;
    height: 180px;
  }

  .content-section {
    gap: 34px;
  }

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

  .projects-panel .button {
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .home-main,
  .site-footer {
    width: min(100% - 32px, var(--home-content-width));
  }

  body[data-page="home"] .site-header {
    width: 100%;
    flex-wrap: wrap;
    min-height: 78px;
    gap: 4px 12px;
    padding: 10px 16px;
  }

  body[data-page="home"] .site-header nav {
    width: 100%;
    justify-content: space-between;
    order: 3;
    gap: 10px;
  }

  body[data-page="home"] .brand {
    order: 1;
    gap: 6px;
    font-size: 0.88rem !important;
  }

  body[data-page="home"] .brand img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  body[data-page="home"] .header-controls {
    order: 2;
  }

  body[data-page="home"] .site-header nav a {
    font-size: 0.72rem !important;
  }

  html {
    scroll-padding-top: 100px;
  }

  .home-main {
    padding-block: 20px 70px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 34px 25px 26px;
  }

  body[data-page="home"] .hero h1 {
    font-size: clamp(2.7rem, 12vw, 4.2rem);
  }

  .hero-art {
    min-height: 245px;
  }

  .logo-frame {
    width: 190px;
  }

  .orbit {
    width: 270px;
    height: 175px;
  }

  .hero-index {
    right: 18px;
    top: 16px;
  }

  .content-section {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 90px;
  }

  .skills-grid {
    gap: 12px;
  }

  .skill-card {
    padding: 18px;
  }

  .projects-panel {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 90px;
    padding: 30px 25px;
  }

  .projects-decoration {
    right: 5%;
    font-size: 10rem;
  }

  .site-footer {
    min-height: 120px;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-block: 20px;
  }

  body[data-page="home"] .site-footer p {
    order: 1;
    width: 100%;
  }

}

@media (max-width: 380px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

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

  body[data-page="home"] *,
  body[data-page="home"] *::before,
  body[data-page="home"] *::after {
    transition-duration: 0.01ms !important;
  }
}
