/* ==========================================================
   KAWSHIK.DEV — Security Observatory
   A dependency-free visual system built for this portfolio.
   ========================================================== */

:root {
  --bg: #071018;
  --bg-deep: #04090e;
  --surface: rgba(13, 27, 39, 0.72);
  --surface-solid: #0d1b27;
  --surface-raised: #122434;
  --text: #f2f7fa;
  --muted: #92a7b5;
  --muted-strong: #b6c6d0;
  --line: rgba(169, 212, 232, 0.14);
  --line-strong: rgba(169, 212, 232, 0.28);
  --cyan: #55e6d3;
  --blue: #4ca7ff;
  --violet: #a88bff;
  --lime: #b4f46b;
  --danger: #ff7f91;
  --gradient: linear-gradient(120deg, var(--cyan), var(--blue) 52%, var(--violet));
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.35);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --header: 72px;
  --shell: min(1180px, calc(100vw - 40px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "Avenir Next", "Segoe UI Variable", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

html[data-theme="light"] {
  --bg: #edf5f7;
  --bg-deep: #dce9ed;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-solid: #f9fcfd;
  --surface-raised: #ffffff;
  --text: #0b1e2b;
  --muted: #4c6777;
  --muted-strong: #284555;
  --line: rgba(10, 42, 60, 0.13);
  --line-strong: rgba(10, 42, 60, 0.25);
  --cyan: #007f75;
  --blue: #176fd1;
  --violet: #7152d8;
  --lime: #4e7f14;
  --shadow: 0 30px 100px rgba(40, 75, 92, 0.14);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) var(--bg-deep);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 15%, color-mix(in srgb, var(--blue) 9%, transparent), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

body::-webkit-scrollbar-thumb {
  border: 2px solid var(--bg-deep);
  border-radius: 99px;
  background: var(--gradient);
}

::selection {
  background: color-mix(in srgb, var(--cyan) 38%, transparent);
  color: var(--text);
}

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

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  background: transparent;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

svg {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-wrap: balance;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

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

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

.section-shell {
  position: relative;
  width: var(--shell);
  margin-inline: auto;
}

.section-pad {
  padding-block: clamp(90px, 12vw, 170px);
}

.glass-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 90%, white 3%), var(--surface));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), var(--shadow);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-heading {
  display: grid;
  gap: 24px;
  margin-bottom: clamp(50px, 8vw, 92px);
}

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.section-heading h2,
.contact-heading h2,
.faq-intro h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.7rem, 8.5vw, 6.8rem);
  font-weight: 520;
  letter-spacing: -0.067em;
  line-height: 0.9;
}

.section-heading h2 em,
.contact-heading h2 em,
.faq-intro h2 em {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

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

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

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

/* Global atmosphere */
.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 9998;
  height: 2px;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gradient);
  box-shadow: 0 0 16px var(--cyan);
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  opacity: 0.48;
  pointer-events: none;
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 34vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.075;
  pointer-events: none;
}

.ambient-one {
  top: 15%;
  left: -15%;
  background: var(--cyan);
}

.ambient-two {
  right: -14%;
  bottom: 10%;
  background: var(--violet);
}

.pointer-glow {
  position: fixed;
  z-index: 0;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--blue) 10%, transparent), transparent 68%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.cursor-dot,
.cursor-ring {
  display: none;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  align-content: center;
  justify-items: center;
  background: var(--bg-deep);
  transition:
    opacity 0.6s var(--ease),
    visibility 0.6s;
}

.loader.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loader-mark {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface-solid);
  box-shadow: 0 0 60px color-mix(in srgb, var(--cyan) 16%, transparent);
  overflow: hidden;
}

.loader-mark span {
  z-index: 1;
  font-size: 2.2rem;
  font-weight: 760;
}

.loader-mark i {
  position: absolute;
  inset: -45%;
  background: conic-gradient(transparent 70%, var(--cyan));
  animation: spin 1.15s linear infinite;
}

.loader-mark::after {
  position: absolute;
  inset: 2px;
  content: "";
  border-radius: 19px;
  background: var(--surface-solid);
}

.loader-mark span {
  position: relative;
  z-index: 2;
}

.loader p {
  margin: 22px 0 13px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.loader-track {
  width: 180px;
  height: 2px;
  overflow: hidden;
  background: var(--line);
}

.loader-track span {
  display: block;
  width: 45%;
  height: 100%;
  background: var(--gradient);
  animation: load-track 1.1s var(--ease) infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes load-track {
  from { transform: translateX(-110%); }
  to { transform: translateX(245%); }
}

/* Header and navigation */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  display: flex;
  height: var(--header);
  align-items: center;
  justify-content: space-between;
  padding-inline: 20px;
  border-bottom: 1px solid transparent;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    transform 0.35s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.site-header.is-hidden {
  transform: translateY(-110%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface));
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.brand-copy {
  display: none;
  line-height: 1.1;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 0.9rem;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 30px;
}

.desktop-nav a {
  position: relative;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 650;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}

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

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.icon-button,
.menu-toggle {
  display: grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.icon-button:hover,
.menu-toggle:hover {
  border-color: var(--cyan);
  background: var(--surface-raised);
}

.icon-button kbd {
  display: none;
}

.command-trigger {
  display: none;
}

.menu-toggle {
  position: relative;
}

.menu-toggle span {
  position: absolute;
  width: 17px;
  height: 1px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle span:first-child { transform: translateY(-5px); }
.menu-toggle span:last-of-type { transform: translateY(5px); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:last-of-type { transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header) 0 auto;
  z-index: 999;
  display: grid;
  padding: 18px 20px 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  transform: translateY(-130%);
  visibility: hidden;
  opacity: 0;
  transition: all 0.45s var(--ease);
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}

.mobile-menu a span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.social-rail {
  display: none;
}

/* Shared controls */
.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 720;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.button svg {
  transition: transform 0.25s var(--ease);
}

.button:hover svg {
  transform: translateX(3px);
}

.button-primary {
  border-color: transparent;
  background: var(--text);
  color: var(--bg-deep);
  box-shadow: 0 13px 38px color-mix(in srgb, var(--cyan) 12%, transparent);
}

.button-primary:hover {
  box-shadow: 0 18px 44px color-mix(in srgb, var(--cyan) 22%, transparent);
}

.button-ghost {
  background: var(--surface);
  color: var(--text);
}

.button-ghost:hover {
  border-color: var(--cyan);
  background: var(--surface-raised);
}

.button-secondary {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface-raised) 88%, var(--bg-deep));
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 12%, var(--surface-raised));
}

.button-small {
  min-height: 43px;
  padding-inline: 16px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  background: none;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

/* Hero */
.hero {
  display: grid;
  min-height: 100svh;
  align-items: center;
  gap: 70px;
  padding-top: calc(var(--header) + 64px);
  padding-bottom: 90px;
}

.hero-gridlines {
  position: absolute;
  inset: 0 50% 0 -50vw;
  z-index: -1;
  display: block;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 70px 70px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 18%, black 74%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 74%, transparent);
  opacity: 0.35;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy > .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--muted-strong);
  letter-spacing: 0.08em;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--lime) 12%, transparent), 0 0 16px var(--lime);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 9px transparent, 0 0 22px var(--lime); }
}

.hero-kicker {
  margin: 28px 0 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: clamp(0.65rem, 2vw, 0.78rem);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 28px;
  font-size: clamp(3.2rem, 12.2vw, 8.7rem);
  font-weight: 560;
  letter-spacing: -0.075em;
  line-height: 0.82;
}

.hero-line {
  display: block;
}

.gradient-text {
  color: transparent;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-intro {
  max-width: 630px;
  margin-bottom: 22px;
  color: var(--muted-strong);
  font-size: clamp(1rem, 2.3vw, 1.18rem);
}

.hero-intro strong {
  color: var(--text);
}

.typing-line {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  max-width: max-content;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--bg-deep) 72%, transparent);
  color: var(--muted-strong);
  font-family: var(--font-mono);
  font-size: clamp(0.65rem, 2.7vw, 0.8rem);
}

.terminal-prompt {
  color: var(--cyan);
}

.typing-line i {
  width: 7px;
  height: 16px;
  background: var(--cyan);
  animation: blink 0.8s steps(2) infinite;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 570px;
  margin-top: 44px;
  border-top: 1px solid var(--line);
}

.hero-metrics div {
  padding: 20px 10px 0 0;
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  font-size: clamp(1.45rem, 5vw, 2.15rem);
  font-weight: 540;
}

.hero-metrics strong::after {
  content: "+";
  color: var(--cyan);
  font-size: 0.6em;
}

.hero-metrics span {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: clamp(0.53rem, 2vw, 0.65rem);
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  width: min(88vw, 470px);
  margin-inline: auto;
  aspect-ratio: 0.89;
}

.profile-shell {
  position: absolute;
  inset: 5% 7% 4% 11%;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 32px 32px 100px 32px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface-raised) 88%, transparent), var(--surface));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 50px 110px rgba(0, 0, 0, 0.45),
    0 0 80px color-mix(in srgb, var(--blue) 11%, transparent);
  overflow: hidden;
}

.profile-shell::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background:
    linear-gradient(130deg, transparent 65%, color-mix(in srgb, var(--cyan) 12%, transparent)),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(255, 255, 255, 0.013) 5px 6px);
  pointer-events: none;
}

.profile-image-wrap {
  height: calc(100% - 58px);
  overflow: hidden;
  border-radius: 23px 23px 80px 23px;
  background: var(--surface-raised);
}

.profile-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.8) contrast(1.04);
}

.profile-index {
  position: absolute;
  top: 24px;
  right: 22px;
  z-index: 4;
  display: block;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(4, 9, 14, 0.68);
  color: #b9f6ed;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
}

.profile-caption {
  display: flex;
  height: 58px;
  align-items: center;
  justify-content: space-between;
  padding-inline: 8px 14px;
  color: var(--muted);
  font-size: 0.68rem;
}

.profile-caption b {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.profile-scan {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 3;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 15px var(--cyan);
  animation: scan 5s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% { transform: translateY(20px); opacity: 0; }
  15%, 85% { opacity: 0.8; }
  50% { transform: translateY(355px); }
}

.orbit {
  position: absolute;
  z-index: -1;
  display: block;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
}

.orbit::after {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}

.orbit-one {
  inset: -5% -6% 2% 3%;
  animation: spin 24s linear infinite;
}

.orbit-one::after { top: 12%; right: 17%; }
.orbit-two {
  inset: 12% 1% 15% -8%;
  border-style: solid;
  opacity: 0.55;
  animation: spin 18s linear infinite reverse;
}
.orbit-two::after { bottom: 7%; left: 30%; background: var(--violet); }

.float-chip {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  color: var(--muted-strong);
  font-size: 0.63rem;
  animation: float 5s ease-in-out infinite;
}

.float-chip span {
  color: var(--cyan);
  font-family: var(--font-mono);
}

.chip-security { top: 12%; left: -1%; }
.chip-ai { top: 35%; right: -3%; animation-delay: -1.5s; }
.chip-code { bottom: 20%; left: -3%; animation-delay: -3s; }

@keyframes float {
  50% { transform: translateY(-9px); }
}

.signal-card {
  position: absolute;
  right: -3%;
  bottom: -2%;
  z-index: 5;
  display: block;
  width: 175px;
  padding: 14px;
  border-radius: 16px;
}

.signal-card-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.signal-card-head i {
  color: var(--lime);
  font-style: normal;
}

.signal-bars {
  display: flex;
  height: 32px;
  align-items: flex-end;
  gap: 4px;
  margin: 12px 0 8px;
}

.signal-bars span {
  flex: 1;
  height: 20%;
  border-radius: 2px 2px 0 0;
  background: var(--gradient);
  animation: signal 1.8s ease-in-out infinite alternate;
}

.signal-bars span:nth-child(2) { height: 55%; animation-delay: -.3s; }
.signal-bars span:nth-child(3) { height: 30%; animation-delay: -.8s; }
.signal-bars span:nth-child(4) { height: 85%; animation-delay: -.5s; }
.signal-bars span:nth-child(5) { height: 47%; animation-delay: -1s; }
.signal-bars span:nth-child(6) { height: 100%; animation-delay: -.2s; }
.signal-bars span:nth-child(7) { height: 65%; animation-delay: -.6s; }
.signal-bars span:nth-child(8) { height: 82%; animation-delay: -1.2s; }

@keyframes signal {
  to { transform: scaleY(0.45); opacity: 0.55; }
}

.signal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
}

.signal-card strong {
  color: var(--text);
}

.scroll-cue {
  display: none;
}

.signal-ticker {
  display: block;
  width: 100%;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
}

.signal-ticker > div {
  display: flex;
  width: max-content;
  align-items: center;
  padding-block: 14px;
  animation: ticker 28s linear infinite;
}

.signal-ticker span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
}

.signal-ticker i {
  width: 5px;
  height: 5px;
  margin-inline: 26px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

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

/* About */
.about-layout {
  display: grid;
  gap: 20px;
}

.about-manifesto {
  padding: clamp(24px, 5vw, 55px);
  border-radius: var(--radius-lg);
}

.large-copy {
  margin-bottom: 32px;
  color: var(--text);
  font-size: clamp(1.55rem, 4.5vw, 2.65rem);
  font-weight: 480;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.large-copy span {
  color: var(--cyan);
}

.about-manifesto > p:not(.large-copy) {
  max-width: 740px;
  color: var(--muted-strong);
}

.manifesto-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 32px;
}

.manifesto-links a,
.copy-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 720;
  cursor: pointer;
}

.manifesto-links a:hover,
.copy-email:hover {
  color: var(--cyan);
}

.principles {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.principles article {
  padding: 27px;
  background: color-mix(in srgb, var(--surface) 58%, transparent);
}

.principles article + article {
  border-top: 1px solid var(--line);
}

.principles span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.principles h3 {
  margin: 28px 0 7px;
  font-size: 1.15rem;
}

.principles p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.education-block {
  display: grid;
  gap: 30px;
  margin-top: 80px;
}

.education-intro h3 {
  max-width: 430px;
  margin: 14px 0 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.05;
}

.education-list {
  border-top: 1px solid var(--line-strong);
}

.education-list article {
  display: grid;
  gap: 12px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.education-list time,
.education-list article > span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.05em;
}

.education-list h4 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.education-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Expertise */
.expertise-console {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 50%, transparent);
  overflow: hidden;
}

.expertise-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.expertise-tabs::-webkit-scrollbar { display: none; }

.expertise-tabs button {
  min-width: max-content;
  flex: 1;
  padding: 17px 20px;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.expertise-tabs button span {
  margin-right: 8px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.55rem;
}

.expertise-tabs button[aria-selected="true"] {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: inset 0 -2px var(--cyan);
}

.skill-panel {
  display: grid;
  gap: 48px;
  padding: clamp(26px, 6vw, 60px);
  border: 0;
  box-shadow: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.skill-panel.is-changing {
  opacity: 0;
  transform: translateY(10px);
}

.skill-panel-copy h3 {
  max-width: 560px;
  margin: 12px 0 18px;
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.skill-panel-copy > p:not(.eyebrow) {
  max-width: 610px;
  color: var(--muted-strong);
}

.skill-tags,
.tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 25px;
}

.skill-tags span,
.tech-row span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 55%, transparent);
  color: var(--muted-strong);
  font-family: var(--font-mono);
  font-size: 0.61rem;
}

.skill-readout {
  display: grid;
  align-items: center;
  gap: 38px;
}

.radial-meter {
  display: grid;
  width: 170px;
  margin-inline: auto;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--value) * 1%), var(--line) 0);
  box-shadow: 0 0 60px color-mix(in srgb, var(--cyan) 8%, transparent);
  position: relative;
  transition: background 0.5s ease;
}

.radial-meter::after {
  position: absolute;
  inset: 11px;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
  background: var(--surface-solid);
}

.radial-meter span {
  position: relative;
  z-index: 1;
  text-align: center;
}

.radial-meter strong,
.radial-meter small {
  display: block;
}

.radial-meter strong {
  font-size: 2.4rem;
  font-weight: 520;
}

.radial-meter small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.meter-list {
  display: grid;
  gap: 20px;
}

.meter-list p {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted-strong);
  font-size: 0.69rem;
}

.meter-list p b {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 500;
}

.meter-list div > i {
  position: relative;
  display: block;
  height: 3px;
  background: var(--line);
  overflow: hidden;
}

.meter-list div > i::after {
  display: block;
  width: var(--width);
  height: 100%;
  content: "";
  background: var(--gradient);
  transform: scaleX(1);
  transform-origin: left;
  transition: none;
}

.is-visible .meter-list div > i::after,
.skill-panel .meter-list div > i::after {
  transform: scaleX(1);
}

.stack-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.stack-cloud span {
  flex: 1 0 auto;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 48%, transparent);
  color: var(--muted-strong);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.stack-cloud span:hover {
  border-color: var(--cyan);
  color: var(--text);
  transform: translateY(-3px);
}

/* Projects */
.project-filter {
  display: flex;
  gap: 7px;
  margin-bottom: 25px;
  overflow-x: auto;
  scrollbar-width: none;
}

.project-filter::-webkit-scrollbar { display: none; }

.project-filter button {
  min-width: max-content;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  cursor: pointer;
}

.project-filter button:hover,
.project-filter button.active {
  border-color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 10%, transparent);
  color: var(--text);
}

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

.project-feature,
.project-card {
  position: relative;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  transform-style: preserve-3d;
  transition:
    border-color 0.3s ease,
    opacity 0.35s ease,
    transform 0.18s ease;
  overflow: hidden;
}

.project-feature:hover,
.project-card:hover {
  border-color: var(--line-strong);
}

.project-feature.is-filtered,
.project-card.is-filtered {
  display: none;
}

.project-feature {
  display: grid;
  border-radius: var(--radius-lg);
}

.project-number {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 4;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg-deep) 75%, transparent);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
}

.project-art {
  position: relative;
  min-height: 300px;
  background: var(--surface-solid);
  overflow: hidden;
}

.art-klink {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(76, 167, 255, 0.25), transparent 50%),
    linear-gradient(135deg, #101d31, #071019);
}

.art-klink::before,
.art-klink::after {
  position: absolute;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(85, 230, 211, 0.16);
  border-radius: 50%;
  content: "";
}

.art-klink::after {
  width: 290px;
  height: 290px;
  border-style: dashed;
}

.browser-frame {
  position: relative;
  z-index: 1;
  width: 73%;
  height: 57%;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(5, 12, 20, 0.78);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  transform: perspective(700px) rotateY(-8deg) rotateX(5deg);
}

.browser-frame > i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 3px;
  border-radius: 50%;
  background: #ff7f91;
}

.browser-frame > i:nth-child(2) { background: #ffd66b; }
.browser-frame > i:nth-child(3) { background: #73e6a0; }

.link-glyph {
  position: absolute;
  top: 30%;
  left: 12%;
  color: #fff;
  font-size: 2.6rem;
  font-weight: 800;
}

.link-glyph span { color: #55e6d3; }

.browser-lines {
  position: absolute;
  top: 38%;
  right: 10%;
  display: grid;
  width: 42%;
  gap: 9px;
}

.browser-lines b {
  height: 5px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
}

.browser-lines b:nth-child(2) { width: 70%; background: #4ca7ff; }
.browser-lines b:nth-child(3) { width: 86%; }

.project-copy {
  padding: clamp(26px, 5vw, 54px);
}

.project-copy h3 {
  margin: 10px 0 13px;
  font-size: clamp(2.4rem, 7vw, 5rem);
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.project-copy > p:not(.eyebrow) {
  max-width: 580px;
  color: var(--muted-strong);
}

.project-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 28px;
}

.project-pair {
  display: grid;
  gap: 18px;
}

.project-card {
  display: flex;
  min-height: 500px;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius);
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card-top span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.project-card-top p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
}

.project-mini-art {
  position: relative;
  height: 190px;
  margin: 22px 0 28px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--bg-deep);
  overflow: hidden;
}

.project-card h3 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  letter-spacing: -0.045em;
}

.project-card > p {
  color: var(--muted-strong);
  font-size: 0.86rem;
}

.project-card .project-actions {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.project-card .project-actions a,
.project-card .project-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.project-card .project-actions a:hover,
.project-card .project-actions button:hover {
  color: var(--cyan);
}

.art-ai {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(168, 139, 255, 0.17), transparent 50%),
    var(--bg-deep);
}

.art-ai b {
  z-index: 2;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(168, 139, 255, 0.5);
  border-radius: 20px;
  color: #d7caff;
  font-size: 2.6rem;
  box-shadow: 0 0 40px rgba(168, 139, 255, 0.18);
}

.art-ai i {
  position: absolute;
  width: 125px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
}

.art-ai i:nth-child(2) { transform: rotate(60deg); }
.art-ai i:nth-child(3) { transform: rotate(-60deg); }

.art-terminal {
  display: grid;
  align-items: center;
  padding: 28px;
  background:
    linear-gradient(rgba(85, 230, 211, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 230, 211, 0.03) 1px, transparent 1px),
    #06100f;
  background-size: 20px 20px;
}

.art-terminal code {
  color: #9ab9b3;
  font-family: var(--font-mono);
  font-size: clamp(0.65rem, 2vw, 0.78rem);
  line-height: 2.2;
}

.art-terminal code b { color: var(--cyan); }
.art-terminal code i { color: #d1ff7d; font-style: normal; }

.art-health {
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(255, 127, 145, 0.15), transparent 55%), #10090c;
}

.art-health span {
  z-index: 2;
  color: #ff9caa;
  font-size: 4.7rem;
  font-weight: 250;
}

.art-health i,
.art-health b {
  position: absolute;
  width: 125px;
  height: 125px;
  border: 1px solid rgba(255, 127, 145, 0.25);
  border-radius: 50%;
}

.art-health b {
  width: 175px;
  height: 175px;
  border-style: dashed;
  animation: spin 18s linear infinite;
}

.art-iot {
  background:
    radial-gradient(circle at center, rgba(85, 230, 211, 0.2), transparent 40%),
    #06100f;
}

.art-iot span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  border: 1px solid var(--cyan);
  border-radius: 13px;
  box-shadow: 0 0 30px rgba(85, 230, 211, 0.22);
  transform: translate(-50%, -50%);
}

.art-iot i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
}

.art-iot i:nth-child(2) { transform: translate(-110px, -60px); }
.art-iot i:nth-child(3) { transform: translate(105px, -55px); }
.art-iot i:nth-child(4) { transform: translate(-5px, 70px); }

.art-iot b {
  position: absolute;
  inset: 15%;
  border: 1px dashed rgba(85, 230, 211, 0.22);
  border-radius: 50%;
}

.art-euzaar {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(180, 244, 107, 0.14), transparent 55%), #0c1108;
}

.commerce-orbit {
  position: relative;
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  border: 1px dashed rgba(180, 244, 107, 0.35);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}

.commerce-orbit span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 1px solid rgba(180, 244, 107, 0.5);
  border-radius: 24px;
  color: #dfffba;
  font-size: 2.2rem;
  font-weight: 700;
  animation: spin 20s linear infinite reverse;
}

.commerce-orbit i {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: var(--lime);
  box-shadow: 0 0 16px rgba(180, 244, 107, 0.5);
}

.commerce-orbit i:first-child { top: 8px; }
.commerce-orbit i:nth-child(2) { right: 17px; bottom: 30px; }
.commerce-orbit i:nth-child(3) { bottom: 23px; left: 20px; }

.section-outro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 32px;
  padding: 23px 0;
  border-block: 1px solid var(--line);
}

.section-outro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.section-outro a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.76rem;
  font-weight: 720;
}

.section-outro a:hover { color: var(--cyan); }

/* Timeline */
.timeline {
  position: relative;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: var(--line);
}

.timeline-line span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gradient);
  transition: none;
}

.timeline.is-visible .timeline-line span { height: 100%; }

.timeline-entry {
  position: relative;
  display: grid;
  gap: 15px;
  padding: 0 0 65px 33px;
}

.timeline-entry time {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.67rem;
}

.timeline-node {
  position: absolute;
  top: 4px;
  left: 0;
  width: 11px;
  height: 11px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 16%, transparent), 0 0 18px var(--cyan);
}

.timeline-entry h3 {
  margin: 9px 0 2px;
  font-size: clamp(1.55rem, 5vw, 2.5rem);
  letter-spacing: -0.04em;
}

.timeline-entry h4 {
  margin: 0 0 12px;
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 550;
}

.timeline-entry div > p:last-child {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Research */
.research,
.services,
.contact {
  position: relative;
  border-block: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 5%, transparent), transparent 45%),
    color-mix(in srgb, var(--bg-deep) 82%, transparent);
}

.publication-grid {
  display: grid;
  gap: 40px;
}

.publication-lead {
  position: relative;
  min-height: 460px;
  padding: clamp(28px, 6vw, 60px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 15%, color-mix(in srgb, var(--violet) 14%, transparent), transparent 35%),
    var(--surface);
  overflow: hidden;
}

.publication-lead::after {
  position: absolute;
  right: -90px;
  bottom: -100px;
  width: 310px;
  height: 310px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  content: "";
}

.paper-index {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.paper-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 65px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  text-transform: uppercase;
}

.paper-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
}

.publication-lead h3 {
  max-width: 680px;
  margin: 18px 0;
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.publication-lead > p {
  max-width: 560px;
  color: var(--muted);
  font-size: 0.8rem;
}

.publication-lead a {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.publication-list {
  border-top: 1px solid var(--line-strong);
}

.publication-list article {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.publication-list article > span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.publication-list p {
  margin-bottom: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  text-transform: uppercase;
}

.publication-list h3 {
  margin: 0 0 7px;
  font-size: 1rem;
  line-height: 1.3;
}

.publication-list small {
  color: var(--muted);
  font-size: 0.7rem;
}

/* Credentials */
.credential-layout {
  display: grid;
  gap: 16px;
}

.certificate-card {
  display: grid;
  gap: 22px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 52%, transparent);
}

.credential-seal {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  box-shadow: inset 0 0 0 5px var(--bg);
}

.certificate-card time {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.certificate-card h3 {
  margin: 7px 0;
  font-size: 1.35rem;
}

.certificate-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.77rem;
}

.certificate-view {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.certificate-view:hover { color: var(--cyan); }

.achievement-stack {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.achievement-stack > div {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.achievement-stack > div:last-child { border-bottom: 0; }
.achievement-stack > div > span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.achievement-stack p { margin: 0; color: var(--muted); font-size: 0.73rem; }
.achievement-stack strong { display: block; color: var(--text); font-size: 0.85rem; }

/* Services */
.service-grid {
  display: grid;
  gap: 14px;
}

.service-grid article {
  position: relative;
  min-height: 450px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s var(--ease);
}

.service-grid article:hover {
  border-color: var(--cyan);
  transform: translateY(-6px);
}

.service-grid article > span {
  position: absolute;
  top: 25px;
  right: 25px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.service-grid article > svg {
  width: 70px;
  height: 70px;
  margin: 48px 0 55px;
  color: var(--cyan);
  stroke-width: 1;
}

.service-grid h3 {
  margin-bottom: 12px;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.service-grid p {
  color: var(--muted-strong);
  font-size: 0.85rem;
}

.service-grid ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.service-grid li {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
}

/* GitHub */
.github-console {
  display: grid;
  gap: 50px;
  padding: clamp(28px, 7vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(85, 230, 211, 0.05), transparent 45%),
    var(--surface);
  box-shadow: var(--shadow);
}

.github-copy h2 {
  margin: 12px 0 19px;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.github-copy > p:not(.eyebrow) {
  max-width: 550px;
  color: var(--muted);
}

.github-copy .button { margin-top: 17px; }

.github-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.github-stats div {
  position: relative;
  min-height: 140px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.github-stats span,
.github-stats strong {
  display: block;
}

.github-stats span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.github-stats strong {
  margin-top: 17px;
  font-size: clamp(1.5rem, 5vw, 2.7rem);
  font-weight: 520;
}

.github-stats i {
  position: absolute;
  right: -20px;
  bottom: -25px;
  width: 78px;
  height: 78px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
}

/* Insights */
.insight-grid {
  display: grid;
  gap: 35px;
}

.insight-lead {
  display: block;
}

.insight-visual {
  position: relative;
  display: grid;
  min-height: 310px;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--blue) 17%, transparent), transparent 45%),
    var(--bg-deep);
  overflow: hidden;
}

.insight-visual span {
  position: relative;
  z-index: 2;
  color: transparent;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 5.5rem;
  font-weight: 800;
  letter-spacing: -0.1em;
}

.insight-visual i {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid var(--line-strong);
  transform: rotate(45deg);
}

.insight-visual i:nth-child(2) { width: 160px; height: 160px; }
.insight-visual i:nth-child(3) { width: 285px; height: 285px; border-style: dashed; }

.insight-lead > p,
.insight-list p {
  margin-bottom: 7px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
}

.insight-lead h3 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 5vw, 3.25rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.insight-lead > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 700;
}

.insight-list {
  border-top: 1px solid var(--line-strong);
}

.insight-list a {
  display: grid;
  grid-template-columns: 35px 1fr 20px;
  gap: 10px;
  align-items: center;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
  transition: padding 0.3s var(--ease);
}

.insight-list a:hover {
  padding-inline: 10px;
}

.insight-list a > span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.insight-list h3 {
  margin: 0;
  font-size: 1rem;
}

.insight-list svg {
  color: var(--cyan);
}

/* FAQ */
.faq {
  display: grid;
  gap: 60px;
}

.faq-intro h2 {
  margin-top: 14px;
}

.faq-list {
  border-top: 1px solid var(--line-strong);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 23px 45px 23px 0;
  cursor: pointer;
  list-style: none;
  font-size: clamp(0.95rem, 3vw, 1.2rem);
  font-weight: 650;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary span,
.faq-list summary span::after {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 14px;
  height: 1px;
  content: "";
  background: var(--cyan);
  transition: transform 0.25s ease;
}

.faq-list summary span::after {
  top: 0;
  right: 0;
  transform: rotate(90deg);
}

.faq-list details[open] summary span::after {
  transform: rotate(0);
}

.faq-list details p {
  max-width: 700px;
  margin: -2px 0 23px;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Contact */
.contact-heading {
  margin-bottom: clamp(55px, 9vw, 100px);
}

.contact-heading .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.contact-layout {
  display: grid;
  gap: 50px;
}

.contact-context > p {
  max-width: 500px;
  color: var(--muted-strong);
  font-size: 1rem;
}

.contact-email {
  display: grid;
  grid-template-columns: 1fr auto;
  width: 100%;
  gap: 4px 16px;
  align-items: center;
  margin: 28px 0;
  padding: 20px 0;
  border-block: 1px solid var(--line);
  text-align: left;
}

.contact-email > span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.contact-email strong {
  grid-row: 2;
  font-size: clamp(1rem, 4vw, 1.35rem);
}

.contact-email svg {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--cyan);
}

.location-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.map-grid {
  position: relative;
  width: 110px;
  height: 100px;
  border-radius: 12px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--bg-deep);
  background-size: 18px 18px;
  overflow: hidden;
}

.map-grid span {
  position: absolute;
  top: 46%;
  left: 58%;
  width: 9px;
  height: 9px;
  border: 2px solid var(--bg-deep);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--cyan) 15%, transparent), 0 0 18px var(--cyan);
}

.location-card > div:last-child span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.location-card strong,
.location-card p { display: block; }
.location-card strong { margin-top: 3px; }
.location-card p { margin: 2px 0 0; color: var(--muted); font-size: 0.66rem; }

.contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.contact-socials a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted-strong);
  font-size: 0.65rem;
}

.contact-socials a:hover { border-color: var(--cyan); color: var(--text); }

.contact-form {
  display: grid;
  gap: 22px;
  padding: clamp(24px, 5vw, 45px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  gap: 22px;
}

.contact-form label {
  display: grid;
  gap: 9px;
}

.contact-form label > span {
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 650;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.87rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.contact-form input,
.contact-form select {
  height: 45px;
}

.contact-form textarea {
  min-height: 130px;
  padding-block: 10px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--cyan);
  background: linear-gradient(to top, color-mix(in srgb, var(--cyan) 5%, transparent), transparent 50%);
}

.contact-form ::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.contact-form select option {
  background: var(--surface-solid);
  color: var(--text);
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.form-footer p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.65rem;
}

.form-footer p.success { color: var(--lime); }
.form-footer p.error { color: var(--danger); }

/* Footer */
.site-footer {
  padding: 60px 20px 25px;
  background: var(--bg-deep);
}

.footer-main,
.footer-bottom {
  width: var(--shell);
  margin-inline: auto;
}

.footer-main {
  display: grid;
  gap: 30px;
  align-items: center;
  padding-bottom: 45px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-brand > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  font-size: 1.35rem;
  font-weight: 800;
}

.footer-brand p,
.footer-brand strong,
.footer-brand small {
  display: block;
  margin: 0;
}

.footer-brand strong { font-size: 0.85rem; }
.footer-brand small { margin-top: 4px; color: var(--muted); font-family: var(--font-mono); font-size: 0.55rem; }
.footer-main > p { max-width: 370px; margin: 0; color: var(--muted); font-size: 0.72rem; }

.footer-main nav {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 20px;
}

.footer-main nav a,
.footer-bottom {
  color: var(--muted);
  font-size: 0.68rem;
}

.footer-main nav a:hover { color: var(--cyan); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.footer-bottom p { margin: 0; }
.footer-bottom div { display: flex; gap: 14px; }
/* ── Live visitor counter ───────────────────────────────── */
.visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.visitor-counter-live {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  animation: vc-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes vc-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--lime); }
  50%       { opacity: 0.45; box-shadow: 0 0 3px var(--lime); }
}

.visitor-counter-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.visitor-counter-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cyan);
  min-width: 2ch;
  transition: color 0.3s ease;
}

/* ── Article live stats (view/share counts) ─────────────── */
.article-live-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
}

.article-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-view-count,
.article-share-count {
  color: var(--cyan);
  font-weight: 700;
}

.back-to-top {
  position: fixed;
  right: 17px;
  bottom: 17px;
  z-index: 700;
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: var(--shadow);
  cursor: pointer;
  visibility: hidden;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.3s var(--ease);
}

.back-to-top.is-visible { visibility: visible; opacity: 1; transform: none; }
.back-to-top svg { transform: rotate(-90deg); }
.back-to-top span { display: none; }

/* Dialogs and toast */
dialog {
  max-width: calc(100vw - 28px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 40px 140px rgba(0, 0, 0, 0.65);
}

dialog::backdrop {
  background: rgba(1, 6, 10, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

dialog[open] {
  animation: dialog-in 0.45s var(--ease);
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
}

.project-modal {
  width: min(760px, calc(100vw - 28px));
  padding: clamp(28px, 6vw, 58px);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.project-modal h2 {
  max-width: 640px;
  margin: 12px 48px 18px 0;
  font-size: clamp(2.4rem, 8vw, 5rem);
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.project-modal > p:not(.eyebrow) {
  color: var(--muted-strong);
}

.modal-grid {
  display: grid;
  gap: 15px;
  margin: 30px 0;
}

.modal-grid > div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.modal-grid span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
}

.modal-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.certificate-modal {
  width: min(900px, calc(100vw - 28px));
  padding: 12px;
}

.certificate-modal img {
  width: 100%;
  max-height: 82vh;
  border-radius: calc(var(--radius-lg) - 8px);
  object-fit: contain;
}

.command-palette {
  width: min(620px, calc(100vw - 28px));
  margin-top: min(16vh, 130px);
  padding: 0;
  overflow: hidden;
}

.command-search {
  display: grid;
  grid-template-columns: 25px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 17px;
  border-bottom: 1px solid var(--line);
}

.command-close {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted-strong);
  cursor: pointer;
}

.command-close:hover {
  border-color: var(--cyan);
  color: var(--text);
}

.command-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

kbd {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
}

.command-results {
  display: grid;
  gap: 3px;
  padding: 9px;
}

.command-results button,
.command-results a {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 0.76rem;
  cursor: pointer;
}

.command-results button span,
.command-results a span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.command-results button:hover,
.command-results button.is-selected,
.command-results a:hover,
.command-results a.is-selected {
  background: var(--surface-raised);
}

.command-palette > p {
  margin: 0;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.58rem;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 9999;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  color: var(--muted-strong);
  font-size: 0.7rem;
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: all 0.3s var(--ease);
}

.toast.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive layout */
@media (min-width: 620px) {
  :root { --shell: min(1180px, calc(100vw - 64px)); }
  .brand-copy { display: block; }
  .command-trigger { display: flex; width: auto; gap: 8px; padding-inline: 11px; }
  .command-trigger kbd { display: inline-block; }
  .education-list article { grid-template-columns: 100px 1fr auto; align-items: start; }
  .certificate-card { grid-template-columns: auto 1fr; }
  .certificate-view { grid-column: 1 / -1; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .modal-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
    gap: 25px;
  }
  .hero h1 { font-size: clamp(4.1rem, 7vw, 6.3rem); }
  .hero-line { white-space: nowrap; }
  .hero-visual { width: min(37vw, 450px); }
  .project-pair { grid-template-columns: 1fr 1fr; }
  .skill-readout { grid-template-columns: 180px 1fr; }
  .publication-grid { grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr); align-items: start; }
  .credential-layout { grid-template-columns: 1fr 1fr; }
  .achievement-stack { grid-column: 1 / -1; }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .insight-grid { grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr); align-items: start; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main nav { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  :root { --header: 82px; }
  .site-header { padding-inline: 38px; }
  .desktop-nav { display: flex; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none; }
  .about-layout { grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.5fr); }
  .education-block { grid-template-columns: 0.65fr 1.35fr; gap: 80px; }
  .skill-panel { grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); align-items: center; }
  .project-feature { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .project-feature-reverse .project-art { grid-column: 2; grid-row: 1; }
  .project-feature-reverse .project-copy { grid-column: 1; grid-row: 1; }
  .project-art { min-height: 520px; }
  .journey .section-heading {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: clamp(34px, 5vw, 70px);
    align-items: end;
    margin-bottom: clamp(54px, 6vw, 76px);
    padding-bottom: 30px;
    border-bottom: 1px solid var(--line);
  }
  .journey .section-heading > div {
    display: grid;
    gap: 13px;
    align-self: stretch;
    align-content: end;
  }
  .journey .section-heading h2 {
    max-width: 760px;
    font-size: clamp(3.35rem, 5.9vw, 5.85rem);
    line-height: 0.94;
    letter-spacing: -0.055em;
  }
  .timeline {
    --timeline-axis: 50%;
    padding-top: 6px;
  }
  .timeline-line {
    left: var(--timeline-axis);
    transform: translateX(-50%);
  }
  .timeline-entry {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(46px, 7vw, 104px);
    align-items: start;
    padding: 0 0 78px;
  }
  .timeline-entry time {
    position: static;
    z-index: 2;
    margin-top: 10px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  }
  .timeline-entry > div {
    position: relative;
    max-width: 530px;
    padding: clamp(22px, 3vw, 30px);
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
      linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, white 3%), var(--surface)),
      color-mix(in srgb, var(--bg-deep) 84%, transparent);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 22px 60px rgba(0, 0, 0, 0.18);
  }
  .timeline-entry > div::before {
    position: absolute;
    top: 22px;
    width: 26px;
    height: 1px;
    content: "";
    background: var(--line-strong);
  }
  .timeline-entry:nth-of-type(odd) time {
    grid-column: 1;
    justify-self: end;
  }
  .timeline-entry:nth-of-type(odd) > div {
    grid-column: 2;
    justify-self: start;
  }
  .timeline-entry:nth-of-type(odd) > div::before {
    right: 100%;
  }
  .timeline-entry:nth-of-type(even) time {
    grid-column: 2;
    justify-self: start;
  }
  .timeline-entry:nth-of-type(even) > div {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
  }
  .timeline-entry:nth-of-type(even) > div::before {
    left: 100%;
  }
  .timeline-node {
    top: 17px;
    left: var(--timeline-axis);
    z-index: 3;
    transform: translateX(-50%);
  }
  .timeline-entry h3 {
    font-size: clamp(1.65rem, 2.6vw, 2.35rem);
  }
  .timeline-entry div > p:last-child {
    max-width: none;
  }
  .credential-layout { grid-template-columns: 1fr 1fr 0.8fr; }
  .achievement-stack { grid-column: auto; }
  .github-console { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
  .faq { grid-template-columns: 0.85fr 1.15fr; }
  .contact-layout { grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr); gap: 80px; }
  .footer-main { grid-template-columns: 1fr 0.7fr 1fr; }
  .footer-main nav { grid-column: auto; justify-content: flex-end; }
}

@media (min-width: 1120px) {
  .site-header { padding-inline: 50px; }
  .social-rail {
    position: fixed;
    bottom: 42px;
    left: 34px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .social-rail > span {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
  .social-rail > i { width: 1px; height: 42px; background: var(--line-strong); }
  .social-rail a { color: var(--muted); transition: color 0.2s ease, transform 0.2s ease; }
  .social-rail a:hover { color: var(--cyan); transform: translateY(-2px); }
  .scroll-cue {
    position: absolute;
    bottom: 24px;
    left: 0;
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    text-transform: uppercase;
    transform: rotate(-90deg) translateY(-25px);
    transform-origin: left bottom;
  }
  .scroll-cue i { width: 48px; height: 1px; background: var(--line-strong); overflow: hidden; }
  .scroll-cue i::after { display: block; width: 50%; height: 100%; content: ""; background: var(--cyan); animation: cue 2s ease-in-out infinite; }
  @keyframes cue { from { transform: translateX(-110%); } to { transform: translateX(220%); } }
  .footer-main,
  .footer-bottom { width: min(1180px, calc(100vw - 100px)); }
}

@media (hover: hover) and (pointer: fine) {
  html.custom-cursor-ready body,
  html.custom-cursor-ready a,
  html.custom-cursor-ready button,
  html.custom-cursor-ready input,
  html.custom-cursor-ready select,
  html.custom-cursor-ready textarea,
  html.custom-cursor-ready summary { cursor: none; }
  html.custom-cursor-ready .cursor-dot,
  html.custom-cursor-ready .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10001;
    display: block;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
  }
  .cursor-dot {
    width: 5px;
    height: 5px;
    background: #fff;
    transform: translate(-50%, -50%);
  }
  .cursor-ring {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
  }
  .cursor-ring.is-active {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
  }
}

@media (max-width: 420px) {
  .hero-actions .button { width: 100%; }
  .signal-card { right: -1%; width: 155px; }
  .float-chip { font-size: 0.56rem; }
  .chip-security { left: -3%; }
  .chip-ai { right: -5%; }
  .project-actions { align-items: flex-start; flex-direction: column; }
  .github-stats { grid-template-columns: 1fr; }
  .location-card { grid-template-columns: 90px 1fr; }
  .map-grid { width: 90px; }
}

@media (max-width: 759px) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero {
    min-height: auto;
    gap: 32px;
    padding-top: calc(var(--header) + 42px);
    padding-bottom: 58px;
  }

  .hero-gridlines,
  .hero-visual,
  .orbit,
  .float-chip,
  .signal-card,
  .profile-scan,
  .signal-ticker {
    display: none;
  }

  .hero-visual {
    width: min(78vw, 330px);
    contain: layout paint style;
  }

  .profile-shell {
    position: relative;
    inset: auto;
    height: 100%;
    border-radius: 26px 26px 72px 26px;
    box-shadow:
      inset 0 1px rgba(255, 255, 255, 0.08),
      0 24px 60px rgba(0, 0, 0, 0.28);
  }

  .profile-image-wrap {
    height: calc(100% - 50px);
    border-radius: 18px 18px 56px 18px;
  }

  .profile-image-wrap img {
    filter: none;
  }

  .profile-caption {
    height: 50px;
  }

  .status-dot,
  .typing-line i {
    animation: none;
  }

  #particle-canvas,
  .pointer-glow {
    display: none;
  }

  .glass-card,
  .site-header.is-scrolled,
  .mobile-menu {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .pointer-glow,
  .cursor-dot,
  .cursor-ring,
  #particle-canvas { display: none !important; }
}

@media print {
  .site-header,
  .social-rail,
  .back-to-top,
  .pointer-glow,
  .cursor-dot,
  .cursor-ring,
  #particle-canvas,
  .loader,
  .signal-ticker { display: none !important; }
  body { background: white; color: black; }
  .section-pad { padding-block: 40px; }
  .reveal { opacity: 1; transform: none; }
  a { text-decoration: underline; }
}
