/* ---------- Design tokens ---------- */
:root {
  --bg: #07100e;
  --bg-deep: #040a09;
  --surface: #0d1916;
  --surface-2: #111f1b;
  --surface-3: #172823;
  --text: #edf8f3;
  --muted: #91a9a0;
  --faint: #62776f;
  --line: rgba(180, 222, 205, 0.13);
  --line-strong: rgba(180, 222, 205, 0.24);
  --accent: #63e6b6;
  --accent-2: #9cf7d5;
  --accent-ink: #032219;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --container: 1180px;
  --header-h: 76px;
}

body.light-theme {
  --bg: #eef5f1;
  --bg-deep: #e5efea;
  --surface: #ffffff;
  --surface-2: #f7fbf9;
  --surface-3: #e9f2ee;
  --text: #0d1b17;
  --muted: #4e645c;
  --faint: #71857d;
  --line: rgba(16, 51, 39, 0.12);
  --line-strong: rgba(16, 51, 39, 0.22);
  --accent: #087d58;
  --accent-2: #0b966a;
  --accent-ink: #f0fff9;
  --shadow: 0 24px 70px rgba(25, 61, 48, 0.12);
}

/* ---------- Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 28px); }
body {
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: color .25s ease, background .25s ease;
}
body.menu-open { overflow: hidden; }
main { display: flex; flex-direction: column; }
main > #home { order: 1; }
main > #about { order: 2; }
main > #experience { order: 3; }
main > #projects { order: 4; }
main > #credentials { order: 5; }
main > #hobbies { order: 6; }
main > #contact { order: 7; }
body::after { content: ""; position: fixed; z-index: 990; inset: 0; background: rgba(1, 10, 9, .62); backdrop-filter: blur(5px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility .25s ease; }
body.menu-open::after { opacity: 1; visibility: visible; pointer-events: auto; }
body.is-loading { overflow: hidden; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }
::selection { color: var(--accent-ink); background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 9999;
  padding: 10px 16px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

.page-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .18;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
.page-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 8%, rgba(59, 224, 166, .11), transparent 28%),
    radial-gradient(circle at 7% 40%, rgba(79, 167, 255, .07), transparent 28%),
    linear-gradient(to bottom, transparent, var(--bg) 78%);
}
#scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 2000;
  width: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

/* ---------- Restored Kali loader from the previous portfolio ---------- */
.earth-loader-overlay { position: fixed; inset: 0; isolation: isolate; overflow: hidden; z-index: 5000; display: flex; justify-content: center; align-items: center; opacity: 1; background: radial-gradient(circle at 50% 44%, rgba(43, 126, 255, .19), transparent 24%), radial-gradient(circle at 14% 18%, rgba(66, 225, 176, .08), transparent 30%), radial-gradient(circle at 88% 78%, rgba(32, 116, 229, .09), transparent 32%), linear-gradient(145deg, #06100e 0%, #0a1723 48%, #08121f 72%, #050c12 100%); transition: opacity .38s ease; }
.earth-loader-overlay::before { content: ""; position: absolute; z-index: -2; inset: -18%; background: conic-gradient(from 215deg at 50% 48%, transparent 0 18%, rgba(42, 122, 255, .09) 27%, transparent 39% 58%, rgba(58, 224, 178, .06) 68%, transparent 78%); filter: blur(54px); opacity: .9; animation: loaderAurora 10s ease-in-out infinite alternate; }
.earth-loader-overlay::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(129, 182, 205, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(129, 182, 205, .045) 1px, transparent 1px), radial-gradient(circle at center, transparent 24%, rgba(2, 8, 12, .58) 82%); background-size: 64px 64px, 64px 64px, auto; mask-image: radial-gradient(ellipse 72% 70% at center, black 18%, transparent 82%); opacity: .62; }
.earth-loader-overlay.is-hidden { opacity: 0; pointer-events: none; }
.earth-loader-overlay.is-gone { display: none; }
.kali-loader-wrap { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.15rem; perspective: 1000px; }
.kali-loader-3d { position: relative; width: 182px; height: 182px; display: grid; place-items: center; transform-style: preserve-3d; animation: kaliLoaderTilt 2.6s ease-in-out infinite; }
.kali-loader-logo { position: relative; z-index: 2; width: 146px; height: 146px; object-fit: contain; filter: drop-shadow(0 0 16px rgba(128, 200, 255, .85)) drop-shadow(0 16px 24px rgba(0, 0, 0, .35)); transform: translateZ(22px); clip-path: inset(0 0 100% 0); opacity: .35; animation: kaliLogoReveal 5s ease-out forwards; }
.kali-loader-orbit { position: absolute; inset: 12px; border: 1px solid rgba(150, 205, 255, .35); border-radius: 50%; box-shadow: inset 0 0 18px rgba(124, 198, 255, .24), 0 0 18px rgba(124, 198, 255, .22); transform-style: preserve-3d; animation: kaliOrbitSpin 2s linear infinite; }
.kali-loader-orbit::before, .kali-loader-orbit::after { content: ""; position: absolute; inset: 0; border: 1px dashed rgba(160, 218, 255, .3); border-radius: 50%; }
.kali-loader-orbit::before { transform: rotateX(70deg) rotateZ(28deg); }
.kali-loader-orbit::after { transform: rotateY(72deg) rotateZ(-30deg); }
.kali-loader-smoke { position: absolute; z-index: 1; left: 50%; bottom: 22px; width: 180px; height: 120px; transform: translateX(-50%); pointer-events: none; }
.kali-loader-smoke span { position: absolute; left: 50%; bottom: 0; width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle, rgba(183, 224, 255, .4) 0%, rgba(183, 224, 255, .08) 55%, transparent 75%); filter: blur(3px); opacity: 0; transform: translate(-50%, 0) scale(.5); animation: kaliSmokeRise 2.8s ease-out infinite; }
.kali-loader-smoke span:nth-child(1) { margin-left: -34px; animation-delay: 0s; }
.kali-loader-smoke span:nth-child(2) { margin-left: -10px; animation-delay: .45s; }
.kali-loader-smoke span:nth-child(3) { margin-left: 18px; animation-delay: .9s; }
.kali-loader-smoke span:nth-child(4) { margin-left: -20px; animation-delay: 1.35s; }
.kali-loader-smoke span:nth-child(5) { margin-left: 28px; animation-delay: 1.8s; }
.loader-text { color: #e2ecff; font-family: "Segoe UI", Arial, sans-serif; font-size: .94rem; font-weight: 700; letter-spacing: .17em; text-shadow: 0 0 18px rgba(92, 157, 255, .24); text-transform: uppercase; }
.loading-dots { display: inline-flex; min-width: 1.8em; justify-content: flex-start; }
.loading-dots span { opacity: 0; animation: loadingDotBlink 1.2s infinite; }
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes kaliOrbitSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes kaliLoaderTilt { 0%, 100% { transform: rotateX(14deg) rotateY(-18deg) translateY(0); } 50% { transform: rotateX(-8deg) rotateY(16deg) translateY(-7px); } }
@keyframes kaliLogoReveal { 0% { clip-path: inset(0 0 100% 0); opacity: .35; } 100% { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes kaliSmokeRise { 0% { opacity: 0; transform: translate(-50%, 0) scale(.45); } 20% { opacity: .55; } 100% { opacity: 0; transform: translate(-50%, -90px) scale(1.45); } }
@keyframes loadingDotBlink { 0%, 20% { opacity: 0; } 40%, 100% { opacity: 1; } }
@keyframes loaderAurora { 0% { transform: translate3d(-2%, -1%, 0) rotate(-3deg) scale(1); opacity: .65; } 100% { transform: translate3d(2%, 1%, 0) rotate(4deg) scale(1.08); opacity: 1; } }
.section-shell { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
.section-block { padding-block: 120px; }
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-2) 88%, transparent));
  box-shadow: var(--shadow);
}
.eyebrow {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.section-heading { max-width: 760px; margin-bottom: 58px; }
.section-heading h2, .contact-copy h2 {
  margin-top: 14px;
  color: var(--text);
  font-size: clamp(2.4rem, 5.2vw, 4.8rem);
  line-height: .98;
  letter-spacing: -.055em;
}
.section-heading h2 em, .contact-copy h2 em {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
.section-heading > p:last-child { max-width: 620px; margin-top: 24px; color: var(--muted); font-size: 1.05rem; }

/* ---------- Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(130%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, padding .25s ease;
}
.site-header.scrolled { padding-block: 8px; border-color: var(--line); }
.nav-shell {
  width: min(var(--container), calc(100% - 32px));
  min-height: 52px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand-icon { position: relative; width: 48px; height: 48px; flex: 0 0 48px; overflow: visible; display: grid; place-items: center; background: transparent; border: 0; border-radius: 50%; box-shadow: 0 10px 28px rgba(25, 105, 235, .22); isolation: isolate; transition: transform .25s ease, filter .25s ease; }
.brand-icon::before { content: ""; position: absolute; z-index: -1; inset: -7px; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, rgba(38, 153, 255, .25), transparent 68%); filter: blur(5px); animation: dragonAura 2.8s ease-in-out infinite; }
.brand-icon::after { content: ""; position: absolute; z-index: 3; inset: 0; pointer-events: none; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 38%); }
.brand-icon img { position: relative; z-index: 2; width: 100%; height: 100%; max-width: none; object-fit: contain; object-position: center; border-radius: 50%; transform: translateZ(0); image-rendering: auto; backface-visibility: hidden; filter: drop-shadow(0 5px 9px rgba(16, 94, 225, .38)); }
.brand:hover .brand-icon { transform: translateY(-2px) scale(1.04); filter: brightness(1.08); }
.brand-smoke { position: absolute; z-index: 1; inset: -18px -10px 12px; pointer-events: none; }
.brand-smoke i { position: absolute; left: 50%; bottom: 0; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, rgba(84, 191, 255, .42), rgba(38, 111, 255, .13) 48%, transparent 72%); filter: blur(2px); opacity: 0; animation: dragonSmoke 3.2s ease-out infinite; }
.brand-smoke i:nth-child(1) { margin-left: -16px; animation-delay: 0s; }
.brand-smoke i:nth-child(2) { margin-left: -1px; animation-delay: 1.05s; }
.brand-smoke i:nth-child(3) { margin-left: 11px; animation-delay: 2.1s; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-size: .86rem; letter-spacing: -.01em; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: .66rem; }
.nav-links { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: var(--accent);
  transition: right .2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .menu-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-2px); }
.menu-toggle { position: relative; display: none; overflow: hidden; isolation: isolate; }
.menu-toggle::before { content: ""; position: absolute; z-index: -1; inset: 7px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%); border-radius: 50%; opacity: 0; transform: scale(.55); transition: opacity .25s ease, transform .25s ease; }
.menu-toggle span { position: absolute; left: 50%; width: 20px; height: 2px; background: currentColor; border-radius: 999px; transform-origin: center; transition: transform .25s cubic-bezier(.2,.7,.2,1), opacity .18s ease; }
.menu-toggle span:nth-child(1) { transform: translate(-50%, -6px); }
.menu-toggle span:nth-child(2) { transform: translate(-50%, 0); }
.menu-toggle span:nth-child(3) { transform: translate(-50%, 6px); }
.menu-toggle[aria-expanded="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.menu-toggle[aria-expanded="true"]::before { opacity: 1; transform: scale(1); }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, 0) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: translate(-50%, 0) scaleX(0); }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translate(-50%, 0) rotate(-45deg); }
.menu-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100svh - var(--header-h));
  padding-top: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  column-gap: clamp(44px, 7vw, 100px);
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; padding-bottom: 78px; }
.availability {
  width: fit-content;
  margin-bottom: 34px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.availability span, .pulse, .current-badge i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent), 0 0 16px color-mix(in srgb, var(--accent) 55%, transparent);
  animation: statusPulse 2.2s ease-in-out infinite;
}
.hero h1 {
  max-width: 720px;
  margin-top: 16px;
  color: var(--text);
  font-size: clamp(3.4rem, 7.6vw, 7.1rem);
  line-height: .85;
  letter-spacing: -.075em;
}
.hero h1 em { color: var(--accent); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.hero-lead { max-width: 650px; margin-top: 32px; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.16rem); line-height: 1.8; }
.focus-card { width: fit-content; max-width: 100%; margin-top: 24px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface); }
.focus-card > div { display: flex; flex-direction: column; }
.focus-card small { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .59rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.focus-card strong { margin-top: 2px; color: var(--text); font-size: .76rem; }
.hero-actions { margin-top: 36px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.button {
  min-height: 50px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-3px); }
.button > span { display: inline-block; transition: transform .2s ease; }
.button:hover > span { transform: translate(3px, 3px); }
.button-primary { color: var(--accent-ink); background: var(--accent); box-shadow: 0 12px 36px color-mix(in srgb, var(--accent) 18%, transparent); }
.button-primary:hover { background: var(--accent-2); box-shadow: 0 16px 44px color-mix(in srgb, var(--accent) 26%, transparent); }
.button-ghost { color: var(--text); background: var(--surface); border-color: var(--line-strong); }
.button-ghost:hover { background: var(--surface-2); border-color: var(--accent); }
.text-link { margin-left: 8px; color: var(--muted); font-size: .82rem; font-weight: 800; text-underline-offset: 5px; transition: color .2s ease; }
.text-link:hover { color: var(--accent); }
.live-action { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.live-action i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 10%, transparent), 0 0 14px var(--accent); animation: liveBlink 1.45s ease-in-out infinite; }
.live-action span { margin-left: 12px; transition: transform .2s ease; }
.live-action:hover span { transform: translate(3px, -3px); }
.hero-visual { position: relative; align-self: stretch; min-height: 650px; }
.visual-frame {
  position: absolute;
  inset: 26px 12px 56px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.visual-frame::after { display: none; }
.visual-frame > img { position: absolute; z-index: 2; right: 0; bottom: -3%; width: 104%; height: 98%; object-fit: contain; object-position: bottom right; filter: saturate(.86) contrast(1.02); }
.visual-code { position: absolute; z-index: 4; color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .6rem; font-weight: 800; letter-spacing: .15em; }
.visual-code-top { left: 26px; top: 28px; }
.visual-code-bottom { right: 26px; bottom: 24px; }
.hero-metrics { grid-column: 1 / -1; align-self: end; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-metrics > div { position: relative; padding: 24px 24px 24px 46px; display: flex; flex-direction: column; }
.hero-metrics > div + div { border-left: 1px solid var(--line); }
.hero-metrics span { position: absolute; left: 16px; top: 26px; color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .62rem; }
.hero-metrics strong { font-size: .92rem; }
.hero-metrics small { margin-top: 4px; color: var(--muted); font-size: .7rem; }

/* ---------- About ---------- */
.about-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; align-items: start; }
.about-story { padding: clamp(28px, 4vw, 52px); }
.about-story > p { color: var(--muted); }
.about-story .large-copy { color: var(--text); font-size: clamp(1.35rem, 2.1vw, 2rem); line-height: 1.45; letter-spacing: -.025em; }
.about-story > p + p { margin-top: 22px; }
.principles { margin-top: 42px; border-top: 1px solid var(--line); }
.principles > div { padding: 20px 0; display: grid; grid-template-columns: 100px 1fr; gap: 18px; border-bottom: 1px solid var(--line); }
.principles span { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.principles p { color: var(--muted); font-size: .88rem; }
.capability-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.capability-card { min-height: 236px; padding: 26px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .25s ease, border-color .25s ease, background .25s ease; }
.capability-card:hover { transform: translateY(-6px); border-color: var(--line-strong); background: var(--surface-2); }
.card-index { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; font-weight: 900; }
.capability-card h3 { margin-top: auto; font-size: 1.05rem; }
.capability-card p { margin-top: 10px; color: var(--muted); font-size: .81rem; line-height: 1.65; }

/* ---------- Experience and tools ---------- */
.experience-card { padding: clamp(26px, 4vw, 52px); }
.experience-meta { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.current-badge { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.experience-meta p { margin-top: 6px; color: var(--muted); font-size: .8rem; }
.experience-number { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .67rem; letter-spacing: .12em; }
.experience-content { padding-top: 38px; display: grid; grid-template-columns: .83fr 1.17fr; gap: clamp(34px, 6vw, 82px); }
.experience-content h3 { max-width: 420px; font-size: clamp(2rem, 3.8vw, 3.6rem); line-height: 1.03; letter-spacing: -.05em; }
.experience-summary { max-width: 420px; margin-top: 20px; color: var(--muted); }
.responsibility-list { list-style: none; padding: 0; }
.responsibility-list li { padding: 18px 0; display: grid; grid-template-columns: 34px 1fr; gap: 12px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: .88rem; }
.responsibility-list li:first-child { padding-top: 0; }
.responsibility-list span { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .65rem; }
.tools-heading { margin: 70px 0 24px; display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.tools-heading > p:last-child { max-width: 520px; color: var(--muted); font-size: .85rem; text-align: right; }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tool-card { min-height: 378px; padding: 32px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .25s ease, border-color .25s ease; }
.tool-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.tool-logo { height: 74px; display: flex; align-items: center; }
.tool-logo img { width: auto; max-width: 220px; max-height: 54px; object-fit: contain; object-position: left center; }
.tool-logo--assist { height: 100px; justify-content: center; align-items: flex-start; padding-top: 4px; }
.tool-logo--assist img { width: 88px; max-width: 88px; max-height: 88px; object-fit: contain; }
body.light-theme .tool-logo img { filter: invert(1) hue-rotate(180deg); }
.tool-card h3 { margin-top: auto; font-size: 1.05rem; }
.tool-card p { margin-top: 9px; color: var(--muted); font-size: .82rem; }
.tool-card > span { margin-top: 20px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Projects ---------- */
.project-stack { display: grid; gap: 16px; }
.project-row { position: relative; isolation: isolate; overflow: hidden; padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: 1fr; gap: 24px; background: linear-gradient(145deg, color-mix(in srgb, var(--surface-2) 88%, transparent), color-mix(in srgb, var(--surface) 94%, transparent)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 46px rgba(0, 0, 0, .08); transition: transform .28s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .25s ease; }
.project-row:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); box-shadow: 0 24px 58px rgba(0, 0, 0, .14); }
.project-featured { background: radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 34%), linear-gradient(145deg, var(--surface-2), var(--surface)); border-color: color-mix(in srgb, var(--accent) 36%, var(--line)); }
.project-featured::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent 4%, var(--accent) 48%, transparent 96%); box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 70%, transparent); animation: featuredGlow 2.8s ease-in-out infinite; }
.project-featured::after { content: ""; position: absolute; z-index: -1; width: 220px; aspect-ratio: 1; top: -130px; right: -90px; border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 50%; box-shadow: 0 0 0 34px color-mix(in srgb, var(--accent) 3%, transparent), 0 0 0 68px color-mix(in srgb, var(--accent) 2%, transparent); pointer-events: none; }
.project-label { width: fit-content; display: inline-flex; align-items: center; gap: 10px; padding: 7px 11px 7px 8px; background: color-mix(in srgb, var(--accent) 7%, var(--bg)); border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line)); border-radius: 999px; }
.project-label span { min-width: 26px; height: 26px; display: grid; place-items: center; color: var(--accent-ink); background: var(--accent); border-radius: 50%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .62rem; font-weight: 900; }
.project-label small { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.project-body h3 { font-size: clamp(1.5rem, 2.8vw, 2.55rem); line-height: 1.1; letter-spacing: -.035em; }
.project-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); border-radius: 999px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .6rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: liveBlink 1.45s ease-in-out infinite; }
.project-body > p { max-width: 720px; margin-top: 14px; color: var(--muted); }
.project-columns { max-width: 780px; margin-top: 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.project-columns > div { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.project-columns h4 { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .66rem; text-transform: uppercase; }
.project-columns p { margin-top: 8px; color: var(--muted); font-size: .79rem; }
.tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 7px; }
.tags span { padding: 6px 10px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .62rem; font-weight: 700; }
.project-live-link { position: relative; width: fit-content; margin-top: 22px; display: inline-flex; align-items: center; gap: 28px; color: var(--accent); font-size: .75rem; font-weight: 900; text-underline-offset: 5px; }
.project-live-link span { transition: transform .2s ease; }
.project-live-link:hover span { transform: translate(4px, -4px); }
.project-arrow { position: absolute; top: clamp(28px, 4vw, 48px); right: clamp(28px, 4vw, 48px); width: 46px; height: 46px; display: grid; place-items: center; color: var(--accent-ink); background: var(--accent); border-radius: 50%; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 24%, transparent); font-size: 1.1rem; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.project-row:hover .project-arrow { transform: rotate(45deg); }

/* ---------- Side lab ---------- */
.hobby-panel { position: relative; isolation: isolate; overflow: hidden; padding: clamp(28px, 5vw, 58px); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: clamp(30px, 7vw, 92px); background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 38%), linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.hobby-panel::before { content: ""; position: absolute; z-index: -1; width: 300px; height: 300px; right: -160px; bottom: -180px; border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 50%; box-shadow: 0 0 0 34px color-mix(in srgb, var(--accent) 3%, transparent), 0 0 0 68px color-mix(in srgb, var(--accent) 2%, transparent); }
.hobby-brand { display: flex; align-items: center; gap: 14px; }
.hobby-brand img { width: 54px; height: 54px; flex: 0 0 auto; filter: drop-shadow(0 8px 16px color-mix(in srgb, var(--accent) 18%, transparent)); }
.hobby-brand .eyebrow { margin: 0; }
.hobby-copy h2 { margin-top: 10px; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.03; letter-spacing: -.045em; }
.hobby-copy > p:last-child { max-width: 620px; margin-top: 18px; color: var(--muted); font-size: .92rem; line-height: 1.8; }
.hobby-stack { align-self: center; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 80%, transparent); }
.hobby-label { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .66rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.hobby-tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 9px; }
.hobby-tags span { padding: 8px 12px 8px 9px; display: inline-flex; align-items: center; gap: 8px; color: var(--text); background: color-mix(in srgb, var(--accent) 8%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line)); border-radius: 999px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .66rem; font-weight: 700; }
.hobby-tags span:hover { border-color: color-mix(in srgb, var(--accent) 54%, var(--line)); background: color-mix(in srgb, var(--accent) 13%, var(--surface-2)); }
.hobby-tech svg { width: 18px; height: 18px; flex: 0 0 auto; display: block; }
.hobby-tech b { font: inherit; font-weight: 800; }
.hobby-note { margin-top: 22px; padding-top: 17px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; line-height: 1.45; }
.hobby-note i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent); }

/* ---------- Credentials ---------- */
.credential-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.credential-card { position: relative; isolation: isolate; overflow: hidden; min-height: 360px; padding: 30px; display: flex; flex-direction: column; color: inherit; background: linear-gradient(150deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; box-shadow: 0 14px 34px rgba(0, 0, 0, .08); transition: transform .28s cubic-bezier(.2,.7,.2,1), border-color .25s ease, background .25s ease, box-shadow .25s ease; }
.credential-card:nth-child(n) { grid-column: span 6; min-height: 340px; }
.credential-logo--zoho { width: 106px; padding: 8px; }
.credential-card::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .18; transition: opacity .25s ease; }
.credential-card::after { content: ""; position: absolute; z-index: -1; width: 190px; height: 190px; right: -110px; top: -110px; border: 1px solid color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 50%; box-shadow: 0 0 0 32px color-mix(in srgb, var(--accent) 2%, transparent), 0 0 0 64px color-mix(in srgb, var(--accent) 1.5%, transparent); }
.credential-card:hover { transform: translateY(-7px); border-color: color-mix(in srgb, var(--accent) 72%, transparent); background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 4%, var(--surface-2)), var(--surface)); box-shadow: 0 22px 54px rgba(0, 0, 0, .16), 0 0 28px color-mix(in srgb, var(--accent) 7%, transparent); }
.credential-card:hover::before { opacity: .9; }
.credential-logo { position: relative; width: 58px; height: 58px; padding: 13px; display: grid; place-items: center; background: #fff; border: 1px solid rgba(8, 26, 19, .08); border-radius: 16px; box-shadow: 0 10px 24px rgba(0, 0, 0, .12); transition: transform .28s ease, box-shadow .28s ease; }
.credential-card:hover .credential-logo { transform: translateY(-2px) rotate(-2deg); box-shadow: 0 14px 30px rgba(0, 0, 0, .17); }
.credential-logo img { width: 100%; height: 100%; object-fit: contain; }
.credential-card > span { margin-top: 32px; padding-top: 0; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .66rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.credential-card h3 { max-width: 340px; margin-top: 9px; font-size: 1.2rem; line-height: 1.35; letter-spacing: -.018em; }
.credential-card p { max-width: 350px; margin-top: 12px; color: var(--muted); font-size: .81rem; line-height: 1.7; }
.credential-logo--powershell { width: 70px; height: 70px; padding: 0; background: transparent; border-color: transparent; box-shadow: 0 12px 26px rgba(0, 80, 155, .2); }
.credential-logo--powershell img { width: 100%; height: 100%; object-fit: contain; }
.credential-card strong { margin-top: auto; padding-top: 24px; display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: .72rem; transition: color .2s ease, transform .2s ease; }
.credential-card:hover strong { color: var(--accent); transform: translateX(3px); }
.achievement { position: relative; isolation: isolate; overflow: hidden; margin-top: 18px; padding: clamp(26px, 4vw, 46px); display: grid; grid-template-columns: 180px 1fr 118px; align-items: stretch; gap: clamp(24px, 4vw, 48px); color: inherit; background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 54%, color-mix(in srgb, #f48222 5%, var(--surface))); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.achievement::before { content: ""; position: absolute; z-index: -1; width: 360px; height: 360px; right: -180px; top: -220px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); box-shadow: 0 0 0 50px color-mix(in srgb, var(--accent) 3%, transparent), 0 0 0 100px color-mix(in srgb, var(--accent) 2%, transparent); }
.achievement-logo { min-height: 180px; padding: 18px; display: grid; place-items: center; background: #fff; border: 1px solid rgba(8, 24, 18, .08); border-radius: 22px; box-shadow: 0 18px 42px rgba(0, 0, 0, .16); }
.achievement-logo img { width: 100%; height: 100%; max-height: 150px; object-fit: contain; }
.achievement-copy { align-self: center; }
.achievement h3 { max-width: 620px; margin-top: 9px; font-size: clamp(1.35rem, 2.4vw, 2.1rem); line-height: 1.15; letter-spacing: -.035em; }
.achievement-copy > p:not(.eyebrow) { max-width: 600px; margin-top: 12px; color: var(--muted); font-size: .88rem; }
.achievement-meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 7px; }
.achievement-meta span { padding: 6px 9px; color: var(--muted); background: color-mix(in srgb, var(--bg) 48%, transparent); border: 1px solid var(--line); border-radius: 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .58rem; font-weight: 800; }
.achievement-copy > a { width: fit-content; margin-top: 22px; display: inline-flex; align-items: center; gap: 24px; color: var(--accent); font-size: .75rem; font-weight: 900; text-underline-offset: 5px; }
.achievement-rank { min-height: 180px; padding: 18px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: 1px solid var(--line); }
.achievement-rank small { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .58rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.achievement-rank strong { margin-block: 2px -4px; color: var(--accent); font-size: clamp(3.8rem, 6vw, 5.6rem); line-height: 1; letter-spacing: -.08em; }
.achievement-rank span { color: var(--text); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Contact and footer ---------- */
.contact-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(48px, 8vw, 110px); align-items: start; }
.contact-copy { position: sticky; top: 120px; }
.contact-copy > p:not(.eyebrow) { max-width: 420px; margin-top: 26px; color: var(--muted); }
.contact-copy > a { display: inline-block; margin-top: 28px; color: var(--accent); font-size: .82rem; font-weight: 800; text-underline-offset: 5px; }
.contact-form { padding: clamp(26px, 4vw, 46px); display: flex; flex-direction: column; gap: 24px; }
.field-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.field input, .field textarea { width: 100%; padding: 15px 16px; color: var(--text); background: color-mix(in srgb, var(--bg) 88%, var(--surface)); border: 1px solid var(--line-strong); border-radius: 11px; outline: none; resize: vertical; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.field textarea { min-height: 210px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--accent) 42%, var(--line-strong)); }
.field input:focus, .field textarea:focus { background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 9%, transparent), 0 12px 30px color-mix(in srgb, var(--accent) 5%, transparent); }
.form-footer { min-height: 50px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
#form-status { color: var(--muted); font-size: .78rem; }
#form-status.success { color: var(--accent); }
#form-status.error { color: #ff8c8c; }
.site-footer { margin-top: 40px; padding-block: 34px; border-top: 1px solid var(--line); }
.site-footer .section-shell { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 36px; }
.site-footer p { color: var(--faint); font-size: .72rem; }
.footer-brand-icon { width: 44px; height: 44px; flex-basis: 44px; }
.back-to-top { position: fixed; right: 20px; bottom: 20px; z-index: 900; width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent-ink); background: var(--accent); border-radius: 12px; box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s ease, visibility .2s ease, transform .2s ease; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .56; transform: scale(.82); }
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), 0 0 14px var(--accent); }
  50% { opacity: .38; transform: scale(.72); box-shadow: 0 0 0 8px transparent, 0 0 4px var(--accent); }
}
@keyframes featuredGlow {
  0%, 100% { opacity: .4; transform: scaleY(.55); }
  50% { opacity: 1; transform: scaleY(1); }
}
@keyframes dragonAura {
  0%, 100% { opacity: .5; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.12); }
}
@keyframes dragonSmoke {
  0% { opacity: 0; transform: translate(-50%, 4px) scale(.45); }
  24% { opacity: .62; }
  100% { opacity: 0; transform: translate(calc(-50% + 8px), -38px) scale(1.65); }
}

/* ---------- Reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root { --container: 920px; }
  .hero { grid-template-columns: 1fr 370px; column-gap: 36px; }
  .hero h1 { font-size: clamp(3.5rem, 8vw, 6rem); }
  .about-layout { grid-template-columns: 1fr; }
  .capability-grid { grid-template-columns: repeat(4, 1fr); }
  .capability-card { min-height: 220px; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-card { min-height: 290px; }
  .contact-section { grid-template-columns: .72fr 1.28fr; gap: 42px; }
}

@media (max-width: 820px) {
  :root { --header-h: 68px; }
  .section-shell { width: min(100% - 32px, 720px); }
  .section-block { padding-block: 88px; }
  .site-header { padding-block: 8px; }
  .brand-copy { display: flex; }
  .menu-toggle { display: grid; }
  .nav-links {
    position: fixed;
    z-index: 1001;
    inset: 76px 16px auto;
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    counter-reset: mobileNav;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(24px) saturate(135%);
    border: 1px solid transparent;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .025);
    opacity: 0;
    transform: translateY(-14px) scale(.985);
    transform-origin: top right;
    pointer-events: none;
    transition: max-height .35s ease, opacity .22s ease, transform .3s cubic-bezier(.2,.7,.2,1), border-color .2s ease;
  }
  .nav-links.open { max-height: 430px; padding: 10px; opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; border-color: color-mix(in srgb, var(--accent) 20%, var(--line)); }
  .nav-links a { counter-increment: mobileNav; padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); border: 1px solid transparent; border-radius: 12px; font-size: .88rem; opacity: 0; transform: translateX(10px); transition: color .2s ease, background .2s ease, border-color .2s ease, opacity .25s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
  .nav-links a::before { content: "0" counter(mobileNav); order: 2; color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .58rem; font-weight: 800; letter-spacing: .08em; }
  .nav-links.open a { opacity: 1; transform: translateX(0); }
  .nav-links.open a:nth-child(1) { transition-delay: .03s; }
  .nav-links.open a:nth-child(2) { transition-delay: .06s; }
  .nav-links.open a:nth-child(3) { transition-delay: .09s; }
  .nav-links.open a:nth-child(4) { transition-delay: .12s; }
  .nav-links.open a:nth-child(5) { transition-delay: .15s; }
  .nav-links.open a:nth-child(6) { transition-delay: .18s; }
  .nav-links a:hover, .nav-links a.active { color: var(--text); background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); border-color: color-mix(in srgb, var(--accent) 15%, var(--line)); }
  .nav-links a.active::before { color: var(--accent); }
  .nav-links a::after { display: none; }
  .hero { min-height: auto; padding-top: 48px; grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 48px; }
  .hero h1 { max-width: 680px; font-size: clamp(3.7rem, 13vw, 6.4rem); }
  .hero-visual { min-height: 590px; width: min(100%, 520px); margin-inline: auto; }
  .hero-metrics { margin-top: 22px; grid-template-columns: repeat(2, 1fr); }
  .hero-metrics > div:nth-child(3) { border-left: 0; }
  .hero-metrics > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
  .experience-content { grid-template-columns: 1fr; }
  .tool-grid, .credential-grid { grid-template-columns: 1fr; }
  .hobby-panel { grid-template-columns: 1fr; gap: 34px; }
  .credential-card:nth-child(n) { grid-column: auto; min-height: 315px; }
  .tool-card { min-height: 245px; }
  .credential-card { min-height: 315px; }
  .achievement { grid-template-columns: 150px 1fr; }
  .achievement-rank { grid-column: 1 / -1; min-height: auto; padding: 22px; flex-direction: row; gap: 14px; border-left: 0; border-top: 1px solid var(--line); }
  .achievement-rank strong { font-size: 3.2rem; }
  .contact-section { grid-template-columns: 1fr; }
  .contact-copy { position: static; }
  .site-footer .section-shell { grid-template-columns: 1fr auto; }
}

@media (max-width: 560px) {
  .section-shell { width: min(100% - 24px, 520px); }
  .section-block { padding-block: 72px; }
  .site-header, .site-header.scrolled { padding-block: 6px; }
  .nav-shell { width: calc(100% - 24px); min-height: 48px; gap: 12px; }
  .site-header .brand { gap: 9px; }
  .site-header .brand-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .site-header .brand-copy strong { font-size: .78rem; }
  .site-header .brand-copy small { margin-top: 2px; font-size: .58rem; }
  .nav-actions { gap: 6px; }
  .theme-toggle, .menu-toggle { width: 40px; height: 40px; border-radius: 12px; }
  .nav-links { inset: 68px 12px auto; }
  .section-heading { margin-bottom: 38px; }
  .section-heading h2, .contact-copy h2 { font-size: clamp(2.6rem, 14vw, 4rem); }
  .hero { padding-top: 36px; }
  .availability { margin-bottom: 28px; }
  .hero h1 { font-size: clamp(3.3rem, 17vw, 5rem); }
  .hero-lead { margin-top: 24px; font-size: .95rem; }
  .hero-actions { align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .text-link { width: 100%; margin: 5px 0 0; text-align: center; }
  .hero-visual { min-height: 470px; }
  .visual-frame { inset: 12px 8px 40px; border-radius: 0; }
  .visual-frame > img { right: 0; bottom: -2%; width: 108%; height: 98%; }
  .hero-metrics { grid-template-columns: 1fr; }
  .hero-metrics > div + div, .hero-metrics > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .hero-metrics > div { padding-block: 18px; }
  .hero-metrics span { top: 20px; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-card { min-height: 190px; }
  .principles > div { grid-template-columns: 82px 1fr; }
  .experience-card { border-radius: var(--radius); }
  .experience-meta { gap: 20px; }
  .experience-number { display: none; }
  .experience-content h3 { font-size: 2.25rem; }
  .tools-heading { align-items: start; flex-direction: column; }
  .tools-heading > p:last-child { text-align: left; }
  .project-row { padding: 24px; gap: 20px; }
  .project-featured { padding-top: 26px; }
  .project-label { max-width: calc(100% - 56px); }
  .project-label small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .project-arrow { top: 24px; right: 24px; width: 42px; height: 42px; }
  .project-columns { grid-template-columns: 1fr; }
  .credential-card { min-height: 330px; padding: 24px; }
  .credential-card:nth-child(n) { min-height: 330px; }
  .achievement { padding: 20px; grid-template-columns: 1fr; gap: 22px; border-radius: var(--radius); }
  .achievement-logo { min-height: 200px; }
  .achievement-logo img { max-height: 180px; }
  .achievement-rank { grid-column: 1; }
  .contact-section { padding-bottom: 38px; gap: 34px; }
  .contact-form { padding: 22px; gap: 20px; border-radius: 22px; }
  .field-row { grid-template-columns: 1fr; }
  .field { gap: 9px; }
  .field input, .field textarea { padding: 14px; border-radius: 12px; }
  .field textarea { min-height: 190px; }
  .form-footer { align-items: stretch; flex-direction: column-reverse; }
  .form-footer .button { width: 100%; }
  .site-footer { margin-top: 0; padding-block: 28px; }
  .site-footer .section-shell { grid-template-columns: 1fr; justify-items: center; gap: 13px; text-align: center; }
  .site-footer .brand { gap: 10px; }
  .footer-brand-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .site-footer .brand-copy { text-align: left; }
  .site-footer .brand-copy strong { font-size: .8rem; }
  .site-footer .brand-copy small { font-size: .6rem; }
  .site-footer p { font-size: .66rem; }
  .back-to-top { right: 12px; bottom: 12px; width: 42px; height: 42px; border-radius: 13px; }
}

@media (max-width: 370px) {
  .site-header .brand-copy small { display: none; }
  .site-header .brand-copy strong { max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .kali-loader-logo { clip-path: inset(0); opacity: 1; }
  .kali-loader-smoke span { opacity: 0; }
}
