/* ==========================================================================
   Alex Betcu — portfolio
   Breakpoints mirror the original Framer site: phone ≤809, tablet 810–1199, desktop ≥1200
   ========================================================================== */

:root {
  --frame: 12px;
  --gap: 12px;
  --radius: 12px;
  --notch: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad-card: 40px;
  --pad-page: 48px;
}

:root,
html[data-theme='dark'] {
  --bg: #0e1011;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.6);
  --card: rgba(255, 255, 255, 0.07);
  --card-hover: rgba(255, 255, 255, 0.11);
  --primary: #ffffff;
  --primary-hover: #f6f6f6;
  --on-primary: #0e1011;
  --on-primary-muted: rgba(14, 16, 17, 0.6);
  --line: #262829;
  --menu: #1c1e1f;
  --mark-filter: none;
  --glass: rgba(14, 16, 17, 0.2);
  color-scheme: dark;
}

html[data-theme='light'] {
  --bg: #ffffff;
  --fg: #0e1011;
  --muted: rgba(14, 16, 17, 0.6);
  --card: #f6f6f6;
  --card-hover: #ececec;
  --primary: #0e1011;
  --primary-hover: #181b1c;
  --on-primary: #ffffff;
  --on-primary-muted: rgba(255, 255, 255, 0.6);
  --line: #e8eded;
  --menu: #f6f6f6;
  --mark-filter: invert(1);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 14px/1.2 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, p, figure, ul {
  margin: 0;
  padding: 0;
  font-weight: 400;
}

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

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

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

.icon {
  display: block;
  flex: none;
}

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

.center {
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Viewport frame: 12px border with rounded inner corners
   -------------------------------------------------------------------------- */
.frame {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  border: var(--frame) solid var(--bg);
  transition: border-color 0.3s ease;
}

.frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow: 0 0 0 var(--frame) var(--bg);
}

/* --------------------------------------------------------------------------
   Notches — tabs cut into a card, with concave corners on both ends
   -------------------------------------------------------------------------- */
.notch {
  position: absolute;
  z-index: 3;
  background: var(--bg);
  color: var(--fg);
  transition: background-color 0.3s ease;
}

.notch::before,
.notch::after {
  content: '';
  position: absolute;
  width: var(--notch);
  height: var(--notch);
  pointer-events: none;
}

/* top-left notch: corners to the right (top) and below (left) */
.notch--tl {
  top: 0;
  left: 0;
  border-bottom-right-radius: var(--notch);
}
.notch--tl::before {
  top: 0;
  left: 100%;
  background: radial-gradient(circle at 100% 100%, transparent calc(var(--notch) - 0.5px), var(--bg) var(--notch));
}
.notch--tl::after {
  top: 100%;
  left: 0;
  background: radial-gradient(circle at 100% 100%, transparent calc(var(--notch) - 0.5px), var(--bg) var(--notch));
}

/* bottom-right notch: corners above (right) and to the left (bottom) */
.notch--br {
  right: 0;
  bottom: 0;
  border-top-left-radius: var(--notch);
  padding: 12px 16px 8px;
  white-space: nowrap;
}
.notch--br::before {
  right: 0;
  bottom: 100%;
  background: radial-gradient(circle at 0 0, transparent calc(var(--notch) - 0.5px), var(--bg) var(--notch));
}
.notch--br::after {
  right: 100%;
  bottom: 0;
  background: radial-gradient(circle at 0 0, transparent calc(var(--notch) - 0.5px), var(--bg) var(--notch));
}

/* top-right notch: corners to the left (top) and below (right) */
.notch--tr {
  top: 0;
  right: 0;
  border-bottom-left-radius: var(--notch);
}
.notch--tr::before {
  top: 0;
  right: 100%;
  background: radial-gradient(circle at 0 100%, transparent calc(var(--notch) - 0.5px), var(--bg) var(--notch));
}
.notch--tr::after {
  top: 100%;
  right: 0;
  background: radial-gradient(circle at 0 100%, transparent calc(var(--notch) - 0.5px), var(--bg) var(--notch));
}

/* --------------------------------------------------------------------------
   Text + icon roll on hover
   -------------------------------------------------------------------------- */
.roll {
  display: inline-block;
  overflow: hidden;
  height: 1.2em;
  line-height: 1.2em;
  vertical-align: top;
}
.roll__in {
  position: relative;
  display: block;
  transition: transform 0.45s var(--ease);
}
.roll__in::after {
  content: attr(data-alt);
  position: absolute;
  top: 100%;
  left: 0;
  white-space: nowrap;
}
a:hover .roll__in,
a:focus-visible .roll__in {
  transform: translateY(-100%);
}
.roll__size {
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  white-space: nowrap;
}

.roll-icon {
  display: block;
  width: var(--s);
  height: var(--s);
  overflow: hidden;
  flex: none;
}
.roll-icon .icon {
  transition: transform 0.45s var(--ease);
}
a:hover .roll-icon .icon,
a:focus-visible .roll-icon .icon {
  transform: translateY(-100%);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: var(--frame);
  left: var(--frame);
  z-index: 60;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 16px 8px;
  border-bottom-right-radius: 20px;
  font-size: 14px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
}
.logo__mark {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: var(--mark-filter);
}
.site-nav {
  display: flex;
  gap: 20px;
}
.theme-toggle {
  position: relative;
  width: 30px;
  height: 20px;
  border-radius: 500px;
  background: var(--card-hover);
  flex: none;
}
.theme-toggle span {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg);
  transition: transform 0.35s var(--ease);
}
html[data-theme='light'] .theme-toggle span {
  transform: translateX(10px);
}

.menu-btn {
  position: fixed;
  top: var(--frame);
  right: var(--frame);
  left: auto;
  z-index: 60;
  display: none;
  height: 36px;
  padding: 0 16px 6px 20px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Mobile menu
   -------------------------------------------------------------------------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: var(--frame);
  background: var(--bg);
}
.menu[hidden] {
  display: none;
}
.menu__panel {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--menu);
  overflow: auto;
  animation: menu-in 0.45s var(--ease);
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}
.menu__close {
  height: 36px;
  padding: 0 16px 6px 20px;
  font-size: 14px;
}
.menu__id {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 72px;
}
.menu__id .avatar {
  width: 56px;
  height: 56px;
}
.menu__name {
  font-size: 22px;
  margin-bottom: 4px;
}
.menu__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 36px;
  line-height: 1.2;
}
.menu__links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap);
  padding: 0 var(--frame);
  min-height: 100vh;
}
.layout--single {
  grid-template-columns: minmax(0, 1fr);
}
.left {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding: var(--frame) 0;
}
.left__card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 0 var(--radius) 0 var(--radius); /* the two other corners sit under notches */
  background: var(--card);
  isolation: isolate;
}
.left__card > img,
.hero-swap__item img,
.carousel__slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.right {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--frame) 0;
  min-width: 0;
}

.card {
  position: relative;
  border-radius: var(--radius);
  background: var(--card);
  transition: background-color 0.3s ease;
}
a.card:hover {
  background: var(--card-hover);
}

.id {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--card);
}

.h-xl {
  font-size: 40px;
  line-height: 1.2;
}
.h-lg {
  font-size: 32px;
  line-height: 1.2;
}
.prose {
  font-size: 15px;
  line-height: 24px;
  max-width: 500px;
}
.prose p + p {
  margin-top: 24px;
}
.prose--wide {
  max-width: none;
}

/* --------------------------------------------------------------------------
   Carousel (home left)
   -------------------------------------------------------------------------- */
.carousel__track {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform 0.8s var(--ease);
  touch-action: pan-y;
}
.carousel__slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}
.btn-glass {
  position: absolute;
  left: 32px;
  bottom: 32px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--glass);
  color: #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 14px;
  line-height: 1;
  transition: background-color 0.3s ease;
}
.btn-glass:hover {
  background: rgba(14, 16, 17, 0.4);
}
.carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border-radius: 4px;
  background: var(--glass);
  color: #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 0.3s ease, opacity 0.3s ease;
}
.carousel__arrow:hover {
  background: rgba(14, 16, 17, 0.45);
}
.carousel__arrow--prev {
  left: 31px;
}
.carousel__arrow--next {
  right: 31px;
}
.carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 31px;
  z-index: 2;
  display: flex;
  padding: 0 5px;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
}
.carousel__dots button {
  width: 20px;
  height: 30px;
  display: grid;
  place-items: center;
}
.carousel__dots button::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.carousel__dots button.is-active::before,
.carousel__dots button:hover::before {
  opacity: 1;
}

/* Work page hero swap */
.hero-swap__item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.hero-swap__item.is-active {
  opacity: 1;
}
/* About: auto crossfade with a slow settle-in zoom */
[data-fade] .hero-swap__item {
  pointer-events: none;
  transition: opacity 1.2s ease;
}
[data-fade] .hero-swap__item.is-active {
  pointer-events: auto;
}
[data-fade] .hero-swap__item img {
  transform: scale(1.06);
  transition: transform 7s ease-out;
}
[data-fade] .hero-swap__item.is-active img {
  transform: none;
}

/* --------------------------------------------------------------------------
   Right column: home
   -------------------------------------------------------------------------- */
.profile-row {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr);
  gap: var(--gap);
}
.profile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  min-height: 308px;
  padding: var(--pad-card);
}
.profile-row--about .profile {
  min-height: 342px;
}
.profile-row--about .avatar {
  width: 70px;
  height: 70px;
}
.profile__name {
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 6px;
}
.profile__bio {
  max-width: 450px;
  font-size: 15px;
  line-height: 24px;
}
.profile__arrow {
  position: absolute;
  top: 32px;
  right: 33px;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.3s ease, transform 0.45s var(--ease);
}
.profile:hover .profile__arrow {
  opacity: 1;
  transform: none;
}

.link-stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.link-card {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 20px;
}
.link-card--primary {
  background: var(--primary);
  color: var(--on-primary);
}
a.link-card--primary:hover {
  background: var(--primary-hover);
}
.link-card--slim {
  height: 58px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 65px;
  padding: 0 24px;
}
.bar__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.link-underline {
  display: inline-block;
  padding-bottom: 1px;
  border-bottom: 1px solid currentColor;
  font-size: 14px;
  line-height: 1;
  transition: opacity 0.3s ease;
}
.link-underline:hover {
  opacity: 0.6;
}

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

.project-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0 var(--radius) var(--radius) var(--radius); /* top-left sits under the title notch */
  background: var(--card);
  isolation: isolate;
}
.project-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1s var(--ease);
}
.project-card:hover > img {
  transform: scale(1.06);
}
.project-card .notch {
  padding: 8px 16px 12px;
}
.project-card h3 {
  font-size: 14px;
}

.btn-muted {
  display: grid;
  place-items: center;
  height: 34px;
  border-radius: 6px;
  background: var(--card);
  font-size: 14px;
  transition: background-color 0.3s ease;
}
.btn-muted:hover {
  background: var(--card-hover);
}

.footer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 172px;
  padding: 24px 64px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
}
.footer-card__name {
  font-size: 24px;
  line-height: 1.2;
}
.footer-card__role {
  color: var(--on-primary-muted);
  margin-top: 2px;
}
.btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--on-primary);
  color: var(--primary);
  white-space: nowrap;
  font-size: 14px;
  transition: opacity 0.3s ease;
}
.btn-solid:hover {
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Project page
   -------------------------------------------------------------------------- */
.project-top {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr);
  gap: var(--gap);
}
.project-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 64px;
  min-height: 344px;
  padding: var(--pad-card);
}
.meta {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.meta__row {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 24px;
}
.meta__row span:last-child {
  text-align: right;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.gallery__item {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
}
.gallery__item img {
  width: 100%;
  height: auto;
}
/* Seamless: stacked slides read as one continuous case study. */
.gallery--seamless {
  gap: 0;
}
.gallery--seamless .gallery__item {
  border-radius: 0;
}
video.gallery__item {
  height: auto;
}
.gallery__embed {
  aspect-ratio: 16 / 9;
}
.gallery__embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.next__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--pad-card);
  min-width: 0;
}
.pill {
  padding: 6px 8px;
  border-radius: 4px;
  background: var(--bg);
  font-size: 12px;
  line-height: 1;
}
.next__text {
  max-width: 350px;
  margin: 28px 0 32px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.next__text.is-clipped {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
}
@media (min-width: 810px) {
  /* the next-project card takes its height from the 3:4 project card beside it */
  .next__card {
    contain: size;
    min-height: 100%;
  }
}
.next__text p + p {
  margin-top: 0;
}
.next__card .link-underline {
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   Work list + about lists
   -------------------------------------------------------------------------- */
.page-intro,
.text-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 64px;
  min-height: 426px;
  padding: var(--pad-page);
}
.text-card--sm {
  min-height: 374px;
}
.list {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
  padding: 12px 24px;
}
.list-row__title {
  font-size: 18px;
  line-height: 1.2;
}
.list-row__meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  white-space: nowrap;
  text-align: right;
}
.list-row__arrow {
  width: 0;
  margin-left: -24px;
  overflow: hidden;
  opacity: 0;
  transition: width 0.4s var(--ease), margin 0.4s var(--ease), opacity 0.3s ease;
}
.list-row:hover .list-row__arrow,
.list-row:focus-visible .list-row__arrow {
  width: 16px;
  margin-left: 0;
  opacity: 1;
}
.list-row__role {
  min-width: 180px;
  text-align: left;
}
.list-row__years {
  min-width: 94px;
}

/* About: section cards sit tight to their content instead of a fixed tall box */
.text-card {
  min-height: 0;
  gap: 40px;
}
.text-card--sm {
  gap: 16px;
  padding: var(--pad-card);
}
.text-card--sm .prose {
  color: var(--muted);
}
.profile-row--about .profile__bio {
  max-width: 420px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* About: numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: 176px;
  padding: 28px 24px 24px;
}
.stat__value {
  font-size: clamp(36px, 3.4vw, 52px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.stat__label {
  max-width: 220px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

/* About: expandable experience rows */
.xp {
  interpolate-size: allow-keywords;
}
.xp > summary {
  list-style: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background-color 0.3s ease;
}
.xp > summary::-webkit-details-marker {
  display: none;
}
.xp > summary:hover {
  background: var(--card-hover);
}
.xp::details-content {
  height: 0;
  overflow: clip;
  transition: height 0.45s var(--ease), content-visibility 0.45s allow-discrete;
}
.xp[open]::details-content {
  height: auto;
}
.xp__toggle {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
  transition: transform 0.45s var(--ease);
}
.xp__toggle::before,
.xp__toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  margin-top: -0.75px;
  border-radius: 2px;
  background: currentColor;
}
.xp__toggle::after {
  transform: rotate(90deg);
}
.xp[open] .xp__toggle {
  transform: rotate(45deg);
}
.xp__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 4px 24px 24px;
}
.xp__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
  list-style: none;
  font-size: 15px;
  line-height: 22px;
}
.xp__list li {
  position: relative;
  padding-left: 20px;
}
.xp__list li::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 0;
  width: 8px;
  height: 1.5px;
  background: var(--muted);
}
.xp__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.xp__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--bg);
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.xp__link:hover {
  background: var(--primary);
  color: var(--on-primary);
}

.clients {
  display: flex;
  align-items: center;
  gap: 48px;
  min-height: 89px;
  padding: 24px 32px;
}
.clients__label {
  font-size: 18px;
  flex: none;
}
.ticker {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12.5%, #000 87.5%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 12.5%, #000 87.5%, transparent 100%);
}
.ticker__track {
  display: flex;
  width: max-content;
  list-style: none;
  animation: ticker calc(var(--n, 6) * 5s) linear infinite;
}
.ticker__track li {
  flex: none;
  width: 100px;
  height: 26px;
  margin-right: 64px;
}
.ticker__track img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: var(--mark-filter);
}
.ticker:hover .ticker__track {
  animation-play-state: paused;
}
@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
/* 404 card */
.contact {
  min-height: calc(80vh - var(--frame));
  padding: 120px clamp(24px, 6.7vw, 135px);
}
.contact__title {
  text-align: center;
  margin-bottom: 48px;
}

/* Left: tilted columns of project covers drifting in opposite directions */
.reel__grid {
  position: absolute;
  inset: -30% -22%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  transform: rotate(-9deg);
}
.reel__track {
  animation: reel var(--dur, 60s) linear infinite;
}
.reel__col:nth-child(even) .reel__track {
  animation-direction: reverse;
}
.reel:hover .reel__track {
  animation-play-state: paused;
}
.reel__tile {
  aspect-ratio: 3 / 4;
  margin-bottom: var(--gap); /* margin, not gap, so -50% lands exactly on the repeat */
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
}
.reel__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%);
  opacity: 0.85;
}
@keyframes reel {
  to {
    transform: translateY(-50%);
  }
}

/* Right: headline + email */
.contact-hero {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
  min-height: min(640px, calc(100svh - var(--frame) * 2));
  padding: var(--pad-page);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px 0 12px;
  border-radius: 500px;
  background: var(--bg);
  font-size: 13px;
  transition: background-color 0.3s ease;
}
.status-pill__dot {
  --dot: 61, 220, 132;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--dot));
  animation: pulse 2s ease-out infinite;
}
.status-pill--alert .status-pill__dot {
  --dot: 255, 90, 60;
}
@keyframes pulse {
  from {
    box-shadow: 0 0 0 0 rgba(var(--dot), 0.55);
  }
  to {
    box-shadow: 0 0 0 9px rgba(var(--dot), 0);
  }
}
.contact-hero__body {
  margin-top: auto;
}
.contact-hero__title {
  max-width: 11ch;
  font-size: clamp(38px, 6.4vw, 88px);
  font-size: clamp(38px, 12.5cqi, 92px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.contact-hero__intro {
  max-width: 470px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 26px;
}
.contact-email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  width: 100%;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.contact-email__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: clamp(22px, 3vw, 40px);
  font-size: clamp(22px, 6cqi, 42px);
  letter-spacing: -0.02em;
}
.contact-email__link .roll-icon {
  --s: 0.8em !important;
}
.contact-email__link .roll-icon .icon {
  width: 100%;
  height: 100%;
}
.contact-email__copy {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--bg);
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.contact-email__copy:hover {
  background: var(--primary);
  color: var(--on-primary);
}
.contact-email__copy.is-copied {
  background: #3ddc84;
  color: #0e1011;
}

/* Form card */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: var(--pad-page);
}
.contact-card__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-card__head p {
  font-size: 15px;
  line-height: 22px;
}
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.topics {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}
.topics__label {
  margin-bottom: 14px;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
}
.topics__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  cursor: pointer;
}
.contact-form .chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px 0 14px;
  border-radius: 500px;
  background: var(--bg);
  font-size: 14px;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.chip span::before {
  content: '+';
  width: 10px;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  transition: transform 0.35s var(--ease);
}
.chip:hover span {
  background: var(--card-hover);
}
.chip input:checked + span {
  background: var(--primary);
  color: var(--on-primary);
}
.chip input:checked + span::before {
  transform: rotate(45deg);
}
.chip input:focus-visible + span {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.2 var(--font);
  padding: 16px 18px;
  outline: none;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow: inset 0 0 0 1px var(--muted);
}
.contact-form ::placeholder {
  color: var(--muted);
  opacity: 1;
}
.contact-form textarea {
  grid-column: 1 / -1;
  min-height: 160px;
  line-height: 1.5;
  resize: vertical;
}
.contact-form button {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 15px;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}
.contact-form button .icon {
  transition: transform 0.45s var(--ease);
}
.contact-form button:hover {
  background: var(--primary-hover);
}
.contact-form button:hover .roll__in {
  transform: translateY(-100%);
}
.contact-form button:hover .icon {
  transform: translate(2px, -2px);
}
.contact-form button[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.contact-form__status {
  grid-column: 1 / -1;
  min-height: 1.2em;
  text-align: center;
  color: var(--muted);
}
.contact-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* --------------------------------------------------------------------------
   404 — a dark wall of work, lit by the cursor
   -------------------------------------------------------------------------- */
.lost {
  --r: 170px;
  background: #0b0c0d;
  touch-action: pan-y;
}
.lost__wall {
  position: absolute;
  inset: -8%;
  will-change: transform;
}
.lost__grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: var(--gap);
  padding: var(--gap);
}
.lost__tile {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
}
.lost__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lost__grid--dim {
  filter: grayscale(1) brightness(0.35);
  opacity: 0.24;
}
.lost__grid--lit {
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--mx, 50%) var(--my, 50%), #000 0%, #000 45%, transparent 100%);
  mask-image: radial-gradient(circle var(--r) at var(--mx, 50%) var(--my, 50%), #000 0%, #000 45%, transparent 100%);
}
.lost__code {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: clamp(120px, 21vw, 340px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.06em;
  mix-blend-mode: difference;
  pointer-events: none;
  user-select: none;
}
.lost__code span {
  display: block;
  will-change: transform;
}
.lost__ring {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease);
}
.lost.is-pointing .lost__ring {
  opacity: 1;
}
.lost.is-flash .lost__ring {
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
}
.lost__hint {
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.4s ease, background-color 0.3s ease;
}
.lost.is-pointing .lost__hint {
  opacity: 0;
}
.lost__hint--touch {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .lost {
    cursor: none;
  }
}
@media (hover: none) {
  .lost__hint--mouse {
    display: none;
  }
  .lost__hint--touch {
    display: inline;
  }
}
html[data-theme='light'] .lost {
  background: #e9eaea;
}
html[data-theme='light'] .lost__grid--dim {
  filter: grayscale(1) contrast(0.9);
  opacity: 0.22;
}

.lost-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 15px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-primary .icon {
  transition: transform 0.45s var(--ease);
}
.btn-primary:hover .icon {
  transform: translate(2px, -2px);
}
.btn-ghost {
  background: var(--bg);
}
.btn-ghost:hover {
  background: var(--primary);
  color: var(--on-primary);
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.9s var(--ease), background-color 0.3s ease;
}
html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
html.js .left__card {
  animation: fade-in 0.8s ease both;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js [data-reveal] {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Tablet 810–1199: single column, desktop header
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .left {
    position: relative;
    height: auto;
    padding-bottom: 0;
  }
  .left__card {
    width: 100%;
    height: min(calc(100vw - 24px), 88vh);
    height: min(calc(100vw - 24px), 88svh);
  }
  .right {
    padding-top: var(--gap);
  }
  .page-contact .left__card {
    height: min(60vw, 520px);
  }
  .contact-hero {
    min-height: 0;
  }
}

/* --------------------------------------------------------------------------
   Phone ≤809
   -------------------------------------------------------------------------- */
@media (max-width: 809px) {
  :root {
    --pad-card: 24px;
    --pad-page: 24px;
  }
  .site-nav {
    display: none;
  }
  .menu-btn {
    display: block;
  }
  .left__card {
    height: auto;
    aspect-ratio: 7 / 8;
    border-radius: 0 0 0 var(--radius);
  }
  .carousel__arrow {
    display: none;
  }
  .carousel__dots {
    display: none;
  }
  .btn-glass {
    left: 24px;
    bottom: 22px;
  }
  .h-xl {
    font-size: 28px;
  }
  .h-lg {
    font-size: 26px;
  }
  .profile-row,
  .project-top,
  .grid-2.next {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile {
    min-height: 0;
    gap: 40px;
  }
  .page-home .link-stack {
    display: none;
  }
  .profile-row--about .profile {
    min-height: 0;
  }
  .profile-row--about .link-stack .link-card:not(.link-card--primary) {
    display: none;
  }
  .profile-row--about .link-card--primary {
    min-height: 42px;
    flex: none;
    height: 42px;
  }
  .projects {
    grid-template-columns: minmax(0, 1fr);
  }
  .project-intro,
  .page-intro,
  .text-card {
    min-height: 0;
    gap: 40px;
  }
  .meta__row {
    min-height: 46px;
    flex: none;
  }
  .next__card {
    min-height: 0;
  }
  .list-row {
    padding: 14px 18px;
    gap: 16px;
    min-height: 58px;
  }
  .list-row__title {
    font-size: 16px;
  }
  .list-row__meta {
    gap: 12px;
    font-size: 13px;
  }
  .page-work .list-row__meta span:first-child,
  .list-row__role {
    display: none;
  }
  .list-row--static .list-row__meta {
    white-space: normal;
  }
  .text-card--sm {
    gap: 16px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    min-height: 150px;
    gap: 24px;
    padding: 20px 18px 18px;
  }
  .stat__value {
    font-size: 32px;
  }
  .stat__label {
    font-size: 13px;
    line-height: 18px;
  }
  .profile-row--about .profile__bio {
    font-size: 19px;
  }
  .xp__body {
    padding: 0 18px 20px;
  }
  .xp__list {
    font-size: 14px;
    line-height: 21px;
  }
  .clients {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
  }
  .ticker {
    width: 100%;
    flex: none;
  }
  .footer-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
  }
  .contact {
    padding: 72px 20px 40px;
    min-height: 0;
  }
  .contact-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-hero {
    gap: 40px;
  }
  .contact-hero__intro {
    font-size: 16px;
    line-height: 24px;
  }
  .contact-card {
    gap: 24px;
  }
  .chip span {
    height: 34px;
    font-size: 13px;
  }
}

@media (min-width: 810px) {
  .menu {
    display: none !important;
  }
}
