:root {
    --bg: #f2f2ef;
    --surface: #ffffff;
    --ink: #0c0c0d;
    --muted: #747474;
    --line: rgba(12, 12, 13, .10);
    --line-dark: rgba(255, 255, 255, .12);
    --accent: #cfff3f;
    --dark: #0b0b0c;
    --dark-2: #151516;
    --radius: 30px;
    --shadow: 0 24px 80px rgba(0, 0, 0, .10);
    --ease: cubic-bezier(.16, 1, .3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}
html {
    scroll-behavior: smooth
}
body {
    font-family: Manrope, system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    overflow-x: hidden;
}
body:before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 80;
    opacity: .24;
    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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
}
a {
    text-decoration: none;
    color: inherit
}
button {
    font: inherit;
    border: 0;
    background: none;
    cursor: pointer
}
::selection {
    background: var(--accent);
    color: #0b0b0c
}
.wrap {
    max-width: 1240px;
    margin: auto;
    padding: 0 28px
}
.eyebrow {
    font-family: "IBM Plex Mono", monospace;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 48px
}
.section-head h2 {
    font-size: clamp(2.6rem, 5.4vw, 5.3rem);
    font-weight: 700;
    line-height: .91;
    letter-spacing: -.065em;
    max-width: 720px;
}
.section-head p {
    max-width: 390px;
    color: var(--muted);
    font-size: 1rem
}

.nav {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 50;
    transition: .5s var(--ease)
}
.nav.compact {
    top: 8px
}
.nav-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 20px;
    background: rgba(249, 249, 246, .80);
    backdrop-filter: blur(24px) saturate(130%);
    border: 1px solid var(--line);
    border-radius: 100px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .06);
    transition: .5s var(--ease);
}
.nav.compact .nav-inner {
    height: 56px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .08)
}
.logo {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.045em
}
.logo span {
    opacity: .42
}
.links {
    display: flex;
    gap: 6px;
    align-items: center
}
.links a {
    font-size: .83rem;
    font-weight: 650;
    color: #58585e;
    padding: 10px 14px;
    border-radius: 100px;
    transition: transform .25s var(--ease), background .25s, color .25s;
}
.links a:hover,
.links a.active {
    background: #e9e9e5;
    color: #111;
    transform: translateY(-1px)
}
.links .cta {
    background: #111;
    color: white;
    padding: 11px 18px
}
.links .cta:hover {
    background: #111;
    color: var(--accent)
}

.lang-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px 6px 14px;
    border-radius: 100px;
    background: rgba(255, 255, 255, .6);
    border: 1px solid var(--line);
    font-size: .78rem;
    font-weight: 650;
    color: #58585e;
    cursor: pointer;
    transition: background .25s, transform .25s var(--ease);
    user-select: none;
}
.lang-dropdown:hover {
    background: #e9e9e5;
    transform: translateY(-1px);
}
.lang-dropdown .arrow {
    font-size: .55rem;
    margin-left: 2px;
    transition: transform .3s var(--ease);
}
.lang-dropdown.open .arrow {
    transform: rotate(180deg);
}
.lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 130px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 6px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .10);
    opacity: 0;
    transform: translateY(6px) scale(.96);
    pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
    z-index: 60;
}
.lang-menu.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.lang-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 14px;
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 600;
    color: #2a2a2c;
    transition: background .2s;
}
.lang-menu button:hover {
    background: #e9e9e5;
}
.lang-menu button .flag {
    font-size: 1.1rem;
}
.lang-menu button.active-lang {
    background: var(--accent);
    color: #0b0b0c;
}

.hero {
    padding: 155px 0 78px;
    min-height: 800px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero:before {
    content: "";
    position: absolute;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    right: -300px;
    top: -270px;
    border: 1px solid rgba(0, 0, 0, .07);
    box-shadow: 0 0 0 90px rgba(0, 0, 0, .015), 0 0 0 180px rgba(0, 0, 0, .012);
    animation: heroOrbit 14s ease-in-out infinite alternate;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.14fr .86fr;
    gap: 60px;
    align-items: center
}
.hero-copy .eyebrow {
    margin-bottom: 25px
}
.hero h1 {
    font-size: clamp(4rem, 8.3vw, 8.25rem);
    font-weight: 750;
    line-height: .835;
    letter-spacing: -.079em;
    max-width: 870px;
}
.hero h1 .gradient {
    color: var(--ink);
    position: relative;
    display: inline-block;
}
.hero h1 .gradient:after {
    content: "";
    position: absolute;
    height: .13em;
    left: .04em;
    right: .02em;
    bottom: .02em;
    background: var(--accent);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    animation: underlineIn 1.1s .9s var(--ease) forwards;
}
.hero-lead {
    font-size: 1.12rem;
    color: var(--muted);
    max-width: 570px;
    margin: 32px 0 30px
}
.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border-radius: 100px;
    padding: 13px 19px;
    font-size: .88rem;
    font-weight: 750;
    transition: .35s var(--ease);
    will-change: transform;
}
.pill-dark {
    background: #111;
    color: white
}
.pill-dark:hover {
    transform: translateY(-4px);
    color: var(--accent)
}
.pill-light {
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line)
}
.pill-light:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow)
}

.orb-card {
    --rx: 0deg;
    --ry: 0deg;
    position: relative;
    min-height: 485px;
    border-radius: 42px;
    overflow: hidden;
    background: #0b0b0c;
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .18);
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) rotate(1.3deg);
    transition: transform .18s ease-out, box-shadow .45s var(--ease);
    will-change: transform;
}
.orb-card:hover {
    box-shadow: 0 42px 105px rgba(0, 0, 0, .23)
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
}
.orb.a {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle at 35% 30%, #f5f5f5 0, #777 28%, #222 60%, #0b0b0c 76%);
    left: -90px;
    top: 5px;
    animation: floatA 8s ease-in-out infinite alternate;
}
.orb.b {
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255, 255, 255, .20);
    box-shadow: inset 0 0 70px rgba(255, 255, 255, .08);
    right: -65px;
    bottom: 6px;
    animation: floatB 10s ease-in-out infinite alternate;
}
.orb.c {
    width: 145px;
    height: 145px;
    background: var(--accent);
    right: 88px;
    top: 124px;
    box-shadow: 0 0 70px rgba(207, 255, 63, .22);
    animation: pulseOrb 5s ease-in-out infinite;
}
.orb-card:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(255, 255, 255, .10), transparent 38%, rgba(0, 0, 0, .30));
    pointer-events: none;
}
.floating {
    position: absolute;
    z-index: 2;
    background: rgba(245, 245, 242, .89);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .20);
    animation: cardFloat 6s ease-in-out infinite;
}
.f1 {
    left: 24px;
    bottom: 28px;
    width: 210px;
    animation-delay: -2s
}
.f2 {
    right: 22px;
    top: 26px;
    width: 185px
}
.floating small {
    display: block;
    color: #777;
    font-family: "IBM Plex Mono", monospace;
    font-size: .62rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .07em;
}
.floating strong {
    display: block;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -.05em;
    margin-top: 4px
}
.mini-bar {
    height: 7px;
    background: #d9d9d5;
    border-radius: 10px;
    margin-top: 14px;
    overflow: hidden
}
.mini-bar i {
    display: block;
    height: 100%;
    width: 78%;
    background: #111;
    border-radius: 10px;
    transform-origin: left;
    animation: barGrow 2s .6s var(--ease) both;
}

.ticker {
    overflow: hidden;
    background: #0b0b0c;
    color: white;
    border-block: 1px solid #222
}
.ticker-track {
    display: flex;
    width: max-content;
    animation: marquee 27s linear infinite
}
.ticker:hover .ticker-track {
    animation-play-state: paused
}
.ticker span {
    padding: 16px 26px;
    font-family: "IBM Plex Mono", monospace;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.ticker b {
    color: var(--accent);
    font-size: 1rem
}

.about {
    padding: 125px 0
}
.about-layout {
    display: grid;
    grid-template-columns: .72fr 1.28fr;
    gap: 72px
}
.profile-card {
    min-height: 535px;
    background: #e5e5e0;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: var(--radius);
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: .55s var(--ease);
}
.profile-card:hover {
    transform: translateY(-8px)
}
.profile-card .number {
    font-size: 7rem;
    line-height: .8;
    letter-spacing: -.08em;
    font-weight: 800;
    color: rgba(0, 0, 0, .10);
}
.profile-card .quote {
    position: absolute;
    bottom: 28px;
    left: 30px;
    right: 30px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -.05em;
}
.profile-card .dot {
    position: absolute;
    width: 185px;
    height: 185px;
    border-radius: 50%;
    background: var(--accent);
    right: -47px;
    top: 108px;
    animation: dotDrift 7s ease-in-out infinite alternate;
}
.profile-card:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .44) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform 1s var(--ease);
}
.profile-card:hover:after {
    transform: translateX(120%)
}
.about-copy h3 {
    font-size: clamp(2.2rem, 4.2vw, 3.8rem);
    font-weight: 720;
    line-height: .96;
    letter-spacing: -.06em;
    margin: 15px 0 25px;
}
.about-copy>p {
    color: var(--muted);
    font-size: 1.04rem;
    max-width: 670px;
    margin-bottom: 17px
}
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 35px
}
.stat {
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
    transition: .35s var(--ease);
}
.stat:hover {
    transform: translateY(-5px);
    background: #fff
}
.stat strong {
    font-size: 2.3rem;
    font-weight: 800;
    display: block;
    letter-spacing: -.07em
}
.stat span {
    font-size: .72rem;
    color: var(--muted);
    font-weight: 650
}

.projects {
    padding: 115px 0;
    background: #0b0b0c;
    color: white
}
.projects .section-head p {
    color: #99999f
}
.projects .eyebrow {
    color: #99999f
}
.project-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px
}
.project {
    --mx: 50%;
    --my: 50%;
    min-height: 430px;
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-dark);
    transition: transform .45s var(--ease), border-color .35s, background .35s;
    isolation: isolate;
    cursor: pointer;
}
.project:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .13), transparent 45%);
    opacity: 0;
    transition: opacity .35s;
}
.project:hover:before {
    opacity: 1
}
.project:hover {
    transform: translateY(-9px);
    border-color: rgba(255, 255, 255, .24)
}
.project:nth-child(1) {
    grid-column: span 7;
    background: #181819
}
.project:nth-child(2) {
    grid-column: span 5;
    background: #222223
}
.project:nth-child(3) {
    grid-column: span 5;
    background: #141415
}
.project:nth-child(4) {
    grid-column: span 7;
    background: #1d1d1e
}
.project:nth-child(1):after,
.project:nth-child(3):after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--accent);
    opacity: .92;
    right: -66px;
    top: -62px;
    z-index: -1;
    transition: transform .7s var(--ease);
}
.project:hover:after {
    transform: scale(1.18)
}
.project-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .09);
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    transition: .45s var(--ease);
}
.project:hover .project-icon {
    transform: rotate(8deg) scale(1.06)
}
.project h3 {
    font-size: clamp(2rem, 4vw, 3.7rem);
    font-weight: 720;
    letter-spacing: -.06em;
    line-height: .9;
    max-width: 540px
}
.project p {
    max-width: 560px;
    color: rgba(255, 255, 255, .66);
    margin-top: 14px;
    font-size: .94rem
}
.tags {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 18px
}
.tags span {
    font-family: "IBM Plex Mono", monospace;
    font-size: .62rem;
    font-weight: 600;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 100px;
    color: #d6d6d8
}
.project-link {
    display: inline-flex;
    margin-top: 22px;
    font-size: .8rem;
    font-weight: 800
}
.project-link:hover {
    color: var(--accent)
}

.books {
    padding: 125px 0
}
.books-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px
}
.book {
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 12px;
    transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .35s;
    transform-origin: center bottom;
}
.book:hover {
    transform: translateY(-10px) rotate(-.6deg);
    box-shadow: var(--shadow);
    background: #fff
}
.cover {
    aspect-ratio: 3/4;
    border-radius: 17px;
    overflow: hidden;
    background: #dededb;
    display: grid;
    place-items: center
}
.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--ease), filter .5s
}
.book:hover .cover img {
    transform: scale(1.045)
}
.cover span {
    font-family: "IBM Plex Mono", monospace;
    font-size: .72rem;
    font-weight: 600;
    color: #888;
    letter-spacing: .08em
}
.book h3 {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -.035em;
    margin: 15px 8px 3px
}
.book small {
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: .59rem;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0 8px
}
.book p {
    color: var(--muted);
    font-size: .77rem;
    line-height: 1.48;
    margin: 10px 8px 15px
}
.book-link {
    font-size: .76rem;
    font-weight: 800;
    margin: 0 8px 8px;
    display: block;
    color: #111
}

.contact-card {
    border-radius: 38px;
    background: #111;
    color: white;
    padding: 66px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, .08);
}
.contact-card:before {
    content: "";
    position: absolute;
    width: 310px;
    height: 310px;
    border-radius: 50%;
    background: var(--accent);
    right: -105px;
    top: -155px;
    animation: contactPulse 7s ease-in-out infinite alternate;
}
.contact-card:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: scan 4s linear infinite;
}
.contact .eyebrow {
    color: #98989e
}
.contact h2 {
    font-size: clamp(3.5rem, 8vw, 7.2rem);
    font-weight: 730;
    line-height: .81;
    letter-spacing: -.075em;
    max-width: 720px;
    position: relative;
    z-index: 1;
}
.contact-copy {
    max-width: 310px;
    position: relative;
    z-index: 1
}
.contact-copy p {
    margin: 12px 0 20px;
    font-size: .94rem;
    color: #acacb0
}
.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}
.socials a {
    background: #f4f4f1;
    color: #111;
    border-radius: 100px;
    padding: 10px 14px;
    font-size: .76rem;
    font-weight: 800;
    transition: .3s var(--ease)
}
.socials a:hover {
    background: var(--accent);
    transform: translateY(-3px)
}
footer {
    padding: 30px 0 45px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .72rem;
    display: flex;
    justify-content: space-between
}

.reveal {
    opacity: 0;
    transform: translateY(42px) scale(.985);
    filter: blur(8px);
    transition: opacity .9s var(--ease), transform 1s var(--ease), filter .85s var(--ease);
}
.reveal.show {
    opacity: 1;
    transform: none;
    filter: blur(0)
}
.project-grid .reveal:nth-child(2) {
    transition-delay: .08s
}
.project-grid .reveal:nth-child(3) {
    transition-delay: .12s
}
.project-grid .reveal:nth-child(4) {
    transition-delay: .18s
}
.books-row .reveal:nth-child(2) {
    transition-delay: .06s
}
.books-row .reveal:nth-child(3) {
    transition-delay: .12s
}
.books-row .reveal:nth-child(4) {
    transition-delay: .18s
}

@keyframes marquee {
    to {
        transform: translateX(-50%)
    }
}
@keyframes underlineIn {
    to {
        transform: scaleX(1)
    }
}
@keyframes heroOrbit {
    to {
        transform: translate(-55px, 45px) scale(.94)
    }
}
@keyframes floatA {
    to {
        transform: translate(30px, 22px) scale(1.06)
    }
}
@keyframes floatB {
    to {
        transform: translate(-26px, -22px) rotate(10deg)
    }
}
@keyframes pulseOrb {
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 110px rgba(207, 255, 63, .28)
    }
}
@keyframes cardFloat {
    50% {
        transform: translateY(-9px)
    }
}
@keyframes barGrow {
    from {
        transform: scaleX(.05)
    }
    to {
        transform: scaleX(1)
    }
}
@keyframes dotDrift {
    to {
        transform: translate(-24px, 35px) scale(.92)
    }
}
@keyframes contactPulse {
    to {
        transform: translate(-35px, 35px) scale(1.12)
    }
}
@keyframes scan {
    from {
        transform: translateX(-100%)
    }
    to {
        transform: translateX(100%)
    }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(20px) saturate(120%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s var(--ease);
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.modal {
    background: #fff;
    border-radius: 36px;
    max-width: 960px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 120px rgba(0, 0, 0, .35);
    transform: scale(.92) translateY(30px);
    transition: transform .5s var(--ease), opacity .5s var(--ease);
    opacity: 0;
    overflow: hidden;
}
.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 750;
    letter-spacing: -.04em;
}
.modal-close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f0f0ed;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    font-weight: 300;
    transition: background .25s, transform .25s var(--ease);
    color: #222;
    border: none;
    cursor: pointer;
}
.modal-close:hover {
    background: #e0e0dc;
    transform: rotate(90deg);
}
.modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
    min-height: 300px;
    background: #f8f8f6;
}
.modal-body iframe {
    width: 100%;
    height: 520px;
    border: 0;
    display: block;
}
.modal-body .preview-card {
    padding: 32px 28px 28px;
}
.modal-body .preview-card .preview-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0 16px;
}
.modal-body .preview-card .preview-tags span {
    font-family: "IBM Plex Mono", monospace;
    font-size: .65rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 100px;
    background: #eaeae7;
    color: #333;
}
.modal-body .preview-card p {
    color: #444;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 640px;
}
.modal-body .preview-card .preview-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.modal-body .preview-card .preview-actions a {
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 700;
    font-size: .85rem;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.modal-body .preview-card .preview-actions .btn-primary {
    background: #111;
    color: #fff;
}
.modal-body .preview-card .preview-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
    color: var(--accent);
}
.modal-body .preview-card .preview-actions .btn-secondary {
    background: #eaeae7;
    color: #111;
}
.modal-body .preview-card .preview-actions .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}
.modal-body .preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 28px;
    text-align: center;
    color: #888;
    min-height: 300px;
}
.modal-body .preview-placeholder .big-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: .3;
}

@media(max-width:900px) {
    .hero-grid,
    .about-layout {
        grid-template-columns: 1fr
    }
    .hero {
        padding-top: 130px
    }
    .orb-card {
        min-height: 390px
    }
    .project:nth-child(n) {
        grid-column: span 12
    }
    .books-row {
        grid-template-columns: repeat(2, 1fr)
    }
    .contact-card {
        padding: 42px;
        flex-direction: column;
        align-items: flex-start
    }
    .section-head {
        align-items: flex-start;
        flex-direction: column
    }
    .modal-body iframe {
        height: 380px;
    }
}
@media(max-width:600px) {
    .wrap {
        padding: 0 17px
    }
    .nav {
        top: 9px
    }
    .links a:not(.cta):not(.lang-dropdown) {
        display: none
    }
    .lang-dropdown {
        padding: 4px 8px 4px 10px;
        font-size: .7rem;
    }
    .lang-dropdown .label-text {
        display: none;
    }
    .hero {
        min-height: auto;
        padding: 122px 0 55px
    }
    .hero h1 {
        font-size: clamp(3.5rem, 17vw, 5.6rem)
    }
    .orb-card {
        min-height: 355px;
        border-radius: 30px
    }
    .f1 {
        left: 15px;
        bottom: 16px
    }
    .f2 {
        right: 15px;
        top: 16px
    }
    .stats {
        grid-template-columns: 1fr 1fr
    }
    .books-row {
        grid-template-columns: 1fr 1fr;
        gap: 9px
    }
    .project {
        min-height: 380px
    }
    .contact-card {
        padding: 34px 25px
    }
    .contact h2 {
        font-size: 4rem
    }
    footer {
        display: block
    }
    .footer-right {
        margin-top: 7px
    }
    .modal {
        max-height: 96vh;
        border-radius: 24px;
    }
    .modal-header {
        padding: 16px 18px;
    }
    .modal-header h2 {
        font-size: 1.15rem;
    }
    .modal-body iframe {
        height: 280px;
    }
    .modal-body .preview-card {
        padding: 20px 16px 20px;
    }
    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
}
@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;
        filter: none
    }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(20px) saturate(120%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s cubic-bezier(.16,1,.3,1);
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.modal {
    background: #fff;
    border-radius: 36px;
    max-width: 960px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 120px rgba(0,0,0,.35);
    transform: scale(.92) translateY(30px);
    transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .5s cubic-bezier(.16,1,.3,1);
    opacity: 0;
    overflow: hidden;
}
.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-bottom: 1px solid rgba(12,12,13,.10);
    flex-shrink: 0;
}
.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 750;
    letter-spacing: -.04em;
}
.modal-close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f0f0ed;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    font-weight: 300;
    transition: background .25s, transform .25s cubic-bezier(.16,1,.3,1);
    color: #222;
    border: none;
    cursor: pointer;
}
.modal-close:hover {
    background: #e0e0dc;
    transform: rotate(90deg);
}
.modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
    min-height: 300px;
    background: #f8f8f6;
}
.modal-body iframe {
    width: 100%;
    height: 520px;
    border: 0;
    display: block;
}
.modal-body .preview-card {
    padding: 32px 28px 28px;
}
.modal-body .preview-card .preview-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0 16px;
}
.modal-body .preview-card .preview-tags span {
    font-family: "IBM Plex Mono", monospace;
    font-size: .65rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 100px;
    background: #eaeae7;
    color: #333;
}
.modal-body .preview-card p {
    color: #444;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 640px;
}
.modal-body .preview-card .preview-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.modal-body .preview-card .preview-actions a {
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 700;
    font-size: .85rem;
    transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s cubic-bezier(.16,1,.3,1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.modal-body .preview-card .preview-actions .btn-primary {
    background: #111;
    color: #fff;
}
.modal-body .preview-card .preview-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,.15);
    color: #cfff3f;
}
.modal-body .preview-card .preview-actions .btn-secondary {
    background: #eaeae7;
    color: #111;
}
.modal-body .preview-card .preview-actions .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.modal-body .preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 28px;
    text-align: center;
    color: #888;
    min-height: 300px;
}
.modal-body .preview-placeholder .big-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: .3;
}
@media(max-width:900px) {
    .modal-body iframe { height: 380px; }
}
@media(max-width:600px) {
    .modal { max-height: 96vh; border-radius: 24px; }
    .modal-header { padding: 16px 18px; }
    .modal-header h2 { font-size: 1.15rem; }
    .modal-body iframe { height: 280px; }
    .modal-body .preview-card { padding: 20px 16px 20px; }
    .modal-close { width: 36px; height: 36px; font-size: 1.2rem; }
}

.preview-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 18px;
    background: #0a0a0f;
    border: 1px solid rgba(255,255,255,0.06);
}

.preview-image img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.preview-card:hover .preview-image img {
    transform: scale(1.02);
}

.preview-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
}

.preview-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08);
    color: #ddd;
    font-family: 'IBM Plex Mono', monospace;
}

.preview-image img:not([src]), 
.preview-image img[src=""],
.preview-image img[src*="undefined"] {
    display: none;
}

.preview-image:not(:has(img[src])) {
    display: none;
}

#beer-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: beerVibrate 0.15s ease 6;
    cursor: pointer;
    overflow: hidden;
}

@keyframes beerVibrate {
    0% { transform: translate(0,0) rotate(0deg); }
    10% { transform: translate(-8px,-12px) rotate(-0.8deg); }
    20% { transform: translate(12px,-8px) rotate(0.8deg); }
    30% { transform: translate(-6px,14px) rotate(-0.5deg); }
    40% { transform: translate(14px,6px) rotate(0.5deg); }
    50% { transform: translate(-14px,-6px) rotate(-0.6deg); }
    60% { transform: translate(6px,14px) rotate(0.6deg); }
    70% { transform: translate(-8px,-14px) rotate(-0.5deg); }
    80% { transform: translate(10px,8px) rotate(0.5deg); }
    90% { transform: translate(-10px,10px) rotate(-0.5deg); }
    100% { transform: translate(0,0) rotate(0deg); }
}

.beer-fill-screen {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: linear-gradient(180deg, #f7c948 0%, #e8a830 25%, #d49a2a 55%, #b87a1e 80%, #8a5c14 100%);
    animation: fillScreen 3s ease-in forwards;
    z-index: 1;
    box-shadow: inset 0 20px 60px rgba(255,200,100,0.3);
}

@keyframes fillScreen {
    0% { height: 0%; }
    70% { height: 88%; }
    75% { height: 82%; }
    80% { height: 90%; }
    85% { height: 85%; }
    92% { height: 92%; }
    100% { height: 90%; }
}

.beer-foam-screen {
    position: absolute;
    bottom: 90%;
    left: -2px;
    right: -2px;
    height: 12%;
    background: radial-gradient(ellipse at 30% 100%, #fff9e6 0%, #f5eed0 35%, #e8dbb0 70%, #d4c48a 100%);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    animation: foamRiseScreen 3.2s ease-in forwards;
    opacity: 0;
    transform: translateY(30px);
    z-index: 2;
    filter: drop-shadow(0 -10px 20px rgba(255,255,240,0.3));
}

@keyframes foamRiseScreen {
    0% { opacity: 0; transform: translateY(30px); }
    60% { opacity: 0; }
    70% { opacity: 0.8; transform: translateY(0); }
    85% { opacity: 1; transform: translateY(-4px); }
    100% { opacity: 1; transform: translateY(0); }
}

.beer-foam-screen::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 5%;
    right: 5%;
    height: 30px;
    background: radial-gradient(ellipse at 30% 0%, #fff9e6 0%, #f5eed0 30%, transparent 70%);
    border-radius: 50%;
    filter: blur(4px);
}

.beer-foam-screen::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 15%;
    right: 15%;
    height: 20px;
    background: radial-gradient(ellipse at 60% 0%, #fff9e6 0%, #f5eed0 25%, transparent 60%);
    border-radius: 50%;
    filter: blur(3px);
}

.bubbles-screen {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.bubble-screen {
    position: absolute;
    bottom: -20px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,240,0.7), rgba(255,200,100,0.15));
    animation: bubbleRiseScreen linear infinite;
    box-shadow: inset 0 -4px 8px rgba(255,255,200,0.1);
}

@keyframes bubbleRiseScreen {
    0% { bottom: -20px; opacity: 0.6; transform: translateX(0) scale(0.8); }
    20% { opacity: 0.9; }
    80% { opacity: 0.7; }
    100% { bottom: 105%; opacity: 0; transform: translateX(30px) scale(1.3); }
}

.beer-close-screen {
    position: relative;
    z-index: 10;
    margin-top: 30px;
    padding: 16px 38px;
    border: none;
    border-radius: 60px;
    background: #f7c948;
    color: #3d2a0a;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 8px 40px rgba(247, 201, 72, 0.5);
    font-family: Manrope, system-ui, sans-serif;
    letter-spacing: 0.06em;
    animation: pulseBtn 1.5s ease-in-out infinite;
}

@keyframes pulseBtn {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 12px 50px rgba(247, 201, 72, 0.7); }
}

.beer-close-screen:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 16px 60px rgba(247, 201, 72, 0.8);
}

@media (max-width: 600px) {
    .beer-close-screen { font-size: 1rem; padding: 14px 28px; }
}