:root {
  --bg: #0a0c0f;
  --bg-soft: rgba(255, 255, 255, 0.05);
  --panel: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.14);
  --text: #edf1f5;
  --muted: rgba(237, 241, 245, 0.62);
  --accent: #2fd97a;
  --accent-soft: #5ee8a0;
  --accent-dim: rgba(47, 217, 122, 0.14);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --sans: "Manrope", sans-serif;
  --display: "Archivo", sans-serif;
  --mono: "JetBrains Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(47, 217, 122, 0.1), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(47, 217, 122, 0.07), transparent 24%),
    linear-gradient(180deg, #0c0f13 0%, #08090b 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(47, 217, 122, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 217, 122, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
}

.page-shell {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 24px 4vw 40px;
  z-index: 1;
}

.page-shell.is-exiting {
  animation: pageExit 340ms cubic-bezier(0.4, 0, 1, 1) both;
}

.site-header,
.hero,
.portfolio-section,
.about-strip,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.site-header .brand-lockup {
  justify-self: start;
}

.site-header .page-nav {
  justify-self: center;
}

.brand-lockup {
  display: grid;
  gap: 14px;
  align-items: center;
}

.brand-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.65rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  transition: color 160ms ease;
}

.brand-name:hover {
  color: var(--accent);
}

.brand-lockup {
  animation: flyInDown 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-nav {
  animation: flyInRight 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-kicker {
  animation: flyInLeft 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-tagline {
  animation: flyInUp 700ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both;
}

.hero-bio {
  animation: flyInUp 700ms cubic-bezier(0.16, 1, 0.3, 1) 220ms both;
}

.hero-portrait {
  animation: flyInScale 800ms cubic-bezier(0.16, 1, 0.3, 1) 100ms both;
}

.section-heading {
  animation: flyInLeft 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.project-card,
.reel-card,
.tool-card,
.skill-item,
.timeline-company,
.timeline-entry,
.brand-chip {
  animation: flyInUp 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.about-quote {
  animation: flyInScale 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.site-footer {
  animation: flyInUp 600ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
}

@media (prefers-reduced-motion: reduce) {
  .brand-lockup,
  .page-nav,
  .hero-kicker,
  .hero-tagline,
  .hero-bio,
  .hero-portrait,
  .section-heading,
  .project-card,
  .reel-card,
  .tool-card,
  .skill-item,
  .timeline-company,
  .timeline-entry,
  .brand-chip,
  .skill-tree-node-anim,
  .skill-tree-node-flash-bar,
  .skill-tree-trunk,
  .skill-tree-connector,
  .about-quote,
  .site-footer {
    animation: none;
  }

  .skill-tree-trunk,
  .skill-tree-connector {
    stroke-dashoffset: 0 !important;
  }

  .skill-tree-node-anim {
    opacity: 1 !important;
    transform: none !important;
  }
}

.eyebrow,
.availability,
.hero-kicker,
.section-label,
.note-label,
.metric-label {
  margin: 0;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent-soft);
}

.availability {
  margin-top: 8px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--panel);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.social-button {
  font: inherit;
  font-family: var(--mono);
  cursor: pointer;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.nav-link {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: 0;
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms ease;
  white-space: nowrap;
}

.nav-link::before {
  content: "[";
  color: var(--line);
  margin-right: 1px;
}

.nav-link::after {
  content: "]";
  color: var(--line);
  margin-left: 1px;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--accent);
}

.nav-link:hover::before,
.nav-link:hover::after,
.nav-link[aria-current="page"]::before,
.nav-link[aria-current="page"]::after {
  color: var(--accent);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 3vw, 48px);
  align-items: center;
  padding: 42px 0 170px;
}

.hero-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(-1 * 4vw);
  right: calc(-1 * 4vw);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms ease;
}

.hero-bg.is-ready {
  opacity: 1;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 15, 0.3) 0%, rgba(10, 12, 15, 0.4) 60%, var(--bg) 100%);
}

.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) brightness(0.78);
}

.hero-copy,
.hero-side {
  position: relative;
  z-index: 1;
}

.hero-side {
  display: flex;
  align-items: center;
  justify-items: end;
  justify-content: flex-end;
  min-height: clamp(200px, 29vw, 480px);
}

.hero-portrait {
  position: relative;
  width: clamp(200px, 29vw, 480px);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(10, 12, 15, 0.95));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

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

.hero-portrait.placeholder::after {
  content: attr(data-placeholder);
  position: absolute;
  inset: auto 50% 18px auto;
  transform: translateX(50%);
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-tagline {
  margin: 8px 0 12px;
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.8vw, 6.5rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.tagline-highlight {
  display: block;
  margin-top: 10px;
  font-size: 0.4em;
  font-weight: 500;
  color: var(--accent-soft);
}

.hero--solo {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: 70px 0 220px;
  min-height: 60vh;
}

.hero--solo .hero-copy {
  max-width: 900px;
}

.hero--about {
  padding: 42px 0 56px;
}

.hero-bio {
  margin: 22px 0 0;
  max-width: 46ch;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.6;
}

.hero-bio--about {
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  max-width: 66ch;
  font-size: 1.9rem;
  line-height: 1.5;
  text-align: left;
}

.hero-bio-highlight {
  color: var(--accent-soft);
  font-weight: 700;
}

.brands-section {
  position: relative;
  overflow: hidden;
  margin: 20px calc(-1 * 4vw) 36px;
  padding: 48px 4vw 52px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  display: grid;
  gap: 28px;
  justify-items: center;
  text-align: center;
}

.brands-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(94, 232, 160, 0.22) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  pointer-events: none;
}

.brands-section > * {
  position: relative;
}

.brands-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 32px 56px;
}

.brand-chip {
  display: inline-flex;
  opacity: 0.82;
  transition: opacity 200ms ease, transform 200ms ease;
}

.brand-chip:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.brand-chip .logo-badge {
  width: auto;
  height: 68px;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
}

.brand-chip .logo-badge img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.brand-chip .logo-badge.logo-badge--natural img {
  filter: none;
}

.brand-chip .logo-badge.logo-badge--natural {
  height: 94px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  box-shadow: 0 0 22px rgba(94, 232, 160, 0.1);
}

.experience-section {
  margin-top: 44px;
  padding-top: 56px;
  padding-bottom: 56px;
  gap: 34px;
}

.experience-heading {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  color: var(--text);
}

.experience-highlight {
  color: var(--accent-soft);
}

.experience-row {
  gap: 24px 36px;
}

.experience-chip {
  display: inline-flex;
  opacity: 0.88;
  transition: opacity 200ms ease, transform 200ms ease;
}

.experience-chip:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.experience-chip .logo-badge {
  width: 80px;
  height: 80px;
  padding: 14px;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

.portfolio-section {
  padding: 60px 0 30px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: -0.01em;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.95;
}

.section-heading p {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  line-height: 1.7;
}

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

.project-card {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(55%) brightness(0.75);
  transition: filter 260ms ease, transform 400ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(47, 217, 122, 0.25);
  outline: none;
}

.project-card:hover img,
.project-card:focus-visible img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.06);
}

.project-card.placeholder::after {
  content: attr(data-placeholder);
  position: absolute;
  inset: auto 14px 14px auto;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tile-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  opacity: 0;
  transition: opacity 220ms ease, width 220ms ease, height 220ms ease;
  pointer-events: none;
}

.project-card:hover .tile-corner,
.project-card:focus-visible .tile-corner {
  opacity: 1;
  width: 22px;
  height: 22px;
}

.tile-corner--tl {
  top: 8px;
  left: 8px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.tile-corner--tr {
  top: 8px;
  right: 8px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.tile-corner--bl {
  bottom: 8px;
  left: 8px;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.tile-corner--br {
  bottom: 8px;
  right: 8px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reel-section,
.tools-section,
.about-section {
  padding: 30px 0;
}

.portfolio-section,
.about-strip,
.about-section,
.reel-section,
.tools-section {
  max-width: 880px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.reel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.reel-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.reel-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.reel-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.reel-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.05;
}

.reel-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.tool-card--featured {
  grid-column: 1 / -1;
  gap: 14px;
  padding: 28px;
  border-color: rgba(47, 217, 122, 0.35);
}

.tool-media {
  margin: -22px -22px 4px;
  aspect-ratio: 21 / 8;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.tool-card--featured .tool-media {
  margin: -28px -28px 6px;
  aspect-ratio: 21 / 6;
}

.tool-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tool-card--featured .tool-title {
  font-size: 2.4rem;
}

.tool-card--featured .tool-description {
  max-width: 62ch;
  font-size: 1.02rem;
}

.tool-interface {
  justify-self: start;
  display: block;
  width: min(360px, 100%);
  border: 1px solid var(--line);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 200ms ease, border-color 200ms ease;
}

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

.tool-interface img {
  width: 100%;
  height: auto;
  display: block;
}

.tool-status {
  justify-self: start;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent-soft);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tool-title {
  margin: 4px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.05;
}

.tool-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.tool-card .social-link {
  justify-self: start;
  margin-top: 6px;
}

.about-section .section-heading p {
  margin-top: 4px;
}

.skills-block,
.timeline-block,
.skill-tree-block {
  margin-top: 30px;
}

.skill-tree-bleed {
  /* Break out of the reading column, centered on the viewport, so the
     tree gets real room regardless of how narrow the parent is. */
  position: relative;
  overflow: hidden;
  width: 100vw;
  margin: 30px calc(50% - 50vw) 36px;
  padding: 72px 4vw 80px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  display: flex;
  justify-content: center;
}

.skill-tree-bleed .skill-tree-block {
  position: relative;
  max-width: 1450px;
  width: 100%;
  margin-top: 0;
}

.skill-tree-heading {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
}

.skill-tree-caption {
  margin: 8px 0 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.6;
}

.skill-tree {
  position: relative;
  margin-top: 14px;
  overflow: hidden;
}

.skill-tree-svg {
  display: block;
  width: 100%;
  height: auto;
}

.skill-tree-trunk {
  fill: none;
  stroke: var(--branch-color, var(--line));
  stroke-width: 9;
  stroke-linecap: round;
  opacity: 1;
  stroke-dasharray: var(--len, 0);
  stroke-dashoffset: var(--len, 0);
  animation: treeGrow var(--grow-duration, 400ms) cubic-bezier(0.25, 0.75, 0.4, 1) forwards;
}

.skill-tree-connector {
  fill: none;
  stroke: var(--branch-color, var(--line));
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.35;
  transition: opacity 220ms ease;
  stroke-dasharray: var(--len, 0);
  stroke-dashoffset: var(--len, 0);
  animation: treeGrow var(--grow-duration, 260ms) ease-out var(--grow-delay, 0ms) forwards;
}

@keyframes treeGrow {
  to {
    stroke-dashoffset: 0;
  }
}

.skill-tree-branch:hover .skill-tree-connector {
  opacity: 0.55;
}

.skill-tree-branch-label {
  fill: var(--branch-color);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.skill-tree-node {
  cursor: pointer;
  outline: none;
}

.skill-tree-node-anim {
  animation: treeNodeAppear 220ms ease-out both;
}

@keyframes treeNodeAppear {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.skill-tree-node-ring {
  fill: rgba(10, 12, 15, 0.92);
  stroke: var(--branch-color);
  stroke-width: 1.6;
  opacity: 0.75;
  transition: opacity 220ms ease, stroke-width 220ms ease, transform 220ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

.skill-tree-node-icon {
  color: var(--branch-color);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
  /* Base per-node size multiplier (content.js `scale` field, default 1). */
  transform: scale(var(--node-scale, 1));
  transition: opacity 220ms ease, transform 220ms ease;
  /* fill-box anchors the scale on the icon's own bounding box instead of
     the whole <svg> viewBox (the SVG default), which is what made icons
     appear to drift toward the canvas center when zoomed on hover. */
  transform-box: fill-box;
  transform-origin: center;
}

.skill-tree-node-label {
  fill: var(--branch-color);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.skill-tree-node:hover .skill-tree-node-ring,
.skill-tree-node:focus-visible .skill-tree-node-ring,
.skill-tree-node.is-active .skill-tree-node-ring {
  opacity: 1;
  stroke-width: 2.2;
  transform: scale(1.14);
}

.skill-tree-node:hover .skill-tree-node-icon,
.skill-tree-node:focus-visible .skill-tree-node-icon,
.skill-tree-node.is-active .skill-tree-node-icon {
  opacity: 1;
  /* Multiply the base per-node scale by the hover zoom instead of
     overwriting it, so bigger icons stay proportionally bigger on hover. */
  transform: scale(calc(var(--node-scale, 1) * 1.16));
}

.skill-tree-node-flash {
  pointer-events: none;
}

.skill-tree-node-flash-bar {
  fill: #ffffff;
  opacity: 0;
  mix-blend-mode: screen;
  transform-box: fill-box;
  transform-origin: center;
}

.skill-tree-node-flash-bar--alt {
  fill: var(--branch-color);
}

.skill-tree-node:hover .skill-tree-node-flash-bar,
.skill-tree-node:focus-visible .skill-tree-node-flash-bar,
.skill-tree-node.is-active .skill-tree-node-flash-bar {
  animation: nodeGlitchFlash 380ms steps(2, end) both;
}

.skill-tree-node:hover .skill-tree-node-flash-bar--alt,
.skill-tree-node:focus-visible .skill-tree-node-flash-bar--alt,
.skill-tree-node.is-active .skill-tree-node-flash-bar--alt {
  animation-name: nodeGlitchFlashAlt;
  animation-delay: 30ms;
}

@keyframes nodeGlitchFlash {
  0% {
    opacity: 0;
    transform: translate(-16px, 12px) scaleX(0.5);
  }
  12% {
    opacity: 0.95;
    transform: translate(-6px, 4px) scaleX(1.15);
  }
  26% {
    opacity: 0.15;
    transform: translate(4px, -3px) scaleX(0.75);
  }
  40% {
    opacity: 0.9;
    transform: translate(-2px, 1px) scaleX(1.05);
  }
  58% {
    opacity: 0.1;
    transform: translate(3px, -2px) scaleX(0.9);
  }
  74% {
    opacity: 0.5;
    transform: translate(8px, -6px) scaleX(0.7);
  }
  100% {
    opacity: 0;
    transform: translate(18px, -13px) scaleX(0.4);
  }
}

@keyframes nodeGlitchFlashAlt {
  0% {
    opacity: 0;
    transform: translate(14px, -11px) scaleX(0.4);
  }
  15% {
    opacity: 0.7;
    transform: translate(4px, -3px) scaleX(1);
  }
  32% {
    opacity: 0.1;
    transform: translate(-3px, 2px) scaleX(0.8);
  }
  50% {
    opacity: 0.6;
    transform: translate(2px, -1px) scaleX(1.05);
  }
  70% {
    opacity: 0.05;
    transform: translate(-6px, 5px) scaleX(0.7);
  }
  100% {
    opacity: 0;
    transform: translate(-16px, 12px) scaleX(0.5);
  }
}

.skill-tree-node--capstone .skill-tree-node-ring {
  stroke-width: 2;
}

.skill-tree-tooltip {
  position: absolute;
  z-index: 3;
  width: 240px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--branch-color, var(--accent));
  background: rgba(10, 12, 15, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
  pointer-events: none;
}

.skill-tree-tooltip[data-placement="above"] {
  transform: translate(-50%, calc(-100% - 4px));
}

.skill-tree-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.skill-tree-tooltip[data-placement="above"].is-visible {
  transform: translate(-50%, -100%);
}

.skill-tree-tooltip-eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--branch-color, var(--accent));
}

.skill-tree-tooltip-title {
  margin: 4px 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text);
}

.skill-tree-tooltip-description {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}

.skill-tree-tooltip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.skill-tree-tag {
  padding: 3px 8px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.skill-item {
  border: 1px solid var(--line);
  background: var(--panel);
}

.skill-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.skill-link:hover {
  background: var(--accent-dim);
  transform: translateX(4px);
}

.skill-name {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  flex-shrink: 0;
  overflow: hidden;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-badge--fallback {
  color: #fff;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 50%;
  border: none;
}

.timeline-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.timeline-entries + .timeline-company {
  margin-top: 28px;
}

.timeline-entries {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 14px 0 0 41px;
  padding: 14px 0 0 24px;
  border-left: 2px solid rgba(47, 217, 122, 0.3);
}

.timeline-company {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(47, 217, 122, 0.05), rgba(255, 255, 255, 0) 60%),
    rgba(255, 255, 255, 0.02);
  text-decoration: none;
  color: inherit;
  transition: background 220ms ease, border-color 220ms ease, transform 220ms ease,
    box-shadow 220ms ease;
}

.timeline-company::before {
  content: "COMPANY";
  position: absolute;
  top: -8px;
  left: 18px;
  padding: 0 6px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.timeline-company:hover {
  background:
    linear-gradient(180deg, rgba(47, 217, 122, 0.1), rgba(255, 255, 255, 0) 70%),
    rgba(255, 255, 255, 0.02);
  border-color: var(--accent);
  transform: translateX(2px);
  box-shadow: 0 0 0 1px rgba(47, 217, 122, 0.15), 0 12px 28px -18px rgba(47, 217, 122, 0.5);
}

.timeline-company:hover .tile-corner,
.timeline-company:focus-visible .tile-corner {
  opacity: 1;
  width: 22px;
  height: 22px;
}

.timeline-company--static {
  cursor: default;
}

.timeline-company--static:hover {
  background:
    linear-gradient(180deg, rgba(47, 217, 122, 0.05), rgba(255, 255, 255, 0) 60%),
    rgba(255, 255, 255, 0.02);
  border-color: var(--line);
  transform: none;
  box-shadow: none;
}

.timeline-company--static:hover .tile-corner {
  opacity: 0;
}

.timeline-company .logo-badge {
  width: 44px;
  height: 44px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.timeline-company-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(47, 217, 122, 0.05), rgba(255, 255, 255, 0) 55%),
    var(--panel);
  overflow: hidden;
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.timeline-entry::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.timeline-entry:hover {
  border-color: var(--accent);
  transform: translateX(3px);
  box-shadow: 0 0 0 1px rgba(47, 217, 122, 0.15), 0 16px 34px -20px rgba(47, 217, 122, 0.55);
}

.timeline-entry:hover::after {
  opacity: 1;
}

.timeline-entry:hover .tile-corner,
.timeline-entry:focus-within .tile-corner {
  opacity: 1;
  width: 22px;
  height: 22px;
}

.timeline-index {
  position: absolute;
  top: 10px;
  right: 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0.45;
  z-index: 1;
  transition: opacity 220ms ease;
}

.timeline-entry:hover .timeline-index {
  opacity: 0.9;
}

.timeline-entries .timeline-entry::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -30px;
  width: 9px;
  height: 9px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 217, 122, 0.12), 0 0 8px rgba(47, 217, 122, 0.6);
  transition: box-shadow 220ms ease, background 220ms ease;
}

.timeline-entries .timeline-entry:hover::before {
  background: var(--accent-soft);
  box-shadow: 0 0 0 5px rgba(47, 217, 122, 0.18), 0 0 14px rgba(47, 217, 122, 0.85);
}

.timeline-thumb {
  position: relative;
  width: 140px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  z-index: 1;
}

.timeline-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(60%) brightness(0.75);
  transition: filter 260ms ease, transform 400ms ease;
}

.timeline-entry:hover .timeline-thumb img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.05);
}

.timeline-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.timeline-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

.timeline-period {
  font-family: var(--mono);
  color: var(--accent-soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.timeline-period::before {
  content: "[ ";
  color: var(--muted);
}

.timeline-period::after {
  content: " ]";
  color: var(--muted);
}

.timeline-role {
  position: relative;
  z-index: 1;
  margin: 4px 0 0;
  color: var(--muted);
}

.timeline-description {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.timeline-milestones {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.timeline-milestones li {
  position: relative;
}

.timeline-milestones li::marker {
  content: "› ";
  color: var(--accent);
  font-family: var(--mono);
}

.about-strip {
  margin-top: 6px;
  padding: 22px 0 12px;
  border-top: 1px solid var(--line);
}

.about-quote {
  margin: 0;
  max-width: 18ch;
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: -0.01em;
  font-size: clamp(1.1rem, 5vw, 2.5rem);
  line-height: 0.95;
  color: var(--accent-soft);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.footer-legal-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-legal-link:hover {
  color: var(--accent);
}

.site-footer .social-link {
  padding: 6px 10px;
  font-size: 0.76rem;
}

code {
  font-family: var(--mono);
  padding: 0.14rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

@keyframes flyInUp {
  from {
    opacity: 0;
    transform: translateY(46px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flyInDown {
  from {
    opacity: 0;
    transform: translateY(-46px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flyInLeft {
  from {
    opacity: 0;
    transform: translateX(-70px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes flyInRight {
  from {
    opacity: 0;
    transform: translateX(70px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes flyInScale {
  from {
    opacity: 0;
    transform: scale(0.82) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pageExit {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  to {
    opacity: 0;
    transform: scale(0.98) translateY(10px);
  }
}

@media (max-width: 900px) {
  .page-shell {
    padding: 20px 20px 32px;
  }

  .brands-section {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-bg {
    left: -20px;
    right: -20px;
  }

  .site-header,
  .hero {
    grid-template-columns: 1fr;
    display: grid;
  }

  .site-nav,
  .page-nav {
    justify-content: flex-start;
  }

  .brand-name {
    font-size: 1.3rem;
  }

  .nav-link {
    font-size: 0.92rem;
  }

  .brand-chip .logo-badge {
    height: 52px;
  }

  .brand-chip .logo-badge.logo-badge--natural {
    height: 72px;
    padding: 8px 12px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reel-grid,
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .skills-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .timeline-entry {
    grid-template-columns: 1fr;
  }

  .timeline-thumb {
    width: 100%;
  }

  .timeline-entries {
    margin-left: 12px;
    padding-left: 16px;
  }

  .timeline-entries .timeline-entry::before {
    left: -22px;
  }

  .hero-tagline {
    max-width: 100%;
  }

  .hero-portrait {
    width: min(240px, 60vw);
  }

  .hero-side {
    min-height: auto;
    justify-content: flex-start;
  }

  .hero--solo {
    padding: 60px 0;
    min-height: 55vh;
  }
}

@media (max-width: 640px) {
  .skill-tree-tooltip {
    width: min(220px, calc(100% - 24px));
  }

  .brand-chip .logo-badge {
    height: 40px;
  }

  .brand-chip .logo-badge.logo-badge--natural {
    height: 56px;
    padding: 6px 10px;
    border-radius: 10px;
  }

  .brands-row {
    gap: 20px 32px;
  }

  .experience-chip .logo-badge {
    width: 56px;
    height: 56px;
    padding: 10px;
    border-radius: 12px;
  }

  .experience-section {
    padding-top: 40px;
    padding-bottom: 40px;
    gap: 24px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-bio,
  .panel-description,
  .section-heading p {
    line-height: 1.55;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.legal-page {
  max-width: 72ch;
  margin: 0 auto;
  padding: 12px 0 40px;
}

.legal-page .section-heading {
  margin-bottom: 8px;
}

.legal-updated {
  margin: 0 0 32px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.legal-page h2 {
  margin: 40px 0 12px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--text);
}

.legal-page p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.legal-page ul {
  margin: 0 0 14px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page a {
  color: var(--accent-soft);
}

.legal-page strong {
  color: var(--text);
  font-weight: 600;
}
