@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500;600;700;900&display=swap');

:root {
  --bg: #0b0a0d;
  --surface: #121116;
  --surface-2: #18161d;
  --ink: #f5f0ed;
  --muted: #9a949c;
  --line: rgba(255,255,255,.12);
  --pink: #ff5ca8;
  --pink-soft: #f6a7cf;
  --lime: #c7ff55;
  --max: 1180px;
  --sans: "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--bg); color: var(--ink); font-family: var(--sans); }
body::before { content: ""; position: fixed; inset: 0; z-index: -3; opacity: .17; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom, #000, transparent 68%); }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.shell { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; padding: 10px 16px; color: #111; background: var(--lime); text-decoration: none; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 16px; }
.ambient { position: absolute; z-index: -2; width: 520px; height: 520px; border-radius: 50%; filter: blur(130px); opacity: .1; pointer-events: none; }
.ambient-one { right: -150px; top: 90px; background: var(--pink); }
.ambient-two { left: -240px; top: 720px; background: #6b55ff; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgba(11,10,13,.74); backdrop-filter: blur(18px); }
.nav-wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: .9rem; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #14070f; background: var(--pink); font-family: var(--mono); font-weight: 500; box-shadow: 0 0 26px rgba(255,92,168,.22); }
#main-nav { display: flex; align-items: center; gap: 34px; }
#main-nav a { position: relative; color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-decoration: none; }
#main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 2px; background: var(--pink); transition: right .2s; }
#main-nav a:hover, #main-nav a.active { color: var(--ink); }
#main-nav a:hover::after, #main-nav a.active::after { right: 0; }
.menu-button { display: none; width: 42px; height: 42px; padding: 11px; border: 1px solid var(--line); border-radius: 50%; background: transparent; }
.menu-button > span:not(.sr-only) { display: block; height: 1px; margin: 5px 0; background: var(--ink); }

.hero { min-height: 690px; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(420px,.95fr); align-items: center; gap: 70px; padding-block: 90px 100px; }
.eyebrow, .section-index, .project-kicker { margin: 0; color: var(--pink-soft); font: 500 .7rem/1.4 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 14px rgba(199,255,85,.55); }
.hero h1, .gallery-hero h1 { max-width: 680px; margin: 24px 0; font-size: clamp(3.2rem, 6.2vw, 6.25rem); font-weight: 900; line-height: .98; letter-spacing: -.07em; }
.hero h1 em, .gallery-hero h1 em { color: var(--pink); font-style: normal; }
.hero-intro { max-width: 570px; margin: 0; color: #bdb6be; font-size: 1.06rem; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 50px; padding: 0 21px; border: 1px solid var(--line); border-radius: 4px; font-size: .84rem; font-weight: 700; text-decoration: none; transition: transform .2s, border-color .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #1b0711; border-color: var(--pink); background: var(--pink); }
.button-primary:hover { background: #ff7bbb; }
.button-ghost:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.04); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 20px; margin: 34px 0 0; padding: 0; list-style: none; }
.hero-tags li { color: var(--muted); font: .7rem var(--mono); letter-spacing: .07em; }
.hero-tags li::before { content: "#"; margin-right: 2px; color: var(--pink); }

.hero-collage { position: relative; display: block; height: 500px; color: var(--ink); text-decoration: none; }
.hero-collage figure { position: absolute; margin: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.18); background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.hero-collage img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.86) contrast(1.04); transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .3s; }
.hero-collage:hover img { transform: scale(1.035); filter: saturate(1); }
.collage-main { inset: 46px 72px 35px 0; transform: rotate(-2deg); }
.collage-main img { object-position: 54% center; }
.collage-small { width: 170px; height: 215px; right: 0; }
.collage-top { top: 0; transform: rotate(4deg); }
.collage-bottom { bottom: 0; transform: rotate(2deg); }
.collage-label { position: absolute; left: -26px; top: 15px; padding: 11px 13px; color: #17080f; background: var(--lime); font: 500 .68rem/1.15 var(--mono); letter-spacing: .08em; transform: rotate(-6deg); }
.collage-count { position: absolute; right: 188px; bottom: 12px; padding: 9px 12px; color: #12070d; background: var(--pink); font: 500 .64rem var(--mono); letter-spacing: .08em; }

.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--pink); color: #170811; transform: rotate(-1deg) scale(1.01); }
.ticker-track { display: flex; width: max-content; align-items: center; gap: 34px; padding: 13px 0; animation: ticker 24s linear infinite; font: 500 .72rem var(--mono); letter-spacing: .14em; }
.ticker-track i { font-style: normal; }
@keyframes ticker {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-50%); }
}

.section { padding-block: 120px; border-bottom: 1px solid var(--line); scroll-margin-top: 72px; }
.section-heading { margin-bottom: 50px; }
.section-heading h2 { margin: 11px 0 0; font-size: clamp(2rem,4vw,3.4rem); line-height: 1.1; letter-spacing: -.055em; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-note { max-width: 260px; margin: 0; color: var(--muted); font-size: .85rem; text-align: right; }
.text-link { color: var(--pink-soft); font: 500 .72rem var(--mono); letter-spacing: .07em; text-decoration: none; }
.text-link:hover { color: var(--pink); }

.about-grid { display: grid; grid-template-columns: .9fr 1.1fr .8fr; gap: 70px; align-items: start; }
.about-lead { margin: 0; color: var(--ink); font-size: clamp(1.7rem,3vw,2.55rem); font-weight: 700; line-height: 1.35; letter-spacing: -.05em; }
.about-copy p { margin: 0 0 20px; color: #aaa3ab; font-size: .97rem; line-height: 1.9; }
.about-facts { margin: 0; border-top: 1px solid var(--line); }
.about-facts div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.about-facts dt { color: #706a72; font: .66rem var(--mono); letter-spacing: .08em; }
.about-facts dd { margin: 0; color: var(--ink); font-size: .78rem; text-align: right; }

.project-list { display: grid; grid-template-columns: 1fr 270px; gap: 18px; }
.project-featured { min-height: 390px; display: grid; grid-template-columns: 60px 1fr minmax(260px,38%); gap: 28px; padding: 34px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; transition: border-color .25s, transform .25s; }
.project-featured:hover { border-color: rgba(255,92,168,.62); transform: translateY(-4px); }
.project-number { color: #5d5760; font: .75rem var(--mono); }
.project-copy { align-self: center; }
.project-copy h3 { margin: 14px 0; font-size: clamp(2.5rem,5vw,5rem); letter-spacing: -.07em; }
.project-copy > p:not(.project-kicker) { max-width: 300px; margin: 0 0 28px; color: var(--muted); line-height: 1.7; }
.game-art { position: relative; display: grid; place-items: center; min-height: 300px; overflow: hidden; border-left: 1px solid var(--line); background: radial-gradient(circle at 50%, rgba(255,92,168,.18), transparent 55%); }
.game-core { display: grid; place-items: center; width: 104px; height: 104px; z-index: 2; border: 1px solid var(--pink); border-radius: 50%; color: #160910; background: var(--pink); font: 500 3.2rem var(--mono); box-shadow: 0 0 70px rgba(255,92,168,.35); }
.game-orbit { position: absolute; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.orbit-one { width: 210px; height: 210px; }
.orbit-two { width: 310px; height: 310px; border-style: dashed; animation: spin 18s linear infinite; }
.game-spark { position: absolute; color: var(--lime); }
.spark-one { left: 18%; top: 20%; }
.spark-two { right: 15%; bottom: 18%; font-size: 1.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.project-next { display: flex; flex-direction: column; justify-content: space-between; min-height: 390px; padding: 28px; border: 1px dashed rgba(255,255,255,.18); color: #645f66; }
.project-next > span { font: .75rem var(--mono); }
.project-next p { margin: 0; font-size: .82rem; line-height: 1.7; }
.project-next strong { color: #918b93; font-size: 1rem; }

.photo-strip { display: grid; grid-template-columns: 1.35fr .75fr .9fr; gap: 14px; align-items: end; }
.photo-card { position: relative; height: 330px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.photo-card.photo-wide { height: 420px; }
.photo-card.photo-tall { height: 500px; }
.photo-card img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.75); transition: transform .55s, filter .3s; }
.photo-card:hover img { transform: scale(1.035); filter: saturate(1); }
.photo-card span { position: absolute; left: 14px; bottom: 14px; padding: 8px 10px; color: var(--ink); background: rgba(11,10,13,.76); backdrop-filter: blur(8px); font: .64rem var(--mono); letter-spacing: .06em; }

.contact-card { position: relative; min-height: 410px; padding: 58px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(125deg, #17141b, #100e13); }
.contact-card::after { content: "P"; position: absolute; right: -18px; bottom: -120px; color: rgba(255,92,168,.055); font: 900 390px/.8 var(--sans); }
.contact-card h2 { position: relative; z-index: 1; max-width: 670px; margin: 24px 0 50px; font-size: clamp(2.7rem,6vw,5.6rem); line-height: 1.05; letter-spacing: -.07em; }
.github-link { position: relative; z-index: 2; width: min(100%,390px); display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); background: rgba(255,255,255,.035); text-decoration: none; transition: background .2s, border-color .2s; }
.github-link:hover { border-color: var(--pink); background: rgba(255,92,168,.08); }
.github-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: #160910; background: var(--pink); font: 500 .72rem var(--mono); }
.github-link small, .github-link strong { display: block; }
.github-link small { margin-bottom: 3px; color: var(--muted); font: .62rem var(--mono); letter-spacing: .12em; }
.github-link strong { font-size: .9rem; }
.github-link b { font-weight: 400; }

.site-footer { min-height: 110px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; color: #68626b; font: .62rem var(--mono); letter-spacing: .08em; }
.site-footer p { margin: 0; }
.site-footer p:nth-child(2) { text-align: center; }
.site-footer a { justify-self: end; text-decoration: none; }
.site-footer a:hover { color: var(--pink); }
.site-footer .footer-icp { grid-column: 1 / -1; justify-self: center; padding-top: 4px; color: #7d7682; }

/* Gallery */
.gallery-main { padding-bottom: 100px; }
.gallery-hero { padding: 100px 0 70px; }
.gallery-hero h1 { max-width: 920px; margin-bottom: 40px; }
.gallery-meta { display: flex; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font: .68rem var(--mono); letter-spacing: .08em; }
.gallery-grid { display: grid; grid-template-columns: repeat(12,1fr); gap: 16px; }
.gallery-item { position: relative; min-height: 420px; padding: 0; overflow: hidden; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: zoom-in; text-align: left; }
.gallery-item:nth-child(1) { grid-column: span 8; }
.gallery-item:nth-child(2) { grid-column: span 4; }
.gallery-item:nth-child(3) { grid-column: span 4; }
.gallery-item:nth-child(4) { grid-column: span 4; }
.gallery-item:nth-child(5) { grid-column: span 4; }
.gallery-item img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.78); transition: transform .6s, filter .3s; }
.gallery-item:hover img { transform: scale(1.025); filter: saturate(1); }
.gallery-item > span, .gallery-item > strong { position: absolute; bottom: 14px; padding: 8px 10px; background: rgba(11,10,13,.78); backdrop-filter: blur(8px); font: .65rem var(--mono); letter-spacing: .08em; }
.gallery-item > span { left: 14px; color: var(--pink); }
.gallery-item > strong { right: 14px; font-weight: 500; }
.gallery-item:nth-child(1) img { object-position: center; }
.gallery-item:nth-child(2) img { object-position: 52% center; }
.lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 44px 86px; border: 0; background: rgba(7,6,8,.95); color: var(--ink); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(7,6,8,.8); }
.lightbox figure { max-width: 100%; max-height: 100%; margin: 0; display: grid; place-items: center; }
.lightbox img { max-width: 82vw; max-height: 82vh; object-fit: contain; }
.lightbox figcaption { margin-top: 10px; color: var(--muted); font: .68rem var(--mono); letter-spacing: .08em; }
.lightbox-close, .lightbox-nav { position: fixed; z-index: 3; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: rgba(20,18,23,.7); cursor: pointer; }
.lightbox-close { right: 26px; top: 22px; width: 44px; height: 44px; font-size: 1.5rem; }
.lightbox-nav { top: 50%; width: 48px; height: 48px; transform: translateY(-50%); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-close:hover, .lightbox-nav:hover { border-color: var(--pink); color: var(--pink); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .reveal { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 60px; padding-top: 80px; }
  .hero-copy { max-width: 720px; }
  .hero-collage { width: min(100%,660px); justify-self: end; }
  .about-grid { grid-template-columns: 1fr 1.2fr; }
  .about-facts { grid-column: 2; }
  .project-list { grid-template-columns: 1fr; }
  .project-next { min-height: 150px; }
  .photo-strip { grid-template-columns: 1fr 1fr; }
  .photo-card:last-child { display: none; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 60px; }
  body { min-width: 0; }
  body::before { background-size: 44px 44px; }
  .shell { width: calc(100% - 36px); }
  .ambient { width: 320px; height: 320px; filter: blur(90px); }

  .site-header { backdrop-filter: blur(22px); }
  .nav-wrap { height: 60px; }
  .brand { gap: 9px; font-size: .82rem; }
  .brand-mark { width: 30px; height: 30px; }
  .menu-button {
    position: relative;
    display: block;
    width: 44px;
    height: 44px;
    padding: 12px;
    color: var(--ink);
    cursor: pointer;
  }
  .menu-button::before,
  .menu-button::after {
    content: "";
    position: absolute;
    left: 12px;
    width: 18px;
    height: 1px;
    background: currentColor;
    transition: top .2s, transform .2s;
  }
  .menu-button::before { top: 17px; }
  .menu-button::after { top: 24px; }
  .menu-button[aria-expanded="true"]::before { top: 21px; transform: rotate(45deg); }
  .menu-button[aria-expanded="true"]::after { top: 21px; transform: rotate(-45deg); }
  .menu-button > span:not(.sr-only) { display: none; }
  #main-nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 18px max(18px, env(safe-area-inset-bottom));
    border-bottom: 1px solid var(--line);
    background: rgba(11,10,13,.98);
    box-shadow: 0 20px 45px rgba(0,0,0,.35);
  }
  #main-nav.open { display: flex; }
  #main-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 6px;
    background: rgba(255,255,255,.025);
    font-size: .82rem;
  }
  #main-nav a.active { background: rgba(255,92,168,.1); }
  #main-nav a::after { display: none; }

  .hero { padding-block: 52px 68px; gap: 42px; }
  .eyebrow, .section-index, .project-kicker { font-size: .66rem; letter-spacing: .1em; }
  .hero h1, .gallery-hero h1 {
    margin: 19px 0;
    font-size: clamp(2.75rem, 14.5vw, 4.2rem);
    line-height: 1.01;
    letter-spacing: -.065em;
  }
  .hero-intro { font-size: .94rem; line-height: 1.75; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 28px; }
  .button { min-height: 52px; width: 100%; padding-inline: 18px; }
  .hero-tags { gap: 10px 18px; margin-top: 25px; }
  .hero-tags li { font-size: .66rem; }
  .hero-collage { width: calc(100% - 4px); height: min(106vw, 410px); justify-self: center; }
  .collage-main { inset: 30px 40px 28px 0; }
  .collage-small { width: 34vw; max-width: 128px; height: 44vw; max-height: 172px; }
  .collage-label { left: -7px; top: 5px; }
  .collage-count { right: min(36vw, 138px); bottom: 6px; white-space: nowrap; }
  .ticker-track { gap: 25px; padding-block: 11px; }

  .section { padding-block: 72px; scroll-margin-top: 60px; }
  .section-heading { margin-bottom: 34px; }
  .section-heading h2 { margin-top: 9px; font-size: clamp(2rem, 10vw, 2.8rem); }
  .section-heading-row { align-items: stretch; flex-direction: column; gap: 18px; }
  .section-heading-row > .text-link { min-height: 44px; display: inline-flex; align-items: center; }
  .section-note { max-width: none; font-size: .8rem; line-height: 1.7; text-align: left; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-lead { font-size: 1.7rem; }
  .about-copy p { font-size: .93rem; line-height: 1.85; }
  .about-facts { grid-column: auto; }
  .about-facts div { min-height: 52px; align-items: center; }

  .project-list { gap: 12px; }
  .project-featured {
    min-height: 0;
    grid-template-columns: 28px minmax(0,1fr);
    gap: 14px;
    padding: 22px;
  }
  .project-copy { padding-block: 18px 8px; }
  .project-copy h3 { margin: 10px 0; font-size: clamp(2.45rem, 15vw, 4rem); }
  .project-copy > p:not(.project-kicker) { margin-bottom: 22px; font-size: .9rem; }
  .project-copy .text-link { min-height: 44px; display: inline-flex; align-items: center; }
  .game-art { grid-column: 1 / -1; min-height: 220px; border-top: 1px solid var(--line); border-left: 0; }
  .game-core { width: 88px; height: 88px; font-size: 2.7rem; }
  .orbit-one { width: 180px; height: 180px; }
  .orbit-two { width: 260px; height: 260px; }
  .project-next { min-height: 132px; padding: 22px; }

  .photo-strip { grid-template-columns: 1fr; gap: 12px; align-items: stretch; }
  .photo-card,
  .photo-card.photo-wide,
  .photo-card.photo-tall {
    display: block;
    height: auto;
    aspect-ratio: 4 / 5;
  }
  .photo-card.photo-wide { aspect-ratio: 4 / 3; }
  .photo-card img { filter: saturate(.9); }

  .contact-card { min-height: 350px; padding: 30px 22px; }
  .contact-card::after { right: -10px; bottom: -70px; font-size: 240px; }
  .contact-card h2 { margin: 20px 0 38px; font-size: clamp(2.35rem, 12vw, 3.7rem); }
  .github-link { min-height: 72px; grid-template-columns: 44px minmax(0,1fr) auto; gap: 12px; padding: 12px; }
  .github-icon { width: 44px; height: 44px; }

  .site-footer {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 14px;
    padding-block: 30px max(30px, env(safe-area-inset-bottom));
    line-height: 1.6;
  }
  .site-footer p:nth-child(2) { display: block; text-align: left; }
  .site-footer a { min-height: 44px; display: inline-flex; align-items: center; justify-self: start; }

  .gallery-main { padding-bottom: 72px; }
  .gallery-hero { padding: 58px 0 40px; }
  .gallery-hero h1 { margin-bottom: 30px; }
  .gallery-meta { gap: 12px; font-size: .62rem; line-height: 1.5; }
  .gallery-grid { gap: 12px; }
  .gallery-item,
  .gallery-item:nth-child(n) {
    grid-column: span 12;
    min-height: 0;
    aspect-ratio: 4 / 5;
    touch-action: manipulation;
  }
  .gallery-item:nth-child(1) { min-height: 0; aspect-ratio: 4 / 3; }
  .gallery-item img { filter: saturate(.9); }
  .lightbox { padding: 64px 12px 88px; }
  .lightbox figure { width: 100%; }
  .lightbox img { max-width: 100%; max-height: calc(100dvh - 172px); }
  .lightbox-close { top: max(12px, env(safe-area-inset-top)); right: 12px; width: 48px; height: 48px; }
  .lightbox-nav { top: auto; bottom: max(18px, env(safe-area-inset-bottom)); width: 52px; height: 52px; }
  .lightbox-prev { left: calc(50% - 64px); }
  .lightbox-next { right: calc(50% - 64px); }
}
