:root {
  --bg: #0a0d10;
  --bg-2: #0f1418;
  --surface: #12181d;
  --surface-2: #171f25;
  --text: #f2efe7;
  --muted: #9aa5ab;
  --line: rgba(242, 239, 231, 0.12);
  --line-strong: rgba(242, 239, 231, 0.24);
  --accent: #c8f25a;
  --accent-ink: #0a0d10;
  --accent-soft: rgba(200, 242, 90, 0.1);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 20px;
  --max: 1180px;
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

[data-theme="light"] {
  --bg: #f4f1e9;
  --bg-2: #ece7db;
  --surface: #fffdf7;
  --surface-2: #f8f4ea;
  --text: #14191d;
  --muted: #5b666c;
  --line: rgba(20, 25, 29, 0.12);
  --line-strong: rgba(20, 25, 29, 0.24);
  --accent: #4d7a00;
  --accent-ink: #ffffff;
  --accent-soft: rgba(77, 122, 0, 0.1);
  --shadow: 0 30px 80px rgba(20, 25, 29, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(1100px 700px at 85% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.menu-open,
body.lightbox-open {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom-color: var(--line);
}

.progress {
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.header__inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1rem;
  text-decoration: none;
  font-family: var(--font-display);
  line-height: 1;
  white-space: nowrap;
}

.brand__mark {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.brand__dot {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--accent);
}

.brand__text {
  margin-left: 0.55rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}

.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav .nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.8rem;
}

.nav .nav__cta::after {
  display: none;
}

.nav .nav__cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .icon--moon,
[data-theme="light"] .icon--sun {
  display: none;
}

.menu-btn {
  display: none;
}

.icon--close {
  display: none;
}

.nav.is-open ~ .header__actions .icon--close,
.menu-btn[aria-expanded="true"] .icon--menu {
  display: none;
}

.menu-btn[aria-expanded="true"] .icon--close {
  display: block;
}

/* Hero */

.hero {
  position: relative;
  padding: calc(76px + clamp(4rem, 10vw, 8.5rem)) 0 clamp(4rem, 8vw, 7rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 72%);
  opacity: 0.55;
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 780px;
  max-height: 780px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero__title {
  margin: 1.5rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.hero__title .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}

.hero__role {
  margin: 1.6rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero__lead {
  max-width: 54ch;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 25%, transparent);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.hero__meta dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__meta dd {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.hero__visual {
  perspective: 1200px;
}

.terminal {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: #0c1116;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition: transform 0.25s ease;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.terminal__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5f57;
}

.terminal__dot:nth-child(2) {
  background: #febc2e;
}

.terminal__dot:nth-child(3) {
  background: #28c840;
}

.terminal__bar p {
  margin: 0 0 0 auto;
  color: #6b7780;
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.terminal__body {
  overflow-x: auto;
  padding: 1.6rem;
  color: #d7dee2;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.95;
}

.terminal__body p {
  margin: 0;
  white-space: nowrap;
}

.prompt {
  margin-right: 0.4rem;
  color: #c8f25a;
}

.cmd {
  color: #ffffff;
}

.out {
  padding-left: 1.1rem;
  color: #7f8c94;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 2px;
  background: #c8f25a;
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}

/* Ticker */

.ticker {
  overflow: hidden;
  padding: 1rem 0;
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.ticker__group {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding-right: 3rem;
}

.ticker span {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Stats */

.stats-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.75rem;
  border-right: 1px solid var(--line);
  transition: background-color 0.25s ease;
}

.stat:last-child {
  border-right: 0;
}

.stat:hover {
  background: var(--surface-2);
}

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.stat__label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

/* Sections */

.section {
  padding: clamp(4.5rem, 9vw, 8rem) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}

.section__head {
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) 1fr;
  align-items: start;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section__index {
  margin: 0.4rem 0 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section h2 {
  max-width: 20ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section__lead {
  max-width: 55ch;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

/* Profile */

.profile__grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

.profile__text p {
  max-width: 62ch;
  margin: 0 0 1.2rem;
  color: var(--muted);
  line-height: 1.8;
}

.profile__text .lead {
  margin-bottom: 1.5rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.015em;
}

.profile__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid transparent;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.text-link:hover {
  border-bottom-color: var(--accent);
}

.text-link .icon {
  width: 15px;
  height: 15px;
}

.fact-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.fact-card h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.fact-card dl {
  margin: 0;
}

.fact-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.fact-card dl > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.fact-card dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.fact-card dd {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  text-align: right;
}

/* Skills */

.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.skill {
  position: relative;
  overflow: hidden;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.skill:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: var(--surface-2);
  transform: translateY(-4px);
}

.skill--wide {
  grid-column: span 2;
}

.skill__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.skill__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.skill__icon .icon {
  width: 22px;
  height: 22px;
}

.skill__num {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.skill h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.skill p {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

/* Timeline */

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.8rem;
  bottom: 0.8rem;
  left: 8.9rem;
  width: 1px;
  background: var(--line);
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 3rem;
  padding: 1.6rem 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: 2.15rem;
  left: calc(8.9rem - 4px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--bg);
}

.timeline__date {
  margin: 0;
  padding-top: 0.35rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-align: right;
}

.timeline__content {
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.timeline__item:last-child .timeline__content {
  border-bottom: 0;
}

.timeline__content h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.timeline__company {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.timeline__content > p:not(.timeline__company) {
  max-width: 65ch;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.timeline__more {
  display: flex;
  justify-content: flex-start;
  margin-top: 1.5rem;
  padding-left: 11rem;
}

.toggle-icon {
  transition: transform 0.3s ease;
}

#timeline-toggle.is-open .toggle-icon {
  transform: rotate(90deg);
}

/* Projects */

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.project {
  position: relative;
  overflow: hidden;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project::after {
  content: "";
  position: absolute;
  right: -20%;
  bottom: -60%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--accent-soft);
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-4px);
}

.project:hover::after {
  opacity: 1;
}

.project__index {
  margin: 0 0 2rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.project h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}

.project__meta {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.project > p:not(.project__index):not(.project__meta) {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Certificates */

.certs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cert {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cert:hover,
.cert:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.cert__num {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.cert__name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 500;
}

.cert__open {
  width: 13px;
  height: 13px;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.cert:hover .cert__open,
.cert:focus-visible .cert__open {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.certs__note {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 7, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1100px, 100%);
  max-height: 92vh;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.lightbox__eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lightbox__bar h3 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.lightbox__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lightbox__count {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  white-space: nowrap;
}

.lightbox__stage {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: clamp(1rem, 3vw, 2rem);
  background: #0b0f14;
}

.lightbox__stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(92vh - 190px);
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(10, 13, 16, 0.72);
  color: #ffffff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lightbox__nav:hover {
  border-color: var(--accent);
  background: rgba(10, 13, 16, 0.92);
  color: var(--accent);
}

.lightbox__nav .icon {
  width: 18px;
  height: 18px;
}

.lightbox__nav--prev {
  left: clamp(0.75rem, 2vw, 1.5rem);
}

.lightbox__nav--prev .icon {
  transform: rotate(180deg);
}

.lightbox__nav--next {
  right: clamp(0.75rem, 2vw, 1.5rem);
}

.lightbox__hint {
  margin: 0;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-align: center;
}

/* Contact */

.contact {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(800px 400px at 100% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
}

.contact h2 {
  max-width: 16ch;
  margin: 1rem 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
}

.contact__lead {
  max-width: 55ch;
  margin: 0 0 2rem;
  color: var(--muted);
  line-height: 1.7;
}

.contact__mail {
  display: inline-block;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.contact__mail:hover {
  border-bottom-color: var(--accent);
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.contact__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.contact__meta dt {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact__meta dt .icon {
  width: 13px;
  height: 13px;
}

.contact__meta dd {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.contact__meta a {
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact__meta a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

/* Footer */

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand--footer .brand__mark,
.brand--footer .brand__dot {
  font-size: 1rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer__top {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.footer__top:hover {
  color: var(--accent);
}

/* Reveal */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Animations */

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px var(--accent-soft);
  }
  50% {
    box-shadow: 0 0 0 7px transparent;
  }
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* Responsive */

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

  .hero__visual {
    max-width: 560px;
  }

  .section__head {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .section__index {
    margin-top: 0;
  }

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

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

  .skill--wide {
    grid-column: span 2;
  }

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

  .projects .project:last-child {
    grid-column: span 2;
  }

  .certs {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .menu-btn {
    display: grid;
  }

  .nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    padding: 1rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 0.25rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .nav a.is-active::after {
    display: none;
  }

  .nav .nav__cta {
    justify-content: center;
    margin-top: 0.75rem;
    padding: 0.8rem 1rem;
    border-bottom: 0;
  }

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

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(1),
  .stat:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .timeline::before {
    left: 4px;
  }

  .timeline__item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding-left: 2rem;
  }

  .timeline__item::before {
    left: 0;
    top: 2.15rem;
  }

  .timeline__date {
    padding-top: 0;
    text-align: left;
  }

  .timeline__more {
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1.5rem, var(--max));
  }

  .header__inner {
    min-height: 68px;
  }

  .nav {
    top: 68px;
  }

  .brand__text {
    display: none;
  }

  .hero {
    padding-top: calc(68px + 4rem);
  }

  .hero__meta {
    gap: 1.5rem;
  }

  .hero__meta > div {
    min-width: 6rem;
  }

  .terminal__body {
    overflow-x: visible;
    padding: 1.1rem;
    font-size: 0.7rem;
  }

  .terminal__body p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .terminal__bar p {
    display: none;
  }

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

  .skill--wide,
  .projects .project:last-child {
    grid-column: span 1;
  }

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

  .contact__meta {
    gap: 1.5rem;
  }

  .footer__inner {
    justify-content: center;
    text-align: center;
  }

  .lightbox {
    padding: 0.5rem;
  }

  .lightbox__panel {
    max-height: 96vh;
    border-radius: 16px;
  }

  .lightbox__bar {
    padding: 0.85rem 1rem;
  }

  .lightbox__stage {
    padding: 0.75rem;
  }

  .lightbox__stage img {
    max-height: calc(96vh - 110px);
  }

  .lightbox__nav {
    width: 38px;
    height: 38px;
  }

  .lightbox__hint {
    display: none;
  }
}

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

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: 0;
  }

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

  .hero__actions .btn,
  .contact__actions .btn {
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .ticker__track {
    animation: none;
  }

  .cursor {
    animation: none;
  }
}

@media print {
  .site-header,
  .ticker,
  .hero__visual,
  .hero__actions,
  .hero__meta,
  .timeline__more,
  .contact__actions,
  .site-footer,
  .skip-link {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .section {
    padding: 1.5rem 0;
    border-top: 0;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .skill,
  .project,
  .cert,
  .fact-card,
  .stats,
  .contact {
    break-inside: avoid;
  }
}
