/* ==========================================================================
   enginyurtseven.com — base.css (shell)
   Tokens, reset, typography, preloader, header & navigation, mobile menu,
   sections, buttons, chips, projects gallery, project dialog, contact
   terminal, toast, footer, utilities, reduced motion and print.
   The journey stage itself is styled in journey.css.
   z-index plan: bg 0 · main 1 · journey internals ≤5 · header 50 ·
                 mobile menu 60 · dialog 70 · toast 90 · preloader 100
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #05070d;
  --bg-2: #0a0f1c;
  --surface: #0e1424;
  --surface-2: #131b30;
  --border: rgba(120, 160, 255, .14);
  --text: #e6edf7;
  --text-dim: #8b98b3;
  --text-mute: #5b6782;
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --accent-3: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --pink: #f472b6;
  --glow: 0 0 24px rgba(34, 211, 238, .35);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --radius: 14px;
  --header-h: 64px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* shell helpers */
  --container: 1200px;
  --gutter: 16px;
  --term-bg: #070b14;
  --border-strong: rgba(120, 160, 255, .26);
  --dot-red: #ff5f57;
  --dot-yellow: #febc2e;
  --dot-green: #28c840;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-lg: clamp(1.05rem, 1rem + .3vw, 1.2rem);
  --fs-xl: clamp(1.2rem, 1.08rem + .6vw, 1.5rem);
  --fs-2xl: clamp(1.5rem, 1.25rem + 1.2vw, 2.1rem);
  --fs-3xl: clamp(2rem, 1.45rem + 2.6vw, 3.4rem);
  --fs-hero: clamp(2.5rem, 1.6rem + 4.4vw, 5.2rem);
  --section-space: clamp(72px, 9vw, 136px);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-color: var(--bg);
  color-scheme: dark;
  scroll-padding-top: calc(var(--header-h) + 12px);
  scrollbar-color: #26324f var(--bg);
  tab-size: 2;
}

@media (prefers-reduced-motion: no-preference) {
  html.no-js { scroll-behavior: smooth; }
}

html.is-locked { overflow: hidden; }
html.is-locked body,
html.is-locked .site-header { padding-right: var(--sbw, 0px); }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* fixed ambient backdrop: soft glows + engineering grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1100px 620px at 88% -8%, rgba(167, 139, 250, .11), transparent 62%),
    radial-gradient(900px 560px at -8% 108%, rgba(34, 211, 238, .09), transparent 60%),
    linear-gradient(rgba(120, 160, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 255, .035) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
}

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

img { height: auto; border-style: none; }

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

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
}

a { color: var(--accent); text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--text);
  overflow-wrap: break-word;
}

p { margin: 0 0 1em; }

code, kbd, pre, samp { font-family: var(--font-mono); font-size: .95em; }

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

dl, dd { margin: 0; }

[hidden] { display: none !important; }

::selection { background: rgba(34, 211, 238, .28); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1d2740; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a3858; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }
[tabindex="-1"]:focus { outline: none; }

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 110;
  padding: .7rem 1rem;
  border-radius: 10px;
  background: var(--accent);
  color: #021018;
  font: 700 .85rem/1 var(--font-mono);
  transform: translateY(-160%);
  transition: transform .2s var(--ease-out);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); outline-color: #fff; }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.mono { font-family: var(--font-mono); }
.text-dim { color: var(--text-dim); }
.text-mute { color: var(--text-mute); }
.text-accent { color: var(--accent); }
.text-ok { color: var(--accent-3); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.nowrap { white-space: nowrap; }
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  vertical-align: -.125em;
}

/* syntax tokens (screen code) */
.tok-kw { color: var(--accent-2); }
.tok-str { color: var(--accent-3); }
.tok-prop { color: var(--accent); }
.tok-num { color: var(--warn); }
.tok-com { color: var(--text-mute); }
.tok-punc { color: var(--text-dim); }

.caret {
  display: inline-block;
  width: .55em;
  height: 1.05em;
  margin-left: .15em;
  vertical-align: text-bottom;
  background: currentColor;
  animation: ey-blink 1.1s steps(1, end) infinite;
}

@keyframes ey-blink { 50% { opacity: 0; } }
@keyframes ey-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Background canvas ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
  transition: opacity 1s ease;
}
html.is-matrix #bg-canvas { opacity: 1; }

/* ---------- Generic terminal window ---------- */
.term {
  position: relative;
  background: var(--term-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .03);
  overflow: hidden;
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 14px;
  background: linear-gradient(180deg, rgba(19, 27, 48, .95), rgba(14, 20, 36, .95));
  border-bottom: 1px solid var(--border);
}
.term__dots,
.pc-dots {
  display: inline-flex;
  gap: 6px;
  flex: none;
}
.term__dots i,
.pc-dots i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot-red);
  opacity: .85;
}
.term__dots i:nth-child(2),
.pc-dots i:nth-child(2) { background: var(--dot-yellow); }
.term__dots i:nth-child(3),
.pc-dots i:nth-child(3) { background: var(--dot-green); }
.term__title {
  flex: 1;
  min-width: 0;
  padding-right: 46px;
  text-align: center;
  font: 500 .75rem/1 var(--font-mono);
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* prompt pieces */
.prompt-user { color: var(--accent-3); }
.prompt-sep,
.prompt-sym { color: var(--text-dim); }
.prompt-path { color: var(--accent); }
.prompt-cmd { color: var(--text); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(700px 420px at 50% 40%, rgba(34, 211, 238, .08), transparent 70%),
    var(--bg);
  transition: opacity .55s var(--ease-out), visibility .55s;
  /* fail-safe: never trap the visitor if scripts fail to load */
  animation: ey-preloader-failsafe .5s ease 4.5s forwards;
}
.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@keyframes ey-preloader-failsafe { to { opacity: 0; visibility: hidden; } }

.preloader__term {
  width: min(560px, 100%);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .95), 0 0 60px -20px rgba(34, 211, 238, .25);
}
.preloader__body { padding: 18px 18px 16px; }
.preloader__log {
  min-height: 11.2em;
  font: 500 .78rem/1.6 var(--font-mono);
  color: var(--accent-3);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.preloader__line { animation: ey-fade-in .25s ease both; }
.preloader__line:last-child::after {
  content: "";
  display: inline-block;
  width: .55em;
  height: 1em;
  margin-left: .2em;
  vertical-align: text-bottom;
  background: var(--accent-3);
  animation: ey-blink 1s steps(1, end) infinite;
}
.preloader__progress {
  position: relative;
  height: 4px;
  margin-top: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
}
.preloader__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(34, 211, 238, .7);
  transform: scaleX(0);
  transform-origin: left center;
}
.preloader__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font: 500 .72rem/1 var(--font-mono);
  color: var(--text-mute);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.site-header.is-scrolled {
  background-color: rgba(8, 12, 22, .74);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header.is-scrolled { background-color: rgba(8, 12, 22, .96); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  padding: .42rem .6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(14, 20, 36, .6);
  font: 700 1.02rem/1 var(--font-mono);
  letter-spacing: -.02em;
  white-space: nowrap;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.brand:hover .brand__mark,
.brand:focus-visible .brand__mark {
  border-color: rgba(34, 211, 238, .45);
  box-shadow: 0 0 22px -6px rgba(34, 211, 238, .6);
}
.brand__lt { color: var(--accent); }
.brand__sl { color: var(--accent-2); }
.brand__caret {
  display: inline-block;
  width: .5em;
  height: 1.05em;
  margin-left: .25em;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(34, 211, 238, .8);
  animation: ey-blink 1.1s steps(1, end) infinite;
}
.brand__domain {
  display: none;
  font: 500 .78rem/1 var(--font-mono);
  color: var(--text-dim);
  white-space: nowrap;
}
@media (min-width: 480px) {
  .brand__domain { display: inline; }
}

.site-nav { display: none; }
.nav-list {
  display: flex;
  align-items: center;
  gap: .1rem;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem .6rem;
  border-radius: 8px;
  font: 500 .82rem/1 var(--font-mono);
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease;
}
.nav-link__idx {
  display: none;
  font-size: .7rem;
  color: var(--accent-2);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: .6rem;
  right: .6rem;
  bottom: .18rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(34, 211, 238, .6);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s var(--ease-out);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(.35); }
.nav-link.is-active { color: var(--accent); }
.nav-link.is-active::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: none;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(14, 20, 36, .6);
  font: 600 .72rem/1 var(--font-mono);
}
.lang-btn {
  min-width: 36px;
  height: 30px;
  padding: 0 .55rem;
  border-radius: 999px;
  color: var(--text-dim);
  letter-spacing: .04em;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] {
  color: var(--accent);
  background: rgba(34, 211, 238, .14);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .38);
}
.lang-sep {
  color: var(--text-mute);
  padding: 0 1px;
  user-select: none;
}

.menu-toggle {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(14, 20, 36, .6);
  transition: border-color .2s ease;
}
.menu-toggle:hover { border-color: rgba(34, 211, 238, .45); }
.menu-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .3s var(--ease-out), opacity .2s ease;
}
.menu-toggle__bar:nth-child(2) { width: 12px; margin-left: 6px; background: var(--accent); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.no-js .menu-toggle,
.no-js .lang-toggle { display: none; }

@media (min-width: 1024px) {
  .site-nav { display: block; }
  .menu-toggle { display: none; }
}
@media (min-width: 1200px) {
  .nav-link__idx { display: inline; }
}

/* ---------- Mobile menu (terminal) ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(3, 5, 10, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .25s ease;
}
.mobile-menu.is-open { opacity: 1; }
.mm-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  transform: translateY(14px) scale(.985);
  transition: transform .4s var(--ease-out);
}
.mobile-menu.is-open .mm-panel { transform: none; }
.mm-panel .term__title { padding-right: 0; }
.mm-close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: -8px;
  border-radius: 8px;
  color: var(--text-dim);
  transition: color .2s ease, background-color .2s ease;
}
.mm-close:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.mm-close .icon { width: 20px; height: 20px; }
.mm-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 18px 22px;
  font-family: var(--font-mono);
}
.mm-prompt {
  margin-bottom: 14px;
  font-size: .82rem;
  color: var(--text-dim);
}
.mm-list li {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .35s ease, transform .45s var(--ease-out);
}
.mobile-menu.is-open .mm-list li { opacity: 1; transform: none; }
.mobile-menu.is-open .mm-list li:nth-child(2) { transition-delay: .04s; }
.mobile-menu.is-open .mm-list li:nth-child(3) { transition-delay: .08s; }
.mobile-menu.is-open .mm-list li:nth-child(4) { transition-delay: .12s; }
.mobile-menu.is-open .mm-list li:nth-child(5) { transition-delay: .16s; }
.mobile-menu.is-open .mm-list li:nth-child(6) { transition-delay: .2s; }
.mm-link {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .9rem .4rem;
  border-bottom: 1px dashed rgba(120, 160, 255, .14);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}
.mm-link:hover,
.mm-link.is-active { color: var(--accent); background: rgba(34, 211, 238, .05); }
.mm-link__idx { font-size: .75rem; color: var(--accent-2); }
.mm-link__cmd { font-size: .85rem; color: var(--accent-3); }
.mm-link.is-active .mm-link__label::after { content: " ←"; color: var(--accent); }
.mm-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
}
.mm-mail {
  font-size: .82rem;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
.mm-mail:hover { color: var(--accent); }

/* ---------- Main ---------- */
.site-main {
  position: relative;
  z-index: 1;
  display: block;
  overflow-x: clip;
}

.noscript-banner {
  position: relative;
  z-index: 2;
  margin: calc(var(--header-h) + 8px) var(--gutter) 0;
  padding: .9rem 1rem;
  border: 1px solid rgba(251, 191, 36, .4);
  border-radius: 10px;
  background: rgba(251, 191, 36, .08);
  color: var(--warn);
  font: 500 .88rem/1.55 var(--font-mono);
}

/* ---------- Journey fallback (static hero; journey.js removes it) ---------- */
.journey-fallback {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: calc(var(--header-h) + 40px) var(--gutter) 64px;
}
@supports (min-height: 100svh) {
  .journey-fallback { min-height: 100svh; }
}
.js .journey-fallback:not(.is-active) { visibility: hidden; }
.jf-inner {
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
}
.jf-prompt {
  margin-bottom: 1.1rem;
  font: 500 .9rem/1.4 var(--font-mono);
  color: var(--text-dim);
}
.jf-name {
  margin-bottom: .2em;
  font-size: var(--fs-hero);
  line-height: 1.02;
  letter-spacing: -.035em;
  background: linear-gradient(100deg, #fff 10%, var(--accent) 55%, var(--accent-2) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text);
}
.jf-role {
  margin-bottom: 1.2rem;
  font: 600 var(--fs-lg)/1.4 var(--font-mono);
  color: var(--accent);
}
.jf-role::before { content: "// "; color: var(--text-mute); }
.jf-tagline {
  max-width: 34ch;
  font: 500 var(--fs-xl)/1.45 var(--font-display);
  color: var(--text);
}
.jf-about {
  max-width: 64ch;
  color: var(--text-dim);
}
.jf-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.6rem;
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding-block: var(--section-space);
}
.section__inner {
  position: relative;
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-prompt {
  margin-bottom: .9rem;
  font: 500 .85rem/1.5 var(--font-mono);
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
.section-prompt .caret { color: var(--accent); width: .5em; }
.section-title {
  margin-bottom: .45em;
  font-size: var(--fs-3xl);
  line-height: 1.05;
}
.section-title__tag {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent);
  opacity: .9;
}
.section-title__tag:last-child { color: var(--accent-2); }
.section-intro {
  max-width: 62ch;
  margin: 0;
  font-size: var(--fs-lg);
  color: var(--text-dim);
}

/* circuit trace divider with a travelling data packet */
.trace {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  height: 3px;
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
}
.trace::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .35) 18%, rgba(167, 139, 250, .35) 82%, transparent);
}
.trace__packet {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 86%, rgba(34, 211, 238, .95) 98%, transparent);
  transform: translateX(-100%);
  animation: ey-packet 7s linear infinite;
}
@keyframes ey-packet {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* ---------- Reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity .7s var(--ease-out), transform .85s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: rgba(19, 27, 48, .72);
  --btn-fg: var(--text);
  --btn-bd: var(--border-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 44px;
  padding: .65em 1.15em;
  border: 1px solid var(--btn-bd);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 .88rem/1.2 var(--font-mono);
  letter-spacing: .01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform .25s var(--ease-out), box-shadow .3s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, .45);
  text-decoration: none;
}
.btn:active { transform: translateY(0) scale(.98); }
.btn .icon { width: 1.1em; height: 1.1em; }
.btn--primary {
  --btn-fg: #021018;
  --btn-bd: transparent;
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 55%, #818cf8 130%);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn--primary:hover {
  border-color: transparent;
  box-shadow: 0 0 36px rgba(34, 211, 238, .55), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--accent);
  --btn-bd: rgba(34, 211, 238, .32);
}
.btn--ghost:hover { background: rgba(34, 211, 238, .08); }
.btn--sm {
  min-height: 36px;
  padding: .45em .8em;
  border-radius: 8px;
  font-size: .76rem;
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(14, 20, 36, .65);
  color: var(--text-dim);
  font: 500 .78rem/1 var(--font-mono);
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .3s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"] {
  color: var(--accent);
  border-color: rgba(34, 211, 238, .5);
  background: rgba(34, 211, 238, .1);
  box-shadow: 0 0 18px -6px rgba(34, 211, 238, .6);
}
.chip__count {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: var(--text-mute);
  font-size: .66rem;
}
.chip[aria-pressed="true"] .chip__count {
  background: rgba(34, 211, 238, .18);
  color: var(--accent);
}

/* ---------- Badges & tags ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(5, 7, 13, .8);
  color: var(--text);
  font: 600 .66rem/1.4 var(--font-mono);
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge .icon { width: 11px; height: 11px; }
.badge--featured { color: var(--warn); border-color: rgba(251, 191, 36, .45); }
.badge--hosted { color: var(--accent-3); border-color: rgba(52, 211, 153, .45); }
.badge--year { color: var(--text-dim); }
.badge--type { color: var(--accent); border-color: rgba(34, 211, 238, .35); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  padding: 2px 8px;
  border: 1px solid rgba(167, 139, 250, .2);
  border-radius: 6px;
  background: rgba(167, 139, 250, .08);
  color: var(--accent-2);
  font: 500 .7rem/1.5 var(--font-mono);
}
.tag::before { content: "#"; opacity: .6; }
.tag--more { color: var(--text-dim); border-color: var(--border); background: rgba(255, 255, 255, .03); }
.tag--more::before { content: ""; }

/* ---------- Projects ---------- */
.projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.projects-count {
  margin: 0;
  font: 500 .8rem/1.5 var(--font-mono);
  color: var(--text-dim);
}
.projects-count__cmd { color: var(--text-mute); }
.projects-count__cmd::before { content: "$ "; color: var(--accent-3); }
.projects-count__out { color: var(--text); }
.projects-count__out b { color: var(--accent); font-weight: 700; }

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 26px;
  transition: opacity .18s ease;
}
.project-grid.is-switching { opacity: 0; }
@media (min-width: 640px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (min-width: 1024px) {
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
}

.project-card {
  position: relative;
  min-width: 0;
}
.project-card.is-entering {
  animation: ey-card-in .55s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes ey-card-in {
  from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.97); }
  to { opacity: 1; transform: none; }
}

.pc {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19, 27, 48, .94), rgba(10, 15, 28, .97));
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .9);
  overflow: hidden;
  transform: perspective(1100px) translate3d(0, var(--lift), 0) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease-out), border-color .3s ease, box-shadow .4s ease;
}
.pc:hover,
.pc:focus-within {
  --lift: -4px;
  border-color: rgba(34, 211, 238, .38);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .95), 0 0 0 1px rgba(34, 211, 238, .12), 0 0 34px -8px rgba(34, 211, 238, .3);
}
.pc.is-tilting { transition: transform .12s linear, border-color .3s ease, box-shadow .4s ease; }
.pc::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(34, 211, 238, .1), transparent 42%);
  opacity: 0;
  transition: opacity .35s ease;
}
.pc:hover::after { opacity: 1; }

.pc-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 7, 13, .55);
}
.pc-url {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(120, 160, 255, .08);
  border-radius: 7px;
  background: rgba(255, 255, 255, .04);
  color: var(--text-dim);
  font: 500 .7rem/1 var(--font-mono);
}
.pc-url .icon { width: 11px; height: 11px; color: var(--accent-3); }
.pc-url .icon.is-plain { color: var(--text-mute); }
.pc-url__text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pc-cover,
.pd-cover {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--bg-2);
}
.pc-cover {
  flex: none;
  aspect-ratio: 16 / 10;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
@supports not (aspect-ratio: 16 / 10) {
  .pc-cover { height: 0; padding-top: 62.5%; }
}
.pc-cover > img,
.pd-cover > img {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(1);
  transition: opacity .5s ease, transform .9s var(--ease-out);
}
.pc-cover > img.is-loaded,
.pd-cover > img.is-loaded { opacity: 1; }
.pc-cover > img.is-tall { height: auto; }
.pc:hover .pc-cover > img.is-loaded:not(.is-tall),
.pc-cover:focus-visible > img.is-loaded:not(.is-tall) { transform: scale(1.045); }
.pc:hover .pc-cover > img.is-tall.is-loaded,
.pc-cover:focus-visible > img.is-tall.is-loaded {
  transform: translate3d(0, var(--pan, 0px), 0);
  transition: opacity .5s ease, transform var(--pan-dur, 4s) cubic-bezier(.45, .05, .55, .95);
}
.pc-cover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(5, 7, 13, .6), transparent);
}
.pc-cover:focus-visible { outline-offset: -3px; border-radius: 0; }
.pc-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}
.pc-badges .badge--year { margin-left: auto; }

/* generated placeholder cover */
.cover-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 12% 0%, hsla(var(--ph-h1, 190), 85%, 55%, .34), transparent 60%),
    radial-gradient(100% 80% at 100% 100%, hsla(var(--ph-h2, 260), 85%, 62%, .3), transparent 62%),
    linear-gradient(160deg, #0c1426, #060912);
}
.cover-ph__code {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .55;
}
.cover-ph__initials {
  position: relative;
  font: 700 clamp(2.2rem, 6.5vw, 3.4rem)/1 var(--font-display);
  letter-spacing: -.03em;
  color: #fff;
  text-shadow: 0 0 30px hsla(var(--ph-h1, 190), 90%, 60%, .55);
  white-space: nowrap;
}
.cover-ph__initials i {
  font-style: normal;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .7em;
  color: var(--accent);
}
.cover-ph__initials i:last-child { color: var(--accent-2); }
.cover-ph__file {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 3;
  font: 500 .68rem/1 var(--font-mono);
  color: rgba(230, 237, 247, .62);
}
.cover-ph__status {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(5, 7, 13, .75);
  color: var(--accent);
  font: 500 .66rem/1.4 var(--font-mono);
}
.cover-ph__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: ey-blink 1s steps(1, end) infinite;
}
.is-pending .cover-ph__status { display: inline-flex; }
.has-image .cover-ph__file,
.has-image .cover-ph__status { display: none; }

.pc-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 18px 18px 20px;
}
.pc-title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.pc-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text-dim);
  font-size: .92rem;
  line-height: 1.6;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.pc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.projects-empty {
  max-width: 640px;
  margin: 26px auto 0;
}
.projects-empty__body {
  padding: 22px 22px 24px;
  font-family: var(--font-mono);
}
.projects-empty__body p { margin-bottom: .5rem; font-size: .85rem; color: var(--text-dim); }
.projects-empty__title {
  margin-top: 1rem;
  font: 700 1.15rem/1.3 var(--font-display) !important;
  color: var(--text) !important;
}
.projects-empty__body .btn { margin-top: .8rem; }

/* ---------- Project dialog ---------- */
.project-dialog {
  width: min(980px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(34, 211, 238, .08), 0 0 60px -30px rgba(34, 211, 238, .4);
}
@supports (max-height: 100svh) {
  .project-dialog { max-height: calc(100svh - 32px); }
}
.project-dialog:not([open]) { display: none; }
.project-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: ey-dialog-in .4s var(--ease-out);
}
.project-dialog::backdrop {
  background: rgba(3, 5, 10, .74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.project-dialog.is-fallback {
  position: fixed;
  inset: 0;
  z-index: 70;
  height: fit-content;
}
.pd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 69;
  background: rgba(3, 5, 10, .8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: ey-fade-in .25s ease;
}
@keyframes ey-dialog-in {
  from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.975); }
  to { opacity: 1; transform: none; }
}
.pd {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.pd-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  height: 44px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.pd-bar .pc-url { height: 28px; font-size: .74rem; }
.pd-close {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-dim);
  transition: color .2s ease, background-color .2s ease;
}
.pd-close:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.pd-close .icon { width: 20px; height: 20px; }
.pd-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pd-cover {
  aspect-ratio: 16 / 10;
  max-height: 56vh;
  border-bottom: 1px solid var(--border);
}
@supports not (aspect-ratio: 16 / 10) {
  .pd-cover { height: 52vh; }
}
.pd-cover.is-scrollable { overflow-y: auto; }
.pd-cover.is-scrollable > img {
  position: relative;
  height: auto;
}
.pd-content { padding: 22px clamp(18px, 3vw, 30px) 28px; }
.pd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.pd-title {
  margin-bottom: .55em;
  font-size: var(--fs-2xl);
}
.pd-desc {
  max-width: 70ch;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
.pd-desc p:last-child { margin-bottom: 0; }
.pd-section { margin-top: 20px; }
.pd-label {
  display: block;
  margin-bottom: 8px;
  font: 500 .72rem/1 var(--font-mono);
  color: var(--text-mute);
  text-transform: lowercase;
}
.pd-label::before { content: "// "; }
.pd-address {
  font: 500 .85rem/1.5 var(--font-mono);
  color: var(--accent);
  overflow-wrap: anywhere;
}
.pd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; }
}

.contact-card {
  position: relative;
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(500px 260px at 0% 0%, rgba(34, 211, 238, .08), transparent 70%),
    linear-gradient(180deg, rgba(19, 27, 48, .9), rgba(10, 15, 28, .95));
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9);
  overflow: hidden;
}
.cc-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.cc-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
}
.cc-avatar__inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--term-bg);
  color: var(--text);
  font: 700 1.15rem/1 var(--font-mono);
  overflow: hidden;
}
.cc-avatar__inner img { width: 100%; height: 100%; object-fit: cover; }
.cc-name {
  margin: 0;
  font: 700 1.2rem/1.2 var(--font-display);
  color: var(--text);
}
.cc-role {
  margin: 2px 0 0;
  font: 500 .82rem/1.4 var(--font-mono);
  color: var(--accent);
}
.cc-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, .35);
  background: rgba(52, 211, 153, .08);
  color: var(--accent-3);
  font: 500 .76rem/1.4 var(--font-mono);
}
.cc-status__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.cc-status.is-available .cc-status__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid currentColor;
  animation: ey-ping 2s var(--ease-out) infinite;
}
.cc-status.is-busy {
  border-color: rgba(251, 191, 36, .35);
  background: rgba(251, 191, 36, .08);
  color: var(--warn);
}
@keyframes ey-ping {
  from { transform: scale(.6); opacity: 1; }
  to { transform: scale(1.8); opacity: 0; }
}
.cc-title {
  margin-bottom: .45em;
  font-size: var(--fs-xl);
  line-height: 1.25;
}
.cc-text {
  color: var(--text-dim);
  font-size: .95rem;
}
.cc-code {
  margin: 18px 0 0;
  padding: 14px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(5, 7, 13, .6);
  font: 500 .82rem/1.75 var(--font-mono);
}
.cc-code p { margin: 0; }
.cc-list { padding-left: 1.2em; }
.cc-list li {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.cc-list a,
.cc-list .cc-val {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--accent-3);
  text-decoration: none;
}
.cc-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cc-copy {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: .35em;
  vertical-align: middle;
  border-radius: 6px;
  color: var(--text-mute);
  transition: color .2s ease, background-color .2s ease;
}
.cc-copy:hover { color: var(--accent); background: rgba(34, 211, 238, .08); }
.cc-copy .icon { width: 14px; height: 14px; }
.cc-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.cc-social a {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(14, 20, 36, .7);
  color: var(--text-dim);
  transition: color .2s ease, border-color .2s ease, box-shadow .3s ease, transform .25s var(--ease-out);
}
.cc-social a:hover {
  color: var(--accent);
  border-color: rgba(34, 211, 238, .45);
  box-shadow: 0 0 22px -6px rgba(34, 211, 238, .6);
  transform: translateY(-2px);
}
.cc-social .icon { width: 20px; height: 20px; }
.cc-cv { margin-top: 18px; }

.contact-term { transition: border-color .3s ease, box-shadow .4s ease; }
.contact-term:focus-within {
  border-color: rgba(34, 211, 238, .35);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9), 0 0 40px -18px rgba(34, 211, 238, .45);
}
.contact-form {
  position: relative;
  padding: 20px clamp(16px, 3vw, 26px) 22px;
  font-family: var(--font-mono);
}
.contact-form__intro {
  margin-bottom: 18px;
  font-size: .8rem;
  color: var(--text-mute);
}
.term-field { margin-bottom: 18px; }
.term-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .6em;
  margin-bottom: 4px;
  font-size: .85rem;
  cursor: pointer;
}
.term-label__cmd { color: var(--accent-3); font-weight: 600; }
.term-label__hint { color: var(--text-mute); font-size: .78rem; }
.term-line {
  position: relative;
}
.term-line::before {
  content: "›";
  position: absolute;
  left: 2px;
  top: .5rem;
  color: var(--accent);
  font-weight: 700;
  pointer-events: none;
}
.term-input {
  display: block;
  width: 100%;
  padding: .5rem .5rem .55rem 1.4rem;
  border: 0;
  border-bottom: 1px dashed rgba(120, 160, 255, .28);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  caret-color: var(--accent);
  font: 400 1rem/1.5 var(--font-mono);
  transition: border-color .2s ease, background-color .2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.term-input::placeholder { color: var(--text-mute); opacity: 1; }
.term-input:hover { border-bottom-color: rgba(120, 160, 255, .45); }
.term-input:focus {
  outline: none;
  border-bottom-style: solid;
  border-bottom-color: var(--accent);
  background: rgba(34, 211, 238, .04);
}
.term-input:focus-visible { outline: none; }
.term-input[aria-invalid="true"] { border-bottom-color: var(--danger); }
textarea.term-input {
  min-height: 7.5rem;
  max-height: 30rem;
  resize: none;
  overflow-y: auto;
}
.term-input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #0b1222 inset;
  transition: background-color 9999s ease 0s;
}
.term-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.term-error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: .76rem;
}
.term-error::before { content: "✖ "; }
.term-counter {
  margin: 6px 0 0 auto;
  color: var(--text-mute);
  font-size: .72rem;
}
.term-counter.is-over { color: var(--danger); }
.term-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 6px;
}
.term-submit .icon { width: 1.05em; height: 1.05em; }
.term-submit.is-busy .icon { animation: ey-spin 1s linear infinite; }
@keyframes ey-spin { to { transform: rotate(360deg); } }
.term-hint { font-size: .74rem; color: var(--text-mute); }
.term-log {
  max-height: 220px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(120, 160, 255, .16);
  overflow-y: auto;
  font-size: .8rem;
  line-height: 1.6;
}
.term-log:empty { display: none; }
.log-line {
  display: flex;
  gap: .6em;
  margin: 0 0 4px;
  color: var(--text-dim);
  animation: ey-fade-in .25s ease both;
}
.log-line__prefix { flex: none; color: var(--text-mute); }
.log-line__text { min-width: 0; overflow-wrap: anywhere; }
.log-line--info .log-line__prefix { color: var(--accent); }
.log-line--ok { color: var(--accent-3); }
.log-line--ok .log-line__prefix { color: var(--accent-3); }
.log-line--err { color: var(--danger); }
.log-line--err .log-line__prefix { color: var(--danger); }
.log-line--warn { color: var(--warn); }
.log-line--warn .log-line__prefix { color: var(--warn); }
.log-line a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* honeypot */
.hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---------- Toast ---------- */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(440px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: .75rem 1rem;
  border: 1px solid rgba(34, 211, 238, .35);
  border-radius: 10px;
  background: rgba(10, 15, 28, .96);
  color: var(--text);
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .9), 0 0 30px -12px rgba(34, 211, 238, .5);
  font: 500 .84rem/1.45 var(--font-mono);
  pointer-events: auto;
  animation: ey-toast-in .35s var(--ease-out) both;
  transition: opacity .3s ease, transform .3s ease;
}
.toast__icon { flex: none; color: var(--accent); font-weight: 700; }
.toast--success { border-color: rgba(52, 211, 153, .45); }
.toast--success .toast__icon { color: var(--accent-3); }
.toast--error { border-color: rgba(248, 113, 113, .45); }
.toast--error .toast__icon { color: var(--danger); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }
@keyframes ey-toast-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 15, 28, .4), rgba(10, 15, 28, .85));
}
.statusbar {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 26px;
  padding-inline: var(--gutter);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: rgba(34, 211, 238, .06);
  color: var(--text-dim);
  font: 500 .7rem/1 var(--font-mono);
  white-space: nowrap;
}
.statusbar__item--ok { color: var(--accent-3); }
.statusbar__item--branch { color: var(--accent); }
.statusbar__spacer { flex: 1; }
.statusbar__item--wide { display: none; }
@media (min-width: 640px) {
  .statusbar__item--wide { display: inline; }
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 26px var(--gutter) calc(26px + env(safe-area-inset-bottom));
  color: var(--text-dim);
  font: 500 .8rem/1.6 var(--font-mono);
}
.footer-inner p { margin: 0; }
.footer-copy { color: var(--text); }
.footer-built { color: var(--text-dim); }
.footer-egg {
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-mute);
  font: 500 .74rem/1.4 var(--font-mono);
  transition: color .2s ease, background-color .2s ease;
}
.footer-egg:hover { color: var(--accent-3); background: rgba(52, 211, 153, .06); }
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  font: 500 .78rem/1 var(--font-mono);
  transition: color .2s ease, border-color .2s ease, box-shadow .3s ease;
}
.back-to-top:hover {
  color: var(--accent);
  border-color: rgba(34, 211, 238, .45);
  box-shadow: 0 0 22px -8px rgba(34, 211, 238, .6);
}
.back-to-top .icon { width: 16px; height: 16px; }

/* ---------- Matrix mode tint ---------- */
html.is-matrix .site-header.is-scrolled { border-bottom-color: rgba(52, 211, 153, .35); }
html.is-matrix .brand__caret { background: var(--accent-3); box-shadow: 0 0 12px rgba(52, 211, 153, .9); }

/* ---------- Pointer / hover capabilities ---------- */
@media (hover: none) {
  .pc:hover { --lift: 0px; }
  .pc:hover::after { opacity: 0; }
  .btn:hover { transform: none; }
  .term-hint { display: none; }
}
@media (pointer: coarse) {
  .lang-btn { height: 34px; }
}

/* ---------- Reduced motion: crossfades only ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret,
  .brand__caret,
  .preloader__line:last-child::after,
  .cover-ph__status::before { animation: none; }
  .trace__packet { display: none; }
  .cc-status.is-available .cc-status__dot::after { animation: none; display: none; }
  .js [data-reveal] {
    transform: none;
    transition: opacity .35s linear;
    transition-delay: 0s;
  }
  .pc,
  .pc:hover,
  .pc:focus-within {
    --rx: 0deg;
    --ry: 0deg;
    --lift: 0px;
    transform: none;
    transition: border-color .3s ease, box-shadow .3s ease;
  }
  .pc-cover > img,
  .pd-cover > img { transition: opacity .3s linear; }
  .pc:hover .pc-cover > img.is-loaded,
  .pc-cover:focus-visible > img.is-loaded { transform: none; }
  .project-card.is-entering { animation: ey-fade-in .3s linear both; animation-delay: 0s; }
  .project-dialog[open] { animation: ey-fade-in .2s linear; }
  .mm-panel,
  .mobile-menu.is-open .mm-panel { transform: none; transition: none; }
  .mm-list li,
  .mobile-menu.is-open .mm-list li { transform: none; transition: opacity .2s linear; transition-delay: 0s; }
  .btn,
  .btn:hover,
  .btn:active,
  .cc-social a:hover { transform: none; }
  .toast { animation: ey-fade-in .2s linear both; }
  .toast.is-leaving { transform: none; }
  .term-submit.is-busy .icon { animation: none; }
  .skip-link { transition: none; }
}

/* ---------- Legal: footer links, contact note, cookie notice ---------- */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font: 500 .78rem/1.4 var(--font-mono);
}
.footer-legal a { color: var(--text-dim); text-decoration: none; }
.footer-legal a:hover { color: var(--accent); }

.contact-form__legal {
  margin: 14px 0 0;
  color: var(--text-mute);
  font: 400 .78rem/1.55 var(--font-mono);
}
.contact-form__legal a { color: var(--text-dim); text-underline-offset: 3px; }
.contact-form__legal a:hover { color: var(--accent); }

.cookie-notice {
  position: fixed;
  left: var(--gutter);
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px 16px;
  max-width: min(560px, calc(100vw - var(--gutter) * 2));
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(8, 12, 22, .97);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9);
  animation: ey-fade-in .4s ease both;
}
.cookie-notice[hidden] { display: none; }
.cookie-notice__text {
  margin: 0;
  color: var(--text-dim);
  font-size: .84rem;
  line-height: 1.5;
}
.cookie-notice__text a { color: var(--accent); white-space: nowrap; }
.cookie-notice__ok { flex: none; }
@media (max-width: 520px) {
  .cookie-notice {
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---------- Lite mode (phones / low-power, set by core.js) ----------
   backdrop blur over constantly animating content re-blurs every frame */
html.lite .site-header.is-scrolled,
html.lite .mobile-menu,
html.lite .project-dialog::backdrop,
html.lite .pd-backdrop {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html.lite .site-header.is-scrolled { background-color: rgba(8, 12, 22, .95); }
html.lite .mobile-menu { background: rgba(3, 5, 10, .96); }
html.lite .project-dialog::backdrop,
html.lite .pd-backdrop { background: rgba(3, 5, 10, .9); }

/* ---------- Print ---------- */
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  body::before,
  #bg-canvas,
  .preloader,
  .site-header,
  .mobile-menu,
  .toast-region,
  .statusbar,
  .trace,
  .filter-bar,
  .pc-actions,
  .contact-term,
  .back-to-top,
  .footer-egg,
  .noscript-banner,
  .project-dialog { display: none !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .journey-fallback { visibility: visible !important; min-height: 0; padding: 0 0 24px; }
  .jf-name { -webkit-text-fill-color: #000; background: none; color: #000; }
  .section { padding-block: 24px; }
  .pc,
  .contact-card { box-shadow: none; border-color: #bbb; background: #fff; transform: none !important; }
  .pc-title, .cc-name, .section-title, h1, h2, h3 { color: #000; }
  .pc-desc, .section-intro, .cc-text { color: #333; -webkit-line-clamp: unset; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card { break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
}
