@font-face {
  font-family: 'Talina';
  src: url('../assets/fonts/Talina DEMO.otf') format('opentype');
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Rage Italic';
  src: url('../assets/fonts/RAGE_1.TTF') format('truetype');
  font-weight: normal;
  font-display: swap;
}

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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
}

/* =========================
   HERO
   ========================= */

.hero {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  --p: 0;
  width: 100%;
  height: 100vh;
  min-height: 0;          /* hero is fixed: a min-height taller than the screen cuts it off */
  overflow: hidden;
  background: #e9e9e9;
}

/* ---------- torn-paper corner images ---------- */

.tear {
  position: absolute;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.tear-tl {
  top: 0;
  left: 0;
  width: clamp(150px, 26vw, 320px);
  animation: tearIn 1s ease-out 0.1s forwards;
}

.tear-tr {
  top: 0;
  right: 0;
  width: clamp(140px, 24vw, 300px);
  animation: tearIn 1s ease-out 0.35s forwards;
}

.tear-bl {
  bottom: 0;
  left: 0;
  width: clamp(130px, 24vw, 300px);
  animation: tearIn 1s ease-out 0.6s forwards;
}

@keyframes tearIn {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- nav ---------- */

nav {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 28px 0 0;
  opacity: 0;
  animation: fadeUp 0.8s ease-out 1s forwards;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 32px;

  background: #f4f4f4;
  border-radius: 40px;
  padding: 12px 30px;

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.nav-pill a {
  position: relative;

  color: #333;
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;

  transform: scale(1);
  transition:
    transform 0.25s ease,
    color 0.25s ease;
}

/* Main hover */
.nav-pill a:hover {
  transform: scale(1.35);
  color: #000;
}

/* ---------- headline ---------- */

.content {
  --h1: clamp(52px, min(8.6vw, 17vh), 110px);
  position: relative;
  z-index: 3;
  padding: 60px 0 0 clamp(32px, 5.6vw, 80px);
  max-width: 720px;
  opacity: 0;
  animation: fadeUp 0.9s ease-out 1.2s forwards;
}

.content h1 {
  position: relative;
  z-index: 1;
  font-family: 'Talina', 'Segoe UI', sans-serif;
  font-size: var(--h1);
  font-weight: 400;
  letter-spacing: -1px;
  margin-top: 20px;
  background: linear-gradient(135deg, #9EB6C2 0%, #122448 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.content .script {
  position: relative;
  z-index: 2;
  white-space: nowrap;
  font-family: 'Rage Italic', cursive;
  font-size: calc(var(--h1) * .836);
  font-weight: 400;
  color: #111;
  margin-top: -.61em;
  margin-left: -4px;
  text-shadow: 2px 3px 6px rgba(0,0,0,0.18);
}

.buttons {
  margin-top: clamp(20px, 4vh, 34px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
}

.buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 30px;
  background: #c3c3c3;
  color: #222;
  border-radius: 22px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.buttons a:hover {
  background: #b0b0b0;
  transform: translateY(-2px);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- photo ---------- */

.photo {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 42%;
  opacity: 0;
  animation: photoIn 1s ease-out 0.8s forwards;
}

.photo img {
  width: 100%;
  display: block;
  max-height: 82vh;
  object-fit: contain;
  object-position: bottom right;
}

@keyframes photoIn {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   ABOUT ME
   ========================================================= */

.about {
  position: relative;
  z-index: 2;
  margin-top: var(--hero-h, max(100vh, 640px));
  box-shadow: 0 -30px 70px rgba(0,0,0,.22);
  min-height: 660px;
  height: 660px;
  overflow: hidden;
  padding: 0;
  background: linear-gradient(
    180deg,
    #f1f1f1 0%,
    #d9d9d9 78%,
    #efefef 100%
  );
}

.about-body {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0;
  display: block;
}

.about-left {
  position: absolute;
  left: 5vw;
  top: 0;
  width: 400px;
  height: 620px;
  display: block;
  z-index: 20;
}

.about-photo {
  position: absolute;
  left: 16px;
  top: 20px;
  width: 360px;
  margin: 0;
  opacity: 1;
  animation: none;
  z-index: 20;
}

.about-photo img {
  width: 100%;
  display: block;
}

.about-heading {
  position: absolute;
  left: 50px;
  top: 540px;
  bottom: auto;
  z-index: 30;
  margin: 0;
  font-family: 'Talina', 'Segoe UI', sans-serif;
  font-size: clamp(46px, 4.4vw, 64px);
  line-height: .95;
  font-weight: 400;
  color: #0b0b0b;
  white-space: nowrap;
  text-shadow: 2px 3px 6px rgba(0,0,0,.14);
}

.heading-tear {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.12));
}

.heading-tear-l {
  width: 92px;
  left: -10px;
  top: 20px;
  z-index: 1;
}

.heading-tear-r {
  width: 78px;
  left: 238px;
  top: 22px;
  z-index: 1;
}

.about-right {
  position: absolute;
  left: 31%;
  right: 4%;
  top: 0;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  z-index: 4;
}

.about-text {
  width: min(570px, 100%);
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 42px;
  opacity: 1;
  animation: none;
}

.about-text p {
  position: relative;
  margin: 0;
  padding: 0 0 11px;
  max-width: 100%;
  border-bottom: 1px dotted #777;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  color: #151515;
}

.about-text p::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
}

.about-text p:nth-of-type(2) {
  margin-left: 95px;
  max-width: calc(100% - 95px);
}

/* ---------- dotted path ---------- */

.about-dots {
  position: absolute;
  z-index: 15;
  top: 0;
  left: 8vw;
  width: 380px;
  height: 660px;
  pointer-events: none;
  overflow: visible;
  opacity: 1;
  animation: none;
}

.dot-node {
  opacity: 1;
  animation: none;
}

/* ---------- bottom decorative images ---------- */

.about::before,
.about::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 245px;
  height: 120px;
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 5;
  pointer-events: none;
}

.about::before {
  left: 0;
  right: auto;
  background-image: url('../assets/images/2bottom left.png');
  background-position: bottom left;
}

.about::after {
  right: 0;
  left: auto;
  background-image: url('../assets/images/2bottom right.png');
  background-position: bottom right;
}

/* =========================================================
   PROJECTS
   ========================================================= */

.projects {
  position: relative;
  z-index: 2;
  background: #0d0d10;
  color: #f7f7f7;
  padding: 0;
  overflow: clip;
}

.projects-intro {
  min-height: 34vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 80px 7vw 36px;
}

.projects-eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  opacity: .55;
  margin-bottom: 12px;
}

.projects-heading {
  text-align: left;
  color: #f7f7f7;
  font-family: 'Talina', 'Segoe UI', sans-serif;
  font-size: clamp(52px, 8vw, 112px);
  line-height: .9;
  font-weight: 400;
  margin: 0;
}

/* Final stacked-project layout. */
.projects .project-stack {
  position: relative;
  height: 100vh;
  min-height: 0;
  padding: 0;
  overflow: visible;
  isolation: isolate;
}

.projects .project-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  min-height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.projects .project-wrap:nth-child(1) { z-index: 1; }
.projects .project-wrap:nth-child(2) { z-index: 2; }
.projects .project-wrap:nth-child(3) { z-index: 3; }
.projects .project-wrap:nth-child(4) { z-index: 4; }
.projects .project-wrap:nth-child(5) { z-index: 5; }

.projects .project-card {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  width: min(1180px, calc(100% - 7vw));
  height: calc(100vh - 40px);
  min-height: 0;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 60px);
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 60px);
  overflow: visible;
  pointer-events: auto;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 30px 30px 0 0;
  background: #101014;
  box-shadow: 0 -18px 60px rgba(0,0,0,.28);
  transform-origin: center top;
  will-change: transform;
}

.project-card--1 { background: #101014; }
.project-card--2 { background: #121217; }
.project-card--3 { background: #15151a; }

.project-card.reverse {
  flex-direction: row-reverse;
}

.project-card:nth-child(odd) .project-showcase {
  order: 1;
}

.project-card:nth-child(odd) .project-info {
  order: 2;
}

.project-card:nth-child(even) .project-info {
  order: 1;
}

.project-card:nth-child(even) .project-showcase {
  order: 2;
}

.project-info {
  flex: 0 0 34%;
  min-width: 0;
  position: relative;
  z-index: 5;
}

.project-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .14em;
  opacity: .5;
  margin-bottom: 18px;
}

.project-info h3 {
  font-family: 'Talina', 'Segoe UI', sans-serif;
  font-size: clamp(34px, 3.7vw, 56px);
  line-height: .95;
  font-weight: 400;
  overflow-wrap: break-word;
  margin-bottom: 28px;
  color: #fff;
}

.project-info p {
  max-width: 480px;
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.55;
  color: rgba(255,255,255,.72);
  margin-bottom: 30px;
}

.project-link {
  display: inline-flex;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,.45);
  padding-bottom: 5px;
}

/* =========================================================
   WEBSITE MOCKUPS
   Full-page desktop/mobile screenshots live inside fixed
   viewports. Hovering a viewport scrolls the screenshot down.
   ========================================================= */

.project-showcase {
  position: relative;
  flex: 1 1 66%;
  min-width: 0;
  aspect-ratio: 8 / 5;
  isolation: isolate;
  overflow: visible;
  z-index: 3;
}

/* CSS laptop mockup (front-facing, 16:10 screen) */
.laptop-mockup {
  position: absolute;
  left: 0;
  top: 4%;
  width: 84%;
  aspect-ratio: 1 / 0.62;
  transition: transform .45s ease, filter .45s ease;
  z-index: 1;
}

.laptop-screen {
  position: absolute;
  left: 4%;
  top: 0;
  width: 92%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #2a2a2a, #0b0b0b);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px 14px 3px 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  overflow: hidden;
  z-index: 2;
}

.laptop-screen::after {
  content: '';
  position: absolute;
  inset: 9px 9px 12px;
  border-radius: 6px;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255,255,255,.09), transparent 30%, transparent 72%, rgba(255,255,255,.025));
  z-index: 3;
}

.laptop-camera {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: #050505;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1);
  z-index: 5;
}

.laptop-screen .mockup-viewport {
  position: absolute;
  inset: 9px 9px 12px;
  overflow: hidden;
  background: #fff;
  border-radius: 6px;
  z-index: 1;
}

.laptop-screen .mockup-viewport img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0;
  transform: translateY(0);
  will-change: transform;
}

/* keyboard deck: thin, full width, slightly wider than the lid */
.laptop-base {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 6.4%;
  background: linear-gradient(180deg, #4a4a4a 0%, #262626 45%, #111 100%);
  border-radius: 2px 2px 14px 14px / 2px 2px 10px 10px;
  box-shadow: 0 16px 28px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.28);
  z-index: 1;
}

/* thumb notch in the centre of the deck */
.laptop-hinge {
  position: absolute;
  left: 50%;
  bottom: 4.6%;
  width: 16%;
  height: 1.8%;
  transform: translateX(-50%);
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #050505, #1b1b1b);
  z-index: 4;
}

.laptop-trackpad,
.laptop-base::before {
  display: none;
}

.laptop-mockup:hover {
  transform: translateY(-8px);
  filter: drop-shadow(0 14px 20px rgba(0,0,0,.25));
}

.phone-viewport iframe {
  display: block;
  width: 375px;
  height: 760px;
  border: 0;
  background: #fff;
  transform: scale(var(--phone-iframe-scale, 0.52));
  transform-origin: top left;
}

/* phone sits IN FRONT of the laptop, bottom-right */
.phone-mockup {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 27%;
  height: auto;
  aspect-ratio: 9 / 19;
  border-radius: 26px;
  background: #111;
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: -14px 24px 50px rgba(0,0,0,.6);
  transform: rotate(3deg);
  transition: transform .45s ease;
  z-index: 10;
}

.phone-mockup:hover {
  transform: rotate(0) translateY(-10px) scale(1.035);
}

.phone-speaker {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 34px;
  height: 4px;
  border-radius: 10px;
  background: #2b2b2b;
  transform: translateX(-50%);
  z-index: 4;
}

.phone-viewport {
  position: absolute;
  inset: 6px;
  border-radius: 20px;
  overflow: hidden;
}

/* Closest uses a full-page screenshot, so let the phone preview scroll vertically. */
.phone-viewport--scrollable {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.phone-viewport--scrollable::-webkit-scrollbar {
  width: 0;
  height: 0;
}


/* Give the screenshot a little lift when the whole showcase is entered. */

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 900px) {

  .about {
    height: auto;
    min-height: 680px;
    padding: 0 24px 50px;
  }

  .about-body {
    height: auto;
    min-height: 630px;
  }

  .about-left {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: 390px;
    padding-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .about-photo {
    position: relative;
    left: auto;
    top: auto;
    width: 230px;
    margin: 0;
  }

  .about-heading {
    position: absolute;
    left: 50%;
    top: 350px;
    bottom: auto;
    transform: translateX(-50%);
    font-size: 40px;
  }

  .about-right {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
  }

  .about-text {
    width: min(560px, 100%);
    margin: 40px 0 0;
    gap: 30px;
  }

  .about-text p:nth-of-type(2) {
    margin-left: 0;
    max-width: 100%;
  }

  .about-dots {
    display: none;
  
    left: 8vw;
    z-index: 2;}

  .about::before,
  .about::after {
    width: 150px;
    height: 80px;
    bottom: 0;
    background-size: contain;
  }

  .about::before {
    left: 0;
    right: auto;
    background-position: bottom left;
  }

  .about::after {
    right: 0;
    left: auto;
    background-position: bottom right;
  }

  /* Projects mobile */

  .projects-intro {
    min-height: 28vh;
    padding: 60px 24px 28px;
  }

  .project-stack {
    height: 88vh;
  }

  .projects .project-stack {
    height: 88vh;
  }

  .projects .project-wrap {
    height: 88vh;
  }

  .projects .project-card {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    height: calc(88vh - 24px);
    min-height: 0;
    padding: 22px;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 24px;
    border-radius: 24px 24px 0 0;
  }

  .projects .project-card.reverse {
    flex-direction: column;
  }

  .project-info {
    order: 2;
    flex: none;
  }

  .project-card:nth-child(even) .project-info,
  .project-card:nth-child(even) .project-showcase,
  .project-card:nth-child(odd) .project-info,
  .project-card:nth-child(odd) .project-showcase {
    order: initial;
  }

  .project-showcase {
    order: 1;
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 0.92;
    min-height: 0;
  }

  .laptop-mockup {
    width: 90%;
    top: 0;
  }

  .laptop-screen {
    border-radius: 9px 9px 2px 2px;
  }

  .laptop-screen .mockup-viewport,
  .laptop-screen::after {
    inset: 5px 5px 7px;
  }

  .phone-mockup {
    width: 34%;
    max-width: none;
    right: 0;
    bottom: 0;
    border-radius: 18px;
  }

  .phone-viewport {
    inset: 4px;
    border-radius: 14px;
  }

  .project-info h3 {
    font-size: 48px;
    margin-bottom: 16px;
  }

  .project-info p {
    font-size: 15px;
    margin-bottom: 20px;
  }
}
.phone-fallback-image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: cover;
  object-position: top center;
}


/* =========================================================
   ALTERNATING LAYOUT
   1: laptop left  · phone right of it · info right
   2: laptop right · phone left of it  · info left
   3: same as 1
   ========================================================= */

@media (min-width: 901px) {
  .projects .project-card--2 .project-showcase { order: 2; }
  .projects .project-card--2 .project-info     { order: 1; }
}

/* mobile: mockups always on top, info below */
@media (max-width: 900px) {
  .projects .project-card .project-showcase { order: 1; }
  .projects .project-card .project-info     { order: 2; }
}

/* card 2: mirror the mockup pair */
.projects .project-card--2 .laptop-mockup {
  left: auto;
  right: 0;
}

.projects .project-card--2 .phone-mockup {
  right: auto;
  left: 0;
  transform: rotate(-3deg);
  box-shadow: 14px 24px 50px rgba(0,0,0,.6);
}

.projects .project-card--2 .phone-mockup:hover {
  transform: rotate(0) translateY(-10px) scale(1.035);
}


/* =========================================================
   HERO SCROLL-AWAY
   --p (0 → 1) is set from js/script.js while the first
   screen is scrolled. Everything in the hero flies out in its
   own direction and the About section slides up over it.
   `translate` is used (not `transform`) so it doesn't clash
   with the entrance animations.
   ========================================================= */

.hero.is-gone { visibility: hidden; }

.hero nav              { translate: 0 calc(var(--p) * -180px); }

.hero .tear-tl         { translate: calc(var(--p) * -420px) calc(var(--p) * -420px); }
.hero .tear-tr         { translate: calc(var(--p) *  420px) calc(var(--p) * -420px); }
.hero .tear-bl         { translate: calc(var(--p) * -420px) calc(var(--p) *  420px); }

.hero .content h1      { translate: calc(var(--p) * -1 * max(85vw, 800px)) 0; }
.hero .content .script { translate: calc(var(--p) * -1 * max(105vw, 950px)) 0; }
.hero .content .buttons{ translate: calc(var(--p) * -1 * max(70vw, 700px)) 0; }

.hero .photo           { translate: calc(var(--p) * 45vw) calc(var(--p) * 35vh); }

.hero nav,
.hero .tear,
.hero .content h1,
.hero .content .script,
.hero .content .buttons,
.hero .photo { will-change: translate; }


/* =========================================================
   GRAPHIC DESIGN — editorial horizontal exhibition
   Deliberately different from the website project mockups.
   ========================================================= */
.design-showcase {
  position: relative;
  z-index: 2;
  background: #0b0b0c;
  color: #f5f5f2;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.08);
}

.design-intro {
  min-height: 30vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 72px 7vw 28px;
  position: relative;
  z-index: 4;
}

.design-eyebrow {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 11px;
  opacity: .5;
  margin: 0 0 10px;
}

.design-heading {
  text-align: left;
  color: #f5f5f2;
  font-family: 'Talina','Segoe UI',sans-serif;
  font-size: clamp(54px, 8vw, 118px);
  line-height: .82;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0 em;
  padding: 0px 0px 10px 0px;
}

.design-stack {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: max-content;
  height: 70vh;
  min-height: 560px;
  padding: 0 8vw 8vh;
}

.design-wrap {
  flex: 0 0 88vw;
  width: 88vw;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3vw;
  box-sizing: border-box;
}

.design-card {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(280px, .5fr) minmax(380px, 1fr);
  align-items: center;
  gap: 5vw;
  padding: 4vh 4vw;
  box-sizing: border-box;
  border-radius: 0;
  background: transparent;
  border-top: 1px solid rgba(255,255,255,.13);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.design-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 1px;
  background: rgba(255,255,255,.18);
}

.design-info {
  min-width: 0;
  position: relative;
  z-index: 5;
  padding-left: 1.2vw;
}

.design-tag {
  display: block;
  font-size: 11px;
  letter-spacing: .2em;
  opacity: .42;
  margin-bottom: 28px;
}

.design-info h3 {
  font-family: 'Talina','Segoe UI',sans-serif;
  font-size: clamp(30px, 2.7vw, 50px);
  line-height: .95;
  font-weight: 400;
  margin: 0 0 24px;
  color: #f5f5f2;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.design-info p {
  max-width: 330px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(245,245,242,.56);
  margin: 0 0 24px;
}

.design-type {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 9px;
  color: rgba(245,245,242,.5);
  border-bottom: 1px solid rgba(245,245,242,.28);
  padding-bottom: 7px;
}

.design-art-panel {
  position: relative;
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.design-art-panel::after {
  content: '';
  position: absolute;
  width: 70%;
  height: 70%;
  border: 1px solid rgba(255,255,255,.07);
  transform: rotate(3deg);
  pointer-events: none;
}

.design-art-frame {
  position: relative;
  z-index: 2;
  width: min(43vw, 680px);
  height: min(56vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.design-art-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 28px 80px rgba(0,0,0,.4);
  transform-origin: center center;
}

.design-card:nth-child(even) .design-info { order: 2; }
.design-card:nth-child(even) .design-art-panel { order: 1; }
.design-card:nth-child(odd) .design-art-panel { order: 2; }
.design-card:nth-child(odd) .design-info { order: 1; }
.design-card:nth-child(even) .design-art-frame img { transform: rotate(-1.5deg); }
.design-card:nth-child(odd) .design-art-frame img { transform: rotate(1.5deg); }

@media (max-width:900px) {
  .design-showcase { overflow: hidden; }
  .design-intro { min-height:auto; padding:72px 24px 34px; }
  .design-heading { font-size:clamp(58px,17vw,88px); }
  .design-stack { width:100%; height:auto; min-height:0; padding:0 0 54px; display:block; }
  .design-wrap { width:100%; height:auto; min-height:0; display:block; padding:0 16px; margin:0 0 18px; }
  .design-card { width:100%; height:auto; min-height:0; display:flex; flex-direction:column!important; gap:28px; padding:30px 24px 34px; border:1px solid rgba(255,255,255,.1); border-radius:0; }
  .design-card::before { display:none; }
  .design-info { order:1!important; padding-left:0; }
  .design-info h3 { font-size:clamp(36px,10vw,52px); }
  .design-art-panel { order:2!important; height:min(58vh,520px); }
  .design-art-frame { width:100%; height:100%; }
  .design-art-panel::after { width:72%; height:72%; }
}

@media (prefers-reduced-motion: reduce) {
  .design-stack{height:auto;min-height:0;padding-bottom:50px}
  .design-wrap{position:relative;inset:auto;height:auto;min-height:0;margin-bottom:18px}
  .design-card{position:relative;top:auto;height:auto;min-height:0;border-radius:22px}
}


/* =========================================================
   DESIGN SHOWCASE — fit the pinned stage inside one viewport
   The section is exactly one screen tall (so nothing is cut off
   while pinned). The title block has a fixed height and the card
   row takes the rest. No flex/grid on the pinned element itself.
   ========================================================= */
@media (min-width: 901px) {
  .design-showcase {
    --design-intro-h: clamp(140px, 26vh, 230px);
    height: 100vh;
    height: 100svh;
  }

  .design-intro {
    height: var(--design-intro-h);
    min-height: 0;
    padding: clamp(14px, 3.5vh, 40px) 7vw clamp(10px, 2.5vh, 28px);
  }

  .design-heading { font-size: clamp(54px, min(8vw, 13vh), 118px); }

  .design-stack {
    height: calc(100vh - var(--design-intro-h));
    height: calc(100svh - var(--design-intro-h));
    min-height: 0;
    padding: 0 8vw clamp(16px, 4vh, 48px);
  }

  .design-card { padding: clamp(14px, 3vh, 40px) 4vw; }
  .design-info h3 { font-size: clamp(26px, min(2.7vw, 6vh), 50px); margin-bottom: clamp(12px, 2.5vh, 24px); }
  .design-tag { margin-bottom: clamp(12px, 3vh, 28px); }

  .design-art-frame { height: 100%; max-height: 520px; }
}

/* The Closest phone preview scrolls its screenshot natively; once it reaches
   the end the wheel must continue to the page instead of being swallowed. */
.phone-viewport--scrollable { overscroll-behavior: auto; }


/* =========================================================
   DESIGN SHOWCASE — artwork always stays inside its card
   The card row now has a definite height (minmax(0,1fr)), so the
   artwork can be sized with real percentages. Padding leaves room
   for the slight tilt, so nothing pokes out of the card.
   ========================================================= */
.design-card { grid-template-rows: minmax(0, 1fr); }
.design-info,
.design-art-panel { min-height: 0; }

.design-art-frame {
  width: 100%;
  height: 100%;
  max-width: 680px;
  max-height: none;
  padding: clamp(10px, 2.4vh, 22px) clamp(10px, 1.6vw, 22px);
  box-sizing: border-box;
}

.design-art-frame img {
  max-width: 100%;
  max-height: 100%;
  cursor: zoom-in;
}

.design-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.design-view {
  appearance: none;
  font: inherit;
  font-size: 12px;
  letter-spacing: .06em;
  color: #f5f5f2;
  background: transparent;
  border: 1px solid rgba(245,245,242,.4);
  border-radius: 22px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.design-view:hover { background: #f5f5f2; color: #0b0b0c; border-color: #f5f5f2; }
.design-view:focus-visible,
.dl-close:focus-visible,
.dl-open:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (max-width: 900px) {
  .design-card { grid-template-rows: none; }
  .design-art-frame { max-width: none; }
}

/* =========================================================
   DESIGN VIEWER (lightbox) — opened from "View image / presentation / book"
   ========================================================= */
.design-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vh, 48px) clamp(16px, 4vw, 56px);
  background: rgba(8,8,9,.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
  overscroll-behavior: contain;
}

.design-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .3s ease;
}

.dl-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: scale(.97);
  transition: transform .35s ease;
}

.design-lightbox.is-open .dl-figure { transform: scale(1); }

.dl-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  max-height: calc(100svh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
  background: #fff;
}

.dl-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 6px 18px;
  color: rgba(245,245,242,.8);
  font-size: 13px;
  text-align: center;
}

.dl-title { font-family: 'Talina', 'Segoe UI', sans-serif; font-size: 20px; color: #f5f5f2; }
.dl-kind { text-transform: uppercase; letter-spacing: .16em; font-size: 10px; opacity: .6; }
.dl-open { color: #f5f5f2; text-decoration: none; border-bottom: 1px solid rgba(245,245,242,.45); padding-bottom: 2px; }

.dl-close {
  position: absolute;
  top: clamp(12px, 3vh, 28px);
  right: clamp(12px, 3vw, 32px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(245,245,242,.35);
  background: rgba(20,20,22,.8);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.dl-close:hover { background: #fff; color: #0b0b0c; }

@media (prefers-reduced-motion: reduce) {
  .design-lightbox, .dl-figure { transition: none; }
}


/* =========================================================
   SKILLS
   Light section after the dark Design exhibition.
   ========================================================= */
.skills {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #f1f1f1 0%, #e2e2e2 100%);
  color: #111;
  overflow: hidden;
  padding-bottom: clamp(60px, 10vh, 120px);
  box-shadow: 0 -30px 70px rgba(0,0,0,.22);
}

.skills-intro {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(64px, 12vh, 120px) 7vw clamp(24px, 4vh, 44px);
}

.skills-eyebrow {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 11px;
  opacity: .55;
  margin: 0 0 10px;
}

.skills-heading {
  font-family: 'Talina', 'Segoe UI', sans-serif;
  font-size: clamp(54px, 8vw, 118px);
  line-height: .9;
  font-weight: 400;
  color: #0b0b0b;
  margin: 0;
  text-shadow: 2px 3px 6px rgba(0,0,0,.12);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 1.8vw, 28px);
  width: min(1280px, 100% - 14vw);
  margin: 0 auto;
}

.skill-group {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.2vw, 34px);
  border-radius: 22px;
  background: #f7f7f7;
  border: 1px solid rgba(0,0,0,.07);
  box-shadow: 0 10px 30px rgba(0,0,0,.07);
  transition: transform .35s ease, box-shadow .35s ease, background .35s ease, color .35s ease;
}

.skill-group:hover {
  transform: translateY(-6px);
  background: #101014;
  color: #f5f5f2;
  box-shadow: 0 22px 50px rgba(0,0,0,.25);
}

.skill-index {
  font-size: 12px;
  letter-spacing: .14em;
  opacity: .5;
  margin-bottom: 18px;
}

.skill-group h3 {
  font-family: 'Talina', 'Segoe UI', sans-serif;
  font-size: clamp(26px, 2.05vw, 34px);
  line-height: 1;
  font-weight: 400;
  margin-bottom: 14px;
  overflow-wrap: break-word;
}

.skill-group > p {
  font-size: 15px;
  line-height: 1.55;
  opacity: .7;
  margin-bottom: 24px;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.skill-list li {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: .85;
  white-space: nowrap;
}

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

@media (max-width: 640px) {
  .skills-grid { grid-template-columns: 1fr; width: calc(100% - 12vw); }
  .skills-intro { padding-left: 6vw; padding-right: 6vw; }
}

@media (hover: none) {
  .skill-group:hover { transform: none; background: #f7f7f7; color: #111; box-shadow: 0 10px 30px rgba(0,0,0,.07); }
}


/* ---------- Skills: tools strip ---------- */
.skills-tools {
  width: min(1280px, 100% - 14vw);
  margin: clamp(40px, 7vh, 72px) auto 0;
  padding-top: clamp(24px, 4vh, 36px);
  border-top: 1px solid rgba(0,0,0,.14);
}

.tools-label {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 11px;
  opacity: .55;
  margin: 0 0 22px;
}

.tools-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 1vw, 14px);
}

.tool {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  background: #f7f7f7;
  border: 1px solid rgba(0,0,0,.07);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  transition: transform .3s ease, box-shadow .3s ease;
}

.tool:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0,0,0,.14);
}

.tool-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  filter: grayscale(1);
  opacity: .75;
  transition: filter .3s ease, opacity .3s ease;
}

.tool:hover .tool-icon { filter: none; opacity: 1; }

.tool-icon svg,
.tool-icon img { width: 100%; height: 100%; display: block; object-fit: contain; }

.tool-name { font-size: 14px; font-weight: 500; white-space: nowrap; }

@media (max-width: 640px) {
  .skills-tools { width: calc(100% - 12vw); }
  .tool { padding: 8px 16px 8px 10px; }
  .tool-icon { width: 30px; height: 30px; }
}

@media (hover: none) {
  .tool-icon { filter: none; opacity: 1; }
  .tool:hover { transform: none; }
}


/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  position: relative;
  z-index: 2;
  background: #0b0b0c;
  color: #f5f5f2;
  overflow: hidden;
  box-shadow: 0 -30px 70px rgba(0,0,0,.22);
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 110px);
  width: min(1280px, 100% - 14vw);
  margin: 0 auto;
  padding: clamp(80px, 14vh, 150px) 0 clamp(60px, 10vh, 110px);
  align-items: start;
}

.contact-eyebrow {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 11px;
  opacity: .5;
  margin: 0 0 14px;
}

.contact-heading {
  font-family: 'Talina', 'Segoe UI', sans-serif;
  font-size: clamp(52px, 7.4vw, 112px);
  line-height: .92;
  font-weight: 400;
  color: #f5f5f2;
  margin: 0 0 28px;
}

.contact-lead {
  max-width: 460px;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.6;
  color: rgba(245,245,242,.7);
  margin-bottom: 40px;
}

.contact-details { list-style: none; display: grid; gap: 0; max-width: 460px; }

.contact-details li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 15px;
}

.contact-details li:last-child { border-bottom: 1px solid rgba(255,255,255,.12); }

.contact-key {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  opacity: .5;
}

.contact-details li > a { justify-self: start; }

.contact-details a,
.to-top {
  color: #f5f5f2;
  text-decoration: none;
  border-bottom: 1px solid rgba(245,245,242,.4);
  padding-bottom: 2px;
  transition: border-color .25s ease, opacity .25s ease;
}

.contact-details a:hover,
.to-top:hover { border-color: #f5f5f2; }

.contact-socials { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* form */
.contact-form {
  display: grid;
  gap: 22px;
  padding: clamp(24px, 3vw, 44px);
  border-radius: 24px;
  background: #121217;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 -18px 60px rgba(0,0,0,.28);
}

.field { display: grid; gap: 10px; }

.field span {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  opacity: .55;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: #f5f5f2;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.25);
  padding: 8px 0 12px;
  outline: none;
  border-radius: 0;
  resize: vertical;
  transition: border-color .25s ease;
}

.field input:focus,
.field textarea:focus { border-bottom-color: #f5f5f2; }

.field.has-error input,
.field.has-error textarea { border-bottom-color: #ff6b6b; }

.contact-submit {
  justify-self: start;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #0b0b0c;
  background: #f5f5f2;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease;
}

.contact-submit:hover { transform: translateY(-3px); background: #fff; }

.form-note { min-height: 1.4em; font-size: 14px; color: rgba(245,245,242,.7); }
.form-note.is-error { color: #ff8a8a; }

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  width: min(1280px, 100% - 14vw);
  margin: 0 auto;
  padding: 26px 0 34px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px;
  color: rgba(245,245,242,.6);
}

@media (max-width: 900px) {
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .contact-inner,
  .site-footer { width: calc(100% - 12vw); }
  .contact-details li { grid-template-columns: 90px 1fr; }
}


/* =========================================================
   POLISH LAYER — fixed nav, hero FX, torn edges, section dots
   ========================================================= */
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---- fixed nav (always visible) ---- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 500; pointer-events: none; }
.site-header nav { padding-top: 18px; }
.nav-pill {
  position: relative;
  pointer-events: auto;
  gap: 4px;
  padding: 6px;
  background: rgba(244,244,244,.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
}
.nav-pill a {
  position: relative;
  z-index: 1;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 15px;
  transition: color .3s ease;
}
.nav-pill a:hover { transform: none; color: #333; }
.nav-pill a.is-lit,
.nav-pill a.is-lit:hover { color: #fff; }
.nav-ind {
  position: absolute;
  z-index: 0;
  top: 6px; bottom: 6px; left: 0;
  width: 0;
  border-radius: 999px;
  background: #101014;
  opacity: 0;
  transition: transform .45s cubic-bezier(.65,0,.35,1), width .45s cubic-bezier(.65,0,.35,1), opacity .3s ease;
}
.nav-pill a:focus-visible { outline: 2px solid #101014; outline-offset: 2px; }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  z-index: 600; background: #fff; transform: scaleX(0); transform-origin: 0 50%;
  mix-blend-mode: difference; pointer-events: none;
}

/* ---- hero interactive background ---- */
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero .content, .hero .photo { position: relative; }
.hero .photo { position: absolute; }

/* ---- torn-paper section transitions (only light/dark boundaries) ---- */
.projects::before, .skills::before, .contact::before {
  content: '';
  position: absolute; left: 0; right: 0; top: -1px; height: clamp(28px, 4vw, 56px);
  z-index: 6; pointer-events: none;
  background: var(--edge);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V19L1198 19L1168 20L1142 19L1123 25L1099 27L1079 25L1051 26L1033 18L1014 11L998 17L964 22L943 12L917 14L884 19L868 11L845 10L821 16L796 26L765 22L738 24L721 20L697 20L671 13L652 7L631 27L602 17L586 16L568 26L546 14L528 20L507 27L485 24L451 22L436 18L403 17L378 22L357 19L328 12L311 24L296 17L275 14L259 12L240 26L217 19L193 4L168 13L152 19L126 17L110 13L95 25L68 19L53 13L31 24L15 19L0 9Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V19L1198 19L1168 20L1142 19L1123 25L1099 27L1079 25L1051 26L1033 18L1014 11L998 17L964 22L943 12L917 14L884 19L868 11L845 10L821 16L796 26L765 22L738 24L721 20L697 20L671 13L652 7L631 27L602 17L586 16L568 26L546 14L528 20L507 27L485 24L451 22L436 18L403 17L378 22L357 19L328 12L311 24L296 17L275 14L259 12L240 26L217 19L193 4L168 13L152 19L126 17L110 13L95 25L68 19L53 13L31 24L15 19L0 9Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.18));
}
.projects { --edge: #efefef; }
.skills   { --edge: #0b0b0c; }
.contact  { --edge: #e2e2e2; }

/* ---- Skills & Contact: dotted-curve motif (matches About) ---- */
.section-dots { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.section-dots path { animation: dotsMarch 40s linear infinite; }
.section-dots--dark path { stroke: #2e2e2e; opacity: .45; }
.section-dots--light path { stroke: #f5f5f2; opacity: .35; }
@keyframes dotsMarch { to { stroke-dashoffset: -400; } }
.skills-intro, .skills-grid, .skills-tools, .contact-inner, .site-footer { position: relative; z-index: 1; }

@media (max-width: 640px) {
  .site-header nav { padding-top: 10px; }
  .nav-pill { padding: 4px; gap: 0; }
  .nav-pill a { padding: 8px 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .section-dots path { animation: none; } }

/* nav moved out of the hero: keep the headline where it was */
.hero .content { margin-top: 70px; }
@media (max-width: 640px) { .hero .content { margin-top: 56px; } }


/* =========================================================
   DOCK NAV — dark glass pill, magnifying icons, label on top
   ========================================================= */
.dock {
  position: fixed;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 9px 38px;
  max-width: calc(100% - 20px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(74,74,74,.72), rgba(18,18,18,.82));
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 14px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12);
  opacity: 0;
  animation: dockIn .8s ease-out 1.2s forwards;
}
@keyframes dockIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

.dock-item {
  position: relative;
  flex: none;
  width: 46px; height: 46px;
  color: #f5f5f2;
  text-decoration: none;
  --lift: 0px;
  will-change: transform;
}
.dock-bg {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(34,34,38,.92);
  border: 1px solid rgba(255,255,255,.16);
  transform-origin: 50% 100%;
  transition: background .25s ease, border-color .25s ease;
}
.dock-bg svg { width: 50%; height: 50%; }
.dock-item:hover .dock-bg, .dock-item:focus-visible .dock-bg { background: rgba(70,70,76,.96); border-color: rgba(255,255,255,.4); }
.dock-item:focus-visible { outline: none; }
.dock-item.is-active .dock-bg { background: rgba(64,64,70,.96); border-color: rgba(255,255,255,.5); }
.dock-item.is-active::after {
  content: ''; position: absolute; bottom: -7px; left: 50%;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #f5f5f2;
}

.dock-label {
  position: absolute;
  bottom: calc(100% + 12px + var(--lift)); left: 50%;
  transform: translate(-50%, 6px);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500; letter-spacing: .02em; white-space: nowrap;
  color: #f5f5f2;
  background: rgba(16,16,20,.92);
  border: 1px solid rgba(255,255,255,.22);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.dock-item:hover .dock-label,
.dock-item:focus-visible .dock-label { opacity: 1; transform: translate(-50%, 0); }

.site-footer { padding-bottom: 100px; }

@media (hover: none) {
  .dock-item.is-active .dock-label { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 640px) {
  .dock { gap: 4px; padding: 7px 9px; bottom: 12px; }
  .dock-item { width: 42px; height: 42px; }
  .dock { padding: 7px 12px; }
}
@media (prefers-reduced-motion: reduce) { .dock { animation: none; opacity: 1; transform: translateX(-50%); } }


/* =========================================================
   RESPONSIVE — HERO on tablets, phones and short screens
   ========================================================= */
@media (max-width: 1099px) {
  .hero .content {
    --h1: clamp(56px, min(19vw, 15vh), 112px);
    max-width: none;
    padding: 28px 6vw 0;
    margin-top: clamp(48px, 13vh, 130px);
  }

  .content .script {
    white-space: normal;               /* name wraps instead of being cut off */
    font-size: clamp(34px, min(13vw, 12vh), 96px);
    line-height: 1.05;
  }

  .buttons a {
    padding: 10px 26px;
    font-size: 15px;
  }

  .photo {
    width: clamp(200px, 66vw, 440px);
    max-width: none;
  }
}

@media (max-width: 420px) {
  .buttons { gap: 12px; }
  .buttons a { padding: 10px 22px; }
}

/* landscape phones */
@media (max-height: 520px) {
  .hero .content { padding-top: 12px; margin-top: 40px; }
  .buttons { margin-top: 14px; }
  .buttons a { padding: 8px 22px; font-size: 14px; }
  .tear-tl, .tear-tr, .tear-bl { width: clamp(110px, 18vw, 200px); }
}


/* =========================================================
   HERO on portrait phones / tablets — fill the screen
   Big photo at the bottom, headline centred in the space above it.
   (--pw = photo width; the headline area is whatever is left.)
   ========================================================= */
@media (max-width: 900px) and (orientation: portrait) {
  .hero { --pw: min(84vw, 460px, 52vh); }

  .photo { width: var(--pw); }

  .hero .content {
    --h1: clamp(56px, min(24vw, 13vh), 120px);
    height: calc(100% - var(--pw) * 1.12);
    margin-top: 0;
    padding-top: 24px;      /* keeps the headline off the very top on small phones */
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .content h1 { margin-top: 0; }
}


/* =========================================================
   HERO POLISH — tagline, button hierarchy, signed-name reveal
   ========================================================= */

/* 1. tagline under the name */
.tagline {
  position: relative;
  z-index: 2;
  margin-top: clamp(14px, 2.4vh, 24px);
  font-size: clamp(9.5px, 2.9vw, 15px);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #3a3a3a;
  opacity: 0;
  animation: fadeUp .8s ease-out 2.4s forwards;
}
.tagline span { margin: 0 .35em; opacity: .5; }
.hero .content .tagline { translate: calc(var(--p) * -1 * max(75vw, 720px)) 0; will-change: translate; }

/* 2. clear primary / secondary buttons */
.buttons a {
  border: 1.5px solid #121217;
  opacity: 0;
  animation: fadeUp .7s ease-out 2.6s forwards;
}
.buttons a:nth-child(2) { animation-delay: 2.75s; }
.buttons a:first-child { background: #121217; color: #fff; }
.buttons a:first-child:hover { background: #000; }
.buttons a:nth-child(2) { background: transparent; color: #121217; }
.buttons a:nth-child(2):hover { background: #121217; color: #fff; }

/* 3. name is "signed" left to right */
.content .script {
  clip-path: inset(-25% 100% -25% -6%);
  animation: signName 1.7s cubic-bezier(.6,.05,.25,1) 1.5s forwards;
}
@keyframes signName {
  from { clip-path: inset(-25% 100% -25% -6%); }
  to   { clip-path: inset(-25% -6% -25% -6%); }
}

@media (prefers-reduced-motion: reduce) {
  .content .script { clip-path: none; animation: none; }
  .tagline, .buttons a { opacity: 1; animation: none; }
}

/* short portrait phones: give the text more room above the photo */
@media (max-height: 700px) and (orientation: portrait) {
  .hero { --pw: min(84vw, 460px, 42vh); }
}
@media (min-width: 900px) { .tagline { letter-spacing: .2em; } }

/* desktop: the name is wider than its container, so let the box grow to fit the
   text. Otherwise the signing reveal (clip-path) cuts off the end of the name. */
@media (min-width: 1100px) {
  .content .script { width: max-content; }
}