:root {
  --bg: #05070d;
  --surface: #080c14;
  --surface-2: #0d121c;
  --panel: #090e17;
  --panel-hot: #120d09;
  --line: #44200b;
  --line-strong: #ff7a00;
  --line-soft: rgba(255, 122, 0, 0.34);
  --amber: #ff7a00;
  --amber-soft: rgba(255, 122, 0, 0.14);
  --green: #66ff1a;
  --text: #f2eee7;
  --text-secondary: #c8c1b7;
  --muted: #8e8791;
  --shadow: 0 0 0 1px rgba(255, 122, 0, 0.22), 0 0 28px rgba(0, 0, 0, 0.52);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 122, 0, 0.07), transparent 26rem),
    linear-gradient(90deg, rgba(255, 122, 0, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 122, 0, 0.028) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 24px 24px, 24px 24px, auto;
  display: grid;
  place-items: center;
  padding: 14px;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0,
    rgba(255, 255, 255, 0.08) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.04;
  mix-blend-mode: screen;
  z-index: 30;
}

body::after {
  background-image:
    radial-gradient(circle at 15% 22%, rgba(255, 255, 255, 0.14) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 36%, rgba(255, 122, 0, 0.12) 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 74%, rgba(115, 255, 47, 0.08) 0 1px, transparent 1.5px);
  background-size: 97px 83px, 131px 107px, 173px 149px;
  opacity: 0.045;
  animation: noiseDrift 46s steps(8, end) infinite alternate;
  z-index: 29;
}

@keyframes noiseDrift {
  0% {
    background-position: 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 17px 23px, -19px 11px, 13px -17px;
  }
}

@keyframes cursorBlink {
  0%,
  46% {
    opacity: 0.72;
  }
  47%,
  100% {
    opacity: 0;
  }
}

@keyframes panelFlicker {
  0%,
  96%,
  100% {
    filter: brightness(1);
  }
  97% {
    filter: brightness(1.018);
  }
  98% {
    filter: brightness(0.995);
  }
}

@keyframes statusBlink {
  0%,
  91%,
  93%,
  100% {
    opacity: 1;
  }
  92% {
    opacity: 0.62;
  }
}

@keyframes revealPanel {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes progressBoot {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes crtJitter {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(1px, 0, 0);
  }
}

@keyframes resumeShimmer {
  0%,
  88%,
  100% {
    transform: translateX(-120%);
    opacity: 0;
  }
  91% {
    opacity: 0.38;
  }
  96% {
    transform: translateX(120%);
    opacity: 0;
  }
}

.command-shell {
  width: min(1440px, 100%);
  position: relative;
  background: rgba(5, 8, 13, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.command-shell::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 122, 0, 0.24);
  pointer-events: none;
  z-index: 1;
}

.command-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 122, 0, 0.18), transparent 16%) top left / 18rem 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(255, 122, 0, 0.18)) bottom right / 18rem 1px no-repeat;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  position: relative;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.055), rgba(255, 122, 0, 0.012));
  z-index: 2;
}

.brand-block {
  display: flex;
  align-items: center;
}

.brand-block::before {
  content: ">";
  margin-right: 16px;
  color: var(--amber);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 122, 0, 0.48);
}

.eyebrow,
.panel-title {
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  text-shadow: 0 0 12px rgba(255, 122, 0, 0.24);
}

.panel-title::before {
  content: "> ";
}

h1 {
  margin: 0;
  color: var(--amber);
  font-size: clamp(1.3rem, 3vw, 2.15rem);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#about .panel-title::after {
  content: "";
  display: inline-block;
  width: 0.56em;
  height: 0.94em;
  margin-left: 0.38em;
  background: currentColor;
  transform: translateY(0.12em);
  animation: cursorBlink 800ms steps(2, start) infinite;
}

.hero-subtitle {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: clamp(0.72rem, 1.5vw, 0.96rem);
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  background: rgba(5, 8, 13, 0.82);
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 0, 0.16), 0 0 18px rgba(255, 122, 0, 0.08);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.status-pill:hover,
.status-pill:focus-visible {
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 0, 0.22), 0 0 16px rgba(115, 255, 47, 0.1);
  outline: none;
}

.status-pill:active {
  transform: translateY(1px);
}

.topbar-link {
  flex: 0 0 auto;
}

.led {
  width: 10px;
  height: 10px;
  background: #73ff2f;
  box-shadow: 0 0 10px rgba(115, 255, 47, 0.86), 0 0 18px rgba(115, 255, 47, 0.32);
  animation: statusBlink 23s steps(1, end) infinite;
}

.command-grid {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  gap: 14px;
  position: relative;
  padding: 14px;
  z-index: 2;
}

.sidebar,
.main-stack {
  display: grid;
  align-content: start;
  gap: 14px;
}

.single-panel {
  padding: 20px;
}

.panel {
  position: relative;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 122, 0, 0.035), transparent 7rem),
    var(--panel);
  padding: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 122, 0, 0.1),
    inset 0 -32px 60px rgba(0, 0, 0, 0.2);
  animation: revealPanel 420ms ease both, panelFlicker 34s steps(1, end) 9s infinite;
  transition: box-shadow 120ms ease, filter 120ms ease;
}

.panel:nth-of-type(2n) {
  animation-duration: 480ms, 39s;
  animation-delay: 60ms, 14s;
}

.panel.is-in-view {
  box-shadow:
    inset 0 0 0 1px rgba(255, 122, 0, 0.15),
    inset 0 -32px 60px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(255, 122, 0, 0.055);
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
}

.panel::before {
  top: 5px;
  left: 5px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.panel::after {
  right: 5px;
  bottom: 5px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.panel-title {
  margin-bottom: 16px;
}

.photo-frame {
  position: relative;
  margin-bottom: 14px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #05070d;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.42);
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 78%, rgba(5, 8, 13, 0.28)),
    repeating-linear-gradient(180deg, transparent 0, transparent 3px, rgba(0, 0, 0, 0.18) 4px);
}

.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 36%;
  image-rendering: auto;
  transition: filter 120ms ease;
}

.photo-frame:hover img {
  filter: saturate(1.06) contrast(1.04) brightness(1.03);
}

.profile-stats {
  display: grid;
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 122, 0, 0.2);
  background: rgba(255, 255, 255, 0.015);
}

.profile-row,
.status-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 122, 0, 0.16);
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.35;
}

.profile-row:last-child,
.status-line:last-child {
  border-bottom: 0;
}

.profile-row span,
.status-line span:first-child {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.profile-row strong,
.status-line span:last-child {
  color: var(--text-secondary);
  text-align: right;
  font-weight: 500;
}

.status-line span:first-child::before {
  content: ">";
  margin-right: 8px;
  color: var(--amber);
}

.inline-download {
  position: relative;
  color: var(--amber);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 140ms ease, text-shadow 140ms ease;
}

.inline-download::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 120ms ease;
}

.inline-download:hover,
.inline-download:focus-visible {
  color: var(--text);
  text-shadow: 0 0 12px rgba(255, 122, 0, 0.36);
  outline: none;
  animation: crtJitter 140ms steps(2, end) 1;
}

.inline-download:hover::after,
.inline-download:focus-visible::after {
  transform: scaleX(1);
}

.button-stack {
  display: grid;
  gap: 9px;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 122, 0, 0.08);
  border: 1px solid var(--line-strong);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 0, 0.16);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, color 120ms ease;
  overflow: hidden;
  will-change: transform;
}

.button::before {
  content: "> ";
  color: var(--amber);
  margin-right: 8px;
}

.button:hover,
.button:focus-visible {
  color: #fff8ed;
  background: rgba(255, 122, 0, 0.18);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 0, 0.24), 0 0 18px rgba(255, 122, 0, 0.16);
  outline: none;
  animation: crtJitter 140ms steps(2, end) 1;
}

.button:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.26);
}

.button-secondary {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.018);
}

.profile-panel .button-stack .button:first-child::after {
  content: "";
  position: absolute;
  inset: -20% auto -20% 0;
  width: 34%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-120%);
  animation: resumeShimmer 18s ease-in-out infinite;
}

.panel p {
  margin: 0 0 12px;
  max-width: 74ch;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.8;
}

.panel p:last-child {
  margin-bottom: 0;
}

.section-intro {
  max-width: 68ch;
}

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

.stack-group {
  position: relative;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.014);
  padding: 14px;
  animation: revealPanel 440ms ease both;
}

.stack-group h2 {
  display: block;
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stack-group h2::before {
  content: ":: ";
}

.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 122, 0, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-list {
  display: grid;
  gap: 12px;
}

.project-item {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line-soft);
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(255, 122, 0, 0.04), transparent 38%),
    rgba(255, 255, 255, 0.012);
  animation: revealPanel 440ms ease both;
}

.project-logo {
  grid-row: 1 / span 4;
  grid-column: 1;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(90deg, transparent 12px, rgba(255, 122, 0, 0.18) 13px, transparent 14px),
    linear-gradient(transparent 12px, rgba(255, 122, 0, 0.18) 13px, transparent 14px),
    rgba(255, 122, 0, 0.08);
  background-size: 15px 15px;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.38), 0 0 14px rgba(255, 122, 0, 0.08);
}

.project-logo svg {
  display: block;
  width: 46px;
  height: 46px;
  color: #73ff2f;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(115, 255, 47, 0.5));
  transition: filter 120ms ease;
}

.project-logo svg path:first-child {
  fill: rgba(115, 255, 47, 0.12);
}

.project-logo svg circle {
  fill: currentColor;
  stroke: none;
}

.project-logo-orion svg {
  width: 48px;
  height: 48px;
  color: #bfffb3;
  stroke-width: 2.4;
  filter: drop-shadow(0 0 7px rgba(115, 255, 47, 0.38));
}

.project-logo-orion svg path:first-child {
  fill: rgba(115, 255, 47, 0.08);
}

.project-logo-orion svg path:nth-child(2) {
  fill: rgba(5, 8, 13, 0.44);
}

.project-item:has(.project-start:hover) .project-logo svg,
.project-item:has(.project-start:focus-visible) .project-logo svg {
  filter: drop-shadow(0 0 11px rgba(115, 255, 47, 0.62));
}

.project-item.active,
.project-item.highlighted {
  border-color: var(--line-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 0, 0.18), 0 0 18px rgba(255, 122, 0, 0.07);
}

.project-header,
.project-meta,
.progress-row,
.project-start {
  grid-column: 2;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.project-name {
  color: var(--amber);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.project-meta div {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 122, 0, 0.12);
}

.project-meta span {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-meta p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.65;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bar {
  flex: 1;
  height: 8px;
  border: 1px solid rgba(255, 122, 0, 0.28);
  background: rgba(255, 255, 255, 0.03);
}

.bar span {
  display: block;
  width: 60%;
  height: 100%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.32);
  transform-origin: left;
  animation: progressBoot 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.project-start {
  width: 100%;
}

.cert-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.014);
  color: var(--text);
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background-color 120ms ease;
  animation: revealPanel 440ms ease both;
}

.cert-card:hover,
.cert-card:focus-visible {
  border-color: var(--line-strong);
  background: rgba(255, 122, 0, 0.055);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(255, 122, 0, 0.1);
  outline: none;
  animation: crtJitter 140ms steps(2, end) 1;
}

.cert-card span {
  color: var(--text);
  font-size: 0.84rem;
  letter-spacing: 0.07em;
  line-height: 1.45;
  text-transform: uppercase;
}

.cert-card strong {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sound-control {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 122, 0, 0.56);
  background: rgba(5, 8, 13, 0.88);
  color: var(--text-secondary);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 0, 0.12), 0 0 18px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
}

.sound-toggle {
  display: inline-flex;
  gap: 4px;
}

.sound-toggle button {
  min-width: 38px;
  min-height: 28px;
  border: 1px solid rgba(255, 122, 0, 0.44);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font: inherit;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.sound-toggle button:hover,
.sound-toggle button:focus-visible {
  color: var(--text);
  box-shadow: 0 0 12px rgba(255, 122, 0, 0.12);
  outline: none;
}

.sound-toggle button[aria-pressed="true"] {
  color: #73ff2f;
  background: rgba(115, 255, 47, 0.08);
  box-shadow: inset 0 0 0 1px rgba(115, 255, 47, 0.18);
}

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

  .sidebar {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  }

  .photo-frame {
    max-width: 360px;
  }
}

@media (max-width: 720px) {
  body {
    padding: 10px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .command-grid {
    padding: 10px;
  }

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

  .brand-block {
    align-items: flex-start;
  }

  .eyebrow,
  .panel-title {
    letter-spacing: 0.08em;
  }

  .profile-row,
  .status-line,
  .progress-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-row strong,
  .status-line span:last-child {
    text-align: left;
  }

  .button {
    overflow-wrap: anywhere;
  }

  .project-item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .project-logo {
    width: 48px;
    height: 48px;
  }

  .project-logo svg {
    width: 36px;
    height: 36px;
  }

  .sound-control {
    left: 10px;
    bottom: 10px;
    max-width: calc(100vw - 20px);
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .skill-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stack-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }
}

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

  body::after,
  .panel,
  .stack-group,
  .project-item,
  .cert-card,
  .bar span,
  .led,
  .profile-panel .button-stack .button:first-child::after {
    animation: none !important;
  }

  #about .panel-title::after {
    display: none;
  }

  .button,
  .inline-download,
  .cert-card,
  .photo-frame img,
  .sound-toggle button,
  .project-logo svg {
    transition: none;
  }
}
