:root {
  --bg: #0a0f1e;
  --panel: #111830;
  --surface: rgba(255, 255, 255, .05);
  --line: rgba(255, 255, 255, .13);
  --text: #eef2ff;
  --muted: #9aa6c4;
  --accent: #ff6b3d;
  --accent2: #5b8cff;
  --r: 20px;
  --gutter: max(clamp(16px, 5vw, 64px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --head: "Space Grotesk", system-ui, sans-serif;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f1ea;
  --panel: #fffdf8;
  --surface: rgba(255, 255, 255, .7);
  --line: rgba(20, 26, 46, .14);
  --text: #141a2e;
  --muted: #5b6478;
  --accent: #e8541f;
  --accent2: #3b6cf6;
  color-scheme: light;
}

@view-transition {
  navigation: auto;
}

.nav {
  view-transition-name: nav;
}

::view-transition-old(root) {
  animation: .18s ease both fade-out;
}

::view-transition-new(root) {
  animation: .3s ease both fade-in;
}

@keyframes fade-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

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

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

.muted {
  color: var(--muted);
  font-size: .92rem;
}

/* backdrop */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg) var(--hero-img, none) center / cover;
  overflow: hidden;
}

.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .3;
  animation: drift 22s ease-in-out infinite alternate;
}

.aurora::before {
  background: var(--accent);
  top: -25vmax;
  left: -18vmax;
}

.aurora::after {
  background: var(--accent2);
  bottom: -28vmax;
  right: -16vmax;
  animation-delay: -9s;
}

@keyframes drift {
  to {
    transform: translate(8vmax, 6vmax) scale(1.15);
  }
}

/* shell + nav */
.wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 1300px;
  margin: auto;
  padding: env(safe-area-inset-top, 0) var(--gutter) 24px;
  gap: 8px;
}

.home {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 1000;

  width: 100vw;
  margin-left: calc(50% - 50vw);

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);

  transition:
    padding .25s ease,
    background .25s ease,
    box-shadow .25s ease,
    backdrop-filter .25s ease,
    margin-bottom .25s ease;
}

.nav.scrolled {
  padding: 10px max(14px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  /* the bar is 16px shorter when scrolled; this keeps the page height identical so nothing shifts under the cursor */
  margin-bottom: 16px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
}

.brand {
  font: 700 1.1rem var(--head);
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 10px;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: .2s;
}

.nav nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav nav a[aria-current] {
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.icon {
  width: 38px;
  height: 38px;
  margin-left: 6px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  backdrop-filter: blur(10px);
}

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

.eyebrow {
  color: var(--accent);
  letter-spacing: .28em;
  font-weight: 600;
  font-size: .85rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  border: 0;
  transition: transform .2s, box-shadow .2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -10px var(--accent);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

/* home hero */
.hero {
  display: grid;
  grid-template-columns: 1.5fr .8fr;
  align-items: center;
  gap: 32px;
  padding: 12px 0;
}

h1 {
  font: 700 clamp(2.5rem, 8vw, 6.2rem)/.95 var(--head);
  letter-spacing: -.03em;
  margin: 8px 0 14px;
}

h1 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}

.role {
  font-size: 1.25rem;
  color: var(--muted);
}

.role b {
  color: var(--text);
  display: inline-block;
  transition: .25s;
}

.role b.out {
  opacity: 0;
  transform: translateY(8px);
}

.lead {
  max-width: 52ch;
  margin-top: 10px;
  color: var(--muted);
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.socials {
  display: flex;
  gap: 18px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.socials a {
  color: var(--muted);
  font-size: .92rem;
  border-bottom: 1px solid transparent;
}

.socials a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.hero-text>* {
  animation: up .7s both;
}

.hero-text> :nth-child(2) {
  animation-delay: .08s;
}

.hero-text> :nth-child(3) {
  animation-delay: .16s;
}

.hero-text> :nth-child(4) {
  animation-delay: .24s;
}

.hero-text> :nth-child(5) {
  animation-delay: .32s;
}

.hero-text> :nth-child(6) {
  animation-delay: .4s;
}

@keyframes up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.hero-photo {
  position: relative;
  justify-self: center;
}

.ring {
  width: min(300px, 62vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(var(--accent), var(--accent2), var(--accent));
  transition: transform .15s ease-out;
  box-shadow: 0 30px 70px -30px var(--accent);
}

.ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel);
  display: block;
}

.ring.sm {
  width: 250px;
  margin-bottom: 14px;
}

.badge {
  position: absolute;
  bottom: 6%;
  right: -4%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 600;
}

.portals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.portal {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  backdrop-filter: blur(12px);
  transition: transform .25s, border-color .25s;
}

.portal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--accent), transparent 70%);
  opacity: 0;
  transform: translateY(30%);
  transition: .35s;
}

.portal:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.portal:hover::before {
  opacity: .2;
  transform: none;
}

.portal>* {
  position: relative;
}

.portal .n {
  font: .75rem monospace;
  color: var(--accent);
}

.portal h2 {
  font: 700 1.25rem var(--head);
  margin: 2px 0;
}

.portal p {
  color: var(--muted);
  font-size: .9rem;
}

.portal i {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-style: normal;
  font-size: 1.3rem;
  color: var(--accent);
  transition: transform .25s;
}

.portal:hover i {
  transform: translateX(6px);
}

/* inner pages */
.pg {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pg-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  animation: up .6s both;
}

h1.pt {
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  margin: 4px 0 0;
}

h1.pt.huge {
  font-size: clamp(3rem, 12vw, 8.5rem);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  backdrop-filter: blur(12px);
  animation: up .6s both;
}

.card h2 {
  font: 700 1.6rem var(--head);
  margin: 8px 0 6px;
}

.card h3 {
  font: 700 1.05rem var(--head);
  margin-bottom: 10px;
}

.card:nth-child(2) {
  animation-delay: .08s;
}

.card:nth-child(3) {
  animation-delay: .16s;
}

.card:nth-child(4) {
  animation-delay: .24s;
}

.tag {
  display: inline-block;
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 2px 10px;
  border-radius: 999px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips i {
  font-style: normal;
  font-size: .82rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 2px 11px;
  border-radius: 999px;
}

ul {
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

/* about: profile column*/
.about {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 14px;
}

.intro {
  grid-row: span 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stats {
  display: flex;
  gap: 22px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.stats b {
  display: block;
  font: 700 2rem/1 var(--head);
  color: var(--accent);
}

.stats span {
  color: var(--muted);
  font-size: .85rem;
}

.skills {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 12px;
  align-items: center;
}

.skills dt {
  color: var(--muted);
  font-size: .9rem;
}

.timeline {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

.timeline li {
  position: relative;
  border-left: 2px solid var(--line);
  padding-left: 16px;
  display: grid;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.timeline li.now {
  border-color: var(--accent);
}

.timeline li.now::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}

.timeline span {
  color: var(--muted);
  font-size: .9rem;
}

/* work: featured project */
.work {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}

.feat {
  grid-row: span 2;
}

.win {
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
}

.bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-size: .75rem;
  color: var(--muted);
}

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

.bar i:first-child {
  background: var(--accent);
}

.bar span {
  margin-left: 8px;
}

.tools4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.tools4 a {
  display: grid;
  padding: 18px;
  background: var(--panel);
  transition: background .2s;
}

.tools4 a:hover {
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
}

.tools4 small {
  color: var(--muted);
}

.judges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.judges a {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  transition: .2s;
}

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

.judges small {
  color: var(--muted);
}

/* certificates: visual wall */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filters button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: .9rem;
  color: var(--muted);
  transition: .2s;
}

.filters button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.cert {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: transform .25s, border-color .25s;
  animation: up .5s both;
}

.cert:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.shot {
  height: 130px;
  background: var(--panel);
  overflow: hidden;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .5s;
}

.cert:hover .shot img {
  transform: scale(1.06);
}

.meta {
  padding: 14px 16px 16px;
  display: grid;
  gap: 4px;
}

.meta h3 {
  font: 700 1rem/1.3 var(--head);
}

.meta .go {
  color: var(--accent);
  font-weight: 600;
  font-size: .9rem;
  margin-top: 4px;
}

/* gallery: photo wall */
.gwall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.photo {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
  cursor: pointer;
  transition: transform .25s, border-color .25s;
  animation: up .5s both;
}

.photo:hover,
.photo:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  outline: none;
}

.photo .frame {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.photo .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.photo:hover .frame img,
.photo:focus-visible .frame img {
  transform: scale(1.08);
}

.photo .cap {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), transparent);
  color: #fff;
  transform: translateY(100%);
  opacity: 0;
  transition: transform .3s, opacity .3s;
}

.photo:hover .cap,
.photo:focus-visible .cap {
  transform: translateY(0);
  opacity: 1;
}

.photo .cap b {
  font: 700 .95rem var(--head);
}

.photo .cap small {
  color: rgba(255, 255, 255, .75);
}

body.lb-lock {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, black);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s;
  z-index: 2000;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lb-fig {
  display: grid;
  gap: 14px;
  max-width: min(92vw, 1100px);
  animation: up .35s both;
}

.lb-fig img {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6);
  margin: 0 auto;
}

.lb-fig figcaption {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  color: var(--text);
}

.lb-fig h3 {
  font: 700 1.3rem var(--head);
}

.lb-fig p {
  color: var(--muted);
  max-width: 60ch;
}

.lb-close,
.lb-nav {
  position: fixed;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  transition: .2s;
  z-index: 2001;
}

.lb-close:hover,
.lb-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lb-close {
  top: max(18px, env(safe-area-inset-top, 0px));
  right: max(18px, env(safe-area-inset-right, 0px));
}

.lb-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev {
  left: max(18px, env(safe-area-inset-left, 0px));
}

.lb-next {
  right: max(18px, env(safe-area-inset-right, 0px));
}

@media (max-width: 620px) {

  .lb-nav {
    width: 38px;
    height: 38px;
  }
}

/* contact: editorial */
.contact {
  justify-content: center;
}

.mail {
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 2px solid var(--line);
  padding: 8px 0 14px;
  font: 700 clamp(1.3rem, 4.6vw, 2.8rem) var(--head);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  transition: border-color .25s, color .25s;
}

.mail span {
  font: .85rem system-ui;
  color: var(--muted);
}

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

.rows {
  list-style: none;
  padding: 0;
  display: block;
}

.rows a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  transition: padding .25s, color .25s;
}

.rows a:hover {
  padding-left: 16px;
  color: var(--accent);
}

.rows b {
  font: 700 1.2rem var(--head);
}

.rows span {
  color: var(--muted);
}

.pager {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
}

.pager a {
  color: var(--muted);
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: .2s;
}

.pager a:hover {
  color: var(--text);
  border-color: var(--accent);
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--text);
  color: var(--bg);
  padding: 8px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 100;
  font-weight: 600;
}

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

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-photo {
    order: -1;
  }

  .hero .ring {
    width: 130px;
  }

  .badge {
    display: none;
  }

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

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

  .intro {
    grid-row: auto;
  }

  .feat {
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {

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

.home .hero {
  min-height: 68dvh;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px 5px 10px;
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
}

.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, .6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(46, 204, 113, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

.hero-text> :nth-child(1) {
  animation-delay: 0s;
}

button.btn {
  font-size: 1rem;
}

/* scroll reveal */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.rv.in {
  opacity: 1;
  transform: none;
}

.bento .rv:nth-child(2) {
  transition-delay: .08s;
}

.bento .rv:nth-child(3) {
  transition-delay: .16s;
}

.bento .rv:nth-child(4) {
  transition-delay: .24s;
}

/* stat bar */
.statbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.statbar div {
  padding: 20px 22px;
  border-right: 1px solid var(--line);
  display: grid;
}

.statbar div:last-child {
  border: 0;
}

.statbar b {
  font: 700 clamp(1.8rem, 4vw, 2.6rem)/1 var(--head);
  color: var(--accent);
}

.statbar span {
  color: var(--muted);
  font-size: .88rem;
  margin-top: 4px;
}

/* ticker */
.ticker {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, #000 8%, #000 92%, transparent);
}

.tk-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 12px;

  background: var(--panel);
  border: 1px solid var(--line);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

  white-space: nowrap;
  position: relative;
  z-index: 2;
}

.tk-track {
  display: flex;
  gap: 44px;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
  position: relative;
  z-index: 1;
}

.tk-track:hover {
  animation-play-state: paused;
}

.tk-track span {
  font: 700 1.25rem var(--head);
  color: var(--muted);
}

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

/* bento */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.bento .card {
  animation: none;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.snap {
  grid-column: span 5;
}

.feat-home {
  grid-column: span 7;
}

.creds {
  grid-column: span 6;
}

.find {
  grid-column: span 6;
}

.bento .tag {
  align-self: flex-start;
}

.snap dl {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px 12px;
}

.snap dt {
  color: var(--muted);
  font-size: .88rem;
}

.snap dd small {
  color: var(--muted);
}

.more {
  color: var(--accent);
  font-weight: 600;
  font-size: .92rem;
  margin-top: auto;
  align-self: flex-start;
}

.more:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.feat-home h2 {
  margin: 2px 0 0;
}

.tools4.mini {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.tools4.mini a {
  padding: 14px 16px;
}

.tools4.mini b {
  font-size: .95rem;
}

.feat-home .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.clist {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 4px;
}

.clist a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  transition: background .2s;
}

.clist a:hover {
  background: var(--surface);
}

.clist .lg {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font: 700 1rem var(--head);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.clist b {
  display: block;
  line-height: 1.3;
  font-weight: 600;
}

.clist small {
  color: var(--muted);
}

.clist em {
  margin-left: auto;
  font-style: normal;
  color: var(--accent);
}

.profiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.profiles a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: .2s;
}

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

.profiles small {
  color: var(--muted);
}

/* cursor spotlight on highlight cards */
.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
}

.spot:hover::after {
  opacity: 1;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 30px clamp(20px, 4vw, 40px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 20%, var(--surface)), var(--surface) 70%);
}

.cta h2 {
  font: 700 clamp(1.4rem, 3vw, 2rem) var(--head);
}

.cta .row {
  margin: 0;
}

.site-foot {
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  padding: 6px 0;
}

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

  .statbar div:nth-child(2) {
    border-right: 0;
  }

  .statbar div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .snap,
  .feat-home,
  .creds,
  .find {
    grid-column: 1 / -1;
  }

  .home .hero {
    min-height: 0;
  }

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

@media (prefers-reduced-motion: reduce) {
  .rv {
    opacity: 1;
    transform: none;
  }

  .tk-track {
    animation: none;
  }
}

/* work: section headings + hackathon cards */
.sec {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.sec-t {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 clamp(1.25rem, 3vw, 1.6rem) var(--head);
}

.sec-t .cnt {
  font: 600 .8rem var(--head);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 2px 10px;
  border-radius: 999px;
}

.hack .shot {
  height: auto;
  aspect-ratio: 3 / 2;
}

.hack .shot img {
  object-position: center;
}

.hack .built {
  color: var(--muted);
  font-size: .9rem;
}

.hack .res {
  justify-self: start;
  margin-top: 2px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent2);
  background: color-mix(in srgb, var(--accent2) 14%, transparent);
  padding: 2px 10px;
  border-radius: 999px;
}

/* hamburger menu (hidden on wide screens) */
.menu-btn {
  display: none;
}

.icon .t-lbl {
  display: none;
}

@media (max-width: 760px) {
  .menu-btn {
    display: grid;
    place-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
  }

  .nav.open .menu-btn span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

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

  .nav.open .menu-btn span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* the link list becomes a dropdown panel under the header */
  .nav nav {
    position: absolute;
    top: calc(100% + 6px);
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }

  .nav.open nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }

  .nav nav a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 16px;
    font-size: 1rem;
    border-radius: 12px;
  }

  .nav nav a[aria-current] {
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .nav nav .icon {
    width: auto;
    height: 46px;
    margin: 4px 0 0;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    border-radius: 12px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav nav .icon .t-lbl {
    display: inline;
    color: var(--muted);
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  .nav nav,
  .menu-btn span {
    transition: none !important;
  }
}

/* phones: no backdrop blur (expensive on budget GPUs) */
@media (max-width: 760px) {
  .nav.scrolled {
    background: var(--panel);
  }

  .nav.scrolled,
  .icon,
  .portal,
  .card,
  .status,
  .statbar,
  .tk-label {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ---------- Scrollbar ---------- */
html {
  scrollbar-gutter: auto;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text) 24%, var(--bg));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Firefox only: Chrome ignores ::-webkit-scrollbar if scrollbar-color is set */
@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--text) 30%, var(--bg)) var(--bg);
  }
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1100;
  pointer-events: none;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform-origin: 0 50%;
  transform: scaleX(0);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 70%, transparent);
}