:root {
  --bg: #101419;
  --bg-deep: #0a0e13;
  --surface: #181c21;
  --surface-2: #1c2025;
  --surface-3: #262a30;
  --line: #3d4946;
  --text: #e0e2ea;
  --muted: #bcc9c5;
  --primary: #83f3de;
  --glow: 131, 243, 222;
  --on-primary: #003730;
  --green: #6bf8ba;
  --blue: #adc6ff;
  --radius: 8px;
  --title: "Manrope", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --header: 68px;
  --header-bg: rgba(16, 20, 25, 0.94);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 16px);
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(var(--glow), 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
}

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

a {
  color: var(--primary);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--title);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  margin: 0;
}

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.icons {
  display: none;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 20;
  padding: 8px 16px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.skip-link:focus {
  top: 8px;
}

.container {
  width: min(1216px, 100% - 64px);
  margin-inline: auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  border-bottom: 1px solid var(--surface-3);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: var(--title);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.875rem;
}

.nav {
  margin-left: auto;
}

.nav ul {
  display: flex;
  gap: 4px;
}

.nav a {
  display: block;
  padding: 8px 10px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.nav a.active {
  border-bottom-color: var(--primary);
}

.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.lang a,
.lang span {
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
  text-decoration: none;
}

.lang a {
  color: var(--muted);
}

.lang a:hover {
  color: var(--primary);
}

.lang span {
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}

.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.section {
  padding-block: 72px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 32px;
}

.label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: 2rem;
}

.section-head p {
  margin-top: 8px;
  color: var(--muted);
}

.card {
  padding: 24px;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s;
}

.card h3 {
  font-size: 1.25rem;
}

.card p {
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 72px;
  padding-block: 40px 56px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
}

.hero h1 span {
  display: block;
  color: var(--muted);
}

.tagline {
  margin-top: 16px;
  color: var(--primary);
  font-family: var(--title);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.intro {
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.fact {
  padding: 16px;
}

.fact small {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fact strong {
  display: block;
  margin-top: 4px;
  font-family: var(--title);
  font-size: 1.125rem;
  font-weight: 600;
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.button.primary:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--on-primary);
}

.photo-card {
  align-self: start;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius);
  background: var(--surface);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 4px;
}

.photo-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 8px 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.about-text p + p {
  margin-top: 16px;
}

.about-text p {
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 16px;
  margin-top: 32px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius);
}

.terminal {
  overflow: hidden;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius);
  background: var(--bg-deep);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.terminal-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.terminal-bar i:nth-child(3) {
  background: var(--green);
  margin-right: 8px;
}

.terminal blockquote {
  margin: 0;
  padding: 20px 16px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.7;
}

.timeline {
  position: relative;
  display: grid;
  gap: 32px;
  padding-left: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 11px;
  width: 1px;
  background: var(--line);
}

.timeline > li {
  position: relative;
}

.timeline > li::before {
  content: "";
  position: absolute;
  top: 28px;
  left: -36px;
  width: 15px;
  height: 15px;
  border: 3px solid var(--surface-3);
  border-radius: 50%;
  background: var(--primary);
}

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.chip.quiet {
  background: var(--surface-3);
  color: var(--muted);
}

.job .role {
  color: var(--primary);
  font-size: 0.9375rem;
}

.job > p:not(.role) {
  margin-top: 8px;
}

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
  margin-top: 16px;
}

.checks li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.checks li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--green);
}

.note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--surface-3);
  font-size: 0.875rem;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 16px;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subject-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.study .chip + h3,
.job .chip + h3 {
  margin-top: 12px;
}

.study h3 + p {
  margin-top: 4px;
  color: var(--primary);
  font-size: 0.9375rem;
}

.study p + p {
  margin-top: 8px;
}

.card h3 + p {
  margin-top: 8px;
}

.card > p + .link-list {
  margin-top: 16px;
}

.sub-title {
  margin: 32px 0 16px;
  font-size: 1.25rem;
}

.link-list li + li {
  margin-top: 10px;
}

.link-list span {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.875rem;
}

.legend li,
.skills li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.level {
  padding: 1px 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  white-space: nowrap;
}

.level.use {
  color: var(--green);
}

.level.academic {
  color: var(--blue);
}

.level.study {
  color: var(--muted);
}

.skills {
  margin-top: 12px;
}

.skills li {
  justify-content: space-between;
  padding-block: 6px;
  border-bottom: 1px solid var(--surface-3);
  font-size: 0.9375rem;
}

.skills li:last-child {
  border-bottom: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filters button {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.filters button:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.filters button[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.project {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.project[hidden] {
  display: none;
}

.project:hover,
.ai-card:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}

.project img,
.project video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid var(--surface-3);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
}

.project-body .chip {
  align-self: flex-start;
}

.project:not(:has(img, video)) .project-links {
  margin-top: 0;
}

.project-body .subject-list {
  margin-top: 4px;
}

.project-body .credit {
  font-size: 0.875rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
  padding-top: 12px;
}

.project-links a,
.link-list a {
  font-family: var(--mono);
  font-size: 0.875rem;
}

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

.contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.contact .icon {
  color: var(--primary);
}

.contact div {
  flex: 1;
  min-width: 0;
}

.contact strong {
  display: block;
  font-family: var(--title);
}

.contact div a,
.contact div span {
  overflow-wrap: anywhere;
  font-size: 0.9375rem;
}

.contact .button {
  padding: 6px 14px;
}

.copy-status {
  min-height: 1.5em;
  margin-top: 12px;
  color: var(--green);
  font-size: 0.875rem;
}

.footer {
  padding-block: 24px;
  border-top: 1px solid var(--surface-3);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s, box-shadow 0.25s;
  transition-delay: var(--delay, 0s), var(--delay, 0s), 0s, 0s;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.card.visible:hover {
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(var(--glow), 0.12);
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(var(--glow), 0.13), transparent 55%), var(--surface);
  transition-delay: 0s;
  transition-duration: 0.15s;
}

.reveal.visible .level {
  animation: level-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 0.35s backwards;
}

@keyframes level-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

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

  .header-inner {
    gap: 12px;
  }

  .lang {
    margin-left: auto;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--surface-3);
  }

  .nav.open {
    display: block;
  }

  .nav ul {
    flex-direction: column;
  }

  .nav a {
    padding: 12px 8px;
    border-bottom: 0;
    font-size: 0.9375rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px;
  }

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

@media (max-width: 820px) {
  .container {
    width: calc(100% - 32px);
  }

  .section {
    padding-block: 48px;
  }

  .section-head h2 {
    font-size: 1.5rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-block: 24px 32px;
  }

  .photo-card {
    order: -1;
    width: min(100%, 260px);
    margin-inline: auto;
  }

  .tagline {
    font-size: 1.1875rem;
  }

  .about,
  .grid-2,
  .contact-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    padding: 20px;
  }

  .project {
    padding: 0;
  }
}

@media (max-width: 560px) {
  .brand-name {
    display: none;
  }

  .facts,
  .grid-3,
  .checks {
    grid-template-columns: minmax(0, 1fr);
  }

  .actions .button {
    width: 100%;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline::before {
    left: 5px;
  }

  .timeline > li::before {
    left: -26px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero > div:first-child > * {
    animation: hero-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }

  .hero > div:first-child > :nth-child(2) { animation-delay: 0.1s; }
  .hero > div:first-child > :nth-child(3) { animation-delay: 0.2s; }
  .hero > div:first-child > :nth-child(4) { animation-delay: 0.3s; }
  .hero > div:first-child > :nth-child(n + 5) { animation-delay: 0.4s; }

  .hero > :not(:first-child) {
    animation: hero-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s backwards;
  }

  .progress {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--green));
    transform: scaleX(0);
    transform-origin: left;
    animation: progress linear;
    animation-timeline: scroll(root);
  }

  .button {
    transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
  }

  .button:hover {
    transform: translateY(-2px);
  }
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

@keyframes progress {
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .nav a {
    position: relative;
    border-bottom-color: transparent !important;
  }

  .nav a::after {
    content: "";
    position: absolute;
    inset: auto 10px 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .nav a:hover::after,
  .nav a.active::after {
    transform: scaleX(1);
  }

  .typing-caret::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    vertical-align: -0.15em;
    background: var(--primary);
    animation: caret 0.8s steps(1) infinite;
  }
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .timeline::after {
      content: "";
      position: absolute;
      top: 8px;
      bottom: 8px;
      left: 11px;
      width: 1px;
      background: var(--primary);
      transform-origin: top;
      animation: draw linear both;
      animation-timeline: view();
      animation-range: entry 20% cover 55%;
    }

    .timeline > li::before {
      animation: dot-on linear both;
      animation-timeline: view();
      animation-range: entry 40% entry 85%;
    }
  }

  @keyframes draw {
    from {
      transform: scaleY(0);
    }
  }

  @keyframes dot-on {
    from {
      background: var(--surface-3);
      transform: scale(0.6);
    }
  }
}

.project img.banner {
  aspect-ratio: 4 / 1;
  object-fit: cover;
  object-position: center;
}

.ai-card {
  position: relative;
}

.ai-card h3 {
  padding-right: 56px;
}

.card-icon {
  position: absolute;
  top: 18px;
  right: 18px;
}

@media (prefers-reduced-motion: no-preference) {
  .ic-star .f { opacity: 0; animation: ic-frame 1.2s step-end infinite; animation-delay: calc(var(--i) * 0.2s); }
  .ic-pulse rect:last-of-type { animation: ic-pulse 2s ease-in-out infinite; transform-origin: 24px 24px; }
  .ic-flap { animation: ic-flap 2.4s ease-in-out infinite; transform-origin: 8px 40px; }
  .ic-float { animation: ic-float 3s ease-in-out infinite; }
  .ic-flow .dash { stroke-dasharray: 5 5; animation: ic-dash 1s linear infinite; }
  .ic-blink .spark { animation: ic-blink 2s ease-in-out infinite; transform-origin: 24px 20px; }
  .ai-card:hover .card-icon { animation-duration: 0.8s; }
}

@keyframes ic-frame { 0% { opacity: 1; } 16.66%, 100% { opacity: 0; } }
@keyframes ic-pulse { 50% { transform: scale(1.35); } }
@keyframes ic-flap { 50% { transform: rotate(-10deg) scale(1.06); } }
@keyframes ic-float { 50% { transform: translateY(-4px) rotate(4deg); } }
@keyframes ic-dash { to { stroke-dashoffset: -10; } }
@keyframes ic-blink { 50% { transform: scale(0.5); opacity: 0.3; } }

:root[data-theme="light"] {
  --bg: #f6f8f9;
  --bg-deep: #e9eef0;
  --surface: #ffffff;
  --surface-2: #f0f3f4;
  --surface-3: #d6dde1;
  --line: #9aa8ae;
  --text: #1a2329;
  --muted: #47545c;
  --primary: #0b6b5c;
  --on-primary: #ffffff;
  --green: #0a7a4f;
  --blue: #1f4e9c;
  --glow: 11, 107, 92;
  --header-bg: rgba(246, 248, 249, 0.94);
}

:root[data-theme="light"] .card-icon {
  filter: brightness(0.72) saturate(1.4);
}

:root[data-theme="light"] .card.visible:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 16px 36px rgba(11, 107, 92, 0.4);
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(11, 107, 92, 0.38), rgba(11, 107, 92, 0.12) 45%, transparent 75%), var(--surface);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .lua,
:root[data-theme="light"] .theme-toggle .sol {
  display: none;
}

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

@media print {
  .theme-toggle {
    display: none;
  }
}

@media print {
  :root {
    --bg: #fff;
    --bg-deep: #fff;
    --surface: #fff;
    --surface-2: #f3f5f6;
    --surface-3: #cfd6da;
    --line: #9aa5aa;
    --text: #1f2933;
    --muted: #3d4852;
    --primary: #0b6b5c;
    --on-primary: #fff;
    --green: #0b6b5c;
    --blue: #1f4e9c;
  }

  body {
    background: #fff;
  }

  .header,
  .progress,
  .filters,
  .menu-button,
  .skip-link,
  .hero .button,
  .hero-actions {
    display: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
  }

  .card,
  .timeline > li {
    break-inside: avoid;
  }

  .card {
    box-shadow: none;
  }
}

@media print {
  .typing-caret::after {
    display: none;
  }
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
}

@media (prefers-reduced-motion: no-preference) {
  .hero .photo-card {
    animation: hero-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s backwards, flutua 7s ease-in-out 1.2s infinite;
  }

  .photo-card img {
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .photo-card:hover img {
    transform: scale(1.03);
  }

  .photo-card {
    overflow: hidden;
  }

  .timeline::before {
    transform-origin: top;
    animation: linha-cresce linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 60%;
  }

  .timeline > li::before {
    transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.3s;
  }

  .timeline > li:hover::before {
    transform: scale(1.3);
    box-shadow: 0 0 0 6px rgba(var(--glow), 0.18);
  }

  .button:active {
    transform: translateY(0) scale(0.97);
  }

  .link-list li {
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .link-list li:hover {
    transform: translateX(6px);
  }

  .chip,
  .level {
    transition: transform 0.2s;
  }

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

@keyframes flutua {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes linha-cresce {
  from {
    transform: scaleY(0);
  }
}

.terminal-out {
  min-height: 340px;
  max-height: min(460px, 70vh);
  overflow-y: auto;
  padding: 16px 16px 4px;
  font-family: var(--mono);
  font-size: 0.96875rem;
  line-height: 1.7;
}

.terminal-out p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.terminal-out .terminal-quote {
  margin-bottom: 8px;
  color: var(--green);
}

.terminal-out .terminal-cmd {
  margin-top: 8px;
  color: var(--primary);
}

.terminal-in {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px 12px;
  font-family: var(--mono);
  font-size: 0.96875rem;
}

.terminal-in label {
  color: var(--primary);
}

.terminal-in input {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  caret-color: var(--primary);
}

.terminal-in input:focus {
  outline: none;
}

.terminal:focus-within {
  border-color: var(--primary);
}

.terminal-hint {
  padding: 0 16px 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.terminal-hint b {
  color: var(--primary);
  font-weight: 600;
}

.semestre {
  margin-top: 16px;
  border-top: 1px solid var(--surface-3);
}

.semestre > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  cursor: pointer;
  font-family: var(--title);
  font-size: 1.25rem;
  font-weight: 700;
  list-style: none;
}

.semestre > summary::-webkit-details-marker {
  display: none;
}

.semestre > summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.875rem;
}

.semestre[open] > summary::before {
  content: "−";
}

.semestre > summary:hover {
  color: var(--primary);
}

.semestre > .grid-2 {
  padding-bottom: 16px;
}

.live {
  margin-top: 32px;
}

.gh-chart {
  display: block;
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  background: #fff;
}

.gh-chart img {
  width: 100%;
}

.mini-title {
  margin-top: 24px;
  font-size: 1rem !important;
}

.live .link-list {
  margin-top: 12px;
}

@media print {
  .terminal-in,
  .terminal-hint,
  .live {
    display: none;
  }
}

.hero {
  position: relative;
}

.hero > :not(.rede) {
  position: relative;
  z-index: 1;
}

.rede {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.75;
}

.stats-band {
  padding-bottom: 8px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat {
  padding: 20px;
  text-align: center;
}

.stat strong {
  display: block;
  color: var(--primary);
  font-family: var(--title);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.875rem;
}

.stats-note {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-align: right;
}

.sub-lead {
  margin: -8px 0 16px;
  color: var(--muted);
}

.fluxo {
  --passo: 0.9s;
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding-left: 40px;
}

.fluxo::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 13px;
  width: 2px;
  background: var(--surface-3);
}

.fluxo li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 28px;
  font-family: var(--mono);
  font-size: 0.875rem;
}

.fluxo b {
  position: absolute;
  left: -40px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--surface-3);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.6875rem;
}

.fluxo li:last-child {
  color: var(--primary);
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .fluxo::after {
    content: "";
    position: absolute;
    left: 10px;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 12px 2px rgba(var(--glow), 0.7);
    animation: viaja calc(var(--passo) * var(--n)) linear infinite;
  }

  .fluxo b {
    animation: acende calc(var(--passo) * var(--n)) linear infinite;
  }

  .fluxo li:nth-child(2) b { animation-delay: calc(var(--passo) * 1); }
  .fluxo li:nth-child(3) b { animation-delay: calc(var(--passo) * 2); }
  .fluxo li:nth-child(4) b { animation-delay: calc(var(--passo) * 3); }
  .fluxo li:nth-child(5) b { animation-delay: calc(var(--passo) * 4); }
}

@keyframes viaja {
  to {
    top: calc(100% - 18px);
  }
}

@keyframes acende {
  0%, 14% {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--glow), 0.18);
  }
  19% {
    border-color: var(--surface-3);
    color: var(--muted);
    box-shadow: none;
  }
}

.lab-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 16px;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(120deg, rgba(var(--glow), 0.12), transparent 60%), var(--surface);
}

.lab-banner .label {
  margin-bottom: 4px;
}

.lab-banner p {
  margin-top: 4px;
}

.lab-banner:hover .button {
  border-color: var(--primary);
  color: var(--primary);
}

.project video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid var(--surface-3);
  background: var(--bg-deep);
}

.kbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.kbar-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.kbar-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-2);
  color: inherit;
  font-family: var(--mono);
  font-size: 0.6875rem;
}

.kbar-btn kbd {
  padding: 0;
  border: 0;
  background: none;
}

.paleta {
  width: min(560px, calc(100% - 32px));
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.paleta::backdrop {
  background: rgba(5, 8, 12, 0.6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.paleta input {
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid var(--surface-3);
  background: transparent;
  color: var(--text);
  font: 1rem var(--body);
}

.paleta input:focus {
  outline: none;
}

.paleta ul {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}

.paleta li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.paleta li small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.paleta li[aria-selected="true"] {
  background: rgba(var(--glow), 0.14);
  color: var(--primary);
}

.paleta li.vazio {
  color: var(--muted);
  cursor: default;
}

.paleta-dica {
  padding: 10px 16px;
  border-top: 1px solid var(--surface-3);
  color: var(--muted);
  font-size: 0.75rem;
}

.paleta-dica kbd {
  margin-right: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .paleta[open] {
    animation: hero-in 0.2s ease-out;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 150;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s, transform 0.25s;
}

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

.matrix {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  cursor: pointer;
}

.terminal-out .terminal-pre {
  color: var(--text);
  white-space: pre;
}

.footer-hint {
  font-family: var(--mono);
  font-size: 0.75rem;
}

@media (max-width: 1120px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .kbar-btn kbd,
  .footer-hint {
    display: none;
  }

  .kbar-btn {
    justify-content: center;
    width: 36px;
    padding: 0;
  }
}

@media print {
  .rede,
  .kbar-btn,
  .toast,
  .stats-note {
    display: none;
  }
}

:root[data-retro] {
  --bg: #030803;
  --bg-deep: #010401;
  --surface: #061006;
  --surface-2: #0a180a;
  --surface-3: #123212;
  --line: #1e5a1e;
  --text: #8dff8d;
  --muted: #4fcf5c;
  --primary: #33ff66;
  --green: #33ff66;
  --blue: #9dff9d;
  --glow: 51, 255, 102;
  --on-primary: #010401;
  --title: var(--mono);
  --body: var(--mono);
  --header-bg: rgba(3, 8, 3, 0.95);
}

:root[data-retro] body {
  text-shadow: 0 0 6px rgba(51, 255, 102, 0.45);
}

:root[data-retro] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px);
}

:root[data-retro] img,
:root[data-retro] video {
  filter: grayscale(1) sepia(1) hue-rotate(70deg) saturate(3) brightness(0.85);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--green);
}

.caso-btn {
  margin-top: 20px;
}

.caso {
  width: min(680px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.caso::backdrop {
  background: rgba(5, 8, 12, 0.65);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.caso h2 {
  font-size: 1.75rem;
}

.caso-fechar {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.caso-fechar:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.caso-etapas {
  margin: 24px 0 0;
}

.caso-etapas dt {
  position: relative;
  padding-left: 20px;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.caso-etapas dt::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.caso-etapas dd {
  margin: 6px 0 20px 20px;
  padding-left: 16px;
  border-left: 1px solid var(--surface-3);
  color: var(--muted);
}

.caso-etapas dd:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .caso[open] {
    animation: hero-in 0.25s ease-out;
  }
}

.segredos {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.segredos li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.segredos li b {
  font-family: var(--mono);
}

.segredos li span {
  font-size: 0.8125rem;
}

.segredos li.ok {
  border-style: solid;
  border-color: var(--primary);
  background: rgba(var(--glow), 0.08);
  color: var(--text);
}

.segredos li.ok span {
  color: var(--primary);
}

.agora {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 18px 20px;
}

.agora strong {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}

.agora p {
  color: var(--muted);
}

.agora-commit {
  margin-top: 4px;
  font-size: 0.875rem;
}

.agora-commit a {
  font-family: var(--mono);
}

.agora-ponto {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(var(--glow), 0.18);
}

@media (prefers-reduced-motion: no-preference) {
  .agora-ponto {
    animation: ao-vivo 2s ease-in-out infinite;
  }
}

@keyframes ao-vivo {
  50% {
    box-shadow: 0 0 0 8px rgba(var(--glow), 0);
  }
}

.langs {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 16px;
}

.langs canvas {
  width: 200px;
  height: 200px;
}

.langs-legenda {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin-top: 16px;
}

.langs-legenda li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
}

.langs-legenda i {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.langs-legenda small {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

@media (max-width: 820px) {
  .langs {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .langs > div {
    width: 100%;
  }

  .caso {
    padding: 24px 20px;
  }

  .caso h2 {
    padding-right: 44px;
    font-size: 1.375rem;
  }
}

@media (max-width: 560px) {
  .langs-legenda {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .caso-btn,
  .link-btn,
  .agora-commit {
    display: none;
  }
}

.depoimento {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 32px 28px 24px;
}

.depoimento::before {
  content: "“";
  position: absolute;
  top: 4px;
  right: 20px;
  color: rgba(var(--glow), 0.22);
  font-family: var(--title);
  font-size: 6rem;
  line-height: 1;
}

.depoimento blockquote {
  margin: 0;
}

.depoimento blockquote p {
  position: relative;
  padding-right: 44px;
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.depoimento figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--surface-3);
}

.depoimento figcaption strong {
  display: block;
  font-family: var(--title);
}

.depoimento figcaption small {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}

.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--primary);
  border-radius: 50%;
  background: rgba(var(--glow), 0.12);
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
}

.job .periodo {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.trilha {
  position: relative;
  height: 150px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.trilha::before,
.trilha::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 13%;
  right: 7%;
  height: 2px;
  background: var(--border);
}

.trilha::after {
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.6s ease-out;
}

.trilha.visivel::after {
  transform: scaleX(1);
}

.trilha li {
  position: absolute;
  top: 50%;
  left: calc(13% + var(--p) * 0.8%);
  width: 0;
}

.trilha li::before {
  content: "";
  position: absolute;
  top: -7px;
  left: -7px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
  transition-delay: calc(var(--p) * 16ms);
}

.trilha.visivel li::before {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(var(--glow), 0.2);
}

.trilha b,
.trilha span {
  position: absolute;
  left: 0;
  width: max-content;
  max-width: 170px;
  transform: translateX(-50%);
  text-align: center;
}

.trilha b {
  bottom: 14px;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.trilha b::after {
  content: " anos";
}

:root[lang="en"] .trilha b::after {
  content: "";
}

.trilha span {
  top: 16px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.35;
}

.trilha li:nth-child(even) b {
  bottom: auto;
  top: 16px;
}

.trilha li:nth-child(even) span {
  top: auto;
  bottom: 14px;
}

.trilha li:is(:first-child, :last-child) :is(b, span) {
  transform: translateX(calc(-100% + 8px));
  text-align: right;
}

.trilha li:nth-child(2) :is(b, span) {
  transform: translateX(-8px);
  text-align: left;
}

.trilha li:last-child span {
  color: var(--text);
  font-weight: 600;
}

.commits {
  margin-top: 16px;
  padding: 18px 20px;
}

.commits-topo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 12px;
}

.commits-topo strong {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.commits-topo span {
  color: var(--muted);
  font-size: 0.875rem;
}

.commits-topo b {
  color: var(--text);
}

.commits-grade {
  display: grid;
  grid-template-rows: repeat(7, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(11px, 1fr);
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.commits-grade i {
  aspect-ratio: 1;
}

.commits-legenda i {
  width: 11px;
  height: 11px;
}

.commits-grade i,
.commits-legenda i {
  display: block;
  border-radius: 2px;
  background: rgba(var(--glow), 0.08);
}

.commits-grade i[data-n] {
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s, transform 0.4s;
  transition-delay: calc(var(--c) * 14ms);
}

.commits.visivel .commits-grade i[data-n] {
  opacity: 1;
  transform: none;
}

.commits [data-n="1"] { background: rgba(var(--glow), 0.3); }
.commits [data-n="2"] { background: rgba(var(--glow), 0.5); }
.commits [data-n="3"] { background: rgba(var(--glow), 0.75); }
.commits [data-n="4"] { background: rgb(var(--glow)); }

.commits-grade i:not([data-n]) {
  background: transparent;
}

.commits-legenda {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.commits-legenda i {
  display: inline-block;
}

.cartao {
  text-align: center;
}

.cartao img {
  margin: 18px auto 10px;
  border-radius: 10px;
  background: #fff;
}

.cartao p {
  color: var(--muted);
}

.cartao .button {
  margin-top: 14px;
}

.jogo {
  width: min(400px, calc(100vw - 32px));
  text-align: center;
}

.jogo canvas {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 8px auto 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  touch-action: none;
}

.jogo-placar {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--muted);
}

.jogo-placar b {
  color: var(--primary);
}

.jogo-msg {
  min-height: 1.6em;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.875rem;
}

.jogo-setas {
  display: none;
  grid-template-columns: repeat(3, 60px);
  grid-template-rows: repeat(2, 50px);
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.jogo .jogo-setas button {
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: rgba(var(--glow), 0.1);
  color: var(--primary);
  font-size: 1.3rem;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.jogo .jogo-setas button:active {
  background: rgba(var(--glow), 0.3);
}

.jogo-setas [data-dir="0,-1"] { grid-area: 1 / 2; }
.jogo-setas [data-dir="-1,0"] { grid-area: 2 / 1; }
.jogo-setas [data-dir="0,1"] { grid-area: 2 / 2; }
.jogo-setas [data-dir="1,0"] { grid-area: 2 / 3; }

@media (pointer: coarse) {
  .jogo-setas {
    display: grid;
  }
}

@media (max-width: 820px) {
  .trilha {
    height: auto;
    padding-left: 30px;
  }

  .trilha::before,
  .trilha::after {
    top: 8px;
    bottom: 8px;
    left: 6px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .trilha::after {
    transform: scaleY(0);
    transform-origin: top;
  }

  .trilha.visivel::after {
    transform: scaleY(1);
  }

  .trilha li {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    padding: 6px 0;
  }

  .trilha li::before {
    top: 12px;
    left: -31px;
  }

  .trilha b,
  .trilha span,
  .trilha li:nth-child(even) b,
  .trilha li:nth-child(even) span {
    position: static;
    display: inline;
    max-width: none;
    transform: none;
    text-align: left;
  }

  .trilha b {
    margin-right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trilha::after,
  .trilha li::before,
  .commits-grade i[data-n] {
    transition: none;
  }
}

@media (max-width: 820px) {
  .trilha li:is(:first-child, :last-child) :is(b, span),
  .trilha li:nth-child(2) :is(b, span) {
    transform: none;
    text-align: left;
  }
}

@media (max-width: 820px) {
  .terminal-out {
    min-height: 240px;
  }
}

.project.destaque {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(var(--glow), 0.35);
}

.projeto-numero {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.875rem;
}

.projeto-numero b {
  display: block;
  color: var(--primary);
  font-family: var(--title);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
}

@media (min-width: 821px) {
  .contact-list > .contact:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 8px);
  }
}
