/* Portfolio/styles/styles.css */
@import "./variables.css";

:root{
  --bg: #ffffff;
  --fg: #0b0b0b;
  --hero-overlay: rgba(255,255,255,0.55);
  --hero-shadow: rgba(0,0,0,0.12);

  --muted: var(--color-text-muted);
  --line: var(--color-border-subtle);
  --line-strong: var(--color-border-strong);

  --wrap: 83.75rem;
  --pad: 3.125rem;
  --header-logo-offset: calc(var(--pad) * 0.25);
  --header-h: 4.875rem;

  --lift: -6.25rem;
  --years-left: clamp(1rem, 4vw, 3.125rem);
  --years-top: clamp(8.75rem, 22vw, 15rem);
  --hello-left: 3.125rem;
  --hello-top: 13.75rem;
  --bgwords-right: clamp(1rem, 4vw, 3.125rem);
  --bgwords-top: clamp(5.625rem, 14vw, 9.375rem);
  --cursor-left: clamp(12.5rem, 44vw, 38.75rem);
  --cursor-top: clamp(10rem, 30vw, 26.25rem);
  --cursor-size: clamp(2rem, 7vw, 3.5rem);
  --name-left: 16.5625rem;
  --name-top: 20rem;
  --name-width: 62.5rem;

  --work-w: 20rem;
  --work-h: 30.125rem;
  --work-gap: 1.625rem;
  --work-text-w: 16.25rem;
}

[data-theme="dark"]{
  --bg: #000000;
  --fg: #ffffff;
  --hero-overlay: rgba(0,0,0,0.55);
  --hero-shadow: rgba(0,0,0,0.55);
}

*{ box-sizing:border-box; }
html,body{ height:100%; overflow-x:hidden; }

body{
  margin:0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-family-base);
  overflow-x:hidden;
}

a{ color: inherit; text-decoration: none; }
img, video{ max-width: 100%; height: auto; }

:focus-visible{
  outline: 0.125rem solid var(--color-focus);
  outline-offset: 0.1875rem;
}

button:focus-visible,
a:focus-visible{
  outline: 0.125rem solid var(--color-focus);
  outline-offset: 0.1875rem;
}

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section{ padding: 3rem 0; }
.about{ padding-bottom: 0.75rem; }

.underline-link{
  display:inline-flex;
  align-items:center;
  gap:0.625rem;
  border-bottom: 0.0625rem solid var(--line-strong);
  padding-bottom: 0.375rem;
  font-size: 1.125rem;
}

/* ================= HEADER ================= */
.site-header{
  position: fixed;
  top:0;
  left:0;
  right:0;
  z-index:50;
  height:var(--header-h);
  border-bottom: 0.0625rem solid var(--line);
  background: var(--color-surface-glass);
  backdrop-filter: blur(0.625rem);
}

.header-inner{
  height:var(--header-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1.75rem;
  position: relative;
}

main{
  padding-top: var(--header-h);
}

.logo{
  display:block;
  line-height:0;
  color: transparent;
  margin-left: var(--header-logo-offset);
}

.logo img{
  display:block;
  height: 1.75rem;
  width:auto;
  image-rendering: pixelated;
}

.nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:1.75rem;
  flex:1;
}

.nav-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:0.375rem;
  width:2.625rem;
  height:2.625rem;
  border: 0.0625rem solid var(--line);
  background: transparent;
  color: var(--color-text-primary);
  cursor:pointer;
}

.nav-toggle-bar{
  width:1.375rem;
  height:0.125rem;
  background: var(--color-text-primary);
  display:block;
}

.nav-link{
  font-size:1.125rem;
  letter-spacing:.02em;
  opacity:.35;
  transition: opacity .2s ease;
}

.nav-link:hover{ opacity:.75; }
.nav-link.is-active{ opacity:1; }

.connect{
  display:inline-flex;
  align-items:center;
  gap:0.625rem;
  font-size:1.125rem;
  border-bottom: 0.0625rem solid var(--line-strong);
  padding-bottom:0.375rem;
}

.theme-dropdown{
  position: relative;
}

.theme-trigger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 0.0625rem solid var(--line-strong);
  background: transparent;
  color: var(--color-text-primary);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.theme-trigger-icon{
  display:grid;
  place-items:center;
  width:1.125rem;
  height:1.125rem;
}

.theme-trigger-icon .theme-icon{
  display:none;
}

.theme-dropdown:not([data-choice]) .theme-trigger .icon-system{
  display:block;
}

.theme-dropdown[data-choice="system"] .theme-trigger .icon-system,
.theme-dropdown[data-choice="light"] .theme-trigger .icon-light,
.theme-dropdown[data-choice="dark"] .theme-trigger .icon-dark{
  display:block;
}

.theme-trigger-caret{
  font-size: 0.75rem;
  line-height:1;
  transition: transform .2s ease;
}

.theme-dropdown.open .theme-trigger-caret{
  transform: rotate(180deg);
}

.theme-menu{
  position:absolute;
  top: calc(100% + 0.375rem);
  right:0;
  min-width: 11.25rem;
  padding: 0.375rem;
  border: 0.0625rem solid var(--line-strong);
  background: var(--color-surface-primary);
  box-shadow: 0 0.75rem 2rem rgba(0,0,0,0.16);
  display:none;
  z-index: 80;
}

.theme-dropdown.open .theme-menu{
  display:block;
}

.theme-option{
  width:100%;
  border: 0;
  background: transparent;
  color: var(--color-text-primary);
  display:flex;
  align-items:center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  text-align:left;
  cursor:pointer;
  font-size: 0.875rem;
}

.theme-option:hover{
  background: var(--color-text-faint);
}

.theme-option.is-active{
  background: var(--color-text-faint);
  font-weight: 700;
}

.theme-option .theme-icon{
  flex: 0 0 auto;
}

/* ================= HERO ================= */
.heroWrap{
  width: 100%;
  display:flex;
  justify-content:center;
  padding: clamp(0.5rem, 1.5vw, 1rem) var(--pad) clamp(1.5rem, 3vw, 2.5rem);
}

.heroStage{
  width: min(75rem, 100%);
  aspect-ratio: 16 / 9;
  position: relative;
  margin: 0 auto;
  overflow: visible;
  isolation: isolate;
}

.heroStage::before{
  content:"";
  position:absolute;
  inset:0;
  z-index: 1;
  pointer-events:none;
  background: radial-gradient(circle at 40% 35%,
    rgba(0,0,0,0) 0%,
    var(--hero-overlay) 70%,
    var(--hero-overlay) 100%
  );
}

.hero-bg{
  position:absolute;
  inset:0;
  z-index: 3;
  pointer-events:none;
  user-select:none;
}

.years{
  position:absolute;
  left: 1.5%;
  top: 20.5%;
  width: 29%;
  pointer-events:none;
  user-select:none;
  z-index: 6;
  -webkit-mask-image: var(--mask-years-fade);
          mask-image: var(--mask-years-fade);
}

.years p{
  margin:0;
  font-size: clamp(1.8rem, 7.5vw, 6.125rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: var(--color-text-ghost-strong);
  text-shadow: var(--shadow-hero-text);
}

.years p:nth-child(1){ opacity:.18; }
.years p:nth-child(2){ opacity:.48; }
.years p:nth-child(3){ opacity:.48; }
.years p:nth-child(4){ opacity:.18; }

.bg-words{
  position:absolute;
  right: 1%;
  top: 11%;
  pointer-events:none;
  user-select:none;
  z-index: 5;
  -webkit-mask-image: var(--mask-years-fade);
          mask-image: var(--mask-years-fade);
  font-size: clamp(1.85rem, 6.1vw, 6.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.06;
  text-transform: uppercase;
  color: var(--color-text-ghost);
  text-shadow: var(--shadow-hero-text);
  filter: blur(0.0094rem);
}

:root:not([data-theme="dark"]) .bg-words{
  /* Keep light mode clean: no mask box, only opacity-based depth. */
  filter: none;
  -webkit-mask-image: none;
          mask-image: none;
}

:root:not([data-theme="dark"]) .years{
  -webkit-mask-image: none;
          mask-image: none;
}

:root:not([data-theme="dark"]) .bg-words div:nth-child(1){ opacity:.14; }
:root:not([data-theme="dark"]) .bg-words div:nth-child(2){ opacity:.5; }
:root:not([data-theme="dark"]) .bg-words div:nth-child(3){ opacity:.5; }
:root:not([data-theme="dark"]) .bg-words div:nth-child(4){ opacity:.16; }

.bg-words.bg-words-front{
  z-index: 4;
}

.bg-words.bg-words-back{
  z-index: 1;
}

.bg-words div:nth-child(1){ opacity:.14; }
.bg-words div:nth-child(2){ opacity:.52; }
.bg-words div:nth-child(3){ opacity:.52; }
.bg-words div:nth-child(4){ opacity:.22; }

.hello-box{
  position:absolute;
  left: 1%;
  top: 17%;
  width: 45%;
  z-index: 20;
  border: clamp(0.125rem, 0.35vw, 0.1875rem) solid var(--color-border-strongest);
  padding: clamp(0.625rem, 1.8vw, 1.75rem) clamp(0.75rem, 2.6vw, 2.125rem);
  background-color: color-mix(in srgb, var(--bg) 22%, transparent);
  box-shadow: 0 0.5rem 1.5rem var(--hero-shadow);
}

.hello-text{
  font-size: clamp(1.4rem, 5.8vw, 6.25rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  display:flex;
  align-items: baseline;
  gap: clamp(0.25rem, 0.7vw, 0.625rem);
  color: var(--color-text-primary);
  white-space: nowrap;
}

.hello-script{
  font-family: var(--font-family-script);
  font-weight: 400;
  margin-right: clamp(0.125rem, 0.4vw, 0.375rem);
}

.caret-bar{
  display:inline-block;
  width: clamp(0.2rem, 0.7vw, 0.625rem);
  height: clamp(1.25rem, 5.6vw, 6rem);
  background: var(--color-text-primary);
  transform: translateY(0.375rem);
  animation: caretBlink 0.9s steps(1, end) infinite;
}

@keyframes caretBlink{
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.handle{
  position:absolute;
  width: clamp(0.5rem, 1.1vw, 1.25rem);
  height: clamp(0.5rem, 1.1vw, 1.25rem);
  background: var(--color-surface-contrast);
}

.h-tl{ left: clamp(-0.625rem, -0.5vw, -0.25rem); top: clamp(-0.625rem, -0.5vw, -0.25rem); }
.h-tr{ right: clamp(-0.625rem, -0.5vw, -0.25rem); top: clamp(-0.625rem, -0.5vw, -0.25rem); }
.h-bl{ left: clamp(-0.625rem, -0.5vw, -0.25rem); bottom: clamp(-0.625rem, -0.5vw, -0.25rem); }
.h-br{ right: clamp(-0.625rem, -0.5vw, -0.25rem); bottom: clamp(-0.625rem, -0.5vw, -0.25rem); }

.cursor-img{
  position:absolute;
  left: 57.5%;
  top: 52%;
  width: 4.2%;
  max-width: 100%;
  height:auto;
  z-index: 30;
  pointer-events:none;
  user-select:none;
  filter:none;
  mix-blend-mode: normal;
}

.name-media{
  position:absolute;
  left: 29%;
  top: 50%;
  width: 73%;
  z-index: 2;
}

.name-video{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  object-fit: contain;
  pointer-events:none;
  user-select:none;
  mix-blend-mode: normal;
  -webkit-mask-image: var(--mask-name-fade);
          mask-image: var(--mask-name-fade);
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}

.heroStage img,
.heroStage svg,
.heroStage video{
  filter:none;
  mix-blend-mode: normal;
  opacity: 1;
}

/* ================= ABOUT ================= */
:root{ --collapse: 0; }

.about{
  position: relative;
  padding-top: 0;
  padding-bottom: 2.5rem;
}

.marquee{
  border-top: 0.0625rem solid var(--line-strong);
  border-bottom: 0.0625rem solid var(--line-strong);
  overflow:hidden;
}

.marquee-track{
  display:flex;
  width:max-content;
  animation: marquee 14s linear infinite;
  will-change: transform;
}

.marquee-content{
  display:flex;
  align-items:center;
  white-space: nowrap;
  padding: 0.375rem 0;
  font-size: 1.375rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.marquee-content span{ display:inline-block; margin-right: 2.125rem; }

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

.about-inner{
  display:block;
  padding-top: 1.5rem;
}

.bio{
  position: relative;
  max-width: 61.25rem;
  margin: 0 auto;
  transition: max-height .4s ease;
}

.bio-text{
  position: relative;
  max-height: 17.5rem;
  overflow: hidden;
  transition: max-height .4s ease;
}

.bio.is-open .bio-text{
  max-height: 62.5rem;
}

.bio.is-collapsed .bio-text::before,
.bio.is-collapsed .bio-text::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height: 4.375rem;
  pointer-events:none;
  z-index: 2;
}

.bio.is-collapsed .bio-text::before{
  top:0;
  background: var(--gradient-bio-fade-top);
}

.bio.is-collapsed .bio-text::after{
  bottom:0;
  background: var(--gradient-bio-fade-bottom);
}

.about-spotlight{
  position: relative;
  width: 100%;
  max-width: 57.5rem;
  margin-top: 0.375rem;
  cursor: pointer;
}

.about-divider{
  display:block;
  width: 100%;
  height: auto;
  margin-top: 0.75rem;
  opacity: .9;
  pointer-events:none;
  user-select:none;
}

.about-spotlight-text{
  margin:0;
  font-weight: 900;
  font-size: clamp(1.375rem, 2.15vw, 2.125rem);
  line-height: 1.22;
  letter-spacing: .01em;
  color: var(--color-text-primary);
  text-wrap: balance;
  hyphens: none;
}

.bio{
  max-width: 65.625rem;
}

.bio-spot{
  color: var(--color-text-primary);
  transition: color .35s ease, filter .35s ease;
}

.bio-dim{
  color: var(--color-text-faint);
  transition: color .35s ease, filter .35s ease;
  filter: blur(0.025rem);
}

.bio.is-open .bio-dim{
  color: var(--color-text-strong);
  filter: none;
}

.about-spotlight{
  position: relative;
}

.photo-grid{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items:end;
  justify-content:center;
  max-height: 0;
  opacity: 0;
  transform: translateY(0.5rem);
  overflow: hidden;
  transition: max-height .4s ease, opacity .35s ease, transform .35s ease;
  pointer-events:none;
  margin: 0 auto;
  width: 100%;
}

.bio.is-open .photo-grid{
  max-height: 125rem;
  opacity: 1;
  transform: translateY(0);
  pointer-events:auto;
  margin-top: 1.75rem;
  margin-bottom: 2.5rem;
  overflow: visible;
}

.photo-slot{
  background: var(--color-surface-primary);
  border: none;
  padding: 0;
  margin: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  width: 100%;
  max-width: 26.25rem;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}

.photo-slot.is-center{
  width: 100%;
  max-width: 38.75rem;
}

.photo-slot img{
  display:block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  transition: transform .25s ease;
}

.photo-slot:hover{
  transform: scale(1.03);
  box-shadow: var(--shadow-card-hover);
}

.bio-boxes{
  display:none;
}

.about-toggle{
  display:block;
  margin: 1.125rem auto 0;
  width: 4rem;
  height: 4rem;
  border: none;
  background: none;
  cursor: pointer;
  opacity: .95;
  position: relative;
  transition: transform .35s ease;
}

.about-toggle:hover{ opacity: 1; }

.about-toggle .chevrons{
  position:absolute;
  inset: 0;
  display:block;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}

.about-toggle .chevrons::before,
.about-toggle .chevrons::after{
  content:"";
  position:absolute;
  left: 50%;
  width: 1.125rem;
  height: 1.125rem;
  border-right: 0.1875rem solid var(--color-border-strong);
  border-bottom: 0.1875rem solid var(--color-border-strong);
  transform: translateX(-50%) rotate(45deg);
  filter: var(--shadow-chevron);
}

.about-toggle .chevrons::before{ top: 1.125rem; }
.about-toggle .chevrons::after{ top: 2.125rem; }

.about-toggle[aria-expanded="true"] .chevrons{
  transform: rotate(180deg);
}

.about-photo{
  display:flex;
  justify-content:flex-end;
}

.about-photo .stack{
  display:flex;
  flex-direction:column;
  gap: 0.875rem;
  align-items:flex-end;
  transform: translateX(0);
  transition: transform .45s ease;
}

.about.is-open .about-photo{
  justify-content:center;
}

.about.is-open .about-photo .stack{
  flex-direction: row;
  align-items:flex-end;
  gap: 1.5rem;
}

.stack-a,.stack-b,.stack-c{
  border-radius: 0;
  background: var(--color-surface-contrast);
  box-shadow: var(--shadow-card-hover);
  transition: height .45s ease, width .45s ease, background .45s ease;
}

.stack-a{
  width: 15rem;
  height: 12.5rem;
}

.stack-b{
  width: 18.75rem;
  height: 15rem;
}

.stack-c{
  width: 15rem;
  height: 12.5rem;
}

.about:not(.is-open) .stack-b{
  background: var(--gradient-stack-light);
}

.about:not(.is-open) .stack-c{
  background: var(--gradient-stack-dark);
}

.about.is-open .stack-b,
.about.is-open .stack-c{
  background: var(--color-surface-contrast);
}

/* ================= WORKS ================= */
.works{ padding-top: 0.625rem; }
.works{ margin-top: -1.75rem; }

.works-divider{ display:none; }

.works-wrap{ padding-top: 1rem; }

.works-title-row{
  display:flex;
  justify-content:center;
  padding: 0;
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
}

.works-title{
  margin:0;
  font-weight: 500;
  font-size: clamp(2.25rem, 4.2vw, 3.75rem);
  letter-spacing: .12em;
}

.works-stage{
  position:relative;
  margin-top: 0;
  min-height: 61.25rem;
}

.works-bg{
  position:absolute;
  left: 50%;
  top: 10.625rem;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events:none;
  user-select:none;
  display:flex;
  flex-direction:column;
  gap: 5.375rem;
  filter: blur(0.0125rem);
  -webkit-mask-image: var(--mask-works-fade);
          mask-image: var(--mask-works-fade);
}

.works-bg span{
  font-weight: 900;
  font-size: clamp(11.875rem, 18vw, 20rem);
  letter-spacing: -0.08em;
  word-spacing: .25em;
  white-space: nowrap;
  line-height: .9;
  background: var(--gradient-works-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: var(--shadow-works-text);
}

.works-bg span:first-child{ opacity: .9; }
.works-bg span:last-child{ opacity: .75; }

.works-bg-ewu{
  display:none;
}

.works-layout{
  position: relative;
  z-index: 2;
  display:flex;
  flex-wrap:wrap;
  gap: 4.375rem;
  justify-content:center;
  align-items:flex-start;
  margin-top: 1.75rem;
}

.work-group{
  flex: 1 1 31.25rem;
  max-width: 37.5rem;
  width: 100%;
  display:flex;
  flex-direction:column;
  gap: 3.125rem;
  align-items:center;
}

.works-mobile{
  display:none;
}

.works-mobile{
  display:none;
}

.work-card{
  width: 100%;
  display:flex;
  gap: 1.375rem;
  align-items:flex-start;
  max-width: calc(var(--work-w) + var(--work-text-w) + 1.375rem);
}

.work-card.is-tile-only{
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--work-w);
}

.work-tile{
  width: var(--work-w);
  height: var(--work-h);
  background: transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.work-tile img{
  display:block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.tile-3 img{ object-position: center 20%; }

.work-meta{
  max-width: var(--work-text-w);
  padding-top: 0.25rem;
}

.work-meta-title{ font-weight:700; font-size: 1rem; }
.work-meta-role{ font-style: italic; font-weight:200; opacity:.9; margin-top: 0.25rem; }
.work-meta-desc{
  margin: 1rem 0 1.125rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

/* ================= SERVICES / CONTACT ================= */
.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.section-title{
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: .02em;
  margin:0;
}

.services-top{
  display:flex;
  flex-wrap:wrap;
  gap: 3.125rem;
  align-items:center;
  margin-top: 1.875rem;
}

.services-copy{
  flex: 1 1 28.125rem;
}

.services-pill{
  flex: 1 1 21.25rem;
}

.services-text{
  margin:0 0 1.125rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.8;
  max-width: 41.25rem;
}

.services-pill{
  border: 0.0625rem solid var(--line-strong);
  border-radius: 62.4375rem;
  height: 11.25rem;
  display:flex;
  align-items:center;
  justify-content:center;
}

.pill-strip{
  width: min(32.5rem, 80%);
  height: auto;
  display:block;
  opacity: .85;
}

.rule{ border-top: 0.0625rem solid var(--color-border-muted); margin: 3.375rem 0; }

.services-grid{
  display:flex;
  flex-wrap:wrap;
  gap: 2.5rem;
  align-items:flex-start;
}

.services-grid > .service{
  flex: 1 1 calc(33.333% - 2.5rem);
  min-width: 17.5rem;
}

.service-title-big{
  font-size: 4.5rem;
  font-weight: 400;
  line-height: .95;
  margin:0;
}

.service-title-big.single{ margin-bottom: 0.625rem; }

.service-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  margin-top: 1.125rem;
  gap: 1.125rem;
}

.service-list{ color: var(--muted); font-size: 0.875rem; line-height: 1.6; }

.pixels{ position:relative; height: 26.25rem; margin-top: 1.375rem; }
.pixels-left{ height: 35rem; }
.pixels-mid{ height: 36.25rem; }
.pixels-right{ height: 57.5rem; }
.px{ position:absolute; background: var(--color-surface-contrast); }
.pixel-media{
  position:absolute;
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  background:transparent;
}

.pixels-left .a{ width:17.5rem; height:17.5rem; left:-2.5rem; top:0; }
.pixels-left .b{ width:16.25rem; height:16.25rem; left:7.75rem; top:11.25rem; }
.pixels-left .c{ width:17.5rem; height:17.5rem; left:-2.5rem; top:20.625rem; }

.pixels-mid .a{ width:16.25rem; height:16.25rem; left:0; top:0; z-index:1; }
.pixels-mid .b{ width:15rem; height:15rem; left:10rem; top:10rem; z-index:3; }
.pixels-mid .c{ width:16.25rem; height:16.25rem; left:2rem; top:19.25rem; z-index:2; }

.pixels-right .a{ width:20rem; height:25rem; left:1rem; top:0; z-index:1; }
.pixels-right .b{ width:15rem; height:15rem; left:11.25rem; top:14.5rem; z-index:3; }
.pixels-right .c{ width:20rem; height:25rem; left:4.75rem; top:22.5rem; z-index:2; }

:root:not([data-theme="dark"]) .pixels-right .c{
  -webkit-mask-image: linear-gradient(to right,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 92%,
    rgba(0, 0, 0, 0) 100%);
          mask-image: linear-gradient(to right,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 92%,
    rgba(0, 0, 0, 0) 100%);
}

.contact-grid{
  display:flex;
  flex-wrap:wrap;
  gap: 3.75rem;
  margin-top: 2.5rem;
}

.contact-grid > *{
  flex: 1 1 calc(33.333% - 3.75rem);
  min-width: 13.75rem;
}

.contact-tagline{
  margin:0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 21.25rem;
}

.contact-stack, .contact-address{
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.contact-address .label{ margin-bottom: 0.5rem; }

.contact-links{
  display:flex;
  justify-content:space-between;
  gap: 1.25rem;
  flex-wrap:wrap;
  margin-top: 2.5rem;
  padding-bottom: 1.875rem;
}

@media (prefers-reduced-motion: reduce){
  *{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================= RESPONSIVE (Desktop-first) ================= */
@media (max-width: 1024px){
  :root{
    --pad: 2rem;
  }

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

  .connect{
    font-size: 1rem;
  }

  .works-layout{
    gap: 2.5rem;
  }

  .work-group{
    flex-basis: 100%;
    max-width: 42.5rem;
  }

  .services-grid > .service{
    flex-basis: calc(50% - 2.5rem);
  }

  .contact-grid > *{
    flex-basis: calc(50% - 3.75rem);
  }
}

@media (max-width: 900px){
  .header-inner{
    gap: 0.75rem;
  }

  .nav{
    display:none;
    position:absolute;
    top: calc(100% + 0.5rem);
    left: var(--pad);
    right: var(--pad);
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap: 0;
    border: 0.0625rem solid var(--line-strong);
    background: var(--color-surface-primary);
    z-index: 70;
  }

  .nav.is-open{
    display:flex;
  }

  .nav-link{
    display:block;
    padding: 0.75rem 0.875rem;
    border-bottom: 0.0625rem solid var(--line);
    opacity: 1;
    font-size: 0.9375rem;
  }

  .nav-link:last-child{
    border-bottom: 0;
  }

  .nav-toggle{
    display:inline-flex;
  }

  .connect{
    display:none;
  }

  .theme-trigger{
    padding: 0.5rem 0.625rem;
  }

  .theme-trigger-label{
    display:none;
  }

  .theme-trigger-caret{
    display:none;
  }
}

@media (max-width: 768px){
  :root{
    --pad: 1.25rem;
  }

  .header-inner{
    gap: 0.875rem;
  }

  .theme-menu{
    right: 0;
    min-width: 10rem;
  }

  .work-card{
    flex-direction:column;
    max-width: var(--work-w);
  }

  .work-meta{
    max-width: 100%;
  }

  .services-top{
    gap: 1.5rem;
  }

  .services-copy,
  .services-pill,
  .services-grid > .service,
  .contact-grid > *{
    flex-basis: 100%;
  }

  #services .service:first-child .pixels-left{
    margin-bottom: 4rem;
  }

  .contact-links{
    justify-content:flex-start;
  }

  /* Keep desktop works background active; only reorder TFS block content */
  #works .works-layout{
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
  }

  #works .work-group-tfs{
    order: 1;
  }

  #works .work-group-ewu{
    order: 2;
    position: relative;
  }

  #works .work-group-tfs{
    max-width: min(62vw, 14rem);
  }

  #works .work-group-tfs > .work-card{
    display: contents;
  }

  #works .work-group-tfs > .work-card:not(.is-tile-only) .work-tile{
    order: 1;
    width: min(62vw, 14rem);
    height: auto;
  }

  #works .work-group-tfs > .work-card.is-tile-only .work-tile{
    order: 2;
    width: min(62vw, 14rem);
    height: auto;
  }

  #works .work-group-tfs > .work-card .work-meta{
    order: 3;
    width: min(62vw, 14rem);
    max-width: 100%;
  }

  #works .work-group-ewu{
    max-width: min(62vw, 14rem);
  }

  #works .work-group-ewu .works-bg-ewu{
    display:flex;
    left: 50%;
    top: 56%;
    transform: translate(-50%, -50%);
    z-index: 0;
  }

  #works .work-group-ewu .work-tile,
  #works .work-group-ewu .work-meta{
    position: relative;
    z-index: 1;
  }

  #works .work-group-ewu > .work-card{
    display: contents;
  }

  #works .work-group-ewu > .work-card:not(.is-tile-only) .work-tile{
    order: 1;
    width: min(62vw, 14rem);
    height: auto;
  }

  #works .work-group-ewu > .work-card.is-tile-only .work-tile{
    order: 2;
    width: min(62vw, 14rem);
    height: auto;
  }

  #works .work-group-ewu > .work-card .work-meta{
    order: 3;
    width: min(62vw, 14rem);
    max-width: 100%;
  }

  #works .works-bg{
    top: 7.5rem;
    gap: 2.5rem;
  }

  #works .works-bg span{
    font-size: clamp(4.5rem, 16vw, 8.5rem);
    letter-spacing: -0.06em;
  }
}

@media (max-width: 480px){
  /* Mobile: match Frame 17 */
  .site-header{
    background: var(--color-surface-primary);
    border-bottom: 0.0625rem solid var(--line);
  }

  .connect{
    display:none;
  }

  .heroWrap{
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .heroStage{
    aspect-ratio: 16 / 10;
  }

  .hello-box{
    left: 1.5%;
    top: 15.5%;
    width: 37%;
  }

  .hello-text{
    font-size: clamp(1.2rem, 5.7vw, 2.25rem);
  }

  .years{
    width: 34%;
    top: 18.5%;
  }

  .years p{
    font-size: clamp(5.6rem, 22vw, 8.8rem);
  }

  .bg-words{
    top: 9%;
    font-size: clamp(4.2rem, 19vw, 7.2rem);
  }

  .cursor-img{
    left: 59%;
    top: 50%;
    width: 5.2%;
  }

  .name-media{
    left: 24%;
    top: 51%;
    width: 77%;
  }

  .about-inner{
    grid-template-columns: 1fr;
    gap: 1.125rem;
  }

  .about-spotlight-text{
    font-size: 0.75rem;
    line-height: 1.55;
  }

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

  .photo-slot{ aspect-ratio: 1 / 1; }
  .about-toggle{ margin-top: 1rem; }
  .about-divider{ margin-top: 1.125rem; }

  /* WORKS */
  #works .works-layout,
  #works .works-bg{
    display:none;
  }

  #works .works-title{
    font-size: 1.25rem;
    letter-spacing: .25em;
    font-weight: 500;
    text-align:center;
  }

  #works .works-mobile{
    display:flex;
    flex-direction: column;
    align-items:center;
    gap: 2.75rem;
    padding: 0 1.25rem;
  }

  #works .works-mobile-block:first-child{
    order: 1;
  }

  #works .works-mobile-block:last-child{
    order: 2;
  }

  #works .works-mobile-block{
    width: min(44vw, 10rem);
    display:flex;
    flex-direction: column;
    gap: 1.75rem;
  }

  #works .works-mobile .work-card{
    display:flex;
    flex-direction: column;
    align-items:center;
    gap: 1.125rem;
  }

  #works .works-mobile .work-card *{
    position: static;
    transform: none;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
  }

  #works .works-mobile .work-tile{
    width: min(44vw, 10rem);
    height: auto;
    overflow:hidden;
    border-radius: 0.125rem;
    background: var(--color-surface-primary);
  }

  #works .works-mobile img{
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  #works .works-mobile .work-meta{
    display:flex;
    flex-direction: column;
    align-items:flex-start;
    gap: 0.5676rem;
    width: min(44vw, 10rem);
  }

  #works .works-mobile .work-meta-title{ font-size: 1rem; }
  #works .works-mobile .work-meta-role{ font-size: 0.8125rem; }
  #works .works-mobile .work-meta-desc{
    font-size: 0.75rem;
    line-height: 1.6;
  }

  #works .works-mobile .view-link{
    font-size: 0.8125rem;
    margin-top: 0.5rem;
  }

  #works .work-secondary{
    position: relative;
    width: min(44vw, 10rem);
    display:flex;
    justify-content:center;
    margin-top: 0.375rem;
    padding: 1.75rem 0 0.625rem;
  }

  #works .work-secondary-bg-only{
    margin-top: 0;
    padding: 1rem 0 0.375rem;
  }

  #works .work-secondary .work-tile{
    width: 100%;
    height: auto;
    margin-left: 0;
  }

  #works .work-bg-inline{
    position:absolute;
    left: 50%;
    top: 0.5rem;
    transform: translateX(-50%);
    width: min(36vw, 8rem);
    height: 3rem;
    background: var(--gradient-works-inline);
    z-index: 0;
    pointer-events:none;
  }

  #works .work-bg-inline span{ display:none; }

  /* SERVICES */
  #services .section-title{
    font-size: 1rem;
    letter-spacing: .2em;
  }

  #services .services-top{
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  #services .services-text{
    font-size: 0.75rem;
    line-height: 1.6;
  }

  #services .services-pill{ height: 7.5rem; }

  #services .services-grid{
    display:flex;
    flex-direction:column;
    gap: 3rem;
  }

  #services .service{
    display:flex;
    flex-direction:column;
    gap: 1rem;
  }

  #services .service-title-big{
    font-size: 2.875rem;
    line-height: .95;
  }

  #services .service-row{
    flex-direction: row;
    justify-content: space-between;
    align-items:flex-end;
    gap: 0.75rem;
  }

  #services .service-list{
    font-size: 0.75rem;
    line-height: 1.6;
  }

  #services .service-row .underline-link{
    font-size: 0.8125rem;
  }

  #services .pixels{
    height: 20rem;
    margin-top: 1.125rem;
  }

  #services .pixels-left{ height: 21.875rem; }
  #services .service:first-child .pixels-left{ margin-bottom: 2.5rem; }
  #services .pixels-left .a{ width:7.5rem; height:11.25rem; left:0; top:0; }
  #services .pixels-left .b{ width:11.875rem; height:7.5rem; left:6.75rem; top:2.5rem; }
  #services .pixels-left .c{ width:8.75rem; height:12.5rem; left:0.625rem; top:9.375rem; }

  #services .pixels-mid{ height: 20rem; }
  #services .pixels-mid .a{ width:8.75rem; height:12.5rem; left:0; top:0; z-index:1; }
  #services .pixels-mid .b{ width:8.75rem; height:12.5rem; left:8.75rem; top:5.625rem; z-index:3; }
  #services .pixels-mid .c{ width:11.25rem; height:7.5rem; left:4.25rem; top:12.8125rem; z-index:2; }

  #services .pixels-right{ height: 23.75rem; }
  #services .pixels-right .a{ width:11.25rem; height:17.5rem; left:6.5rem; top:0; z-index:1; }
  #services .pixels-right .b{ width:7.5rem; height:10rem; left:6.125rem; top:7.5rem; z-index:3; }
  #services .pixels-right .c{ width:11.25rem; height:17.5rem; left:4.75rem; top:19.5rem; z-index:2; }

  /* CONTACT */
  #contact .section-title{
    font-size: 1rem;
    letter-spacing: .2em;
  }

  #contact .contact-grid{
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  #contact .contact-tagline{ font-size: 0.75rem; }

  #contact .contact-links{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
    margin-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}
