/* ============================================================
   TOKENS — "Shard" theme (dark, default) + light theme override
   ============================================================ */
:root {
  --void: #08090C;
  --void-2: #0E1014;
  --panel: #0C0E12;
  --panel-2: #12151b;
  --line: rgba(183, 187, 198, 0.14);
  --line-soft: rgba(183, 187, 198, 0.07);

  --ice: #B7BBC6;
  --ice-dim: #7C818F;
  --ice-faint: #4A5062;
  --slate: #383E4E;
  --frost: #F2F4F7;

  --aurora-a: #7BE7DA;
  --aurora-b: #9C8CF7;
  --accent-green: #3DDC84;
  --accent-green-dim: rgba(61, 220, 132, 0.14);

  --dot: rgba(183, 187, 198, 0.16);
  --grain-op: .5;

  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease: cubic-bezier(.19, 1, .22, 1);
  --bar-h: 64px;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --void: #F6F7F2;
  --void-2: #EFF1EA;
  --panel: #FFFFFF;
  --panel-2: #FBFCF8;
  --line: rgba(15, 17, 21, 0.12);
  --line-soft: rgba(15, 17, 21, 0.06);

  --ice: #3B3F46;
  --ice-dim: #6B7078;
  --ice-faint: #9A9FA8;
  --slate: #D8DBD3;
  --frost: #0F1115;

  --aurora-a: #16A67B;
  --aurora-b: #6E56CF;
  --accent-green: #16A67B;
  --accent-green-dim: rgba(22, 166, 123, 0.12);

  --dot: rgba(15, 17, 21, 0.14);
  --grain-op: .35;

  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--void);
}

body {
  margin: 0;
  background: var(--void);
  color: var(--frost);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}

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

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 300;
}

p {
  margin: 0 0 1.1em;
  color: var(--ice);
  font-weight: 300;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--frost);
  font-weight: 500;
}

strong.accent {
  color: var(--accent-green);
  font-weight: 500;
}

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

:focus-visible {
  outline: 1px solid var(--accent-green);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 999;
  background: var(--frost);
  color: var(--void);
  padding: .75em 1.25em;
  font-family: var(--font-mono);
  font-size: .8rem;
}

.skip-link:focus {
  left: 0;
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  z-index: 100;
  background: linear-gradient(90deg, var(--aurora-a), var(--accent-green), var(--aurora-b));
  transition: width .08s linear;
  box-shadow: 0 0 10px 0 rgba(61, 220, 132, 0.5);
}

/* ============================================================
   AMBIENT VOID / DOTTED GRID
   ============================================================ */
.void-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.void-grain {
  position: absolute;
  inset: 0;
  opacity: var(--grain-op);
  background-image: radial-gradient(var(--dot) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
  transition: opacity .5s var(--ease);
}

.void-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 20%, rgba(56, 62, 78, 0.28), transparent 70%);
  transition: background .5s var(--ease);
}

:root[data-theme="light"] .void-vignette {
  background: radial-gradient(ellipse 70% 55% at 50% 15%, rgba(61, 220, 132, 0.10), transparent 70%);
}

/* soft roaming aurora blobs, purely decorative */
.void-blob {
  position: absolute;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .16;
  z-index: 0;
  animation: blobDrift 26s ease-in-out infinite alternate;
}

.void-blob--a {
  top: -10%;
  left: -10%;
  background: var(--aurora-a);
}

.void-blob--b {
  bottom: -14%;
  right: -8%;
  background: var(--aurora-b);
  animation-duration: 32s;
  animation-delay: -6s;
}

@keyframes blobDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(6vw, 4vh) scale(1.12);
  }
}

/* mouse-follow spotlight in hero */
.cursor-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(61, 220, 132, 0.10), transparent 60%);
  opacity: 0;
  transition: opacity .4s var(--ease);
}

.hero:hover .cursor-glow {
  opacity: 1;
}

/* ============================================================
   BREADCRUMB BAR
   ============================================================ */
.crumbbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 65;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--void) 90%, transparent), transparent);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--ice-dim);
  backdrop-filter: blur(6px);
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease);
  border-bottom: 1px solid transparent;
}

.crumbbar.is-scrolled {
  background: color-mix(in srgb, var(--void) 82%, transparent);
  border-bottom-color: var(--line-soft);
  backdrop-filter: blur(12px);
}

/* hamburger — mobile only */
.menu-toggle {
  display: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 70;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.menu-toggle span {
  width: 13px;
  height: 1.4px;
  background: var(--ice);
  transition: transform .3s var(--ease), opacity .3s var(--ease), background .3s var(--ease);
}

.menu-toggle:hover {
  border-color: var(--accent-green);
  background: var(--accent-green-dim);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.4px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.4px) rotate(-45deg);
}

@media (max-width:640px) {
  .menu-toggle {
    display: inline-flex;
  }
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--void) 96%, transparent);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 24px 32px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s linear .35s;
}

.mobile-nav[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}

.mobile-nav a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.6rem, 7vw, 2.2rem);
  color: var(--frost);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 16px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), color .3s var(--ease);
}

.mobile-nav[data-open="true"] a {
  opacity: 1;
  transform: none;
}

.mobile-nav[data-open="true"] a:nth-child(1) {
  transition-delay: .05s;
}

.mobile-nav[data-open="true"] a:nth-child(2) {
  transition-delay: .1s;
}

.mobile-nav[data-open="true"] a:nth-child(3) {
  transition-delay: .15s;
}

.mobile-nav[data-open="true"] a:nth-child(4) {
  transition-delay: .2s;
}

.mobile-nav[data-open="true"] a:nth-child(5) {
  transition-delay: .25s;
}

.mobile-nav[data-open="true"] a:nth-child(6) {
  transition-delay: .3s;
}

.mobile-nav a::before {
  content: attr(data-idx);
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--ice-faint);
}

.mobile-nav a:hover {
  color: var(--accent-green);
}

@media (min-width:641px) {
  .mobile-nav {
    display: none;
  }
}

.crumbbar__mark {
  color: var(--ice);
  display: flex;
  opacity: .85;
  transition: transform .4s var(--ease), opacity .3s, color .3s;
}

.crumbbar__mark:hover {
  transform: rotate(45deg);
  opacity: 1;
  color: var(--accent-green);
}

.crumbbar__cv {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ice);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .7rem;
  transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease);
}

.crumbbar__cv:hover {
  border-color: var(--accent-green);
  color: var(--frost);
  background: var(--accent-green-dim);
}

@media (max-width:520px) {
  .crumbbar__cv span {
    display: none;
  }

  .crumbbar__cv {
    padding: 7px 9px;
  }
}

.crumbbar__here {
  text-transform: lowercase;
  min-width: 80px;
  position: relative;
}

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

.crumbbar__nav a {
  color: var(--ice-dim);
  transition: color .25s var(--ease);
  position: relative;
  padding-bottom: 2px;
}

.crumbbar__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--accent-green);
  transition: right .3s var(--ease);
}

.crumbbar__nav a:hover {
  color: var(--frost);
}

.crumbbar__nav a:hover::after {
  right: 0;
}

@media (max-width:640px) {
  .crumbbar__nav {
    display: none;
  }
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ice);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .4s var(--ease), background .3s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  transform: rotate(20deg);
  background: var(--accent-green-dim);
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
}

.theme-toggle .icon-moon {
  display: none;
}

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

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ice-faint);
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent-green);
  display: inline-block;
}

.whisper {
  font-weight: 200;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  letter-spacing: -.01em;
  color: var(--frost);
  line-height: 1.15;
  margin-bottom: 36px;
  max-width: 16ch;
}

.whisper--lg {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  max-width: none;
}

.panel {
  max-width: 1180px;
  margin: 0 auto;
  padding: 150px 40px 30px;
  border-top: 1px solid var(--line-soft);
}

@media (max-width:640px) {
  .panel {
    padding: 110px 22px 10px;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border: 1px solid var(--ice-faint);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--frost);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, var(--aurora-a), var(--accent-green), var(--aurora-b));
  background-size: 220% 220%;
  opacity: 0;
  transition: opacity .4s var(--ease);
}

.btn:hover {
  border-color: transparent;
  color: var(--void);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -14px rgba(61, 220, 132, 0.45);
}

.btn:hover::before {
  opacity: 1;
  animation: btnSheen 2.2s ease infinite;
}

@keyframes btnSheen {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.btn--solid {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: var(--void);
}

.btn--solid::before {
  opacity: 0 !important;
}

.btn--solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -14px rgba(61, 220, 132, 0.55);
  color: var(--void);
}

.btn--quiet {
  border-color: var(--line);
  color: var(--ice-dim);
}

.btn--block {
  width: 100%;
  justify-content: center;
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(18px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

/* ============================================================
   HERO / SHARD
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 132px 24px 60px;
  overflow: hidden;
  contain: layout paint;
}

.shard-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shard-fallback {
  position: absolute;
  width: min(64vw, 560px);
  height: min(64vw, 560px);
  opacity: .9;
}

#shardCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Tech logo badges projected onto the shard's own vertices — positioned
   every frame from JS (shard.js) to track the rotating 3D geometry. */
.shard-icons {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.shard-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5);
  opacity: 0;
  will-change: transform, opacity;
}

.shard-icon i {
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width:640px) {
  .shard-icons {
    display: none;
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 12px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ice-dim);
  background: var(--panel);
  animation: badgeIn .9s var(--ease) both;
}

.hero__badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 var(--accent-green-dim);
  animation: dotPulse 2.2s ease-in-out infinite;
}

@keyframes dotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(61, 220, 132, .55);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(61, 220, 132, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0);
  }
}

@keyframes badgeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 480px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ice-dim);
  margin-bottom: 14px;
}

.hero__title {
  font-weight: 200;
  letter-spacing: .02em;
  font-size: clamp(2.5rem, 7.5vw, 5.2rem);
  line-height: .98;
  color: var(--frost);
  margin-bottom: 20px;
}

.hero__title .line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: lineUp 1.1s var(--ease) forwards;
}

.hero__title .line:nth-child(2) {
  animation-delay: .14s;
}

.hero__title .accent-text {
  background: linear-gradient(100deg, var(--accent-green), var(--aurora-a) 60%, var(--aurora-b));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lineUp 1.1s var(--ease) forwards, gradientDrift 6s ease-in-out infinite 1.1s;
}

@keyframes lineUp {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes gradientDrift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.hero__sub {
  max-width: 38ch;
  margin: 0 auto 30px;
  font-size: .94rem;
  color: var(--ice-dim);
}

.hero__sub .accent {
  color: var(--accent-green);
}

.hero__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.hero__socials {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ice-dim);
  background: var(--panel);
  transition: transform .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  color: var(--void);
  background: var(--accent-green);
  border-color: var(--accent-green);
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 22px -10px rgba(61, 220, 132, .55);
}

.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ice-faint);
}

.scroll-hint i {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--ice-faint), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-hint i::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-green);
  animation: hintDrop 2.4s ease-in-out infinite;
}

@keyframes hintDrop {
  0% {
    top: -100%;
  }

  60% {
    top: 100%;
  }

  100% {
    top: 100%;
  }
}

/* ============================================================
   TECH MARQUEE
   ============================================================ */
.marquee {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 22px 0;
  overflow: hidden;
  background: var(--panel);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ice-dim);
  white-space: nowrap;
}

.marquee__item i {
  font-size: 1.15rem;
  color: var(--ice-faint);
}

.marquee__item:hover,
.marquee__item:hover i {
  color: var(--accent-green);
}

@keyframes marqueeScroll {
  from {
    transform: translateX(0);
  }

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

/* ============================================================
   ABOUT
   ============================================================ */
.about__layout {
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 56px;
  align-items: start;
}

.about__text ul.about__meta {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.about__meta li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
  color: var(--frost);
  transition: padding-left .3s var(--ease), border-color .3s var(--ease);
}

.about__meta li:hover {
  padding-left: 8px;
  border-color: var(--accent-green);
}

.about__meta li span {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ice-faint);
  flex-shrink: 0;
  padding-top: 2px;
}

.about__portrait {
  position: relative;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: min(100%, 320px);
  margin: 0 auto;
  perspective: 900px;
}

/* rotating conic-gradient ring behind the circular photo */
.about__portrait-ring {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  z-index: 0;
  background: conic-gradient(from 0deg, var(--accent-green), var(--aurora-a), var(--aurora-b), var(--accent-green));
  opacity: .55;
  filter: blur(1.5px);
  animation: ringSpin 9s linear infinite;
  transition: opacity .4s var(--ease);
}

.about__portrait:hover .about__portrait-ring {
  opacity: .9;
  animation-duration: 4.5s;
}

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

.about__portrait-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  padding: 6px;
  background: var(--void);
  box-shadow: 0 22px 50px -22px rgba(0, 0, 0, 0.55);
  transform-style: preserve-3d;
  transition: transform .35s var(--ease), box-shadow .4s var(--ease);
  will-change: transform;
}

.about__portrait:hover .about__portrait-frame {
  box-shadow: 0 26px 60px -20px rgba(61, 220, 132, 0.35);
}

.about__portrait-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: 50% 18%;
  filter: grayscale(.5) contrast(1.05);
  transition: filter .4s var(--ease), transform .5s var(--ease);
}

.about__portrait:hover .about__portrait-frame img {
  filter: grayscale(0) contrast(1.05);
  transform: scale(1.04);
}

.about__portrait figcaption {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .04em;
  color: var(--ice-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  background: var(--panel);
}

.about__portrait figcaption .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(61, 220, 132, .55);
  animation: dotPulse 2.2s ease-in-out infinite;
}

@media (max-width:860px) {
  .about__layout {
    grid-template-columns: 1fr;
  }

  .about__portrait {
    order: -1;
    width: min(100%, 240px);
    margin: 0 auto 16px;
  }
}

/* ============================================================
   SKILL SCATTER — cards placed around the shard (desktop),
   collapses to an in-flow tight grid on smaller / shorter viewports
   so nothing ever overflows the hero into the next section.
   ============================================================ */
.scatter {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.scatter-card {
  pointer-events: auto;
}

.scatter-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: clamp(128px, 15vmin, 196px);
  margin-top: calc(-1 * clamp(54px, 6.4vmin, 84px));
  margin-left: calc(-1 * clamp(64px, 7.5vmin, 98px));
  background: var(--panel);
  border: 1px solid var(--line);
  padding: clamp(12px, 1.6vmin, 20px) clamp(12px, 1.6vmin, 20px) clamp(14px, 1.8vmin, 22px);
  border-radius: 3px;
  transform-origin: center;
  transform:
    rotate(var(--angle)) translate(calc(var(--radius-vmin) * 1vmin)) rotate(calc(-1 * var(--angle) + var(--tilt)));
  transition: border-color .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}

.scatter-card:hover {
  border-color: var(--accent-green);
  background: var(--panel-2);
  box-shadow: 0 18px 40px -20px rgba(61, 220, 132, 0.28);
  z-index: 3;
  transform:
    rotate(var(--angle)) translate(calc(var(--radius-vmin) * 1vmin)) rotate(calc(-1 * var(--angle) + var(--tilt))) scale(1.05);
}

.scatter-card i {
  font-size: 1.25rem;
  color: var(--ice-faint);
  filter: grayscale(1);
  opacity: .7;
  transition: filter .3s var(--ease), opacity .3s var(--ease), transform .3s var(--ease);
  display: inline-block;
}

.scatter-card:hover i {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.15) rotate(-6deg);
}

.scatter-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: .94rem;
  color: var(--frost);
  margin: 10px 0 6px;
}

.scatter-card p {
  font-family: var(--font-mono);
  font-size: .66rem;
  line-height: 1.6;
  color: var(--ice-dim);
  margin: 0;
}

.scatter-reveal {
  opacity: 0;
  transition: opacity 1s var(--ease);
}

.scatter-reveal.in-view {
  opacity: 1;
}

/* Below this size, the polar-scatter math can no longer guarantee a fit
   against the hero box — collapse to a calm, in-flow grid instead so
   cards can never bleed past the hero into About. Scatter mode now only
   engages on genuinely spacious desktop viewports. */
@media (max-width:1180px),
(max-height:840px) {
  .hero {
    padding-top: 118px;
    padding-bottom: 44px;
    min-height: auto;
  }

  .scatter {
    position: relative;
    inset: auto;
    z-index: 1;
    pointer-events: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(560px, 100%);
    margin: 34px auto 0;
  }

  .scatter-card {
    position: static;
    width: auto;
    margin: 0;
    transform: none !important;
    padding: 14px 14px 16px;
  }

  .scatter-card:hover {
    transform: translateY(-3px) !important;
  }

  .scatter-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero__content {
    order: -1;
  }
}

@media (max-width:520px) {
  .scatter {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .scatter-card h3 {
    font-size: .82rem;
  }

  .scatter-card p {
    font-size: .62rem;
    -webkit-line-clamp: 2;
  }
}

/* ============================================================
   NEUROAPP
   ============================================================ */
.neuroapp__title-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.neuroapp__logo {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 4px;
}

@media (max-width:520px) {
  .neuroapp__title-row {
    gap: 16px;
  }

  .neuroapp__logo {
    width: 150px;
    height: 150px;
  }
}

.neuroapp__text {
  max-width: 70ch;
}

.neuroapp__text p {
  font-size: .96rem;
}

/* ============================================================
   WORK
   ============================================================ */
.work-list {
  border-top: 1px solid var(--line);
}

.work-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 30px;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
  transition: background .4s var(--ease), padding-left .4s var(--ease), border-color .4s var(--ease),
    opacity 1s var(--ease) var(--stagger, 0s), transform 1s var(--ease) var(--stagger, 0s), filter 1s var(--ease) var(--stagger, 0s);
  position: relative;
}

.work-item:hover {
  background: var(--line-soft);
  padding-left: 14px;
}

.work-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-green);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .4s var(--ease);
}

.work-item:hover::before {
  transform: scaleY(1);
}

.work-item__num {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--ice-faint);
  padding-top: 6px;
  transition: color .3s var(--ease);
}

.work-item:hover .work-item__num {
  color: var(--accent-green);
}

.work-item__flag {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--aurora-a);
  margin-bottom: 10px;
}

.work-item__flag--alt {
  color: var(--aurora-b);
}

.work-item__title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.work-item__logo {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 8px;
}

.work-item h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 300;
  color: var(--frost);
  margin-bottom: 6px;
}

.work-item__tagline {
  color: var(--ice);
  font-size: .94rem;
  margin-bottom: 14px;
}

.work-item p {
  max-width: 62ch;
}

.work-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.work-item__tags li {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ice-faint);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 2px;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}

.work-item:hover .work-item__tags li {
  border-color: var(--line);
}

.work-item__tags li:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

@media (max-width:640px) {
  .work-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ============================================================
   CERTIFICATIONS — carousel of PDF certificate cards
   ============================================================ */
.cert-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.cert-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 22px;
  margin: 0 -2px;
  flex: 1;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--ice-faint) transparent;
}

.cert-track::-webkit-scrollbar {
  height: 6px;
}

.cert-track::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 99px;
}

.cert-track::-webkit-scrollbar-thumb:hover {
  background: var(--ice-faint);
}

.cert-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: min(360px, 84vw);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}

.cert-card:hover {
  border-color: var(--accent-green);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(61, 220, 132, 0.3);
}

/* Certificates are landscape (US Letter landscape ≈ 11:8.5) — matching that
   ratio here keeps the embedded PDF filling the frame instead of leaving
   blank space below a taller/portrait-shaped thumb. */
.cert-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 11/8.5;
  background: var(--void-2);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
}

/* the PDF's first page is rasterised onto this canvas by PDF.js (see main.js) —
   works on every browser, including mobile ones with no native PDF plugin.
   pointer-events off so clicks always hit the thumb wrapper (which opens the
   fullscreen modal). The canvas is drawn pre-cropped to a cover-fit, so no
   CSS object-fit is needed here. */
.cert-card__thumb canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* shown while PDF.js is fetching/rendering, or if rendering fails */
.cert-card__thumb[data-state="loading"]::before,
.cert-card__thumb[data-state="error"]::before {
  content: attr(data-message);
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 18px;
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.5;
  color: var(--ice-faint);
}

.cert-card__thumb[data-state="error"]::before {
  color: #E38686;
}

.cert-card__expand {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--void) 70%, transparent);
  color: var(--frost);
  border: 1px solid var(--line);
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: scale(.85);
  transition: opacity .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}

.cert-card__expand svg {
  width: 15px;
  height: 15px;
}

.cert-card__thumb:hover .cert-card__expand {
  opacity: 1;
  transform: scale(1);
}

.cert-card__thumb:hover .cert-card__expand {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.cert-card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cert-card__date {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ice-faint);
}

.cert-card__body h3 {
  font-size: .98rem;
  font-weight: 400;
  color: var(--frost);
  line-height: 1.35;
  margin: 2px 0 0;
}

.cert-card__inst {
  font-size: .8rem;
  color: var(--accent-green);
  margin: 0;
}

.cert-card__desc {
  font-size: .82rem;
  line-height: 1.6;
  margin: 2px 0 4px;
}

.cert-card__link {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .03em;
  color: var(--ice-dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}

.cert-card__link:hover {
  color: var(--accent-green);
  border-color: var(--accent-green);
}

.cert-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ice-dim);
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}

.cert-nav svg {
  width: 16px;
  height: 16px;
}

.cert-nav:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: var(--accent-green-dim);
}

.cert-nav:disabled {
  opacity: .35;
  cursor: default;
}

.cert-nav:disabled:hover {
  border-color: var(--line);
  color: var(--ice-dim);
  background: var(--panel);
}

@media (max-width:640px) {
  .cert-nav {
    display: none;
  }
}

/* ---------- Fullscreen certificate modal ---------- */
.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}

.cert-modal[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transition: opacity .3s var(--ease);
}

.cert-modal__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--void) 88%, transparent);
  backdrop-filter: blur(8px);
}

.cert-modal__panel {
  position: relative;
  z-index: 1;
  width: min(1000px, 100%);
  max-height: 92vh;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transform: scale(.96) translateY(10px);
  transition: transform .35s var(--ease);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6);
}

.cert-modal[data-open="true"] .cert-modal__panel {
  transform: none;
}

/* PDF.js renders every page of the document into its own <canvas>, appended
   here (see main.js) — full pages, uncropped, scrolling if there's more than
   one. Works without a native PDF plugin, so it also renders on mobile. */
.cert-modal__viewer {
  background: var(--void-2);
  align-self: stretch;
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.cert-modal__viewer canvas {
  max-width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .5);
}

.cert-modal__viewer__status {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ice-faint);
  text-align: center;
  padding: 40px 20px;
}

.cert-modal__viewer__status.is-error {
  color: #E38686;
}

.cert-modal__info {
  padding: 26px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.cert-modal__info h3 {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--frost);
  line-height: 1.3;
  margin: 2px 0 0;
}

.cert-modal__info .cert-card__desc {
  font-size: .88rem;
}

.cert-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--void) 70%, transparent);
  border: 1px solid var(--line);
  color: var(--frost);
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}

.cert-modal__close svg {
  width: 15px;
  height: 15px;
}

.cert-modal__close:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  transform: rotate(90deg);
}

@media (max-width:760px) {
  .cert-modal__panel {
    grid-template-columns: 1fr;
    max-height: 94vh;
    overflow-y: auto;
  }

  .cert-modal__viewer {
    max-height: 52vh;
  }
}

/* ============================================================
   CONTACT
   ============================================================ */
.panel--contact {
  padding-bottom: 80px;
}

.contact__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 10px;
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 6px;
}

.contact__links a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--ice);
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  transition: color .3s var(--ease), border-color .3s var(--ease), padding-left .3s var(--ease);
}

.contact__links a svg {
  width: 16px;
  height: 16px;
  color: var(--ice-faint);
  transition: color .3s var(--ease);
  flex-shrink: 0;
}

.contact__links a:hover {
  color: var(--frost);
  border-color: var(--accent-green);
  padding-left: 6px;
}

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

.contact__socials {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.contact__note {
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ice-faint);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-form label {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ice-faint);
  margin-top: 14px;
}

.contact-form input,
.contact-form textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px;
  color: var(--frost);
  font-family: var(--font-body);
  font-size: .96rem;
  font-weight: 300;
  transition: border-color .3s var(--ease);
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-green);
}

.contact-form button {
  margin-top: 26px;
}

.form-status {
  font-family: var(--font-mono);
  font-size: .78rem;
  margin-top: 12px;
  min-height: 1.2em;
  color: var(--accent-green);
}

.form-status.is-error {
  color: #E38686;
}

@media (max-width:760px) {
  .contact__layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 40px 40px;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ice-faint);
  max-width: 1180px;
  margin: 0 auto;
}

.site-footer__socials {
  display: flex;
  gap: 8px;
}

.site-footer__socials .icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-footer__socials .icon-btn svg {
  width: 13px;
  height: 13px;
}