:root {
  --bg-0: #000000;
  --bg-1: #020202;
  --bg-2: #050505;
  --text: #f5f5f7;
  --muted: #a6a6aa;
  --card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.2);
  --accent: #62ff8c;
  --accent-2: #ffffff;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.72);
  --radius: 16px;
  --cursor-terminal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Crect x='3' y='2' width='2' height='14' fill='%2362ff8c'/%3E%3C/svg%3E") 3 16, auto;
  --cursor-terminal-active: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Crect x='2' y='2' width='3' height='14' fill='%2362ff8c'/%3E%3Crect x='7' y='12' width='8' height='2' fill='%2362ff8c'/%3E%3C/svg%3E") 3 16, pointer;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.14), transparent 38%),
    radial-gradient(circle at 85% 8%, rgba(255, 255, 255, 0.08), transparent 26%),
    radial-gradient(circle at 20% 95%, rgba(255, 255, 255, 0.05), transparent 35%),
    linear-gradient(140deg, var(--bg-0), var(--bg-1) 50%, var(--bg-2));
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 76px;
  cursor: var(--cursor-terminal);
}

body.booting {
  overflow: hidden;
}

body.booting .site-header,
body.booting main,
body.booting footer,
body.booting .noise,
body.booting .cursor-glow {
  opacity: 0;
  pointer-events: none;
}

.site-header,
main,
footer,
.noise,
.cursor-glow {
  transition: opacity 420ms ease;
}

.boot-sequence {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(98, 255, 140, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.99));
  transition: opacity 520ms ease;
}

.boot-sequence.done {
  opacity: 0;
  pointer-events: none;
}

.boot-panel {
  width: min(680px, 92vw);
  border: 1px solid rgba(98, 255, 140, 0.3);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 35px rgba(0, 0, 0, 0.65);
  padding: 1.2rem 1.1rem;
  font-family: "IBM Plex Mono", monospace;
}

.boot-title {
  margin: 0 0 0.7rem;
  color: #7fffa0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-shadow: 0 0 8px rgba(98, 255, 140, 0.36);
}

.boot-line {
  margin: 0.28rem 0;
  color: #62ff8c;
  text-shadow: 0 0 8px rgba(98, 255, 140, 0.35);
}

.boot-hidden {
  opacity: 0;
}

.boot-line,
.boot-hidden {
  transition: opacity 250ms ease;
}

.noise {
  position: fixed;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 0.5px, transparent 0.8px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
  z-index: 0;
}

.cursor-glow {
  position: fixed;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(98, 255, 140, 0.24), rgba(98, 255, 140, 0.08) 38%, rgba(98, 255, 140, 0));
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 220ms ease, transform 120ms ease;
  filter: blur(2px);
  z-index: 1;
}

.site-header,
main,
footer {
  position: relative;
  z-index: 2;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem clamp(1rem, 4vw, 3rem);
  backdrop-filter: blur(12px);
  background:
    linear-gradient(180deg, rgba(34, 34, 36, 0.82), rgba(8, 8, 9, 0.78)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.22), transparent 65%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 8px 24px rgba(0, 0, 0, 0.55);
  z-index: 10000;
  pointer-events: auto;
}

.brand {
  font-weight: 600;
  color: #62ff8c;
  font-family: "IBM Plex Mono", monospace;
  text-shadow: 0 0 10px rgba(98, 255, 140, 0.28);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.05em;
}

.nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav a {
  color: #d9fce3;
  text-decoration: none;
  font-size: 0.86rem;
  font-family: "IBM Plex Mono", monospace;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  transition: all 170ms ease;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.nav a:hover,
.nav a.active {
  color: #62ff8c;
  border-color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08));
  text-shadow: 0 0 10px rgba(98, 255, 140, 0.3);
}

main {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: clamp(1.3rem, 2.8vw, 2.4rem);
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: clamp(1rem, 3vw, 2rem) 0;
}

.hero-panel,
.photo-wrap,
.card,
.badge-item,
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.hero-panel > *,
.card > *,
.badge-item > *,
.contact-card > * {
  position: relative;
  z-index: 2;
}

.hero-panel::before,
.photo-wrap::before,
.card::before,
.badge-item::before,
.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.24) 0%,
    rgba(255, 255, 255, 0.08) 24%,
    rgba(255, 255, 255, 0.02) 45%,
    rgba(255, 255, 255, 0) 65%
  );
  pointer-events: none;
}

.hero-panel {
  padding: clamp(1.2rem, 3vw, 2.2rem);
  transform-style: preserve-3d;
  transition: transform 200ms ease;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #d7ffe3;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.04;
  margin-bottom: 0.8rem;
}

.roles {
  min-height: 2rem;
  font-family: "IBM Plex Mono", monospace;
  color: #62ff8c;
  margin-bottom: 1rem;
  text-shadow: 0 0 8px rgba(98, 255, 140, 0.45), 0 0 22px rgba(98, 255, 140, 0.22);
}

#typedRole {
  display: inline-block;
  transition: opacity 160ms ease;
}

#typedRole.fade {
  opacity: 0;
}

.cursor {
  display: inline-block;
  animation: blink 700ms steps(2, start) infinite;
  color: #62ff8c;
}

.terminal-line {
  margin: 0 0 0.75rem;
  font-family: "IBM Plex Mono", monospace;
  color: #62ff8c;
  font-size: clamp(0.78rem, 1.8vw, 0.96rem);
  letter-spacing: 0.01em;
  text-shadow: 0 0 6px rgba(98, 255, 140, 0.52), 0 0 16px rgba(98, 255, 140, 0.25);
  animation: terminalFlicker 2.8s linear infinite;
}

.terminal-line .prompt {
  opacity: 0.8;
  margin-right: 0.45rem;
}

.terminal-line .command {
  font-weight: 500;
}

.summary {
  color: var(--muted);
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.chip,
.filter {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
  color: var(--text);
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.chip:hover,
.filter:hover,
.filter.active {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1));
}

.chip:hover {
  color: #62ff8c;
  text-shadow: 0 0 8px rgba(98, 255, 140, 0.35);
}

.photo-wrap {
  padding: clamp(0.75rem, 2vw, 1.2rem);
}

.profile-photo {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
}

.section {
  padding: clamp(2.5rem, 6vw, 4.6rem) 0;
  scroll-margin-top: 95px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  margin-bottom: 0;
}

.filters {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  gap: 0.95rem;
}

.cards {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.card {
  padding: 1rem;
  transition: transform 200ms ease, border-color 200ms ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.4);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

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

.card .meta {
  margin-top: 0.8rem;
  font-size: 0.79rem;
  color: #93f7ad;
  font-family: "IBM Plex Mono", monospace;
}

.card .meta::before {
  content: "$ ";
  opacity: 0.8;
}

a {
  color: inherit;
  cursor: var(--cursor-terminal-active);
}

a:hover {
  color: var(--accent);
}

.badge-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
}

.badge-item {
  padding: 0.85rem;
  text-align: center;
  transition: transform 200ms ease, border-color 200ms ease;
}

.badge-item p,
.contact-card {
  font-family: "IBM Plex Mono", monospace;
}


.badge-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.4);
}

.badge-item img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.contact-card {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 74px;
  text-decoration: none;
  font-weight: 500;
  transition: transform 180ms ease, border-color 180ms ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.45);
}

button,
.chip,
.filter,
.nav a,
.contact-card {
  cursor: var(--cursor-terminal-active);
}

footer {
  text-align: center;
  color: #62ff8c;
  text-shadow: 0 0 8px rgba(98, 255, 140, 0.35);
  padding: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 2rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

@keyframes terminalFlicker {
  0%,
  100% {
    opacity: 1;
  }
  7% {
    opacity: 0.92;
  }
  8% {
    opacity: 0.98;
  }
  42% {
    opacity: 0.9;
  }
  43% {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1.2rem;
  }

  .photo-wrap {
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .cursor-glow {
    display: none;
  }
}
