@layer reset, base, layout, components, motion, responsive;

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

  html {
    scroll-behavior: smooth;
  }

  @media (max-width: 720px) {
    html {
      scroll-behavior: auto;
    }
  }

  body,
  h1,
  h2,
  h3,
  p,
  ul {
    margin: 0;
  }

  ul {
    padding: 0;
    list-style: none;
  }

  button,
  a {
    color: inherit;
  }

  button {
    font: inherit;
  }

  img,
  svg {
    display: block;
  }
}

@layer base {
  :root {
    --ink: #06141b;
    --deep: #0a2027;
    --forest: #103b3c;
    --pine: #1b5b50;
    --mint: #9fe8c7;
    --aqua: #58d6cf;
    --sun: #f2da91;
    --coral: #ff886b;
    --paper: #edf6eb;
    --muted: #a7bcb6;
    --line: rgb(237 246 235 / 18%);
    --panel: rgb(6 20 27 / 78%);
    --display: "Syne", sans-serif;
    --mono: "DM Mono", monospace;
    --page-gutter: clamp(1.25rem, 4vw, 4.75rem);
    --header-height: 5.5rem;
    --radius: 1.5rem;
  }

  ::selection {
    color: var(--ink);
    background: var(--mint);
  }

  body {
    min-width: 320px;
    color: var(--paper);
    background: var(--ink);
    font-family: var(--display);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
  }

  body.menu-open {
    overflow: hidden;
  }

  a {
    text-decoration: none;
  }

  a:focus-visible,
  button:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 5px;
  }

  #world {
    position: fixed;
    inset: 0;
    z-index: -4;
    width: 100%;
    height: 100%;
  }

  .lite-scene #world {
    display: none;
  }

  .lite-landscape {
    display: none;
    position: fixed;
    inset: 0;
    z-index: -4;
    overflow: hidden;
    pointer-events: none;
    background:
      radial-gradient(circle at 72% 24%, rgb(242 218 145 / 22%), transparent 28%),
      linear-gradient(180deg, #0a2027 0%, #0c2c32 42%, #06141b 100%);
  }

  .lite-scene .lite-landscape {
    display: block;
  }

  .lite-landscape::after {
    position: absolute;
    inset: 0;
    content: "";
    background-image:
      radial-gradient(circle at 12% 18%, rgb(185 233 214 / 0.7) 0 1px, transparent 1.6px),
      radial-gradient(circle at 28% 10%, rgb(185 233 214 / 0.4) 0 1px, transparent 1.6px),
      radial-gradient(circle at 46% 16%, rgb(185 233 214 / 0.55) 0 1px, transparent 1.6px),
      radial-gradient(circle at 63% 8%, rgb(185 233 214 / 0.35) 0 1px, transparent 1.6px),
      radial-gradient(circle at 81% 14%, rgb(185 233 214 / 0.5) 0 1px, transparent 1.6px),
      radial-gradient(circle at 18% 32%, rgb(185 233 214 / 0.28) 0 1px, transparent 1.6px);
  }

  .lite-sun {
    position: absolute;
    top: 16%;
    right: 14%;
    width: min(18vw, 7.5rem);
    aspect-ratio: 1;
    background: #f2da91;
    border-radius: 50%;
    box-shadow: 0 0 4.5rem 1.4rem rgb(242 218 145 / 28%);
  }

  .lite-halo {
    position: absolute;
    top: 10%;
    right: 7%;
    width: min(38vw, 16rem);
    aspect-ratio: 1;
    border: 1px solid rgb(242 218 145 / 18%);
    border-radius: 50%;
  }

  .lite-ridge {
    position: absolute;
    left: -8%;
    right: -8%;
    bottom: 0;
    height: 46%;
    background: #0a2c32;
    clip-path: polygon(
      0% 100%,
      0% 58%,
      12% 42%,
      24% 61%,
      36% 28%,
      53% 62%,
      68% 38%,
      83% 58%,
      100% 40%,
      100% 100%
    );
  }

  .lite-ridge-mid {
    height: 38%;
    background: #103b3c;
    clip-path: polygon(
      0% 100%,
      0% 68%,
      16% 48%,
      29% 66%,
      44% 40%,
      61% 64%,
      76% 50%,
      100% 58%,
      100% 100%
    );
  }

  .lite-ridge-near {
    height: 28%;
    background: #164643;
    clip-path: polygon(
      0% 100%,
      0% 72%,
      11% 60%,
      21% 74%,
      35% 52%,
      51% 70%,
      67% 58%,
      83% 68%,
      100% 54%,
      100% 100%
    );
  }

  .atmosphere {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background:
      radial-gradient(
        circle at 66% 30%,
        rgb(242 218 145 / 17%),
        transparent 24%
      ),
      linear-gradient(
        180deg,
        rgb(4 17 24 / 12%) 0%,
        rgb(4 17 24 / 48%) 65%,
        var(--ink) 100%
      );
  }

  .noise {
    position: fixed;
    inset: 0;
    z-index: 10;
    opacity: 0.035;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  }

  .cursor-light {
    position: fixed;
    z-index: -2;
    width: 34rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgb(88 214 207 / 9%), transparent 66%);
    translate: -50% -50%;
    pointer-events: none;
    will-change: left, top;
  }

  .skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    padding: 0.65rem 1rem;
    color: var(--ink);
    background: var(--mint);
    font: 500 0.75rem var(--mono);
    transform: translateY(-160%);
    transition: transform 180ms ease;
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
  }

  svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

@layer layout {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    height: var(--header-height);
    padding-inline: var(--page-gutter);
    border-bottom: 1px solid transparent;
    transition:
      height 300ms ease,
      background-color 300ms ease,
      border-color 300ms ease,
      backdrop-filter 300ms ease;
  }

  .site-header.is-scrolled {
    height: 4.5rem;
    background: rgb(6 20 27 / 92%);
    border-color: var(--line);
  }

  @media (hover: hover) and (min-width: 721px) {
    .site-header.is-scrolled {
      background: rgb(6 20 27 / 78%);
      backdrop-filter: blur(18px);
    }
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    justify-self: start;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.02em;
  }

  .brand-mark {
    display: grid;
    place-items: center;
    width: 2.35rem;
    aspect-ratio: 1;
    background: var(--mint);
    border: 1px solid rgb(159 232 199 / 45%);
    border-radius: 50%;
    overflow: hidden;
  }

  .brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.7) contrast(1.06);
  }

  .site-nav {
    display: flex;
    align-items: center;
    gap: clamp(1.4rem, 3vw, 3rem);
    justify-self: center;
  }

  .site-nav a,
  .header-contact {
    position: relative;
    font: 400 0.7rem var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .site-nav a::after {
    position: absolute;
    bottom: -0.6rem;
    left: 50%;
    width: 0;
    height: 1px;
    content: "";
    background: var(--mint);
    transition:
      width 220ms ease,
      left 220ms ease;
  }

  .site-nav a:hover::after,
  .site-nav a.is-active::after {
    left: 0;
    width: 100%;
  }

  .header-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    justify-self: end;
    transition: color 200ms ease;
  }

  .header-contact:hover {
    color: var(--mint);
  }

  .header-contact svg {
    transition: transform 220ms ease;
  }

  .header-contact:hover svg {
    transform: translate(3px, -3px);
  }

  .menu-toggle {
    display: none;
  }

  .section {
    position: relative;
    min-height: 100vh;
    padding: clamp(7rem, 12vw, 11rem) var(--page-gutter);
    scroll-margin-top: 4rem;
  }

  .section-panel {
    background:
      linear-gradient(
        90deg,
        rgb(6 20 27 / 94%) 0%,
        rgb(6 20 27 / 79%) 52%,
        rgb(6 20 27 / 58%) 100%
      ),
      radial-gradient(circle at 10% 10%, rgb(88 214 207 / 8%), transparent 40%);
    border-top: 1px solid var(--line);
  }

  .skills {
    background:
      linear-gradient(
        270deg,
        rgb(6 20 27 / 92%) 0%,
        rgb(6 20 27 / 76%) 58%,
        rgb(6 20 27 / 62%) 100%
      ),
      radial-gradient(circle at 82% 22%, rgb(88 214 207 / 10%), transparent 38%);
  }

  .journey {
    background:
      linear-gradient(
        105deg,
        rgb(6 20 27 / 94%) 0%,
        rgb(6 20 27 / 81%) 50%,
        rgb(6 20 27 / 54%) 100%
      ),
      radial-gradient(
        circle at 76% 45%,
        rgb(242 218 145 / 10%),
        transparent 34%
      );
  }

  .section-heading {
    width: min(100%, 69rem);
    margin-bottom: clamp(4rem, 8vw, 7.5rem);
  }

  .section-heading-split {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(14rem, 0.75fr);
    gap: 4rem;
    align-items: end;
    width: 100%;
  }

  .section-heading h2 {
    max-width: 15ch;
    margin-top: 1.3rem;
    font-size: clamp(2.6rem, 6vw, 6.5rem);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.065em;
  }

  .eyebrow,
  .mono-label {
    color: var(--mint);
    font: 400 0.68rem var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .section-note {
    max-width: 25rem;
    color: var(--muted);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.6;
  }
}

@layer components {
  .hero {
    display: flex;
    align-items: center;
    min-height: 100svh;
    padding-top: calc(var(--header-height) + 2rem);
    overflow: hidden;
  }

  .hero::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: linear-gradient(90deg, rgb(6 20 27 / 44%), transparent 68%);
  }

  .hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
  }

  .hero-title {
    max-width: 93rem;
    margin-top: clamp(1.5rem, 3vw, 3rem);
    font-size: clamp(3.9rem, 10.6vw, 11rem);
    font-weight: 500;
    line-height: 0.79;
    letter-spacing: -0.085em;
  }

  .title-line {
    display: block;
    width: fit-content;
    padding-right: 0.1em;
  }

  .title-outline {
    color: transparent;
    -webkit-text-stroke: 1px rgb(237 246 235 / 78%);
  }

  .title-indent {
    margin-left: clamp(1rem, 11vw, 10rem);
  }

  .hero-bottom {
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: clamp(2.8rem, 5vw, 5rem);
    padding-left: clamp(0rem, 18vw, 17rem);
  }

  .hero-intro {
    max-width: 32rem;
    color: var(--muted);
    font-size: clamp(1rem, 1.4vw, 1.25rem);
  }

  .hero-intro strong {
    color: var(--paper);
    font-weight: 500;
  }

  .hero-actions {
    display: flex;
    gap: 0.75rem;
  }

  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 3.4rem;
    padding: 0.5rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: 500 0.7rem var(--mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition:
      color 240ms ease,
      background 240ms ease,
      border-color 240ms ease,
      transform 240ms ease;
  }

  .button:hover {
    transform: translateY(-3px);
  }

  .button-primary {
    color: var(--ink);
    background: var(--mint);
    border-color: var(--mint);
  }

  .button-primary:hover {
    background: var(--sun);
    border-color: var(--sun);
  }

  .button-ghost:hover {
    color: var(--mint);
    border-color: var(--mint);
  }

  .scroll-cue {
    position: absolute;
    right: var(--page-gutter);
    bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--muted);
    font: 400 0.6rem var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transform: rotate(90deg);
    transform-origin: right bottom;
  }

  .scroll-cue i {
    display: block;
    width: 4rem;
    height: 1px;
    overflow: hidden;
    background: var(--line);
  }

  .scroll-cue i::after {
    display: block;
    width: 45%;
    height: 100%;
    content: "";
    background: var(--mint);
    animation: scroll-line 2.2s ease-in-out infinite;
  }

  .hero-orbit,
  .contact-orbit {
    position: absolute;
    right: clamp(-5rem, 2vw, 3rem);
    top: 18%;
    display: flex;
    gap: 0.7rem;
    align-items: center;
    justify-content: center;
    width: 12rem;
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    font: 300 0.46rem var(--mono);
    letter-spacing: 0.08em;
    animation: orbit-spin 18s linear infinite;
  }

  .hero-orbit span,
  .contact-orbit span {
    transform: rotate(90deg);
  }

  .hero-orbit i,
  .contact-orbit i {
    width: 3px;
    aspect-ratio: 1;
    background: var(--mint);
    border-radius: 50%;
  }

  .profile-grid {
    display: grid;
    grid-template-columns: 1.15fr minmax(18rem, 0.65fr);
    gap: clamp(2rem, 6vw, 7rem);
    align-items: start;
  }

  .profile-copy {
    max-width: 52rem;
  }

  .profile-copy .lead {
    margin-bottom: 2.5rem;
    color: var(--paper);
    font-size: clamp(1.8rem, 3.4vw, 3.8rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.045em;
  }

  .profile-copy > p:last-child {
    max-width: 42rem;
    margin-left: clamp(0rem, 9vw, 8rem);
    color: var(--muted);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
  }

  .profile-card {
    position: relative;
    padding: 1rem;
    background: rgb(237 246 235 / 5%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transform-style: preserve-3d;
  }

  .profile-card::before {
    position: absolute;
    inset: 0.7rem;
    z-index: -1;
    content: "";
    border: 1px solid rgb(159 232 199 / 18%);
    border-radius: calc(var(--radius) - 0.5rem);
    transform: translateZ(-20px);
  }

  .profile-avatar {
    position: relative;
    aspect-ratio: 1 / 0.82;
    overflow: hidden;
    border-radius: calc(var(--radius) - 0.45rem);
    background: var(--forest);
  }

  .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.45) contrast(1.08);
  }

  .profile-avatar::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent, rgb(6 20 27 / 35%));
  }

  .avatar-ring {
    position: absolute;
    right: -9%;
    bottom: -18%;
    z-index: 1;
    width: 55%;
    aspect-ratio: 1;
    border: 1px solid var(--mint);
    border-radius: 50%;
    box-shadow: 0 0 0 1rem rgb(6 20 27 / 20%);
  }

  .profile-card > div:last-child {
    padding: 1.6rem 0.6rem 0.8rem;
    transform: translateZ(24px);
  }

  .profile-card h3 {
    margin: 0.55rem 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.04em;
  }

  .profile-card p:last-child {
    color: var(--muted);
    font-size: 0.92rem;
  }

  .profile-facts {
    display: flex;
    grid-column: 1 / -1;
    margin-top: 1rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .profile-facts > div {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.2rem;
    align-items: flex-start;
    padding: 1.8rem clamp(1rem, 2vw, 2rem);
  }

  .profile-facts > div + div {
    border-left: 1px solid var(--line);
  }

  .fact-value {
    color: var(--mint);
    margin-top: 0.35rem;
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.045em;
  }

  .fact-label {
    color: rgb(237 246 235 / 68%);
    font: 400 0.62rem var(--mono);
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  .fact-detail {
    color: var(--paper);
    font-size: 0.78rem;
    opacity: 0.72;
  }

  .skill-cloud {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    perspective: 1100px;
  }

  .skill-item {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 17rem;
    padding: 1.4rem;
    overflow: hidden;
    background: rgb(237 246 235 / 1.5%);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transform-style: preserve-3d;
    transition:
      background-color 280ms ease,
      color 280ms ease;
  }

  .skill-item::after {
    position: absolute;
    inset: auto -35% -65% auto;
    width: 80%;
    aspect-ratio: 1;
    content: "";
    background: radial-gradient(
      circle,
      rgb(159 232 199 / 24%),
      transparent 68%
    );
    border-radius: 50%;
    opacity: 0;
    transition: opacity 300ms ease;
  }

  .skill-item:hover {
    color: var(--ink);
    background: var(--mint);
  }

  .skill-item:hover::after {
    opacity: 1;
  }

  .skill-index {
    color: var(--muted);
    font: 300 0.62rem var(--mono);
  }

  .skill-item:hover .skill-index,
  .skill-item:hover p {
    color: rgb(6 20 27 / 64%);
  }

  .skill-glyph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5.4rem;
    aspect-ratio: 1;
    margin: auto 0;
    color: var(--mint);
    border: 1px solid var(--line);
    border-radius: 50%;
    font: 400 1rem var(--mono);
    transform: translateZ(28px);
    transition:
      color 280ms ease,
      border-color 280ms ease,
      transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .skill-glyph img {
    width: 52%;
    height: 52%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition:
      filter 280ms ease,
      transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .skill-glyph-js span {
    color: var(--paper);
    font: 700 1.15rem var(--mono);
    letter-spacing: -0.08em;
    transition: color 280ms ease;
  }

  .skill-item:hover .skill-glyph-js span {
    color: #f7df1e;
  }

  .skill-glyph-pair {
    gap: 0.18rem;
  }

  .skill-glyph-pair img {
    width: 35%;
    height: 42%;
  }

  .skill-item:hover .skill-glyph {
    color: var(--ink);
    border-color: rgb(6 20 27 / 24%);
    transform: translateZ(45px) rotateY(360deg);
  }

  .skill-item:hover .skill-glyph img {
    filter: saturate(1) brightness(0.92);
    transform: scale(1.08);
  }

  .skill-item h3 {
    font-size: 1rem;
    font-weight: 600;
  }

  .skill-item p {
    color: var(--muted);
    font-size: 0.78rem;
    transition: color 280ms ease;
  }

  .timeline {
    position: relative;
    max-width: 80rem;
  }

  .timeline::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(18% + 1.35rem);
    width: 1px;
    content: "";
    background: linear-gradient(var(--mint), var(--line) 88%, transparent);
  }

  .timeline-item {
    display: grid;
    grid-template-columns: 18% 2.7rem minmax(0, 1fr);
    min-height: 12rem;
  }

  .timeline-date {
    padding-top: 0.55rem;
    color: var(--muted);
    font: 300 0.68rem var(--mono);
  }

  .timeline-marker {
    position: relative;
    display: flex;
    justify-content: center;
  }

  .timeline-marker span {
    z-index: 1;
    width: 0.7rem;
    height: 0.7rem;
    margin-top: 0.5rem;
    background: var(--ink);
    border: 1px solid var(--mint);
    border-radius: 50%;
    box-shadow: 0 0 0 0.45rem var(--ink);
  }

  .timeline-content {
    max-width: 47rem;
    padding: 0 0 4rem 3rem;
  }

  .timeline-content h3 {
    margin: 0.7rem 0;
    font-size: clamp(1.6rem, 3vw, 3.1rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.055em;
  }

  .timeline-content p:last-child {
    color: var(--muted);
  }

  .projects {
    padding-inline: 0;
    overflow: hidden;
  }

  .projects-heading {
    padding-inline: var(--page-gutter);
  }

  .project-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
  }

  .project-controls button {
    display: grid;
    place-items: center;
    width: 3.2rem;
    aspect-ratio: 1;
    padding: 0;
    color: var(--paper);
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50%;
    transition:
      color 180ms ease,
      background 180ms ease,
      border-color 180ms ease;
  }

  .project-controls button:hover {
    color: var(--ink);
    background: var(--mint);
    border-color: var(--mint);
  }

  .project-controls > span {
    min-width: 4.2rem;
    color: var(--muted);
    font: 300 0.65rem var(--mono);
    text-align: center;
  }

  .project-controls b {
    color: var(--paper);
    font-weight: 400;
  }

  .project-track {
    display: grid;
    grid-auto-columns: min(78vw, 62rem);
    grid-auto-flow: column;
    gap: clamp(1.2rem, 2.5vw, 2.5rem);
    padding: 0 var(--page-gutter) 2.5rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-padding-inline: var(--page-gutter);
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    perspective: 1300px;
  }

  .project-track::-webkit-scrollbar {
    display: none;
  }

  .project-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    min-height: min(70vh, 41rem);
    overflow: hidden;
    background: #0b252c;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    transform-origin: center;
  }

  .project-visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 26rem;
    overflow: hidden;
    color: var(--ink);
    isolation: isolate;
  }

  .project-number {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 2;
    color: currentColor;
    font: 400 0.65rem var(--mono);
  }

  .project-symbol {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: clamp(8rem, 18vw, 14rem);
    aspect-ratio: 1;
    border: 1px solid currentColor;
    border-radius: 50%;
    font: 500 clamp(2rem, 5vw, 5rem) var(--display);
    letter-spacing: -0.08em;
    box-shadow:
      0 0 0 1.5rem rgb(6 20 27 / 4%),
      0 0 0 3rem rgb(6 20 27 / 3%);
    transition: transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .project-card:hover .project-symbol {
    transform: scale(1.05);
  }

  .project-symbol-logo img {
    width: 82%;
    height: auto;
  }

  .project-symbol-app img {
    width: 42%;
    height: auto;
  }

  .visual-finloop {
    background: #a6e7c5;
  }

  .visual-hoylog {
    background: #ffe56b;
  }

  .visual-checkmark {
    background: #f2da91;
  }

  .visual-freinet {
    background: #ff9c7e;
  }

  .visual-bio {
    background: #71c8a2;
  }

  .visual-morelos {
    background: #89d1d8;
  }

  .visual-lobo {
    background: #d9bb71;
  }

  .project-grid {
    position: absolute;
    inset: -35%;
    z-index: -1;
    opacity: 0.2;
    background-image:
      linear-gradient(currentColor 1px, transparent 1px),
      linear-gradient(90deg, currentColor 1px, transparent 1px);
    background-size: 2.2rem 2.2rem;
    transform: perspective(400px) rotateX(55deg) rotateZ(-20deg);
    animation: grid-drift 15s linear infinite;
  }

  .orbit-lines {
    position: absolute;
    z-index: -1;
    width: 68%;
    aspect-ratio: 1;
    border: 1px dashed currentColor;
    border-radius: 50%;
    opacity: 0.35;
    animation: orbit-spin 18s linear infinite;
  }

  .orbit-lines::before,
  .orbit-lines::after {
    position: absolute;
    inset: 13%;
    content: "";
    border: 1px solid currentColor;
    border-radius: 50%;
    transform: rotateX(65deg);
  }

  .orbit-lines::after {
    inset: 28%;
    border-style: dashed;
    transform: rotateY(65deg);
  }

  .leaf-lines {
    position: absolute;
    width: 62%;
    height: 75%;
    border: 1px solid currentColor;
    border-radius: 100% 0 100% 0;
    opacity: 0.28;
    transform: rotate(-20deg);
  }

  .leaf-lines::after {
    position: absolute;
    inset: 9%;
    content: "";
    border: 1px dashed currentColor;
    border-radius: inherit;
  }

  .project-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 4vw, 4rem);
  }

  .project-body h3 {
    margin: 0.9rem 0 1.5rem;
    font-size: clamp(2rem, 4vw, 4.25rem);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.06em;
  }

  .project-body > p:not(.mono-label) {
    color: var(--muted);
    font-size: clamp(0.95rem, 1.3vw, 1.12rem);
  }

  .project-body > p:not(.mono-label) + p:not(.mono-label) {
    margin-top: 1rem;
  }

  .project-body ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
  }

  .project-body li {
    padding: 0.45rem 0.8rem;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    font: 300 0.6rem var(--mono);
    text-transform: uppercase;
  }

  .project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }

  .project-external-link {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    align-self: flex-start;
    color: var(--paper);
    font: 400 0.68rem var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .project-external-link svg {
    width: 0.9rem;
    height: 0.9rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    transition: transform 180ms ease;
  }

  .project-external-link:hover {
    color: var(--mint);
  }

  .project-external-link:hover svg {
    transform: translate(0.15rem, -0.15rem);
  }

  .contact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 92vh;
    overflow: hidden;
    background:
      linear-gradient(135deg, rgb(16 59 60 / 82%), rgb(6 20 27 / 88%)),
      var(--ink);
    border-top: 1px solid var(--line);
  }

  .contact h2 {
    max-width: 15ch;
    margin: 1.5rem 0 3rem;
    font-size: clamp(3.2rem, 8vw, 8.8rem);
    font-weight: 500;
    line-height: 0.88;
    letter-spacing: -0.075em;
  }

  .contact-link {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: fit-content;
    padding-bottom: 0.5rem;
    color: var(--mint);
    border-bottom: 1px solid currentColor;
    font-size: clamp(1rem, 2vw, 1.55rem);
  }

  .contact-link svg {
    transition: transform 220ms ease;
  }

  .contact-link:hover svg {
    transform: translate(4px, -4px);
  }

  .contact-links {
    display: flex;
    gap: 2rem;
    margin-top: 5rem;
  }

  .contact-links a {
    color: var(--muted);
    font: 300 0.68rem var(--mono);
    text-transform: uppercase;
    transition: color 180ms ease;
  }

  .contact-links a:hover {
    color: var(--paper);
  }

  .contact-orbit {
    top: auto;
    right: 9%;
    bottom: 16%;
    width: clamp(12rem, 22vw, 21rem);
    color: rgb(237 246 235 / 45%);
  }

  .site-footer {
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    padding: 1.5rem var(--page-gutter);
    color: var(--muted);
    background: #041016;
    border-top: 1px solid var(--line);
    font: 300 0.6rem var(--mono);
    text-transform: uppercase;
  }

  .site-footer a:hover {
    color: var(--mint);
  }
}

@layer motion {
  .reveal {
    opacity: 0;
    transform: translateY(2.4rem);
    transition:
      opacity 850ms cubic-bezier(0.2, 0.75, 0.25, 1),
      transform 850ms cubic-bezier(0.2, 0.75, 0.25, 1);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .hero .reveal:nth-child(2) {
    transition-delay: 100ms;
  }

  .hero .reveal:nth-child(3) {
    transition-delay: 200ms;
  }

  .skill-item:nth-child(2n),
  .timeline-item:nth-child(2) {
    transition-delay: 80ms;
  }

  .skill-item:nth-child(3n),
  .timeline-item:nth-child(3) {
    transition-delay: 160ms;
  }

  .tilt-card {
    transition:
      transform 180ms ease-out,
      background-color 280ms ease,
      color 280ms ease;
  }

  @media (hover: hover) and (pointer: fine) {
    .tilt-card {
      will-change: transform;
    }
  }

  @keyframes scroll-line {
    0% {
      transform: translateX(-120%);
    }
    50%,
    100% {
      transform: translateX(240%);
    }
  }

  @keyframes orbit-spin {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes grid-drift {
    to {
      background-position: 8.8rem 4.4rem;
    }
  }

}

@layer responsive {
  @media (max-width: 980px) {
    .site-header {
      grid-template-columns: 1fr auto;
    }

    .header-contact {
      display: none;
    }

    .site-nav {
      position: fixed;
      inset: 0;
      z-index: -1;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      padding: 6rem var(--page-gutter);
      visibility: hidden;
      background: rgb(6 20 27 / 97%);
      opacity: 0;
      transform: translateY(-1.5rem);
      transition:
        opacity 300ms ease,
        transform 300ms ease,
        visibility 300ms;
    }

    .site-nav.is-open {
      visibility: visible;
      opacity: 1;
      transform: translateY(0);
    }

    .site-nav a {
      font: 500 clamp(2.2rem, 8vw, 5rem) var(--display);
      letter-spacing: -0.055em;
      text-transform: none;
    }

    .site-nav a::after {
      display: none;
    }

    .menu-toggle {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      align-items: center;
      justify-content: center;
      width: 2.8rem;
      aspect-ratio: 1;
      padding: 0;
      cursor: pointer;
      background: transparent;
      border: 1px solid var(--line);
      border-radius: 50%;
    }

    .menu-toggle span {
      width: 1rem;
      height: 1px;
      background: var(--paper);
      transition: transform 240ms ease;
    }

    .menu-toggle[aria-expanded="true"] span:first-child {
      transform: translateY(4px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] span:last-child {
      transform: translateY(-4px) rotate(-45deg);
    }

    .section-heading-split {
      grid-template-columns: 1fr;
      gap: 2rem;
    }

    .section-note {
      max-width: 32rem;
    }

    .skill-cloud {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-controls {
      justify-content: flex-start;
    }

    .project-card {
      grid-template-columns: 1fr;
    }

    .project-visual {
      min-height: 22rem;
    }
  }

  @media (max-width: 720px) {
    :root {
      --header-height: 4.6rem;
      --radius: 1.1rem;
    }

    .brand-name {
      display: none;
    }

    .section {
      min-height: auto;
      padding-top: 7rem;
      padding-bottom: 7rem;
    }

    .hero {
      min-height: 100svh;
      padding-bottom: 5rem;
    }

    .hero-orbit {
      top: 19%;
      right: -5rem;
      width: 10rem;
      opacity: 0.7;
    }

    .hero-title {
      font-size: clamp(3.15rem, 16.5vw, 6rem);
      line-height: 0.84;
    }

    .title-indent {
      margin-left: 0;
    }

    .hero-bottom {
      display: block;
      padding-left: 0;
    }

    .hero-actions {
      margin-top: 1.8rem;
    }

    .button {
      padding-inline: 1rem;
      font-size: 0.6rem;
    }

    .scroll-cue {
      display: none;
    }

    .section-heading {
      margin-bottom: 3.5rem;
    }

    .section-heading h2 {
      font-size: clamp(2.6rem, 13vw, 4.2rem);
    }

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

    .profile-card {
      max-width: 28rem;
    }

    .profile-copy > p:last-child {
      margin-left: 0;
    }

    .profile-facts {
      grid-column: auto;
      flex-direction: column;
    }

    .profile-facts > div + div {
      border-top: 1px solid var(--line);
      border-left: 0;
    }

    .skill-item {
      min-height: 13.5rem;
      padding: 1rem;
    }

    .skill-glyph {
      width: 4.2rem;
    }

    .timeline::before {
      left: 0.35rem;
    }

    .timeline-item {
      grid-template-columns: 1.2rem minmax(0, 1fr);
    }

    .timeline-date {
      grid-column: 2;
      padding-left: 1.5rem;
    }

    .timeline-marker {
      grid-row: 1 / span 2;
    }

    .timeline-content {
      padding: 0.6rem 0 4rem 1.5rem;
    }

    .project-track {
      grid-auto-columns: calc(100vw - (var(--page-gutter) * 2));
      gap: 0.9rem;
      padding-bottom: 1.5rem;
    }

    .project-card {
      align-self: start;
      min-height: 0;
    }

    .project-visual {
      min-height: clamp(13rem, 58vw, 16rem);
    }

    .project-body {
      min-height: 0;
      padding: 1.5rem;
    }

    .project-body h3 {
      margin: 0.65rem 0 1rem;
      font-size: clamp(2rem, 11vw, 3rem);
    }

    .project-body ul {
      margin-top: 1.5rem;
    }

    .project-links {
      gap: 1rem 1.25rem;
      margin-top: 1.25rem;
    }

    .contact {
      min-height: 82svh;
    }

    .contact h2 {
      font-size: clamp(3rem, 15vw, 5rem);
    }

    .contact-orbit {
      right: -5rem;
      bottom: 8%;
      opacity: 0.55;
    }

    .contact-links {
      gap: 1rem;
      margin-top: 4rem;
    }

    .site-footer {
      flex-direction: column;
    }

    .noise {
      display: none;
    }

    .project-grid,
    .orbit-lines,
    .hero-orbit,
    .contact-orbit {
      animation: none;
    }
  }

  @media (max-width: 420px) {
    .hero-actions {
      align-items: stretch;
      flex-direction: column;
      width: fit-content;
    }

    .skill-cloud {
      grid-template-columns: 1fr 1fr;
    }

    .contact-link {
      max-width: 100%;
      font-size: 0.9rem;
    }
  }

  @media (hover: none) {
    .cursor-light {
      display: none;
    }

    .noise,
    .hero-orbit,
    .contact-orbit {
      display: none;
    }

    .project-grid,
    .orbit-lines {
      animation: none;
    }

    .skill-cloud,
    .project-track {
      perspective: none;
    }

    .skill-item,
    .profile-card {
      transform-style: flat;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }

    .reveal {
      opacity: 1;
      transform: none;
    }
  }
}
