:root {
  color-scheme: dark;
  --bg: #040813;
  --bg-2: #071727;
  --surface: rgba(8, 20, 38, 0.72);
  --surface-strong: rgba(10, 25, 48, 0.9);
  --text: #eef7ff;
  --muted: #9fb4c9;
  --line: rgba(97, 232, 255, 0.22);
  --cyan: #49f3ff;
  --blue: #3b82ff;
  --purple: #b45cff;
  --green: #5cffb1;
  --amber: #ffd166;
  --pink: #ff5ddc;
  --danger: #ff637d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --glow: 0 0 28px rgba(73, 243, 255, 0.28);
  --max: 1180px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #eef7ff;
  --bg-2: #f8fbff;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --text: #122033;
  --muted: #52667e;
  --line: rgba(41, 133, 255, 0.24);
  --cyan: #00a9c7;
  --blue: #2369ff;
  --purple: #8247d6;
  --green: #098f5a;
  --amber: #b66b00;
  --pink: #bd2f98;
  --danger: #c0324e;
  --shadow: 0 24px 70px rgba(70, 111, 160, 0.18);
  --glow: 0 0 26px rgba(0, 169, 199, 0.14);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(73, 243, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 80% 6%, rgba(180, 92, 255, 0.18), transparent 26rem),
    linear-gradient(135deg, var(--bg), var(--bg-2) 46%, var(--bg));
  overflow-x: hidden;
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at 14% 8%, rgba(0, 169, 199, 0.18), transparent 26rem),
    radial-gradient(circle at 82% 10%, rgba(130, 71, 214, 0.12), transparent 26rem),
    linear-gradient(135deg, var(--bg), var(--bg-2) 52%, #e6f3ff);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(73, 243, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 243, 255, 0.07) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 88%);
}

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

button, input, textarea { font: inherit; }

.signal-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.7;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 0, rgba(255, 255, 255, 0.028) 1px, transparent 1px, transparent 7px);
  opacity: 0.2;
}

.reptile-skeleton-cursor {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.reptile-skeleton-cursor.active { opacity: 1; }

.float-shape {
  position: fixed;
  border: 1px solid var(--line);
  box-shadow: var(--glow);
  pointer-events: none;
  z-index: -1;
  animation: drift 10s ease-in-out infinite alternate;
}

.shape-a { width: 120px; height: 120px; top: 18%; left: 7%; transform: rotate(24deg); border-radius: 22px; }
.shape-b { width: 84px; height: 84px; top: 66%; right: 7%; transform: rotate(45deg); animation-delay: -3s; }
.shape-c { width: 180px; height: 60px; bottom: 9%; left: 18%; transform: skew(-18deg); animation-delay: -6s; }

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: cover;
  background: rgba(73, 243, 255, 0.08);
  box-shadow: 0 0 18px rgba(73, 243, 255, 0.22);
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 5px;
}

.menu-link {
  position: relative;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.menu-link:hover, .menu-link.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(73, 243, 255, 0.14), rgba(180, 92, 255, 0.13));
  box-shadow: inset 0 0 0 1px var(--line), var(--glow);
}

.theme-toggle, .menu-trigger, .back-top {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(73, 243, 255, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.theme-toggle:hover, .menu-trigger:hover, .back-top:hover,
.theme-toggle:focus-visible, .menu-trigger:focus-visible, .back-top:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.menu-trigger {
  display: none;
  width: 44px;
  height: 42px;
  padding: 10px;
  border-radius: 13px;
}

.menu-trigger span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

.section-shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 92px 0 34px;
}

.section-grid, .profile-layout, .contact-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: center;
}

.hero { min-height: calc(100vh - 72px); display: grid; align-items: center; }
.hero-grid { gap: 36px; }

.microline, .section-kicker, .mission-category, .note-card p {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  margin: 0;
  font-size: clamp(3.5rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: normal;
  text-shadow: 0 0 34px rgba(73, 243, 255, 0.34);
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.03;
}

h3 { margin: 0 0 12px; font-size: 1.18rem; }

.hero-subtitle {
  margin: 18px 0 10px;
  color: var(--text);
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  font-weight: 800;
}

.tagline { color: var(--green); font-weight: 800; }

.hero-description, .profile-card p, .timeline p, .contact-card p, .mission-card p {
  color: var(--muted);
  line-height: 1.75;
}

.typing-shell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 12px 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(73, 243, 255, 0.08);
  box-shadow: var(--glow);
}

.typing-prefix { color: var(--muted); font-weight: 800; }
#typing-text { color: var(--cyan); font-weight: 900; }
.typing-cursor { width: 10px; height: 20px; background: var(--cyan); animation: blink 0.85s steps(2, start) infinite; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover, .btn:focus-visible { transform: translateY(-3px); box-shadow: var(--glow); }
.btn.primary { color: #02111f; background: linear-gradient(135deg, var(--cyan), var(--green)); border: 0; }
.btn.secondary { background: linear-gradient(135deg, rgba(59, 130, 255, 0.2), rgba(180, 92, 255, 0.2)); }
.btn.ghost { background: rgba(255, 255, 255, 0.04); color: var(--muted); }
button.btn { cursor: pointer; font: inherit; }

.availability-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cv-captcha-dialog {
  width: min(calc(100% - 28px), 460px);
  padding: 0;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-strong);
  box-shadow: var(--shadow), var(--glow);
}

.cv-captcha-dialog::backdrop {
  background: rgba(2, 8, 18, 0.74);
  backdrop-filter: blur(8px);
}

.cv-captcha-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 28px;
}

.cv-captcha-card h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

.cv-captcha-copy, .cv-captcha-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.cv-captcha-card label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.cv-captcha-card input {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.cv-captcha-card input:focus-visible {
  border-color: var(--cyan);
  box-shadow: var(--glow);
}

.cv-captcha-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cv-captcha-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font: inherit;
  font-size: 1.2rem;
}

.cv-captcha-close:hover, .cv-captcha-close:focus-visible {
  color: var(--text);
  border-color: var(--cyan);
  box-shadow: var(--glow);
}

.hero-visual {
  position: relative;
  min-height: 590px;
}

.glass-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 28%, rgba(73, 243, 255, 0.08));
}

.avatar-core {
  position: absolute;
  top: 18px;
  right: 48px;
  display: grid;
  place-items: center;
  width: 172px;
  height: 172px;
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border: 2px dashed var(--cyan);
  border-radius: 50%;
  animation: spin 18s linear infinite;
  box-shadow: 0 0 28px rgba(73, 243, 255, 0.3);
}

.avatar-inner {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 28px;
  overflow: hidden;
  color: var(--text);
  font-size: 2.3rem;
  font-weight: 950;
  background: radial-gradient(circle at 30% 20%, rgba(92, 255, 177, 0.4), rgba(73, 243, 255, 0.18), rgba(180, 92, 255, 0.28));
  border: 1px solid var(--line);
  box-shadow: 0 0 42px rgba(180, 92, 255, 0.32);
}

.avatar-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.terminal-card { position: absolute; top: 150px; left: 0; width: min(420px, 82%); padding: 18px; }
.status-panel { position: absolute; top: 64px; left: 42px; width: 240px; padding: 18px; }
.network-panel { position: absolute; right: 0; top: 270px; width: 255px; padding: 18px; }
.stats-card { position: absolute; left: 72px; bottom: 26px; right: 34px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 14px; }

.panel-topline { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--muted); }
.panel-topline span { width: 10px; height: 10px; border-radius: 999px; background: var(--danger); }
.panel-topline span:nth-child(2) { background: var(--amber); }
.panel-topline span:nth-child(3) { background: var(--green); }
.panel-topline strong { margin-left: 6px; font-size: 0.84rem; }

.terminal-lines p { margin: 10px 0; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; }
.terminal-lines span { color: var(--green); font-weight: 900; }
.panel-label { margin-bottom: 14px; color: var(--cyan); font-weight: 900; text-transform: uppercase; font-size: 0.78rem; }
.status-row { display: flex; justify-content: space-between; margin: 10px 0 8px; color: var(--muted); font-size: 0.9rem; }
.status-row strong { color: var(--text); }
.meter { height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); border-radius: inherit; }
.meter.cyan span { background: linear-gradient(90deg, var(--cyan), var(--purple)); }
.signal-bars { display: flex; align-items: end; gap: 7px; height: 72px; }
.signal-bars span { flex: 1; min-width: 18px; background: linear-gradient(to top, var(--blue), var(--cyan)); border-radius: 9px 9px 0 0; animation: bars 1.8s ease-in-out infinite; }
.signal-bars span:nth-child(1) { height: 34%; }
.signal-bars span:nth-child(2) { height: 62%; animation-delay: -0.2s; }
.signal-bars span:nth-child(3) { height: 48%; animation-delay: -0.4s; }
.signal-bars span:nth-child(4) { height: 86%; animation-delay: -0.6s; }
.signal-bars span:nth-child(5) { height: 56%; animation-delay: -0.8s; }
.network-panel p { margin: 12px 0 0; color: var(--muted); font-size: 0.9rem; }
.stats-card div { padding: 14px; border-right: 1px solid var(--line); }
.stats-card div:last-child { border-right: 0; }
.stats-card strong { display: block; color: var(--cyan); font-size: 1.3rem; }
.stats-card span { color: var(--muted); font-size: 0.78rem; font-weight: 800; }

.section-heading { max-width: 760px; margin-bottom: 28px; }
.profile-card, .facts-card, .timeline, .contact-card, .contact-form { padding: 28px; }
.facts-card h3 { color: var(--cyan); }
.facts-card dl { margin: 0; display: grid; gap: 12px; }
.facts-card div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.facts-card dt { color: var(--muted); font-weight: 800; }
.facts-card dd { margin: 0; font-weight: 850; }

.skills-grid, .mission-grid, .knowledge-grid {
  display: grid;
  gap: 18px;
}

.skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mission-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.knowledge-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.skill-card, .mission-card, .note-card {
  min-width: 0;
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.skill-card:hover, .skill-card:focus-within,
.mission-card:hover, .mission-card:focus-within,
.note-card:hover, .note-card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow), var(--glow);
  border-color: color-mix(in srgb, var(--cyan) 60%, var(--line));
}
.skill-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--cyan); background: rgba(73, 243, 255, 0.1); font-size: 1.4rem; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  font-weight: 750;
}
.chip-list.small span { font-size: 0.76rem; }

.mission-card { display: flex; flex-direction: column; min-height: 100%; }
.mission-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mission-icon { font-size: 1.9rem; }
.status { display: inline-flex; align-items: center; min-height: 28px; padding: 6px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 900; border: 1px solid currentColor; }
.status.active { color: var(--green); }
.status.development { color: var(--cyan); }
.status.testing { color: var(--amber); }
.status.internal { color: var(--purple); }
.status.work { color: var(--blue); }
.mission-card ul, .responsibility-list { margin: 18px 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.mission-card li::marker, .responsibility-list li::marker { color: var(--cyan); }
.details-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--cyan);
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.details-link span, .note-card a em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}
.details-link:hover, .details-link:focus-visible,
.note-card a:hover, .note-card a:focus-visible,
.contact-list a:hover, .contact-list a:focus-visible,
.footer-links a:hover, .footer-links a:focus-visible {
  color: var(--text);
  background: rgba(73, 243, 255, 0.12);
  box-shadow: var(--glow);
  text-shadow: 0 0 14px rgba(73, 243, 255, 0.48);
  transform: translateY(-2px);
}
.wide-card { grid-column: span 2; }

.experience-stack { display: grid; gap: 28px; }
.experience-group { display: grid; gap: 14px; }
.experience-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.experience-group-title span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 20px var(--cyan);
}
.experience-group-title h3 { margin: 0; font-size: 1rem; text-transform: uppercase; }
.timeline { display: grid; grid-template-columns: 42px 1fr; gap: 22px; }
.timeline::after { content: ""; position: absolute; left: 47px; top: 34px; bottom: 34px; width: 2px; background: linear-gradient(var(--cyan), var(--purple), var(--green)); box-shadow: var(--glow); }
.timeline-node { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 24px var(--cyan); }
.homelab-node {
  display: grid;
  place-items: center;
  color: var(--text);
  background: linear-gradient(135deg, rgba(73, 243, 255, 0.28), rgba(180, 92, 255, 0.34));
  font-size: 1rem;
}
.career-labels { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.career-labels span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--green); font-size: 0.78rem; font-weight: 900; }
.company { color: var(--cyan) !important; font-weight: 900; }
.split-list {
  columns: 2;
  column-gap: 28px;
}
.split-list li { break-inside: avoid; margin-bottom: 4px; }
.tech-exposure {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.tech-exposure p {
  margin: 0 0 12px;
  color: var(--cyan) !important;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.note-card { min-height: 210px; display: flex; flex-direction: column; }
.note-card h3 { line-height: 1.35; }
.note-card span { margin-top: auto; color: var(--muted); font-size: 0.85rem; }
.note-card a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--cyan);
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.contact-layout { align-items: start; }
.contact-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.contact-list span { color: var(--muted); font-weight: 800; }
.contact-list a {
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--cyan);
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.contact-form { display: grid; gap: 12px; }
.contact-form label { color: var(--muted); font-weight: 850; }
.contact-form input, .contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--cyan); box-shadow: var(--glow); }
.contact-form textarea { resize: vertical; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 32px), var(--max));
  margin: 60px auto 22px;
  padding: 24px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  backdrop-filter: blur(18px);
}
.site-footer strong { color: var(--text); font-size: 1.2rem; }
.site-footer p { margin: 8px 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--cyan);
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.scroll-anchor {
  display: block;
  position: relative;
  top: -96px;
  visibility: hidden;
}

.article-page .site-header.article-header {
  margin-bottom: 0;
}

.article-header .theme-toggle {
  width: 42px;
  flex: 0 0 42px;
}

.article-main {
  width: min(calc(100% - 32px), 940px);
  margin: 0 auto;
  padding: 82px 0 36px;
}

.article-hero {
  padding: 32px;
  margin-bottom: 24px;
}

.article-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 1;
}

.article-summary {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.75;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.article-meta span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(73, 243, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 900;
}

.article-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: start;
}

.toc-card, .tutorial-content {
  padding: 24px;
}

.toc-card {
  position: sticky;
  top: 112px;
}

.toc-card h2, .tutorial-content h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.toc-card ol, .tutorial-content ol, .tutorial-content ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.toc-card a {
  color: var(--muted);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.toc-card a:hover, .toc-card a:focus-visible {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(73, 243, 255, 0.35);
}

.tutorial-content {
  display: grid;
  gap: 22px;
}

.tutorial-block {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.tutorial-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tutorial-block p {
  color: var(--muted);
  line-height: 1.75;
}

.plain-callout, .hr-note {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(73, 243, 255, 0.08);
  color: var(--muted);
  line-height: 1.75;
}

.plain-callout strong, .hr-note strong {
  color: var(--text);
}

.skill-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.skill-proof li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.publication-note {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 209, 102, 0.08);
}

.back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  z-index: 60;
}
.back-top.visible { opacity: 1; pointer-events: auto; }

body.js-ready .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
body.js-ready .reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes blink { 50% { opacity: 0; } }
@keyframes drift { to { transform: translate3d(18px, -18px, 0) rotate(55deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bars { 50% { transform: scaleY(0.55); filter: hue-rotate(60deg); } }
@media (max-width: 1080px) {
  .reptile-skeleton-cursor { display: none; }
  .site-header { align-items: center; }
  .menu-trigger { display: block; }
  .site-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-strong);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .site-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .theme-toggle { width: 100%; }
  .mission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .section-grid, .profile-layout, .contact-layout { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .toc-card { position: relative; top: 0; }
  .hero { min-height: auto; }
  .hero-copy { text-align: center; }
  .hero-actions, .typing-shell { justify-content: center; }
  .hero-visual { min-height: 640px; }
  .skills-grid, .mission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wide-card { grid-column: span 2; }
}

@media (max-width: 620px) {
  .site-header { width: min(calc(100% - 20px), var(--max)); margin-top: 10px; border-radius: 14px; }
  .section-shell { width: min(calc(100% - 22px), var(--max)); padding-top: 74px; }
  .hero-copy { text-align: left; }
  .hero-actions { display: grid; }
  .btn { width: 100%; }
  .cv-captcha-actions { display: grid; }
  .details-link, .note-card a { width: 100%; }
  .typing-shell { width: 100%; justify-content: flex-start; }
  .hero-visual { min-height: 720px; }
  .avatar-core { top: 0; right: 50%; transform: translateX(50%); }
  .status-panel { top: 180px; left: 0; width: 100%; }
  .terminal-card { top: 330px; width: 100%; }
  .network-panel { top: 500px; left: 0; right: auto; width: 100%; }
  .stats-card { left: 0; right: 0; bottom: 0; grid-template-columns: repeat(2, 1fr); }
  .stats-card div { border-right: 0; border-bottom: 1px solid var(--line); }
  .skills-grid, .mission-grid, .knowledge-grid { grid-template-columns: 1fr; }
  .wide-card { grid-column: auto; }
  .facts-card div { grid-template-columns: 1fr; gap: 3px; }
  .timeline { grid-template-columns: 28px 1fr; padding: 20px; }
  .timeline::after { left: 33px; }
  .split-list { columns: 1; }
  .site-footer { display: grid; }
  .contact-list li { display: grid; }
  .article-main { width: min(calc(100% - 22px), 940px); padding-top: 66px; }
  .article-hero, .toc-card, .tutorial-content { padding: 20px; }
  .skill-proof { grid-template-columns: 1fr; }
}

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