:root {
  color-scheme: dark;
  --bg: #07090f;
  --surface: rgba(15, 18, 30, 0.72);
  --surface-strong: #111522;
  --text: #f4f6fb;
  --muted: #9299aa;
  --line: rgba(255, 255, 255, 0.1);
  --cyan: #5ee7ff;
  --violet: #8c6cff;
  --lime: #c8ff66;
  --pink: #ff6ac2;
  --max-width: 1380px;
  --display: "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--violet) var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 52% -10%, rgba(93, 78, 180, 0.13), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 90%);
  mask-image: linear-gradient(to bottom, black, transparent 90%);
  content: "";
  pointer-events: none;
}

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

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

#signal-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.48;
  pointer-events: none;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.12;
  pointer-events: none;
}

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

.ambient-two {
  bottom: 5%;
  left: -18rem;
  background: var(--violet);
}

.section-shell {
  width: min(calc(100% - 64px), var(--max-width));
  margin-inline: auto;
}

/* Keyboard users can jump past the hero; visible only when focused. */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 60;
  padding: 10px 14px;
  border: 1px solid var(--cyan);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 650;
  transform: translateY(-200%);
  transition: transform 160ms ease;
}

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

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(calc(100% - 36px), 1440px);
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 9, 15, 0.68);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(140%);
  transform: translateX(-50%);
}

.brand {
  display: flex;
  align-items: center;
  width: max-content;
  font-size: 0.74rem;
  font-weight: 720;
  letter-spacing: 0.14em;
}

.nav-pill {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.035);
}

.nav-pill a {
  padding: 8px 14px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease;
}

.nav-pill a:hover,
.nav-pill a:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  outline: none;
}

.header-link {
  justify-self: end;
  padding: 9px 12px;
  font-size: 0.78rem;
  font-weight: 650;
}

.header-link span,
.button span,
.contact-action span {
  display: inline-block;
  margin-left: 6px;
  transition: transform 180ms ease;
}

.header-link:hover span,
.button:hover span,
.contact-action:hover span {
  transform: translate(3px, -3px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(420px, 0.93fr);
  align-items: center;
  min-height: 86svh;
  padding-block: 104px 56px;
}

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

.section-index,
.portfolio-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3.5rem, 5.8vw, 6rem);
  font-weight: 760;
  line-height: 0.87;
  letter-spacing: -0.072em;
}

.gradient-text {
  display: block;
  /* Extend the painted area below the tight line box so descenders (j, q) are not clipped by background-clip: text. */
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  background: linear-gradient(100deg, var(--cyan), var(--violet));
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 25px rgba(94, 231, 255, 0.1));
}

.hero-intro {
  max-width: 620px;
  margin: 26px 0 0;
  color: #aeb4c3;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  line-height: 1.65;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 680;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.button-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(12px);
}

.button-ghost:hover {
  border-color: rgba(94, 231, 255, 0.3);
  background: rgba(94, 231, 255, 0.06);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
  perspective: 1200px;
}

.core-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(35vw, 500px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transition: transform 220ms ease-out;
}

.core-stage::before {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 108, 255, 0.12), transparent 67%);
  filter: blur(10px);
  content: "";
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  box-shadow: inset 0 0 40px rgba(94, 231, 255, 0.025);
}

.orbit::before {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
  content: "";
}

.orbit-one {
  inset: 4%;
  border-style: dashed;
  animation: rotate 28s linear infinite;
}

.orbit-two {
  inset: 17%;
  border-color: rgba(140, 108, 255, 0.23);
  animation: rotate-reverse 19s linear infinite;
}

.orbit-two::before {
  background: var(--violet);
  box-shadow: 0 0 16px var(--violet);
}

.orbit-three {
  inset: 30%;
  border-style: dotted;
  animation: rotate 13s linear infinite;
}

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

.portrait-shell {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44%;
  aspect-ratio: 1;
  border: 1px solid rgba(196, 222, 255, 0.28);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(94, 231, 255, 0.025) 40%, rgba(140, 108, 255, 0.09)),
    rgba(10, 13, 22, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -18px 38px rgba(140, 108, 255, 0.08),
    0 0 0 9px rgba(255, 255, 255, 0.014),
    0 0 90px rgba(94, 231, 255, 0.16);
  backdrop-filter: blur(14px) saturate(125%);
}

.portrait-shell::before {
  position: absolute;
  inset: 5%;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: inset 0 0 28px rgba(94, 231, 255, 0.07);
  content: "";
  pointer-events: none;
}

.portrait-core {
  position: relative;
  z-index: 1;
  width: 82%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(94, 231, 255, 0.22);
  border-radius: 50%;
  background: #111522;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.34);
}

.portrait-core img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.orbit-label {
  position: absolute;
  z-index: 3;
  display: flex;
  gap: 7px;
  align-items: center;
  color: #d5dbe6;
  font-family: var(--mono);
  font-size: clamp(0.54rem, 0.6vw, 0.66rem);
  font-weight: 590;
  letter-spacing: 0.11em;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(7, 9, 15, 0.95);
  white-space: nowrap;
}

.orbit-label::before {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  content: "";
  opacity: 0.8;
}

.label-xai {
  top: 3%;
  left: 29%;
  color: #ebe5ff;
  font-size: clamp(0.68rem, 0.76vw, 0.82rem);
}
.label-security { top: 24%; right: 2%; }
.label-xr { right: 7%; bottom: 14%; }
.label-vision { bottom: 14%; left: 1%; }

.orbit-label-foundation {
  color: #858d9d;
  font-size: clamp(0.47rem, 0.52vw, 0.56rem);
  font-weight: 540;
  letter-spacing: 0.08em;
  opacity: 0.72;
}

.orbit-label-foundation::before {
  width: 3px;
  height: 3px;
  box-shadow: none;
  opacity: 0.55;
}

.label-fullstack { top: 29%; left: 7%; }
.label-architecture { top: 48%; right: 3%; }
.label-devops { bottom: 24%; left: 15%; }

.scroll-gateway {
  --gateway-x: 50%;
  --gateway-y: 50%;
  position: relative;
  grid-column: 1 / -1;
  justify-self: center;
  z-index: 5;
  display: flex;
  gap: 22px;
  align-items: center;
  min-width: 278px;
  padding: 9px 10px 9px 20px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(rgba(11, 14, 23, 0.72), rgba(8, 11, 18, 0.76)) padding-box,
    linear-gradient(120deg, rgba(94, 231, 255, 0.32), rgba(255, 255, 255, 0.08) 48%, rgba(140, 108, 255, 0.28)) border-box;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(125%);
  transform: none;
  transition: box-shadow 260ms ease, transform 260ms ease;
}

.scroll-gateway::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--gateway-x) var(--gateway-y), rgba(94, 231, 255, 0.13), transparent 38%);
  content: "";
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.scroll-gateway:hover,
.scroll-gateway:focus-visible {
  box-shadow: 0 18px 52px rgba(36, 173, 211, 0.17);
  transform: translateY(-4px);
}

.scroll-gateway:hover::before,
.scroll-gateway:focus-visible::before {
  opacity: 1;
}

.gateway-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
}

.gateway-copy small {
  color: #8a92a3;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
}

.gateway-copy strong {
  color: #d9dee8;
  font-size: 0.78rem;
  font-weight: 590;
  letter-spacing: 0.01em;
  transition: color 220ms ease;
}

.scroll-gateway:hover .gateway-copy strong,
.scroll-gateway:focus-visible .gateway-copy strong {
  color: #f3fbff;
}

.gateway-energy {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid rgba(94, 231, 255, 0.22);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(94, 231, 255, 0.08), rgba(140, 108, 255, 0.07));
  box-shadow: inset 0 0 18px rgba(94, 231, 255, 0.04);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.scroll-gateway:hover .gateway-energy,
.scroll-gateway:focus-visible .gateway-energy {
  border-color: rgba(94, 231, 255, 0.5);
  box-shadow: inset 0 0 20px rgba(94, 231, 255, 0.1), 0 0 22px rgba(94, 231, 255, 0.12);
  transform: translateY(2px);
}

.gateway-energy b {
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 1px solid rgba(203, 247, 255, 0.8);
  border-bottom: 1px solid rgba(203, 247, 255, 0.8);
  transform: rotate(45deg);
}

.glance {
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.glance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.glance-column {
  --glance-accent: var(--cyan);
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 30px 36px 30px 0;
}

.glance-column + .glance-column {
  padding: 30px 0 30px 36px;
  border-left: 1px solid var(--line);
}

.glance-research { --glance-accent: var(--violet); }

.glance-label {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--glance-accent);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.glance-label::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--glance-accent);
  box-shadow: 0 0 12px var(--glance-accent);
  content: "";
}

.glance-column p {
  max-width: 52ch;
  margin: 0;
  color: #c2c7d3;
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  line-height: 1.6;
}

.work,
.research,
.recognition,
.contact {
  padding-block: clamp(90px, 9vw, 130px);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: 50px;
  align-items: end;
  margin-bottom: 48px;
}

.section-index {
  display: block;
  margin-bottom: 20px;
  color: var(--cyan);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.4rem, 4.8vw, 5rem);
  font-weight: 720;
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.section-heading > p {
  justify-self: end;
  max-width: 330px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.hero-news {
  position: relative;
  z-index: 4;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 145px minmax(0, 1fr) 122px;
  min-width: 0;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid rgba(94, 231, 255, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(112deg, rgba(94, 231, 255, 0.05), rgba(140, 108, 255, 0.03)),
    rgba(11, 14, 23, 0.68);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(16px);
}

.hero-news-heading {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.hero-news-heading span {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-news-heading i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 11px rgba(94, 231, 255, 0.8);
}

.hero-news-heading p {
  margin: 0;
  color: #737c8e;
  font-size: 0.72rem;
}

.hero-news-feed {
  max-height: 154px;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.hero-news-feed::-webkit-scrollbar { display: none; }

.hero-news-feed:focus-visible {
  outline: 1px solid rgba(94, 231, 255, 0.48);
  outline-offset: -2px;
}

.hero-news-track {
  display: flex;
  flex-direction: column;
}

.hero-news-item {
  display: grid;
  flex: 0 0 66px;
  grid-template-columns: 85px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 66px;
  padding: 9px 17px 9px 22px;
  scroll-snap-align: start;
}

.hero-news-item + .hero-news-item { border-top: 1px solid var(--line); }

.hero-news-meta {
  display: grid;
  gap: 5px;
}

.hero-news-meta time {
  color: #dce2ec;
  font-size: 1rem;
  font-weight: 660;
}

.hero-news-meta span,
.hero-news-controls output {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-news-meta span { color: #788296; }

.hero-news-story {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hero-news-story h2 {
  margin: 0;
  color: #edf2fa;
  font-size: clamp(1rem, 1.55vw, 1.3rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.hero-news-story p {
  margin: 0;
  color: #7f899b;
  font-size: 0.72rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.hero-news-controls {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding-inline: 12px;
  border-left: 1px solid var(--line);
}

.hero-news-controls button {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  aspect-ratio: 1;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid rgba(94, 231, 255, 0.22);
  border-radius: 50%;
  background: rgba(94, 231, 255, 0.035);
  color: #b9c7d7;
  font: inherit;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.hero-news-controls button:hover:not(:disabled),
.hero-news-controls button:focus-visible {
  border-color: rgba(94, 231, 255, 0.55);
  background: rgba(94, 231, 255, 0.1);
  color: var(--cyan);
  outline: none;
}

.hero-news-controls button:disabled {
  cursor: default;
  opacity: 0.28;
}

.hero-news-controls output {
  display: flex;
  gap: 3px;
  align-items: center;
  color: #8993a6;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}

.hero-news-controls output i {
  color: #515a6a;
  font-style: normal;
}

.skill-matrix {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.018);
  overflow: hidden;
}

.skill-group {
  position: relative;
  min-height: 132px;
  padding: 28px;
  border-right: 1px solid var(--line);
  transition: background 220ms ease;
}

.skill-group:last-child { border-right: 0; }

.skill-group::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 220ms ease, transform 350ms ease;
}

.skill-group:hover {
  background: rgba(94, 231, 255, 0.035);
}

.skill-group:hover::after {
  opacity: 0.7;
  transform: scaleX(1);
}

.skill-group > span,
.career-heading,
.career-step > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
}

.skill-group p {
  margin: 22px 0 0;
  color: #d3d8e3;
  font-size: clamp(0.9rem, 1.25vw, 1.1rem);
  line-height: 1.6;
}

.career {
  margin-top: 18px;
  padding: 26px 28px 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(140, 108, 255, 0.045), transparent 45%),
    rgba(255, 255, 255, 0.014);
}

.career-heading {
  display: flex;
  justify-content: space-between;
}

.career-heading span:first-child { color: var(--text); }

.career-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin-top: 36px;
}

.career-track::before {
  position: absolute;
  top: 4px;
  right: 3%;
  left: 3%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.13), var(--violet), var(--cyan));
  content: "";
}

.career-step {
  position: relative;
  display: grid;
  gap: 10px;
  padding-top: 25px;
}

.career-step i {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 9px;
  height: 9px;
  border: 2px solid #181c29;
  border-radius: 50%;
  background: #6f7890;
  box-shadow: 0 0 0 3px rgba(111, 120, 144, 0.12);
}

.career-step.is-current i {
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(94, 231, 255, 0.1), 0 0 18px var(--cyan);
}

.career-step strong {
  max-width: 210px;
  font-size: clamp(0.9rem, 1.2vw, 1.08rem);
  font-weight: 560;
  line-height: 1.4;
}

/* Portfolio card — one component shared by the engineering and research grids.
   Anatomy: visual (SVG glyph) → kicker → title → summary → meta (where the link goes). */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}

.work-grid .portfolio-card:nth-child(-n + 2) { grid-column: span 3; }
.work-grid .portfolio-card:nth-child(n + 3) { grid-column: span 2; }
.research-grid .portfolio-card { grid-column: span 2; }

.portfolio-card {
  --card-accent: var(--cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 400px;
  overflow: hidden;
  padding: 18px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: #0d1019;
  cursor: pointer;
  outline: none;
  transform-style: preserve-3d;
  transition: border-color 240ms ease, transform 220ms ease-out, box-shadow 240ms ease;
}

.portfolio-card::after {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--card-accent), transparent 68%);
  content: "";
  opacity: 0.16;
  pointer-events: none;
  transition: transform 500ms cubic-bezier(.2,.8,.2,1), opacity 300ms ease;
}

.portfolio-card:hover,
.portfolio-card:focus-visible {
  border-color: color-mix(in srgb, var(--card-accent) 52%, transparent);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.28),
    inset 0 0 44px color-mix(in srgb, var(--card-accent) 6%, transparent);
}

.portfolio-card:hover::after {
  opacity: 0.26;
  transform: scale(1.25);
}

.card-games { --card-accent: #ff9c62; }
.card-cinematic { --card-accent: #f1c86b; }
.card-ar { --card-accent: var(--cyan); }
.card-vr { --card-accent: var(--violet); }
.card-vision { --card-accent: var(--lime); }
.card-xai { --card-accent: var(--pink); }
.card-paper { --card-accent: var(--cyan); }
.card-thermal { --card-accent: #ff9c62; }
.card-scorecard { --card-accent: var(--lime); }

.card-visual {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 190px;
  margin: -18px -22px 0;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--card-accent) 16%, transparent), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  color: var(--card-accent);
}

.card-visual svg {
  width: auto;
  height: 62%;
  max-width: 78%;
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--card-accent) 40%, transparent));
  transition: transform 400ms cubic-bezier(.2,.8,.2,1);
}

.scorecard-award {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  color: var(--card-accent);
  pointer-events: none;
}

.scorecard-award svg {
  width: 36px;
  height: 36px;
  max-width: none;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--card-accent) 56%, transparent));
}

.work-grid .portfolio-card[href*="youtube.com"] .card-visual::before {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  width: 32px;
  height: 22px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--card-accent) 72%, transparent);
  border-radius: 6px;
  background: rgba(11, 14, 23, 0.58);
  color: var(--card-accent);
  content: "▶";
  font-size: 0.62rem;
  line-height: 1;
  text-indent: 1px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--card-accent) 16%, transparent);
  pointer-events: none;
  transition: background 180ms ease, border-color 180ms ease;
}

.work-grid .portfolio-card[href*="youtube.com"]:hover .card-visual::before {
  border-color: var(--card-accent);
  background: color-mix(in srgb, var(--card-accent) 14%, rgba(11, 14, 23, 0.72));
}

.portfolio-card:hover .card-visual svg { transform: scale(1.06); }

.card-body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-right: 52px;
}

.portfolio-kicker { color: var(--card-accent); font-size: 0.66rem; }

.portfolio-card h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.1vw, 2.1rem);
  font-weight: 660;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.award-highlight {
  color: var(--card-accent);
  font-weight: 650;
}

.card-summary {
  max-width: 40ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.card-meta {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  color: #8a92a3;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-youtube {
  display: none;
}

.card-arrow {
  position: absolute;
  right: 22px;
  bottom: 23px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--mono);
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
}

.portfolio-card:hover .card-arrow {
  border-color: color-mix(in srgb, var(--card-accent) 50%, transparent);
  background: var(--card-accent);
  color: #080a0f;
  box-shadow: 0 0 22px color-mix(in srgb, var(--card-accent) 35%, transparent);
  transform: rotate(12deg);
}

.recognition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.credential-panel {
  --credential-accent: var(--cyan);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--credential-accent) 5%, transparent), transparent 42%),
    rgba(255, 255, 255, 0.014);
}

.certificate-panel { --credential-accent: var(--violet); }

.credential-panel-heading {
  display: flex;
  justify-content: space-between;
  padding: 19px 21px;
  color: #838b9b;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
}

.credential-panel-heading span:last-child {
  color: var(--credential-accent);
}

.recognition-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  transition: background 220ms ease, padding 220ms ease;
}

.recognition-item:hover,
.recognition-item:focus-visible {
  padding-left: 24px;
  background: color-mix(in srgb, var(--credential-accent) 6%, transparent);
}

.recognition-item i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--credential-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--credential-accent) 75%, transparent);
}

.recognition-item > span {
  display: grid;
  gap: 5px;
}

.recognition-item strong {
  color: #dde2eb;
  font-size: clamp(0.94rem, 1.25vw, 1.08rem);
  font-weight: 580;
}

.recognition-item small {
  color: #858d9d;
  font-family: var(--mono);
  font-size: clamp(0.66rem, 0.78vw, 0.73rem);
  line-height: 1.45;
}

.recognition-item b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #929aaa;
  font-size: 0.74rem;
  font-weight: 500;
  transition: border-color 200ms ease, color 200ms ease, transform 200ms ease;
}

.recognition-item:hover b,
.recognition-item:focus-visible b {
  border-color: color-mix(in srgb, var(--credential-accent) 45%, transparent);
  color: var(--credential-accent);
  transform: translate(2px, -2px);
}

.contact {
  padding-bottom: 34px;
}

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

.contact-action {
  display: inline-flex;
  align-items: center;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  color: #d8dde7;
  font-family: var(--mono);
  font-size: clamp(0.82rem, 1.3vw, 1rem);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.contact-action:hover {
  border-color: rgba(94, 231, 255, 0.36);
  background: rgba(94, 231, 255, 0.055);
  color: var(--cyan);
}

.contact-linkedin {
  background: rgba(140, 108, 255, 0.045);
}

.footer-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 35px;
  align-items: center;
  margin-top: 150px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: #8a92a3;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a { transition: color 180ms ease; }
.social-links a:hover { color: var(--cyan); }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms cubic-bezier(.2,.75,.2,1), transform 800ms cubic-bezier(.2,.75,.2,1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 132px;
  }

  .hero-copy { max-width: 870px; }
  .hero-news { grid-row: 2; margin-top: 24px; }
  .hero-visual { min-height: 510px; }
  .core-stage { width: min(72vw, 520px); }
  .scroll-gateway { margin-bottom: 26px; }

  .work-grid .portfolio-card:nth-child(n),
  .research-grid .portfolio-card { grid-column: span 3; }
  .work-grid .portfolio-card:last-child { grid-column: span 3; }
  .research-grid .portfolio-card:last-child { grid-column: 2 / span 4; }
}

@media (max-width: 820px) {
  .section-shell { width: min(calc(100% - 36px), var(--max-width)); }
  .site-header { grid-template-columns: 1fr auto; }
  .nav-pill { display: none; }

  .hero h1 { font-size: clamp(3.4rem, 11.5vw, 5.7rem); }
  .hero-intro { max-width: 540px; }

  .hero-news {
    grid-template-columns: 1fr;
    margin: 20px 0 0;
  }
  .hero-news-heading {
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    min-height: 54px;
    box-sizing: border-box;
    padding: 13px 120px 13px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .hero-news-heading p { display: none; }
  .hero-news-feed { max-height: 178px; }
  .hero-news-item {
    flex-basis: 76px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 16px;
    min-height: 76px;
    padding: 9px 14px;
  }
  .hero-news-controls {
    position: absolute;
    top: 13px;
    right: 8px;
    height: 28px;
    padding-inline: 6px;
    border-left: 0;
  }

  .section-heading,
  .glance-grid,
  .recognition-grid {
    grid-template-columns: 1fr;
  }

  .section-heading > p { justify-self: start; }

  .glance-column,
  .glance-column + .glance-column {
    padding: 26px 0;
    border-left: 0;
  }
  .glance-column + .glance-column { border-top: 1px solid var(--line); }

  .skill-matrix { grid-auto-flow: row; }
  .skill-group {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .skill-group:last-child { border-bottom: 0; }

  .career-track { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .career-track::before { display: none; }

  .footer-row {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 110px;
  }
}

@media (max-width: 760px) {
  /* Two cards across get too narrow for visual + title + summary; go single column. */
  .portfolio-grid { grid-template-columns: 1fr; }
  .work-grid .portfolio-card:nth-child(n),
  .work-grid .portfolio-card:last-child,
  .research-grid .portfolio-card,
  .research-grid .portfolio-card:last-child { grid-column: auto; min-height: 0; }
}

@media (max-width: 590px) {
  .site-header { top: 10px; width: calc(100% - 20px); }
  .brand-name { font-size: 0.58rem; letter-spacing: 0.09em; }
  .header-link { font-size: 0.7rem; }
  .hero { min-height: auto; padding-block: 98px 42px; }
  .hero h1 { font-size: clamp(2.65rem, 12vw, 4.1rem); }
  .hero-intro { font-size: 0.96rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .hero-actions .button { width: fit-content; }
  .hero-visual { min-height: 390px; }
  .core-stage { width: min(80vw, 400px); }
  .orbit-label {
    gap: 6px;
    font-size: 0.48rem;
    letter-spacing: 0.08em;
  }
  .orbit-label.label-xai { font-size: 0.58rem; }
  .orbit-label-foundation { font-size: 0.43rem; }
  .work,
  .research,
  .recognition,
  .contact { padding-block: 72px; }

  .section-heading { margin-bottom: 36px; }
  .section-heading h2 { font-size: clamp(2.3rem, 11vw, 3.6rem); }

  .hero-news-feed { max-height: 216px; }
  .hero-news-item {
    flex-basis: 92px;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 14px;
    min-height: 92px;
    padding: 9px 14px;
  }
  .skill-group { padding: 22px; }
  .career { padding: 22px; }
  .career-heading { gap: 12px; flex-direction: column; }
  .career-track { grid-template-columns: 1fr; margin-top: 28px; }
  .career-step {
    padding-top: 0;
    padding-left: 24px;
  }
  .career-step i { top: 5px; }

  .card-visual { height: 160px; }
}

@media (max-width: 350px) {
  .hero-news-feed { max-height: 252px; }
  .hero-news-item {
    flex-basis: 110px;
    min-height: 110px;
  }
}

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