/* ==========================================================================
   Fonts (self-hosted, variable, latin subset)
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --container: 1140px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 64px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark is the default */
:root,
:root[data-theme="dark"] {
  --bg: #07090f;
  --bg-alt: #0a0e17;
  --surface: #0f1420;
  --surface-2: #141a28;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #e7ecf3;
  --text-muted: #9aa6b8;
  --text-dim: #7d889b;
  --accent: #22d3ee;
  --accent-2: #34d399;
  --accent-ink: #04111a;
  --accent-soft: rgba(34, 211, 238, 0.1);
  --ok: #34d399;
  --glow-1: rgba(34, 211, 238, 0.16);
  --glow-2: rgba(52, 211, 153, 0.1);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --term-bg: #0b0f19;
  --term-text: #d6deea;
  --badge-tile: #ffffff0d;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-alt: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0b1220;
  --text-muted: #475467;
  --text-dim: #5b6474;
  --accent: #0e7490;
  --accent-2: #047857;
  --accent-ink: #ffffff;
  --accent-soft: rgba(14, 116, 144, 0.08);
  --ok: #059669;
  --glow-1: rgba(14, 116, 144, 0.12);
  --glow-2: rgba(5, 150, 105, 0.08);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 40px -20px rgba(15, 23, 42, 0.18);
  --term-bg: #0b0f19;
  --term-text: #d6deea;
  --badge-tile: #f3f5f8;
  color-scheme: light;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}

strong {
  color: var(--text);
  font-weight: 600;
}

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.icon--inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: -2px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav.is-scrolled,
.nav.is-open {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__prompt {
  color: var(--accent);
}

.brand__cursor {
  width: 8px;
  height: 17px;
  margin-left: 3px;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav__links a {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}

.nav__links a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.nav__links a.is-active {
  color: var(--text);
}

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

.nav__links .nav__cta {
  margin-left: 8px;
  color: var(--accent-ink);
  background: var(--accent);
}

.nav__links .nav__cta:hover {
  color: var(--accent-ink);
  background: var(--accent);
  filter: brightness(1.08);
}

.nav__links .nav__cta.is-active::after {
  display: none;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

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

.icon-btn .icon {
  grid-area: 1 / 1;
}

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

.lang {
  display: inline-flex;
  gap: 2px;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.lang__opt {
  display: grid;
  place-items: center;
  min-width: 32px;
  padding: 0 6px;
  border-radius: 7px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.2s, background-color 0.2s;
}

.lang__opt:hover {
  color: var(--text);
}

.lang__opt[aria-current] {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav__toggle {
  display: none;
}

.nav__toggle .icon--close,
.nav.is-open .nav__toggle .icon--menu {
  display: none;
}

.nav.is-open .nav__toggle .icon--close {
  display: block;
}

/* ==========================================================================
   Buttons, chips, links
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 30px -10px var(--accent);
}

.btn--primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 34px -8px var(--accent);
}

.btn--ghost {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn--lg {
  min-height: 52px;
  padding: 0 24px;
}

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

.chips li {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.4;
  white-space: nowrap;
}

.chips--sm li {
  padding: 3px 9px;
  font-size: 12px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14.5px;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: 2px;
}

.badge--live {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
}

.badge--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  margin-top: calc(var(--nav-h) * -1);
  padding: calc(var(--nav-h) + clamp(48px, 9vw, 112px)) 0 clamp(56px, 8vw, 96px);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}

/* Two slow aurora glows behind the waves */
.hero__bg::before,
.hero__bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}

.hero__bg::before {
  top: -18%;
  right: -8%;
  width: 62vw;
  height: 62vw;
  max-width: 820px;
  max-height: 820px;
  background: radial-gradient(circle at 40% 40%, var(--glow-1), transparent 62%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.hero__bg::after {
  bottom: -30%;
  left: -14%;
  width: 54vw;
  height: 54vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(circle at 60% 50%, var(--glow-2), transparent 62%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

/* Signal waves; the script keeps the left side calm */
.hero__waves {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 72px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--ok);
  opacity: 0;
  animation: ping 2.4s var(--ease) infinite;
}

.hero h1 {
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.hero__role {
  display: block;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.hero__role em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 54ch;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: clamp(16px, 1.4vw, 18px);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__social {
  display: flex;
  gap: 8px;
  margin-top: 28px;
}

.hero__social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

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

/* Terminal */

.terminal {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  background: var(--term-bg);
  color: var(--term-text);
  box-shadow: 0 30px 80px -30px rgba(2, 8, 23, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
}

.terminal::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(140deg, var(--accent), transparent 40%, transparent 60%, var(--accent-2));
  opacity: 0.35;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.terminal__dots {
  display: flex;
  gap: 7px;
}

.terminal__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}

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

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

.terminal__title {
  margin-inline: auto;
  padding-right: 45px;
  color: #7d8799;
  font-family: var(--font-mono);
  font-size: 12px;
}

.terminal__body {
  padding: 18px 20px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
  scrollbar-width: none;
}

.terminal__body::-webkit-scrollbar {
  display: none;
}

.t-line,
.t-out > div,
.notfound .terminal__body > div {
  white-space: pre;
}

.t-prompt {
  color: #34d399;
  font-weight: 700;
}

.t-cmd {
  color: #f1f5f9;
}

.t-key {
  color: #22d3ee;
}

.t-ok {
  color: #34d399;
}

.footer .t-ok {
  color: var(--ok);
}

.t-dim {
  color: #6b778a;
}

.t-out {
  margin: 2px 0 12px;
  color: #b4bfcf;
}

.t-caret,
.t-cmd.is-typing::after {
  display: inline-block;
  width: 8px;
  height: 16px;
  vertical-align: -3px;
  background: #22d3ee;
}

.t-cmd.is-typing::after {
  content: "";
  margin-left: 1px;
}

/* JS-driven reveal of terminal lines; hidden lines keep their space */
.terminal.is-animated .t-line:not(.is-shown),
.terminal.is-animated .t-out:not(.is-shown) {
  visibility: hidden;
}

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(56px, 8vw, 88px) 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  overflow: hidden;
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 8px;
  padding: 26px 24px 24px;
}

.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat dt {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.4;
}

.stat dd {
  margin: 0;
  background: linear-gradient(120deg, var(--text) 30%, var(--accent) 75%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(38px, 4.6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: clamp(64px, 8vw, 104px) 0;
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section__head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section__kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: lowercase;
}

.section__kicker span {
  color: var(--text-dim);
}

.section__kicker span::after {
  content: " /";
}

.section h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.section__sub {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 17px;
}

/* Profile */

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.profile__text {
  display: grid;
  gap: 18px;
  color: var(--text-muted);
  font-size: 17px;
}

.pillars {
  display: grid;
  gap: 12px;
}

.pillar {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.pillar:hover {
  border-color: var(--border-strong);
  transform: translateX(4px);
}

.pillar__icon {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.pillar h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.pillar p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.55;
}

/* Skills */

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

.skill {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

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

.skill h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.skill h3 .icon {
  color: var(--accent);
}

/* Experience timeline */

.timeline {
  position: relative;
  display: grid;
  gap: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 190px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border) 30%, var(--border));
}

.job {
  position: relative;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.job::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 185px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
}

.job:first-child::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.job__meta {
  padding: 20px 32px 0 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.job__place {
  display: block;
  color: var(--text-dim);
}

.job__card {
  margin-left: 32px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.job__head {
  margin-bottom: 14px;
}

.job__head h3 {
  font-size: 19px;
}

.job__company {
  margin-top: 4px;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

.job__points {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.job__points li {
  position: relative;
  padding-left: 20px;
}

.job__points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 1.5px;
  background: var(--accent);
  opacity: 0.8;
}

/* Certifications */

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

.cert {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.cert:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.cert img {
  width: 72px;
  height: 72px;
  padding: 6px;
  border-radius: 12px;
  background: var(--badge-tile);
  object-fit: contain;
}

.cert h3 {
  font-size: 15.5px;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.cert p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.certs__more {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 14.5px;
}

.certs__more img {
  border-radius: 6px;
}

/* Projects */

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

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.project::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.project:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.project:hover::before {
  opacity: 0.8;
}

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

.project h3 {
  font-size: 18px;
}

.project__year {
  margin-left: 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.project p {
  flex: 1;
  margin: 10px 0 20px;
  color: var(--text-muted);
  font-size: 15px;
}

.project--link h3 .icon {
  color: var(--accent);
  transition: transform 0.25s var(--ease);
}

.project--link:hover h3 .icon {
  transform: translate(2px, -2px);
}

/* Background */

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

.bg-col {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.bg-col__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 16px;
}

.bg-col__title .icon {
  color: var(--accent);
}

.bg-list {
  display: grid;
  gap: 18px;
}

.bg-list li {
  display: grid;
  gap: 2px;
  padding-left: 14px;
  border-left: 2px solid var(--border-strong);
}

.bg-list strong {
  font-size: 15px;
}

.bg-list span {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.bg-list em {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-style: normal;
}

/* CV download */

.cv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(420px 260px at 0% 0%, var(--glow-1), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}

.cv__preview {
  position: relative;
  display: block;
  width: clamp(150px, 18vw, 210px);
  border-radius: 10px;
  transform: rotate(-3deg);
  box-shadow: 0 24px 50px -18px rgba(2, 8, 23, 0.55), 0 0 0 1px var(--border-strong);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.cv__preview::after {
  content: "";
  position: absolute;
  inset: 8px -8px -8px 8px;
  z-index: -1;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  transform: rotate(5deg);
}

.cv__preview:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 30px 60px -18px rgba(2, 8, 23, 0.6), 0 0 0 1px var(--accent);
}

.cv__preview img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #fff;
}

.cv__badge {
  position: absolute;
  right: -10px;
  bottom: 14px;
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 18px -6px var(--accent);
}

.cv__lead {
  max-width: 54ch;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 17px;
}

.cv__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 18px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

@media (min-width: 761px) {
  .cv__meta li + li::before {
    content: "·";
    margin-right: 18px;
    margin-left: -10px;
    color: var(--text-dim);
  }
}

.cv__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

#cv + .contact {
  padding-top: 0;
}

@media (max-width: 760px) {
  .cv {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .cv__preview {
    width: 150px;
    margin: 4px 0 8px 8px;
  }

  .cv__actions .btn {
    width: 100%;
  }
}

/* Contact */

.contact__card {
  position: relative;
  padding: clamp(32px, 6vw, 64px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(500px 260px at 100% 0%, var(--glow-1), transparent 70%),
    radial-gradient(400px 240px at 0% 100%, var(--glow-2), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.contact__lead {
  max-width: 56ch;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 17px;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

#copy-email .icon--check,
#copy-email.is-copied .icon--copy {
  display: none;
}

#copy-email.is-copied .icon--check {
  display: block;
  color: var(--ok);
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14.5px;
}

.contact__links a,
.contact__links span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  overflow-wrap: anywhere;
}

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

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

/* Footer */

.footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer__mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s, border-color 0.2s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   Motion
   ========================================================================== */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

@keyframes drift-a {
  to {
    transform: translate(-12%, 14%) scale(1.15);
  }
}

@keyframes drift-b {
  to {
    transform: translate(16%, -10%) scale(0.9);
  }
}

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

@keyframes ping {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  80%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

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

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

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

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .skills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 960px) {
  .nav__toggle {
    display: inline-grid;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 12px var(--gutter) 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }

  .nav.is-open .nav__links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__links a {
    padding: 13px 12px;
    font-size: 16px;
  }

  .nav__links a.is-active::after {
    left: 0;
    right: auto;
    top: 12px;
    bottom: 12px;
    width: 2px;
    height: auto;
  }

  .nav__links .nav__cta {
    margin: 10px 0 0;
    text-align: center;
  }

  .nav__actions {
    margin-left: auto;
  }

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

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

  .stat:nth-child(3) {
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

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

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

  .job {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 30px;
  }

  .job::before {
    left: 0;
    top: 4px;
  }

  .job__meta {
    padding: 0 0 10px;
  }

  .job__place {
    display: inline;
  }

  .job__place::before {
    content: " · ";
  }

  .job__card {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 60px;
  }

  .nav__inner {
    gap: 12px;
  }

  .nav__actions {
    gap: 4px;
  }

  .icon-btn,
  .lang {
    height: 38px;
  }

  .icon-btn {
    width: 38px;
  }

  .lang__opt {
    min-width: 28px;
    padding: 0 4px;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 13px;
  }

  .brand__cursor {
    width: 7px;
    height: 15px;
  }
}

@media (max-width: 640px) {

  .skills,
  .projects,
  .certs {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__ctas .btn {
    flex: 1 1 auto;
  }

  .terminal__body {
    padding: 16px;
    font-size: 11.5px;
  }

  .terminal__title {
    padding-right: 0;
  }

  .stat {
    padding: 18px;
  }

  .job__card,
  .project,
  .bg-col {
    padding: 20px;
  }

  .contact__actions .btn {
    width: 100%;
  }

  .to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media print {
  .nav,
  .to-top,
  .hero__bg,
  .terminal,
  .contact__actions {
    display: none !important;
  }

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

/* ==========================================================================
   404
   ========================================================================== */

.notfound {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 0;
}

.notfound .container {
  max-width: 640px;
}

.notfound .terminal__body {
  min-height: 0;
}

.notfound h1 {
  margin-top: 40px;
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.notfound p {
  margin: 12px 0 28px;
  color: var(--text-muted);
  font-size: 17px;
}

.notfound .notfound__de {
  margin-top: -16px;
  color: var(--text-dim);
  font-size: 15px;
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
