:root {
  --bg: #f6f0e5;
  --bg-elevated: rgba(255, 253, 249, 0.82);
  --surface: rgba(255, 252, 247, 0.88);
  --line: rgba(74, 49, 29, 0.09);
  --text: #241811;
  --muted: #7b6658;
  --accent: #d86d3e;
  --accent-2: #efc17c;
  --accent-3: #0d7492;
  --page-glow-warm: rgba(216, 109, 62, 0.16);
  --page-glow-cool: rgba(13, 116, 146, 0.1);
  --page-grad-end: #fffdf8;
  --glass-highlight: rgba(255, 255, 255, 0.52);
  --glass-shadow: rgba(89, 57, 31, 0.08);
  --shadow: 0 22px 70px rgba(84, 55, 31, 0.11);
  --radius-xl: 32px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --max-width: 1200px;
}

body[data-theme="dark"] {
  --bg: #0d1117;
  --bg-elevated: rgba(16, 24, 35, 0.78);
  --surface: rgba(21, 31, 45, 0.82);
  --line: rgba(190, 213, 255, 0.12);
  --text: #eff6ff;
  --muted: #9db0c8;
  --accent: #ff8b5e;
  --accent-2: #f7cb5f;
  --accent-3: #7dd3fc;
  --page-glow-warm: rgba(255, 139, 94, 0.14);
  --page-glow-cool: rgba(125, 211, 252, 0.12);
  --page-grad-end: #111926;
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --glass-shadow: rgba(0, 0, 0, 0.28);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Syne", sans-serif;
  background:
    radial-gradient(circle at 10% 12%, var(--page-glow-warm), transparent 34%),
    radial-gradient(circle at 88% 16%, var(--page-glow-cool), transparent 30%),
    linear-gradient(150deg, var(--bg) 0%, var(--page-grad-end) 100%);
  color: var(--text);
  transition: background 480ms ease, color 320ms ease;
}

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

button {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.ambient {
  position: fixed;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.52;
  z-index: 0;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

[data-parallax-speed] {
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

[data-scroll-fx] {
  --scroll-y: 0px;
  --scroll-opacity: 1;
  transform: translate3d(0, var(--scroll-y), 0);
  opacity: var(--scroll-opacity);
  will-change: transform, opacity;
}

.ambient-one {
  top: 8rem;
  left: -4rem;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(255, 106, 61, 0.26) 0%, rgba(255, 106, 61, 0) 72%);
}

.ambient-two {
  right: -2rem;
  bottom: 12rem;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(14, 116, 144, 0.2) 0%, rgba(14, 116, 144, 0) 72%);
}

.topbar {
  max-width: none;
  margin: 0;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: fixed;
  left: 0;
  right: 0;
  transform: none;
  width: 100%;
  top: 0;
  z-index: 20;
}

.topbar::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 9rem;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(255, 252, 248, 0.9) 0%,
    rgba(255, 250, 244, 0.72) 44%,
    rgba(255, 248, 241, 0.22) 76%,
    rgba(255, 255, 255, 0) 100%
  );
}

body[data-theme="dark"] .topbar::before {
  background: linear-gradient(
    180deg,
    rgba(13, 17, 23, 0.96) 0%,
    rgba(15, 22, 31, 0.84) 44%,
    rgba(17, 25, 38, 0.34) 76%,
    rgba(13, 17, 23, 0) 100%
  );
}

main {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-mark {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #101010;
  overflow: hidden;
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.brand-copy strong {
  font-family: "Syne", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.brand-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.nav-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, var(--glass-highlight), rgba(255, 255, 255, 0.02)),
    var(--bg-elevated);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    linear-gradient(180deg, var(--glass-highlight), rgba(255, 255, 255, 0.02)),
    var(--bg-elevated);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 1.05rem;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 240ms ease, opacity 240ms ease;
}

body.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 280ms ease, color 280ms ease, transform 280ms ease;
}

.nav-menu a:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  transform: translateY(-0.5px);
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-switch,
.theme-toggle {
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--glass-highlight), rgba(255, 255, 255, 0.02)),
    var(--bg-elevated);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.lang-switch {
  display: inline-flex;
  gap: 0.25rem;
}

.chip,
.theme-toggle {
  border: 0;
  color: var(--muted);
}

.chip {
  background: transparent;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 280ms ease, color 280ms ease, transform 280ms ease;
}

.chip.is-active {
  background: var(--text);
  color: var(--bg);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 3.65rem;
  min-height: 3rem;
  padding-inline: 0.65rem;
  cursor: pointer;
}

.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
}

.theme-toggle__sun,
.theme-toggle__moon {
  display: none;
}

body[data-theme="light"] .theme-toggle__moon,
body[data-theme="dark"] .theme-toggle__sun {
  display: inline-flex;
  color: var(--text);
}

body[data-theme="light"] .theme-toggle__moon {
  transform: scaleX(-1);
}

.hero,
.section-header,
.projects-carousel,
.stack-showcase,
.info-grid,
.contact,
.about {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding-top: 6rem;
  padding-bottom: 3rem;
}

.hero-copy,
.hero-panel,
.section-header > *,
.about-card,
.about-stack,
.project-card {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 500;
}

.hero h1,
.section-header h2,
.about h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.hero h1 {
  font-size: 4.2rem;
  max-width: 14ch;
  overflow-wrap: normal;
  word-break: normal;
}

.hero-text,
.section-text,
.about p,
.project-card__description,
.spotlight-card p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  overflow-wrap: break-word;
  word-break: normal;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 500;
  text-align: center;
  transition: transform 320ms ease, background 320ms ease, color 320ms ease, box-shadow 320ms ease;
}

.button:hover,
.project-card__link:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--text), color-mix(in srgb, var(--text) 82%, var(--accent) 18%));
  color: var(--bg);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.spotlight-card,
.about-card,
.about-stack article,
.info-grid article,
.contact,
.project-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--glass-highlight), rgba(255, 255, 255, 0.01)),
    var(--surface);
  border: 0;
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 14px 34px var(--glass-shadow);
}

.spotlight-card {
  padding: 1.6rem;
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle at 14% 0%, rgba(216, 109, 62, 0.13), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(13, 116, 146, 0.1), transparent 36%),
    linear-gradient(180deg, var(--glass-highlight), rgba(255, 255, 255, 0.01) 56%),
    var(--surface);
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border-radius: calc(var(--radius-xl) - 1rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.spotlight-label,
.project-card__tag,
.project-card__year {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.82rem;
}

.spotlight-card h2 {
  margin: 1rem 0 0.6rem;
  font-family: "Syne", sans-serif;
  font-size: 2.45rem;
  line-height: 1;
  overflow-wrap: normal;
  word-break: normal;
}

.spotlight-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.spotlight-metrics article {
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.06);
  min-width: 0;
  transition: transform 360ms ease, box-shadow 360ms ease, background 360ms ease;
}

.spotlight-metrics strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

.spotlight-metrics span {
  display: block;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: normal;
}

.marquee {
  overflow: hidden;
  padding: 0.5rem 0 2rem;
}

.marquee-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.marquee-track span {
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--glass-highlight), rgba(255, 255, 255, 0.02)),
    var(--bg-elevated);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.section-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1.5rem;
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}

.section-header h2,
.about h2 {
  font-size: 3.4rem;
  overflow-wrap: normal;
  word-break: normal;
}

.section-header h2 {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.section-text {
  max-width: 38ch;
}

.projects-carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding-bottom: 4rem;
}

.projects-window {
  overflow: hidden;
  min-width: 0;
  border-radius: var(--radius-xl);
}

.projects-grid {
  display: flex;
  will-change: transform;
  transition: transform 1200ms cubic-bezier(0.19, 1, 0.22, 1);
}

.carousel-button {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    linear-gradient(180deg, var(--glass-highlight), rgba(255, 255, 255, 0.02)),
    var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 280ms ease, background 280ms ease, box-shadow 280ms ease;
}

.carousel-button:hover {
  transform: translateY(-1px);
  background: var(--surface);
}

.carousel-button span {
  font-size: 1.25rem;
  line-height: 1;
}

.project-card {
  flex: 0 0 100%;
  padding: 1.3rem;
  min-height: 21rem;
  display: flex;
  flex-direction: column;
  opacity: 0.72;
  transform: scale(0.992);
  transition: opacity 900ms ease, transform 1200ms cubic-bezier(0.19, 1, 0.22, 1);
  cursor: pointer;
}

.project-card.is-active {
  opacity: 1;
  transform: scale(1);
}

.project-card:nth-child(1),
.project-card:nth-child(4) {
  grid-column: span 7;
}

.project-card:nth-child(2),
.project-card:nth-child(5) {
  grid-column: auto;
}

.project-card__glow {
  position: absolute;
  inset: auto -2rem -4rem auto;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 61, 0.18) 0%, rgba(14, 116, 144, 0.08) 38%, transparent 72%);
  pointer-events: none;
}

.project-card__top,
.project-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.project-card__title {
  margin: 1rem 0 0.75rem;
  font-family: "Syne", sans-serif;
  font-size: 1.7rem;
  line-height: 1;
  overflow-wrap: normal;
  word-break: normal;
}

.project-card__description {
  margin: 0 0 1.4rem;
}

.project-card__footer {
  margin-top: auto;
  align-items: end;
}

.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-card__stack span {
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  transition: box-shadow 280ms ease, background 280ms ease, color 280ms ease;
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  align-items: stretch;
  margin-top: 1.75rem;
  padding-bottom: 2rem;
}

.about-card,
.about-stack article,
.info-grid article,
.contact {
  padding: 1.6rem;
}

.about-card,
.about-stack article {
  transition:
    opacity 1200ms cubic-bezier(0.19, 1, 0.22, 1),
    transform 1200ms cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow 320ms ease,
    border-color 320ms ease !important;
  transform: none;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 106, 61, 0.12), transparent 38%),
    radial-gradient(circle at 100% 0%, rgba(14, 116, 144, 0.1), transparent 34%),
    linear-gradient(180deg, var(--glass-highlight), rgba(255, 255, 255, 0.01) 56%),
    var(--surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 14px 34px var(--glass-shadow);
}

.about-card {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease !important;
  transform: none !important;
}

.about-stack article {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease !important;
  transform: none !important;
}

.about-stack {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 1.2rem;
  height: 100%;
}

.about-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-top: 0;
}

.about-stack span,
.info-grid span,
.contact-links span {
  display: block;
  margin-bottom: 0.6rem;
  font-family: "Syne", sans-serif;
  font-size: 1.45rem;
}

.stack-showcase {
  display: block;
  padding-bottom: 1.6rem;
  max-width: none;
  width: 100%;
  padding-inline: 1.25rem;
}

.stack-cloud {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: visible;
  padding-top: 0.45rem;
  padding-right: 1.25rem;
  padding-bottom: 0.7rem;
  scrollbar-width: none;
}

.stack-cloud::-webkit-scrollbar {
  display: none;
}

.stack-pill {
  --stack-pill-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 7.5rem;
  min-height: 2.45rem;
  padding: 0.5rem 0.58rem;
  border-radius: 0.95rem;
  border: 0;
  background: var(--stack-pill-bg);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform 280ms ease, box-shadow 320ms ease, background 320ms ease;
}

.stack-pill--accent {
  --stack-pill-bg:
    linear-gradient(135deg, rgba(255, 106, 61, 0.2), rgba(14, 116, 144, 0.14)),
    rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(135deg, rgba(255, 106, 61, 0.2), rgba(14, 116, 144, 0.14)),
    rgba(255, 255, 255, 0.92);
}

.stack-pill:hover {
  transform: translateY(-1px) scale(1.03);
  background: var(--stack-pill-bg) !important;
  border-color: var(--line) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  color: var(--text) !important;
  filter: none !important;
}

.stack-pill--accent:hover {
  background: var(--stack-pill-bg) !important;
  border-color: var(--line) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  color: var(--text) !important;
}

.spotlight-metrics article:hover,
.stack-pill:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 14px 28px rgba(32, 20, 13, 0.1);
}

body[data-theme="dark"] .spotlight-metrics article:hover,
body[data-theme="dark"] .stack-pill:hover {
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.project-card__stack span:hover {
  transform: none;
  box-shadow: none;
}

body[data-theme="dark"] .stack-pill {
  --stack-pill-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(21, 31, 45, 0.96);
}

body[data-theme="dark"] .stack-pill--accent {
  --stack-pill-bg:
    linear-gradient(135deg, rgba(255, 139, 94, 0.14), rgba(125, 211, 252, 0.1)),
    rgba(21, 31, 45, 0.96);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem;
  padding-bottom: 2rem;
}

.info-grid article {
  grid-column: span 2;
  min-height: 12rem;
}

.info-grid article:nth-child(4),
.info-grid article:nth-child(5) {
  grid-column: span 3;
}

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

.architecture-grid article,
.architecture-grid article:nth-child(4),
.architecture-grid article:nth-child(5) {
  grid-column: auto;
  min-height: 11rem;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease !important;
  transform: none !important;
}

.info-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: stretch;
  margin-top: 4rem;
  margin-bottom: 4rem;
  max-width: 1120px;
}

.contact > div,
.contact-links {
  min-width: 0;
}

.contact h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.04;
  max-width: 9ch;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-links {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  align-self: stretch;
  height: 100%;
}

.contact-links a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.06);
  transition: transform 320ms ease, background 320ms ease, box-shadow 320ms ease;
}

.contact-links a:hover {
  transform: translateY(-1px);
  background: var(--bg-elevated);
  box-shadow: 0 14px 28px rgba(84, 55, 31, 0.08);
}

.contact-links strong {
  display: block;
  overflow-wrap: break-word;
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  filter: blur(2px);
  transition:
    visibility 0ms linear var(--reveal-delay, 0ms),
    opacity 1800ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 1800ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 1800ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  visibility: hidden;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
  visibility: visible;
}

.reveal.reveal-left {
  transform: translate3d(-18px, 8px, 0);
}

.reveal.reveal-right {
  transform: translate3d(18px, 8px, 0);
}

.reveal.reveal-up {
  transform: translate3d(0, 22px, 0);
}

.reveal.reveal-zoom {
  transform: translate3d(0, 12px, 0) scale(0.992);
}

.hero-copy,
.hero-panel,
.section-header,
.projects-carousel,
.about,
.stack-showcase,
.info-grid,
.contact,
.spotlight-card,
.about-card,
.about-stack article,
.info-grid article,
.project-card {
  transition:
    opacity 1200ms cubic-bezier(0.19, 1, 0.22, 1),
    transform 1200ms cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow 320ms ease,
    border-color 320ms ease;
}

.spotlight-card:hover,
.info-grid:not(.architecture-grid) article:hover {
  box-shadow: 0 20px 44px rgba(78, 40, 18, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  transform:
    translate3d(var(--hover-x, 0px), calc(var(--scroll-y, 0px) - 3px + var(--hover-y, 0px)), 0)
    rotateX(var(--hover-rotate-x, 0deg))
    rotateY(var(--hover-rotate-y, 0deg));
}

body[data-theme="dark"] .spotlight-card:hover,
body[data-theme="dark"] .info-grid:not(.architecture-grid) article:hover {
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
  border-color: rgba(190, 213, 255, 0.16);
}

.about-card:hover {
  box-shadow: 0 16px 32px rgba(32, 20, 13, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px) !important;
  filter: none !important;
}

body[data-theme="dark"] .about-card:hover {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  border-color: rgba(190, 213, 255, 0.16);
  filter: none !important;
}

.about-stack article:hover {
  box-shadow: 0 16px 32px rgba(32, 20, 13, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px) !important;
  filter: none !important;
}

body[data-theme="dark"] .about-stack article:hover {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  border-color: rgba(190, 213, 255, 0.16);
}

.architecture-grid article:hover,
.architecture-grid article:nth-child(4):hover,
.architecture-grid article:nth-child(5):hover {
  box-shadow: 0 16px 32px rgba(32, 20, 13, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px) !important;
  filter: none !important;
}


body[data-theme="dark"] .architecture-grid article:hover,
body[data-theme="dark"] .architecture-grid article:nth-child(4):hover,
body[data-theme="dark"] .architecture-grid article:nth-child(5):hover {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  border-color: rgba(190, 213, 255, 0.16);
  filter: none !important;
}

.spotlight-card,
.about-card,
.about-stack article,
.info-grid article,
.project-card {
  transform-style: preserve-3d;
  --hover-x: 0px;
  --hover-y: 0px;
  --hover-rotate-x: 0deg;
  --hover-rotate-y: 0deg;
}

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

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

@media (max-width: 1024px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav-menu {
    order: 3;
    flex: 1 1 100%;
  }

  .hero {
    align-items: start;
  }

  .hero h1 {
    font-size: 3.6rem;
    max-width: 14ch;
  }

  .spotlight-card h2,
  .section-header h2,
  .about h2,
  .contact h2 {
    font-size: 2.8rem;
  }

  .hero,
  .section-header,
  .contact,
  .about {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .architecture-grid {
    grid-template-columns: 1fr 1fr;
  }

  .info-grid article,
  .info-grid article:nth-child(4),
  .info-grid article:nth-child(5) {
    grid-column: auto;
  }

  .project-card,
  .project-card:nth-child(1),
  .project-card:nth-child(2),
  .project-card:nth-child(4),
  .project-card:nth-child(5) {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  :root {
    --radius-xl: 24px;
    --radius-md: 16px;
  }

  .topbar {
    position: fixed;
    top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    padding-top: 1.8rem;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    z-index: 40;
  }

  .topbar::before {
    position: absolute;
    height: 13rem;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    gap: 0.65rem;
    min-width: 0;
  }

  .brand-copy strong {
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .brand-copy {
    min-width: 0;
    overflow: hidden;
  }

  .controls {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    margin-top: 0;
    justify-self: end;
  }

  .menu-toggle {
    display: inline-flex;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 2.6rem;
    height: 2.6rem;
  }

  .nav-menu {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-top: 0.6rem;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    justify-content: flex-start;
    box-shadow: none;
    gap: 0.2rem;
    border-radius: 1.1rem;
    padding: 0.4rem;
  }

  body.menu-open .nav-menu {
    display: flex;
  }

  .nav-menu a {
    width: 100%;
    min-height: 2.35rem;
    padding: 0.55rem 0.8rem;
    justify-content: flex-start;
    font-size: 0.9rem;
    border-radius: 0.8rem;
  }

  .lang-switch {
    flex: 0 0 auto;
    min-width: auto;
    padding: 0.18rem;
    gap: 0.12rem;
  }

  .chip {
    flex: 0 0 auto;
    min-width: 2.1rem;
    padding: 0.34rem 0.46rem;
    font-size: 0.76rem;
  }

  .theme-toggle {
    min-width: 2.35rem;
    min-height: 2.35rem;
    flex: 0 0 auto;
    padding-inline: 0.4rem;
  }

  .hero {
    padding-top: 8.5rem;
    gap: 1.25rem;
    padding-bottom: 2rem;
  }

  .hero h1 {
    font-size: 3.1rem;
    max-width: 14ch;
    line-height: 1;
  }

  .hero-text,
  .section-text,
  .about p,
  .project-card__description,
  .spotlight-card p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-actions {
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .button {
    flex: 1 1 10rem;
    padding: 0.9rem 1rem;
  }

  .spotlight-card {
    min-height: auto;
    padding: 1.4rem;
  }

  .spotlight-card h2,
  .section-header h2,
  .about h2,
  .contact h2 {
    font-size: 2.55rem;
  }

  [data-parallax-speed] {
    will-change: auto;
  }

  [data-scroll-fx] {
    will-change: auto;
  }

  .stack-cloud {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    gap: 0.5rem;
    padding-right: 0;
  }

  .section-header {
    align-items: start;
    padding-top: 1.25rem;
  }

  .spotlight-metrics {
    grid-template-columns: 1fr;
  }

  .projects-carousel {
    grid-template-columns: 1fr 1fr;
  }

  .projects-window {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .carousel-button {
    grid-row: 2;
    width: 3rem;
    height: 3rem;
  }

  #projectPrev {
    justify-self: end;
  }

  #projectNext {
    justify-self: start;
  }

  .project-card {
    min-height: 20rem;
    padding: 1.1rem;
  }

  .project-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-card,
  .about-stack article,
  .info-grid article,
  .contact {
    padding: 1.25rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .architecture-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 8.9rem;
  }

  .topbar,
  .hero,
  .section-header,
  .projects-carousel,
  .stack-showcase,
  .info-grid,
  .contact,
  .about {
    padding-inline: 1rem;
  }

  .brand-mark {
    width: 2.3rem;
    height: 2.3rem;
    flex: 0 0 auto;
  }

  .brand-copy strong {
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .brand-copy small {
    font-size: 0.82rem;
  }

  .topbar::before {
    height: 13.75rem;
  }

  .controls {
    align-items: center;
  }

  .lang-switch,
  .theme-toggle,
  .nav-menu,
  .menu-toggle {
    box-shadow: none;
  }

  .theme-toggle {
    justify-content: center;
    padding-inline: 0.75rem;
  }

  .chip {
    font-size: 0.88rem;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .spotlight-card h2,
  .section-header h2,
  .about h2,
  .contact h2 {
    font-size: 2.2rem;
  }

  .stack-cloud {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    gap: 0.45rem;
  }

  .stack-pill {
    min-width: 6.25rem;
    min-height: 2.35rem;
    padding: 0.58rem 0.5rem;
    font-size: 0.76rem;
  }

  .spotlight-label,
  .project-card__tag,
  .project-card__year,
  .project-card__stack span {
    font-size: 0.78rem;
  }

  .marquee-track span {
    padding: 0.75rem 1rem;
  }

  .project-card__top {
    align-items: flex-start;
  }

  .project-card__title {
    font-size: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-parallax-speed],
  [data-scroll-fx],
  .ambient {
    transform: none !important;
    opacity: 1 !important;
    will-change: auto;
  }

  .reveal,
  .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    visibility: visible !important;
    transition: none;
  }
}
