/* ==========================================================
   Leyton F. — 1:1 rebuild of leytonf.framer.ai
   Layout mirrors the original Framer page: a fixed-height
   (2119px) frame with absolutely positioned sections, a
   desktop layout (>=1200px) and Framer's tablet overrides
   (<1200px). Values below are copied from the live page.
   ========================================================== */
:root {
  --bg: #fafafa;
  --surface: #f1f1f1;
  --surface-2: #efefef;
  --ink: #171717;
  --ink-muted: #606060;
  --accent: #2ba7ff;
  --accent-soft: #e5f2fb;
  --placeholder: #9c9c9c;

  /* Framer spring (stiffness 500, damping 35, mass 1) sampled into linear() */
  --spring: linear(0, 0.0222, 0.079, 0.1577, 0.2485, 0.3441, 0.439, 0.5294, 0.613, 0.6881, 0.7541, 0.811, 0.859, 0.8987, 0.931, 0.9566, 0.9765, 0.9915, 1.0025, 1.0101, 1.015, 1.0178, 1.0191, 1.0192, 1.0184, 1.0171, 1.0155, 1.0137, 1.0118, 1.01, 1.0084, 1.0068, 1.0054, 1.0042, 1.0032, 1.0024, 1.0017, 1.0011, 1.0007, 1.0003, 1.0001, 0.9999, 0.9998, 0.9997, 0.9996, 1);
  --spring-duration: 0.45s;
}

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

html, body {
  margin: 0;
  background: var(--bg);
}

body {
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { display: block; }

/* ---------- Page frame ---------- */
.page {
  position: relative;
  width: 100%;
  height: 2054px;
  overflow: clip;
  background: var(--bg);
}

.main {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2054px;
}

/* ---------- Fixed header ---------- */
.nav {
  position: fixed;
  z-index: 1;
  top: 24px;
  left: calc(50% - 504px);
  width: 1008px;
  height: 40px;
}

.nav__name {
  position: absolute;
  z-index: 1;
  top: calc(50% - 18px);
  left: 0;
  width: 125px;
  height: 36px;
  border-radius: 100px;
  background: var(--accent-soft);
  box-shadow: 1px 1px 2px rgba(23, 23, 23, 0.05);
}
.nav__name p {
  position: absolute;
  top: 50%;
  left: 39px;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 18px;
  font-weight: 500;
  white-space: pre;
}
.nav__spark {
  position: absolute;
  top: 8px;
  left: 12px;
  width: 21px;
  height: 21px;
}

/* Contact switcher (Email / LinkedIn / X) */
.switcher {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  height: 40px;
  padding: 2px;
  border-radius: 100px;
  background: var(--surface-2);
  box-shadow: 2px 2px 5px rgba(23, 23, 23, 0.05);
}
.switcher__inner {
  display: flex;
  gap: 1px;
  height: 36px;
  border-radius: 100px;
  background: var(--surface-2);
  overflow: clip;
}
.seg {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 100px;
  background: var(--surface-2);
  overflow: clip;
  cursor: pointer;
  outline: none;
  transition:
    width var(--spring-duration) var(--spring),
    background-color var(--spring-duration) var(--spring);
}
.seg.is-active {
  width: var(--w);
  background: var(--bg);
}
.seg[data-seg="email"].is-active { cursor: auto; }
.seg__icon {
  position: absolute;
  left: 11px;
}
.seg__label {
  position: absolute;
  top: 50%;
  left: 31px;
  transform: translateY(-50%);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  white-space: pre;
  visibility: hidden;
  cursor: pointer;
}
.seg.is-active .seg__label { visibility: visible; }

/* ---------- Hero ---------- */
.hero {
  position: absolute;
  z-index: 1;
  top: 64px;
  left: calc(50% - 504px);
  width: 1008px;
  height: 374px;
}
.hero__contents {
  position: absolute;
  top: calc(50% - 91px);
  left: 0;
  width: 473px;
  height: 182px;
}
.hero__hello {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  white-space: pre;
}
.hero__p1,
.hero__p2 {
  position: absolute;
  left: 0;
  right: 0;
  color: var(--ink-muted);
  font-size: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}
.hero__p1 { top: 34px; }
.hero__p2 { bottom: 60px; }
.accent { color: var(--accent); }

.btn {
  position: absolute;
  bottom: 0;
  height: 36px;
  border-radius: 8px;
  overflow: clip;
  font-size: 15px;
  font-weight: 600;
}
.btn p {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  white-space: pre;
}
.btn--primary {
  left: 0;
  width: 114px;
  background: var(--accent);
  color: var(--bg);
}
.btn__icon {
  position: absolute;
  top: 12px;
  left: 85px;
  width: 13px;
  height: 13px;
  overflow: visible;
}
.btn--soft {
  left: 126px;
  width: 100px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Work ticker ---------- */
.ticker {
  position: absolute;
  top: 438px;
  left: 0;
  right: -107px;
  height: 320px;
  overflow: clip;
}
.ticker__track {
  display: flex;
  gap: 24px;
  width: max-content;
  height: 100%;
  will-change: transform;
}
/* Each tile is its own small GPU layer, so the browser never has to redraw
   one huge strip in pieces while it moves (that showed up as flicker). */
.ticker__track > li {
  will-change: transform;
}

.tile {
  position: relative;
  flex: none;
  border-radius: 24px;
  overflow: clip;
}

/* Backgrounds are exported at ~3x; shown at the tile's own size */
.tile__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Rounded on its own too: a moving tile is drawn as a separate layer, and
     at 100% zoom its clip could leave the image's square corners showing. */
  border-radius: inherit;
}

.tile--phone {
  width: 224px;
  height: 320px;
}
.tile--phone .tile__shot {
  position: absolute;
  top: 16px;
  left: 32px;
  width: 160px;
  height: 325px;
  object-fit: cover;
  filter:
    drop-shadow(rgba(0, 0, 0, 0.25) 0 30px 22px)
    drop-shadow(rgba(0, 0, 0, 0.18) 0 20px 26px)
    drop-shadow(rgba(0, 0, 0, 0.18) 0 0 9px);
}

.tile-group {
  position: relative;
  flex: none;
  width: 320px;
  height: 320px;
}
.tile--logo {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 320px;
  height: 152px;
}
.verku__mark,
.verku__word { position: absolute; }
.verku__mark { top: 51px; left: 49px; width: 68px; height: 50px; }
.verku__word { top: 55px; left: 121px; width: 149px; height: 40px; }

.tile--blank {
  position: absolute;
  top: 168px;
  width: 152px;
  height: 152px;
  background: var(--placeholder);
}
.tile--blank:nth-of-type(2) { left: 0; }
.tile--blank:nth-of-type(3) { left: 168px; z-index: 1; }

.tile--laptop {
  width: 450px;
  height: 320px;
}
.tile--laptop .tile__shot {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Featured work ---------- */
.work {
  position: absolute;
  top: 822px;
  left: calc(50% - 576px);
  width: 1152px;
  height: 684px;
}
.work__card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 72px 128px;
  border-radius: 16px;
  background: var(--surface);
  overflow: clip;
}
.work__card img {
  flex: none;
  width: 1008px;
  aspect-ratio: 1.77465 / 1;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}
.work__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 481px;
  height: 20px;
  font-size: 15px;
}
.work__title,
.work__desc {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  white-space: pre;
}
.work__title { left: 0; color: var(--ink); font-weight: 600; }
.work__desc { left: 90px; color: var(--ink-muted); font-weight: 500; }

/* ---------- Divider ---------- */
.line {
  position: absolute;
  bottom: 485px;
  left: calc(50% - 504px);
  width: 1008px;
  height: 1px;
  background: var(--surface);
}

/* ---------- About + Contact ---------- */
.about {
  position: absolute;
  bottom: 145px;
  left: calc(50% - 504.5px);
  width: 1009px;
  height: 276px;
}
/* The About Me button scrolls to the divider line above the section, so the
   badge lands below the fixed header instead of under it. */
#about-me { scroll-margin-top: 64px; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min-content;
  height: 32px;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--accent-soft);
  overflow: clip;
}
.badge p {
  color: var(--accent);
  font-size: 16px;
  font-weight: 500;
  white-space: pre;
}

.about__col {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 75%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.about__text {
  width: 614px;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 20px;
  word-break: break-word;
  overflow-wrap: break-word;
}
.about__text p { white-space: pre-wrap; }
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  width: 100%;
}
.skill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--surface);
  overflow: clip;
}
.skill__icon { flex: none; width: 14px; height: 14px; }
.skill span {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  white-space: pre;
}

.contact {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 160px;
  height: 230px;
}
.contact__badge {
  position: absolute;
  top: 0;
  left: 0;
}
.contact__list {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 160px;
  height: 174px;
}
.contact__list li { position: absolute; left: 0; }
.contact__list li:nth-child(1) { top: 0; }
.contact__list li:nth-child(2) { top: 47px; }
.contact__list li:nth-child(3) { top: 94px; }
.contact__list li:nth-child(4) { top: 142px; }

.contact__item {
  position: relative;
  display: block;
  border-radius: 100px;
  background: var(--surface);
  overflow: clip;
  color: var(--ink);
}
.contact__list li:nth-child(1) .contact__item { width: 160px; height: 31px; }
.contact__list li:nth-child(2) .contact__item { width: 103px; height: 31px; }
.contact__list li:nth-child(3) .contact__item { width: 110px; height: 32px; }
.contact__list li:nth-child(4) .contact__item { width: 134px; height: 32px; }

.contact__icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.contact__text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 500;
  white-space: pre;
}

/* Hover — measured on the original:
   email fades to #606060 with the Framer spring, the
   LinkedIn and X handles switch instantly. */
.contact__item--email { transition: color var(--spring-duration) var(--spring); }
.contact__item--email:hover,
.contact__item--instant:hover { color: var(--ink-muted); }

/* ---------- Footer ---------- */
.footer {
  position: absolute;
  bottom: 0;
  left: calc(50% - 504.5px);
  width: 1009px;
  height: 82px;
  overflow: clip;
}
.footer__contents {
  position: absolute;
  top: calc(50% - 9px);
  left: 0;
  width: 335px;
  height: 18px;
  overflow: clip;
  font-size: 14px;
}
.footer__name {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  color: var(--ink);
  font-weight: 500;
  white-space: pre;
}
.footer__made {
  position: absolute;
  top: 50%;
  left: 117px;
  transform: translateY(-50%);
  color: var(--ink-muted);
  font-weight: 400;
  white-space: pre;
}

/* ==========================================================
   Responsive — tablet (810–1199px) and mobile (<810px)
   Desktop (>=1200px) above is untouched. Below 1200px the
   page switches to normal flow, keeping the desktop spacing:
   160 hero top · 96 to work strip · 64 to card · 24 caption
   · 62 to divider · 64 to about · 128 + 32 footer.
   The project card stays 72px wider than the text column,
   as on desktop.
   ========================================================== */
@media (max-width: 1199.98px) {
  :root {
    --gutter: 96px;       /* text column inset */
    --card-gutter: 24px;  /* project card inset */
    --card-pad: 72px;
  }

  .page {
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .main { display: contents; }

  /* Header */
  .nav { left: var(--gutter); right: var(--gutter); width: auto; }

  /* Hero */
  .hero {
    order: 1;
    position: relative;
    top: auto; left: auto;
    width: auto; height: auto;
    margin: 0 var(--gutter);
    padding-top: 160px;
  }
  .hero__contents {
    position: static;
    width: auto; height: auto;
    max-width: 473px;
    display: flex;
    flex-wrap: wrap;
    column-gap: 12px;
  }
  .hero__hello,
  .hero__p1,
  .hero__p2 { position: static; flex: 0 0 100%; }
  .hero__hello { order: 0; margin-bottom: 16px; }
  .hero__p1 { order: 1; margin-bottom: 12px; }
  .hero__p2 { order: 2; margin-bottom: 24px; }
  .btn { order: 3; position: relative; left: auto; bottom: auto; flex: none; }

  /* Work strip */
  .ticker {
    order: 2;
    position: relative;
    top: auto; left: auto; right: auto;
    margin-top: 96px;
  }

  /* Featured project */
  .work {
    order: 3;
    position: relative;
    top: auto; left: auto;
    width: auto; height: auto;
    margin: 64px var(--card-gutter) 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .work__card {
    order: 0;
    position: relative;
    inset: auto;
    height: auto;
    padding: var(--card-pad) var(--card-pad) 0;
  }
  .work__card img { width: 100%; }
  .work__caption {
    order: 1;
    position: static;
    width: auto; height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .work__title,
  .work__desc { position: static; transform: none; }
  .work__desc { white-space: normal; }

  /* Divider */
  .line {
    order: 4;
    position: relative;
    bottom: auto; left: auto;
    width: auto;
    margin: 62px var(--gutter) 0;
  }

  /* About + Contact */
  .about {
    order: 5;
    position: relative;
    bottom: auto; left: auto;
    width: auto; height: auto;
    margin: 64px var(--gutter) 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
  }
  .about__col {
    position: static;
    flex: 1 1 auto;
    width: auto;
    max-width: 757px;
  }
  .about__text { width: auto; max-width: 614px; }
  .contact {
    position: static;
    flex: none;
    width: 160px; height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .contact__badge { position: static; order: -1; }
  .contact__list {
    position: static;
    width: auto; height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .contact__list li { position: static; }

  /* Footer */
  .footer {
    order: 6;
    position: relative;
    bottom: auto; left: auto;
    width: auto; height: auto;
    margin: 64px var(--gutter) 0;
    padding: 32px 0;
    overflow: visible;
  }
  .footer__contents {
    position: static;
    width: auto; height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    overflow: visible;
  }
  .footer__name,
  .footer__made { position: static; transform: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 809.98px) {
  :root {
    --gutter: 24px;
    --card-gutter: 24px;
    --card-pad: 24px;
  }

  /* No name badge; social switcher centred */
  .nav__name { display: none; }
  .switcher { right: auto; left: 50%; transform: translateX(-50%); }

  .about { flex-direction: column; gap: 48px; }
  .about__col { max-width: none; }
  .contact { width: auto; }

  /* Copyright + "Made with" line centred */
  .footer__contents { justify-content: center; text-align: center; }
}
