:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #fffdf8;
  --ink: #17211d;
  --muted: #5f6d66;
  --line: rgba(23, 33, 29, 0.13);
  --accent: #0c7c73;
  --accent-2: #d95d39;
  --accent-3: #264653;
  --shadow: 0 24px 70px rgba(24, 42, 36, 0.14);
}

:root.dark {
  color-scheme: dark;
  --bg: #101413;
  --surface: #181f1d;
  --ink: #f8f4eb;
  --muted: #b7c4bd;
  --line: rgba(248, 244, 235, 0.14);
  --accent: #2dd4bf;
  --accent-2: #ff8a5b;
  --accent-3: #9ad4ec;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.cursor-glow {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(12, 124, 115, 0.22), transparent 65%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1160px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand,
nav,
.hero-actions,
.toolbar,
.contact-actions,
.console-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
}

nav a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

nav a:hover,
.chip:hover,
.console-tab:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--ink);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.1rem;
}

.theme-glyph {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
}

main,
footer {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
  gap: 24px;
  min-height: calc(100vh - 96px);
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 90px 0 42px;
  align-items: end;
  overflow: hidden;
  cursor: crosshair;
}

.hero a,
.hero button {
  cursor: pointer;
}

#heroCanvas {
  position: absolute;
  inset: 24px 0 0;
  width: 100%;
  height: calc(100% - 24px);
  opacity: 0.72;
  z-index: -1;
  pointer-events: none;
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 880px;
  font-size: clamp(3.2rem, 9vw, 7.8rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 4.6rem);
}

.hero-copy {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.28rem);
}

.button,
.chip,
.console-tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 12px 18px;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.button.ghost {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

.hero-panel,
.metric-card,
.contact-card,
.console-shell,
.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 20px;
  backdrop-filter: blur(16px);
}

.profile-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.profile-card img {
  width: 88px;
  height: 88px;
  border: 2px solid color-mix(in srgb, var(--accent) 45%, var(--surface));
  border-radius: 8px;
  object-fit: cover;
  object-position: center 18%;
  background: var(--surface);
}

.profile-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
  line-height: 1.15;
}

.availability {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.pulse {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 16%, transparent);
}

.quick-stats {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
}

.quick-stats div {
  padding: 16px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-3) 10%, transparent);
}

.quick-stats dt {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.quick-stats dd {
  margin: 6px 0 0;
  color: var(--muted);
}

.section {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0;
}

.intro-grid,
.split,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 44px;
}

.intro-grid p:not(.eyebrow),
.section-heading p,
.contact p {
  color: var(--muted);
  font-size: 1.05rem;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 24px;
}

.sticky-copy {
  position: sticky;
  top: 104px;
  align-self: start;
}

.chip,
.console-tab {
  padding: 10px 14px;
}

.chip.active,
.console-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.skill-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.skill {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.skill:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.skill small {
  color: var(--accent-2);
  font-weight: 800;
  text-transform: uppercase;
}

.skill strong {
  display: block;
  margin-top: 10px;
  font-size: 1.05rem;
}

.timeline {
  display: grid;
  gap: 14px;
}

.role {
  border-left: 4px solid var(--line);
  padding: 18px 0 18px 20px;
  cursor: pointer;
}

.role.active {
  border-color: var(--accent);
}

.role h3 {
  margin: 0;
  font-size: 1.35rem;
}

.role time {
  display: block;
  margin: 4px 0 12px;
  color: var(--accent-2);
  font-weight: 800;
}

.role ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

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

.project-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.project-topline,
.project-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.project-topline {
  justify-content: space-between;
}

.project-topline span,
.project-topline strong,
.project-details dt,
.project-links a,
.project-links span {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-topline span,
.project-details dt {
  color: var(--accent-2);
}

.project-topline strong {
  padding: 6px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.project-card h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.05;
}

.project-card p {
  margin: 0;
  color: var(--muted);
}

.project-company {
  font-weight: 800;
}

.project-details {
  display: grid;
  gap: 10px;
  margin: 0;
}

.project-details div {
  display: grid;
  gap: 3px;
}

.project-details dd {
  margin: 0;
  color: var(--muted);
}

.project-links {
  margin-top: auto;
}

.project-links a,
.project-links span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.project-links a {
  color: var(--ink);
  background: var(--surface);
}

.project-links a:hover {
  border-color: var(--accent);
}

.project-links span {
  color: var(--muted);
}

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

.metric-card {
  padding: 20px;
}

.metric-card span,
.contact-card span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.metric-card strong {
  display: block;
  margin: 12px 0;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
}

.console-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(50, 255, 131, 0.14), transparent 35%),
    #050806;
  border-color: rgba(71, 255, 146, 0.42);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.28),
    inset 0 0 42px rgba(38, 255, 122, 0.08);
}

.console-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.045) 0,
    rgba(255, 255, 255, 0.045) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: screen;
  opacity: 0.45;
}

.console-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(99, 255, 151, 0.08), transparent);
  animation: terminalSweep 4.2s linear infinite;
}

.console-frame {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(71, 255, 146, 0.32);
  color: rgba(150, 255, 183, 0.72);
  font: 800 0.72rem/1 "Courier New", Consolas, monospace;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(71, 255, 146, 0.5);
}

.console-tabs {
  position: relative;
  z-index: 1;
  padding: 12px;
  border-bottom: 1px solid rgba(71, 255, 146, 0.2);
}

.console-tab {
  background: rgba(9, 27, 16, 0.86);
  border-color: rgba(71, 255, 146, 0.32);
  color: #78ff9e;
  font-family: "Courier New", Consolas, monospace;
  text-shadow: 0 0 8px rgba(71, 255, 146, 0.45);
}

.console-tab.active,
.console-tab:hover {
  background: rgba(60, 255, 125, 0.16);
  border-color: rgba(110, 255, 158, 0.72);
  color: #c5ffd4;
}

pre {
  position: relative;
  z-index: 1;
  min-height: 270px;
  margin: 0;
  padding: 22px;
  overflow: auto;
  color: #78ff9e;
  font: 800 0.98rem/1.75 "Courier New", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
  text-shadow:
    0 0 4px rgba(120, 255, 158, 0.72),
    0 0 18px rgba(50, 255, 131, 0.26);
  white-space: pre-wrap;
}

pre::after {
  content: "_";
  display: inline-block;
  color: #c5ffd4;
  animation: terminalBlink 900ms steps(2, start) infinite;
}

@keyframes terminalBlink {
  50% {
    opacity: 0;
  }
}

@keyframes terminalSweep {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

.contact-actions {
  align-items: stretch;
}

.contact-card {
  flex: 1 1 220px;
  padding: 18px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.contact-card strong {
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 880px) {
  .site-header {
    align-items: flex-start;
  }

  nav {
    order: 3;
    width: 100%;
  }

  .hero,
  .intro-grid,
  .split,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 64px;
  }

  .sticky-copy {
    position: static;
  }

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

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

@media (max-width: 560px) {
  .cursor-glow {
    display: none;
  }

  h1 {
    font-size: 3.1rem;
  }

  .site-header,
  .hero,
  .section,
  footer {
    width: min(100% - 24px, 1160px);
  }

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

  .hero-actions .button {
    width: 100%;
  }
}
