:root {
  color-scheme: dark;
}

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

body.home-page {
  --home-bg: #06080d;
  --home-panel: #0d1420;
  --home-panel-strong: #111b2a;
  --home-line: #26354b;
  --home-line-soft: rgba(229, 229, 229, 0.12);
  --home-text: #f5f5f5;
  --home-muted: #9aa7b8;
  --home-accent: #fca311;
  --home-accent-soft: rgba(252, 163, 17, 0.14);
  --home-shadow: rgba(0, 0, 0, 0.45);

  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  color: var(--home-text);
  background:
    linear-gradient(rgba(20, 33, 61, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 33, 61, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 82% 10%, rgba(20, 33, 61, 0.8), transparent 34rem),
    var(--home-bg);
  background-size: 36px 36px, 36px 36px, auto, auto;
  font-family: "JetBrains Mono", "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
}

html[data-theme="light"] body.home-page,
body.home-page.theme-light {
  --home-bg: #e5e5e5;
  --home-panel: #f7f7f5;
  --home-panel-strong: #ffffff;
  --home-line: #a7b0bd;
  --home-line-soft: rgba(20, 33, 61, 0.15);
  --home-text: #101722;
  --home-muted: #526174;
  --home-accent: #d77f00;
  --home-accent-soft: rgba(215, 127, 0, 0.12);
  --home-shadow: rgba(20, 33, 61, 0.16);
  background:
    linear-gradient(rgba(20, 33, 61, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 33, 61, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.95), transparent 34rem),
    var(--home-bg);
  background-size: 36px 36px, 36px 36px, auto, auto;
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.home-page .site-header {
  position: relative;
  z-index: 20;
  margin: 0;
  background: rgba(6, 8, 13, 0.88);
  border-bottom: 1px solid var(--home-line);
  backdrop-filter: blur(16px);
}

html[data-theme="light"] .home-page .site-header,
.home-page.theme-light .site-header {
  background: rgba(229, 229, 229, 0.88);
}

.home-page .header-inner {
  max-width: 1180px;
  min-height: 72px;
  padding: 0 24px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--home-text);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand-mark:hover {
  color: var(--home-accent);
  text-decoration: none;
}

.brand-prompt {
  color: var(--home-accent);
}

.home-page .header-actions {
  width: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-page .btn {
  flex: none;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--home-line);
  border-radius: 0;
  background: var(--home-panel);
  color: var(--home-text);
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.home-page .btn:hover {
  opacity: 1;
  border-color: var(--home-accent);
  color: var(--home-accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.home-page .btn-primary {
  background: transparent;
}

.home-page .utility-btn {
  color: var(--home-accent);
  background: var(--home-accent-soft);
}

.home-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 28px;
}

.identity-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.7fr);
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - 164px);
  padding-bottom: 72px;
}

.section-index {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--home-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-index > span:first-child {
  color: var(--home-accent);
}

.section-index::after {
  content: "";
  width: 48px;
  height: 1px;
  background: var(--home-line);
}

.hero-copy h1 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--home-text);
  font-family: inherit;
  font-size: clamp(4.4rem, 12vw, 9.25rem);
  line-height: 0.86;
  letter-spacing: -0.09em;
  text-shadow: 8px 8px 0 var(--home-accent-soft);
}

.role-line {
  margin: 34px 0 6px;
  color: var(--home-accent);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.focus-line {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

.focus-line span {
  margin: 0 8px;
  color: var(--home-line);
}

.hero-lead {
  max-width: 720px;
  margin: 30px 0;
  color: var(--home-text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.7;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-row > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--home-line);
  color: var(--home-muted);
  background: var(--home-panel);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}

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

.identity-card {
  position: relative;
  padding: 14px;
  border: 1px solid var(--home-line);
  background: linear-gradient(145deg, var(--home-panel-strong), var(--home-panel));
  box-shadow: 18px 18px 0 var(--home-accent-soft), 0 24px 60px var(--home-shadow);
}

.identity-card::before,
.identity-card::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--home-accent);
}

.identity-card::before {
  top: -7px;
  left: -7px;
  border-top: 2px solid var(--home-accent);
  border-left: 2px solid var(--home-accent);
}

.identity-card::after {
  right: -7px;
  bottom: -7px;
  border-right: 2px solid var(--home-accent);
  border-bottom: 2px solid var(--home-accent);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  padding: 2px 2px 12px;
  color: var(--home-muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.card-code {
  color: var(--home-accent);
}

.portrait-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--home-line);
  background:
    linear-gradient(135deg, transparent 49.5%, var(--home-line) 50%, transparent 50.5%),
    var(--home-bg);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(1) contrast(1.14) brightness(1.05);
}

.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(255, 255, 255, 0.035) 3px 4px);
}

.portrait-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  z-index: 2;
}

.corner-a {
  top: 10px;
  left: 10px;
  border-top: 1px solid var(--home-accent);
  border-left: 1px solid var(--home-accent);
}

.corner-b {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid var(--home-accent);
  border-bottom: 1px solid var(--home-accent);
}

.identity-fields {
  margin: 14px 0 0;
}

.identity-fields div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--home-line-soft);
}

.identity-fields dt,
.identity-fields dd {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.identity-fields dt {
  color: var(--home-muted);
}

.identity-fields dd {
  color: var(--home-text);
}

.identity-hash {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
  padding-top: 14px;
}

.identity-hash span {
  display: block;
  width: 100%;
  background: var(--home-line);
}

.identity-hash span:nth-child(1) { height: 35%; }
.identity-hash span:nth-child(2) { height: 80%; }
.identity-hash span:nth-child(3) { height: 50%; }
.identity-hash span:nth-child(4) { height: 100%; background: var(--home-accent); }
.identity-hash span:nth-child(5) { height: 65%; }
.identity-hash span:nth-child(6) { height: 42%; }
.identity-hash span:nth-child(7) { height: 88%; }

.content-section {
  padding: 86px 0;
  border-top: 1px solid var(--home-line);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.25fr);
  gap: 72px;
}

.section-heading h2,
.contact-panel h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--home-text);
  font-family: inherit;
  font-size: clamp(1.65rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.about-copy p,
.contact-panel p {
  margin: 0 0 22px;
  color: var(--home-muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-copy blockquote {
  margin: 34px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--home-accent);
  border-left: 4px solid var(--home-accent);
  border-radius: 0;
  background: var(--home-accent-soft);
  color: var(--home-text);
  font-family: inherit;
  font-style: normal;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
}

.compact-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.compact-heading .section-index {
  flex: 0 0 auto;
  margin-bottom: 4px;
}

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

.area-card {
  position: relative;
  min-height: 220px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--home-line);
  background: var(--home-panel);
}

.area-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--home-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.area-card:hover::after {
  transform: scaleX(1);
}

.area-number {
  display: block;
  margin-bottom: 42px;
  color: var(--home-accent);
  font-size: 0.68rem;
}

.area-card h3 {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  color: var(--home-text);
  font-family: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.area-card p {
  margin: 0;
  color: var(--home-muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.94rem;
  line-height: 1.65;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--home-line);
  border-left: 1px solid var(--home-line);
}

.metadata-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  padding: 20px;
  border-right: 1px solid var(--home-line);
  border-bottom: 1px solid var(--home-line);
  background: var(--home-panel);
}

.metadata-row span {
  color: var(--home-muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.metadata-row strong {
  color: var(--home-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.metadata-wide {
  grid-column: 1 / -1;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--home-line);
  background: var(--home-panel);
}

.signal-strip a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 18px;
  border-right: 1px solid var(--home-line);
  color: var(--home-text);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.signal-strip a:last-child {
  border-right: 0;
}

.signal-strip a span {
  color: var(--home-accent);
}

.signal-strip a:hover {
  color: var(--home-accent);
  background: var(--home-accent-soft);
  text-decoration: none;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 60px;
  align-items: end;
  margin: 72px 0;
  padding: 42px;
  border: 1px solid var(--home-accent);
  background: linear-gradient(120deg, var(--home-accent-soft), transparent 70%);
}

.contact-panel p:not(.section-index) {
  max-width: 620px;
  margin: 18px 0 0;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 8px;
}

.contact-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--home-line);
  background: var(--home-panel);
  color: var(--home-text);
  font-size: 0.7rem;
  text-decoration: none;
}

.contact-links a:hover {
  border-color: var(--home-accent);
  color: var(--home-accent);
  text-decoration: none;
}

.home-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 32px;
  border-top: 1px solid var(--home-line);
  color: var(--home-muted);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

@media (max-width: 900px) {
  .home-page .header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 24px;
  }

  .home-page .header-actions {
    justify-content: flex-start;
  }

  .identity-hero {
    grid-template-columns: 1fr;
    gap: 48px;
    min-height: 0;
    padding-top: 32px;
  }

  .identity-card {
    width: min(420px, calc(100% - 32px));
    justify-self: center;
  }

  .about-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

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

  .area-card {
    min-height: 0;
  }

  .area-number {
    margin-bottom: 28px;
  }

  .signal-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-strip a:nth-child(2) {
    border-right: 0;
  }

  .signal-strip a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--home-line);
  }
}

@media (max-width: 640px) {
  .home-shell,
  .home-footer {
    width: min(100% - 28px, 1180px);
  }

  .home-shell {
    padding-top: 38px;
  }

  .home-page .header-inner {
    padding: 16px 14px;
  }

  .home-page .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .btn {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: clamp(4.1rem, 24vw, 6.4rem);
  }

  .focus-line {
    line-height: 1.8;
  }

  .identity-card {
    width: calc(100% - 28px);
  }

  .content-section {
    padding: 62px 0;
  }

  .about-grid {
    gap: 32px;
  }

  .compact-heading {
    display: block;
  }

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

  .metadata-grid,
  .signal-strip,
  .contact-links {
    grid-template-columns: 1fr;
  }

  .metadata-wide {
    grid-column: auto;
  }

  .metadata-row {
    grid-template-columns: 100px 1fr;
  }

  .signal-strip a,
  .signal-strip a:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--home-line);
  }

  .signal-strip a:last-child {
    border-bottom: 0;
  }

  .contact-panel {
    margin: 44px 0;
    padding: 26px 20px;
  }

  .home-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready .reveal,
  .motion-ready .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .home-page *,
  .home-page *::before,
  .home-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
