:root {
  --bg: #0a0e14;
  --surface: #12161f;
  --border: #232838;
  --text: #e4e7ee;
  --text-muted: #8b93a7;
  --accent: #22d3ee;
  --accent-hover: #0eb8d4;
  --accent-secondary: #a78bfa;
  --danger: #ff3b3b;

  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.25rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --glow: 0 0 24px color-mix(in srgb, var(--accent) 35%, transparent);
  --shadow-float:
    0 0 10px 4px color-mix(in srgb, var(--bg) 55%, transparent),
    0 10px 20px rgba(0, 0, 0, 0.55);
  --shadow-pill: 0 2px 8px rgba(0, 0, 0, 0.4);
  --transition: 200ms ease;

  --timeline-line-width: 2px;
  --timeline-node-size: 10px;
  --timeline-connector-height: 2px;
  --timeline-indent: var(--space-6);
  --timeline-card-padding-y: var(--space-3);
  --timeline-line-center-x: calc(-1 * var(--timeline-indent) + (var(--timeline-line-width) / 2));
  --timeline-card-anchor-y: calc(var(--timeline-card-padding-y) + (var(--fs-lg) * 1.2 / 2));
  --timeline-pill-offset-x: -8px;
  --timeline-pill-offset-y: -9px;

  --timeline-node-duration: 0.2s;
  --timeline-connector-delay: var(--timeline-node-duration);
  --timeline-connector-duration: 80ms;
  --timeline-card-delay: calc(var(--timeline-connector-delay) + var(--timeline-connector-duration) + 30ms);
  --timeline-card-duration: 0.3s;
  --timeline-pill-delay: calc(var(--timeline-card-delay) + 280ms);
  --timeline-pill-duration: 0.4s;

  --skills-group-stagger: 180ms;
  --skills-title-duration: 260ms;
  --skills-rule-delay: var(--skills-title-duration);
  --skills-rule-duration: 280ms;
  --skills-chip-delay: calc(var(--skills-rule-delay) + var(--skills-rule-duration));
  --skills-chip-duration: 240ms;
  --skills-chip-stagger: 45ms;

  --projects-bubble-m: 100px;
  --projects-bubble-s: calc(var(--projects-bubble-m) * 0.77);
  --projects-bubble-l: calc(var(--projects-bubble-m) * 1.3);
  --projects-pop-duration: 380ms;
  --projects-unit-stagger: 90ms;
  --projects-satellite-delay: 120ms;

  --icon-size: 20px;
  --tap-target: 44px;
  --grid-cell: 48px;

  --hex-clip: polygon(41.34% 7.00%, 44.23% 5.61%, 47.11% 4.78%, 50.00% 4.50%, 52.89% 4.78%, 55.77% 5.61%, 58.66% 7.00%, 82.91% 21.00%, 85.56% 22.81%, 87.72% 24.89%, 89.40% 27.25%, 90.61% 29.89%, 91.33% 32.81%, 91.57% 36.00%, 91.57% 64.00%, 91.33% 67.19%, 90.61% 70.11%, 89.40% 72.75%, 87.72% 75.11%, 85.56% 77.19%, 82.91% 79.00%, 58.66% 93.00%, 55.77% 94.39%, 52.89% 95.22%, 50.00% 95.50%, 47.11% 95.22%, 44.23% 94.39%, 41.34% 93.00%, 17.09% 79.00%, 14.44% 77.19%, 12.28% 75.11%, 10.60% 72.75%, 9.39% 70.11%, 8.67% 67.19%, 8.43% 64.00%, 8.43% 36.00%, 8.67% 32.81%, 9.39% 29.89%, 10.60% 27.25%, 12.28% 24.89%, 14.44% 22.81%, 17.09% 21.00%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-play-state: paused !important;
    transition-duration: 0.01ms !important;
  }
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: var(--fs-base);
  overflow-x: clip;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.2;
}

h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-5);
}

h2::before {
  content: "// ";
  color: var(--accent);
  font-family: var(--font-mono);
}

h3 {
  font-size: var(--fs-lg);
}

section {
  padding: var(--space-5) var(--space-4);
  max-width: 960px;
  margin: 0 auto;
}

.btn {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: var(--fs-sm);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.btn--secondary {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text);
}

.logo42 {
  width: 18px;
  height: auto;
  fill: currentColor;
  flex-shrink: 0;
  margin-right: var(--space-2);
  position: relative;
  top: 3px;
}

.nav__logo-cursor {
  color: var(--accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--fs-sm);
}

.nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) 0;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--text);
}

.nav__link-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__lang-toggle {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3em 0.8em;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.nav__lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
}

.nav__burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
}

@media (max-width: 500px) {
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4);
    display: none;
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__burger {
    display: flex;
  }
}

@media (max-width: 870px) {
  .nav__link-text {
    display: none;
  }
}

@media (max-width: 500px) {
  .nav__link-text {
    display: inline;
  }
}

.hero {
  min-height: calc(100dvh - 65px);
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero__stack {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  gap: var(--space-6);
  width: 100%;
}

.hero__intro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: end;
  gap: var(--space-2);
}

.hero__intro::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140%;
  height: 220%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--accent) 8%, transparent), transparent 65%);
  pointer-events: none;
  z-index: -1;
}

.hero__title {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fs-3xl);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero__title::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.85em;
  margin-left: 6px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px 1px color-mix(in srgb, var(--accent) 55%, transparent);
  animation: blink 1.8s steps(1) infinite;
}

.hero__subtitle {
  font-size: var(--fs-base);
  color: var(--text-muted);
  text-align: center;
}

.hero__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: var(--space-7);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: var(--grid-cell) var(--grid-cell);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
  animation: heroGridScroll 10s linear infinite;
  mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
}

@keyframes heroGridScroll {
  to {
    background-position: var(--grid-cell) var(--grid-cell);
  }
}

.hero__glyphs {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
  mask-image: linear-gradient(to bottom, black 0%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 88%, transparent 100%);
}

.hero__glyph {
  position: absolute;
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  color: var(--accent);
  opacity: 0;
}

@keyframes heroGlyphLife {
  0% {
    opacity: 0;
    transform: rotate(var(--rotation)) translate(0, 0);
  }

  20% {
    opacity: 0.16;
  }

  80% {
    opacity: 0.16;
  }

  100% {
    opacity: 0;
    transform: rotate(var(--rotation)) translate(var(--drift-x), var(--drift-y));
  }
}

.hero__glyph-spin {
  display: inline-block;
  animation: heroGlyphSpin 8s linear infinite;
}

@keyframes heroGlyphSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.hero__glyph-inner {
  display: inline-block;
  animation: heroGlyphBob 5s ease-in-out infinite;
}

@keyframes heroGlyphBob {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(var(--bob-x1), var(--bob-y1));
  }

  50% {
    transform: translate(var(--bob-x2), var(--bob-y2));
  }

  75% {
    transform: translate(var(--bob-x3), var(--bob-y3));
  }
}

.hero__avatar {
  --avatar-size: 320px;
  position: relative;
  width: var(--avatar-size);
  height: var(--avatar-size);
  flex-shrink: 0;
}

.hero__avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: -1;
  mix-blend-mode: screen;
  animation: heroGlowBreathe 4s ease-in-out infinite;
}

@keyframes heroGlowBreathe {

  0%,
  100% {
    box-shadow:
      0 0 18px 3px color-mix(in srgb, var(--accent-hover) 60%, transparent),
      0 0 42px 10px color-mix(in srgb, var(--accent-hover) 35%, transparent),
      0 0 95px 26px color-mix(in srgb, var(--accent-secondary) 20%, transparent);
  }

  50% {
    box-shadow:
      0 0 26px 6px var(--accent-hover),
      0 0 62px 16px color-mix(in srgb, var(--accent-hover) 60%, transparent),
      0 0 125px 34px color-mix(in srgb, var(--accent-secondary) 35%, transparent);
  }
}

@media (pointer: coarse) {
  .hero__intro {
    padding-top: var(--space-4);
  }

  .hero__glyphs {
    display: none;
  }

  .hero::after {
    animation: none;
  }

  .hero__avatar::before {
    animation: none;
    box-shadow:
      0 0 18px 3px color-mix(in srgb, var(--accent-hover) 60%, transparent),
      0 0 42px 10px color-mix(in srgb, var(--accent-hover) 35%, transparent),
      0 0 95px 26px color-mix(in srgb, var(--accent-secondary) 20%, transparent);
  }
}

.hero__avatar-frame {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--glow), var(--shadow-float);
}

.hero__avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  transform: scale(1);
}

.hero__avatar-badges {
  position: absolute;
  inset: 0;
}

.hero__avatar-badges li {
  position: absolute;
  animation: heroBadgeFloat 4s ease-in-out infinite;
}

.hero__avatar-badges li:nth-child(1) {
  animation-delay: 0s;
}

.hero__avatar-badges li:nth-child(2) {
  animation-delay: -1.3s;
}

.hero__avatar-badges li:nth-child(3) {
  animation-delay: -2.6s;
}

@keyframes heroBadgeFloat {

  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }

  50% {
    transform: translate(-50%, -50%) translateY(-6px);
  }
}

.hero__avatar-badges a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-float);
  transition: border-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.hero__avatar-badges a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.1);
  box-shadow: var(--shadow-float), var(--glow);
}

.hero__avatar-badge-icon {
  width: var(--icon-size);
  height: var(--icon-size);
  fill: currentColor;
}

.hero__avatar-badge-at {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 600;
}

.hero__terminal {
  width: 100%;
  max-width: 480px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  text-align: left;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.hero__terminal p {
  display: flex;
  align-items: center;
  padding: var(--space-1) 0;
}

.hero__terminal p:nth-child(odd) {
  color: var(--text-muted);
}

.hero__terminal p:nth-child(even) {
  color: var(--accent);
  font-weight: 500;
}

.hero__terminal p.is-active::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 1em;
  margin-left: 2px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px 1px color-mix(in srgb, var(--accent) 55%, transparent);
  animation: blink 1.1s steps(1) infinite;
}

.hero__terminal p.hero__terminal-error {
  color: var(--danger);
}

.hero__cta {
  display: none;
  gap: var(--space-3);
}

.hero__actions {
  display: flex;
  align-self: start;
}

@media (max-width: 800px) {
  .hero__title {
    display: block;
    text-align: center;
  }

  .hero__intro {
    padding-top: var(--space-4);
  }

  .hero__row {
    flex-direction: column;
    text-align: center;
    gap: var(--space-5);
  }

  .hero__avatar {
    order: -1;
    --avatar-size: 200px;
  }

  .hero__content {
    align-items: center;
  }

  .hero__avatar-badges {
    display: none;
  }

  .hero__cta {
    display: flex;
  }

  .hero__actions {
    display: none;
  }
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.about p {
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: 1.7;
  text-align: justify;
  text-align-last: left;
}

.about p+p {
  margin-top: var(--space-4);
}

.about.is-observing .about__text {
  opacity: 0;
  filter: blur(1px);
}

.about.is-visible .about__text {
  animation: aboutRevealBlur 0.7s ease-out both;
}

.about.is-visible .about__text:nth-of-type(1) {
  animation-delay: 200ms;
}

.about.is-visible .about__text:nth-of-type(2) {
  animation-delay: 400ms;
}

.about.is-visible .about__text:nth-of-type(3) {
  animation-delay: 600ms;
}

@keyframes aboutRevealBlur {
  from {
    opacity: 0;
    filter: blur(1px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-left: var(--space-2);
  padding-left: var(--timeline-indent);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: var(--timeline-line-width);
  height: 100%;
  background: linear-gradient(to bottom, var(--border) 0%, var(--border) 85%, transparent 100%);
}

.timeline__item {
  position: relative;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(var(--timeline-line-center-x) - (var(--timeline-node-size) / 2));
  top: calc(var(--timeline-card-anchor-y) - (var(--timeline-node-size) / 2));
  width: var(--timeline-node-size);
  height: var(--timeline-node-size);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 8px 1px color-mix(in srgb, var(--accent) 55%, transparent);
}

.timeline__connector {
  position: absolute;
  left: calc(var(--timeline-line-center-x) + (var(--timeline-node-size) / 2));
  top: calc(var(--timeline-card-anchor-y) - (var(--timeline-connector-height) / 2));
  width: var(--space-4);
  height: var(--timeline-connector-height);
  background: var(--accent);
  transform-origin: left;
}

.timeline__card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--timeline-card-padding-y) var(--space-4);
  box-shadow: var(--shadow-float);
  transform-origin: left center;
}

.timeline__card-glow {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 0% 50%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%);
}

.timeline__card-year {
  position: absolute;
  top: var(--timeline-pill-offset-y);
  right: var(--timeline-pill-offset-x);
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pill);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  line-height: 1.3;
}

.timeline__item.is-observing::before {
  transform: scale(0);
}

.timeline__item.is-observing .timeline__connector {
  transform: scaleX(0);
}

.timeline__item.is-observing .timeline__card {
  transform: scale(0.15);
  opacity: 0;
}

.timeline__item.is-observing .timeline__card-year {
  transform: scale(0.5);
  opacity: 0;
}

.timeline__item.is-visible::before {
  animation: timelineNodePop var(--timeline-node-duration) cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.timeline__item.is-visible .timeline__connector {
  animation: timelineConnectorDraw var(--timeline-connector-duration) linear both;
  animation-delay: var(--timeline-connector-delay);
}

.timeline__item.is-visible .timeline__card {
  animation: timelineCardSpawn var(--timeline-card-duration) cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--timeline-card-delay);
}

.timeline__item.is-visible .timeline__card-year {
  animation: timelinePillPop var(--timeline-pill-duration) ease both;
  animation-delay: var(--timeline-pill-delay);
}

@keyframes timelineNodePop {
  0% {
    transform: scale(0);
  }

  60% {
    transform: scale(1.4);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes timelineConnectorDraw {
  0% {
    transform: scaleX(0);
  }

  100% {
    transform: scaleX(1);
  }
}

@keyframes timelineCardSpawn {
  0% {
    transform: scale(0.15);
    opacity: 0;
  }

  60% {
    transform: scale(1.1);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes timelinePillPop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.timeline__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  padding-right: var(--space-6);
}

.job__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--text-muted);
}

.job__tasks {
  margin-top: var(--space-1);
  padding-left: var(--space-4);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.job__tasks li {
  list-style: disc;
  margin-bottom: var(--space-1);
}

.icon-sprite {
  display: none;
}

.skills__groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

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

.skills__group:nth-of-type(1) {
  --group-i: 0;
}

.skills__group:nth-of-type(2) {
  --group-i: 1;
}

.skills__group:nth-of-type(3) {
  --group-i: 2;
  grid-column: 1 / -1;
}

.skills__group-title {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.skills__group-rule {
  display: block;
  height: 1px;
  margin: var(--space-2) 0 var(--space-3);
  background: var(--accent);
  transform-origin: left;
}

.skills.is-observing .skills__group-title {
  opacity: 0;
}

.skills.is-observing .skills__group-rule {
  transform: scaleX(0);
}

.skills.is-observing .tag {
  opacity: 0;
  transform: translateY(4px);
}

.skills.is-visible .skills__group-title {
  animation: skillsTitleIn var(--skills-title-duration) ease both;
  animation-delay: calc(var(--group-i) * var(--skills-group-stagger));
}

.skills.is-visible .skills__group-rule {
  animation: skillsRuleDraw var(--skills-rule-duration) ease both;
  animation-delay: calc(var(--group-i) * var(--skills-group-stagger) + var(--skills-rule-delay));
}

.skills.is-visible .tag {
  animation: skillsChipIn var(--skills-chip-duration) ease both;
  animation-delay: calc(var(--group-i) * var(--skills-group-stagger) + var(--skills-chip-delay) + var(--skills-chip-stagger) * var(--tag-i, 0));
}

.skills.is-visible .tag-list .tag:nth-child(1) {
  --tag-i: 0;
}

.skills.is-visible .tag-list .tag:nth-child(2) {
  --tag-i: 1;
}

.skills.is-visible .tag-list .tag:nth-child(3) {
  --tag-i: 2;
}

.skills.is-visible .tag-list .tag:nth-child(4) {
  --tag-i: 3;
}

.skills.is-visible .tag-list .tag:nth-child(5) {
  --tag-i: 4;
}

@keyframes skillsTitleIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes skillsRuleDraw {
  0% {
    transform: scaleX(0);
  }

  100% {
    transform: scaleX(1);
  }
}

@keyframes skillsChipIn {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 25%, transparent);
}

.tag__icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

.projects {
  position: relative;
  z-index: 0;
}

.projects::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="216" height="216"><filter id="projectsGrain"><feTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="2" stitchTiles="stitch"/><feColorMatrix type="matrix" values="0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.045 0"/></filter><rect width="216" height="216" filter="url(%23projectsGrain)"/></svg>'),
    repeating-radial-gradient(ellipse at 34% 42%, transparent 0 34px, rgba(34, 211, 238, .05) 34px 35px, transparent 35px 74px),
    repeating-radial-gradient(ellipse at 80% 62%, transparent 0 41px, rgba(167, 139, 250, .045) 41px 42px, transparent 42px 84px);
  background-size: 216px 216px, auto, auto;
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, black 0%, black 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, black 0%, black 55%, transparent 100%);
}

.projects__stage {
  position: relative;
  height: 320px;
}

.unit {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  transform: translate(-50%, -50%);
}

.unit:hover,
.unit:focus-within {
  z-index: 30;
}

.projects__stage.is-observing .unit {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

.projects__stage.is-visible .unit {
  animation: unitPop var(--projects-pop-duration) cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--delay);
}

@keyframes unitPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }

  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.18);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.unit__bubble {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: box-shadow var(--transition), transform var(--transition);
}

.unit__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--bg) 65%, transparent)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8));
}

.unit__plate {
  position: absolute;
  inset: 2px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  clip-path: var(--hex-clip);
}

.unit__bubble::before {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: var(--space-3);
  height: 100%;
}

.unit--flip-left .unit__bubble::before {
  left: auto;
  right: 100%;
}

.unit--s .unit__bubble {
  width: var(--projects-bubble-s);
  height: var(--projects-bubble-s);
}

.unit--m .unit__bubble {
  width: var(--projects-bubble-m);
  height: var(--projects-bubble-m);
}

.unit--l .unit__bubble {
  width: var(--projects-bubble-l);
  height: var(--projects-bubble-l);
}

.unit__img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.01);
  clip-path: var(--hex-clip);
}

.unit__hex {
  position: absolute;
  inset: 0;
  background: var(--accent);
  clip-path: var(--hex-clip);
}

.unit--l .unit__visual {
  animation: hexGlowBreathe 4s ease-in-out infinite;
}

@keyframes hexGlowBreathe {

  0%,
  100% {
    filter:
      drop-shadow(0 0 6px color-mix(in srgb, var(--bg) 65%, transparent)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 8px color-mix(in srgb, var(--accent-hover) 50%, transparent)) drop-shadow(0 0 18px color-mix(in srgb, var(--accent-hover) 30%, transparent)) drop-shadow(0 0 38px color-mix(in srgb, var(--accent-secondary) 16%, transparent));
  }

  50% {
    filter:
      drop-shadow(0 0 6px color-mix(in srgb, var(--bg) 65%, transparent)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 12px color-mix(in srgb, var(--accent-hover) 85%, transparent)) drop-shadow(0 0 26px color-mix(in srgb, var(--accent-hover) 55%, transparent)) drop-shadow(0 0 55px color-mix(in srgb, var(--accent-secondary) 28%, transparent));
  }
}

@media (pointer: coarse) {
  .unit--l .unit__visual {
    animation: none;
  }
}

.unit--plate .unit__img {
  z-index: 1;
  width: 62%;
  height: 62%;
  transform: none;
  clip-path: none;
}

.unit--plate-fill .unit__clip {
  position: absolute;
  inset: 2px;
  clip-path: var(--hex-clip);
}

.unit--plate-fill .unit__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.2);
  clip-path: none;
}

.unit--invert .unit__img {
  filter: invert(1);
}

.unit__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.unit:hover .unit__bubble,
.unit:focus-within .unit__bubble {
  transform: scale(1.06);
}

.unit__detail {
  position: absolute;
  left: 100%;
  top: 50%;
  width: max-content;
  min-width: 440px;
  max-width: calc(100vw - 2rem);
  margin-left: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: 0 0 6px color-mix(in srgb, var(--bg) 65%, transparent), 0 4px 8px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translate(-6px, -50%);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  text-align: left;
}

.unit--flip-left .unit__detail {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: var(--space-3);
  transform: translate(6px, -50%);
}

.unit:hover .unit__detail,
.unit:focus-within .unit__detail {
  opacity: 1;
  transform: translate(0, -50%);
  pointer-events: auto;
}

@media (max-width: 1080px) {

  .unit:hover .unit__detail,
  .unit:focus-within .unit__detail {
    opacity: 0;
    pointer-events: none;
  }
}

.unit__detail .tag-list {
  flex-wrap: nowrap;
}

.unit__detail.is-modal-open {
  position: fixed;
  left: 50%;
  top: 50%;
  right: auto;
  margin: 0;
  min-width: 0;
  width: min(calc(100vw - 2rem), 380px);
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: auto;
  z-index: 999;
}

.unit__detail.is-modal-open .tag-list {
  flex-wrap: wrap;
}

.unit__detail .tag {
  background: var(--bg);
  flex-shrink: 0;
}

.unit__detail-title {
  font-size: var(--fs-base);
  margin-bottom: var(--space-2);
}

.unit__detail-text {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-3);
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  contain: inline-size;
}

.unit__detail-link {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent);
  transition: color var(--transition);
}

.unit__detail-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.faq-item+.faq-item {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border);
}

.faq-item__q {
  font-size: var(--fs-base);
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.faq-item__a {
  color: var(--text-muted);
  line-height: 1.6;
}

.stage-info__more {
  margin-top: var(--space-5);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.stage-info__more a {
  color: var(--accent);
  transition: color var(--transition);
}

.stage-info__more a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer__text {
  width: 100%;
  max-width: 912px;
  color: var(--text-muted);
}

.site-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  transition: border-color var(--transition), color var(--transition);
}

.site-footer__links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.site-footer__icon {
  width: var(--icon-size);
  height: var(--icon-size);
  fill: currentColor;
}

.site-footer__at {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--icon-size);
  height: var(--icon-size);
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1;
  position: relative;
  bottom: 2px;
}

.site-footer__credit {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.toast {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  z-index: 200;
  transform: translate(-50%, 10px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-float);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

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