:root {
    color-scheme: light;
    --bg: #f5f5f2;
    --surface: rgba(255, 255, 255, 0.8);
    --surface-strong: #ffffff;
    --surface-soft: #ecece7;
    --text: #0f0f0f;
    --muted: #676767;
    --line: rgba(15, 15, 15, 0.12);
    --accent: #111111;
    --accent-contrast: #ffffff;
    --shadow: 0 30px 70px rgba(0, 0, 0, 0.08);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --container: 1240px;
}

body.dark {
    color-scheme: dark;
    --bg: #080808;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-strong: #111111;
    --surface-soft: #171717;
    --text: #f7f7f7;
    --muted: #a5a5a5;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #ffffff;
    --accent-contrast: #111111;
    --shadow: 0 36px 90px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Syne", Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(0, 0, 0, 0.12), transparent 24%),
    radial-gradient(circle at 85% 20%, rgba(0, 0, 0, 0.05), transparent 18%),
    linear-gradient(180deg, var(--bg) 0%, #ededea 100%);
    transition: background-color 220ms ease, color 220ms ease;
}

body.dark {
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.09), transparent 24%),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.06), transparent 18%),
    linear-gradient(180deg, var(--bg) 0%, #0f0f0f 100%);
}

body.menu-open {
    overflow: hidden;
}

@keyframes fallAndSway {
    0% {
        transform: translateY(-100px) translateX(0px) rotate(0deg);
    }
    25% {
        transform: translateY(25vh) translateX(-20px) rotate(90deg);
    }
    50% {
        transform: translateY(50vh) translateX(20px) rotate(180deg);
    }
    75% {
        transform: translateY(75vh) translateX(-20px) rotate(270deg);
    }
    100% {
        transform: translateY(calc(100vh + 100px)) translateX(0px) rotate(360deg);
    }
}

.falling-numbers {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.falling-number {
    position: absolute;
    top: -100px;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    animation: fallAndSway 12s linear infinite;
    opacity: 0.2;
}

body:not(.dark) .falling-number, body:not(.dark) .project-media > img, body:not(.dark) .company-cover > img {
    filter: invert(1);
}

.falling-number.zero {
    background-image: url("img/0.png");
}

.falling-number.one {
    background-image: url("img/1.png");
}

.falling-number:nth-child(1) {
    left: 2%;
    animation-delay: 0s;
    width: 18px;
    height: 18px;
}

.falling-number:nth-child(2) {
    left: 8%;
    animation-delay: 1s;
    width: 16px;
    height: 16px;
}

.falling-number:nth-child(3) {
    left: 14%;
    animation-delay: 2s;
    width: 20px;
    height: 20px;
}

.falling-number:nth-child(4) {
    left: 20%;
    animation-delay: 3s;
    width: 17px;
    height: 17px;
}

.falling-number:nth-child(5) {
    left: 26%;
    animation-delay: 4s;
    width: 19px;
    height: 19px;
}

.falling-number:nth-child(6) {
    left: 32%;
    animation-delay: 5s;
    width: 15px;
    height: 15px;
}

.falling-number:nth-child(7) {
    left: 38%;
    animation-delay: 6s;
    width: 18px;
    height: 18px;
}

.falling-number:nth-child(8) {
    left: 44%;
    animation-delay: 7s;
    width: 16px;
    height: 16px;
}

.falling-number:nth-child(9) {
    left: 50%;
    animation-delay: 8s;
    width: 20px;
    height: 20px;
}

.falling-number:nth-child(10) {
    left: 56%;
    animation-delay: 9s;
    width: 17px;
    height: 17px;
}

.falling-number:nth-child(11) {
    left: 62%;
    animation-delay: 0.5s;
    width: 18px;
    height: 18px;
}

.falling-number:nth-child(12) {
    left: 68%;
    animation-delay: 1.5s;
    width: 15px;
    height: 15px;
}

.falling-number:nth-child(13) {
    left: 74%;
    animation-delay: 2.5s;
    width: 19px;
    height: 19px;
}

.falling-number:nth-child(14) {
    left: 80%;
    animation-delay: 3.5s;
    width: 16px;
    height: 16px;
}

.falling-number:nth-child(15) {
    left: 86%;
    animation-delay: 4.5s;
    width: 20px;
    height: 20px;
}

.falling-number:nth-child(16) {
    left: 92%;
    animation-delay: 5.5s;
    width: 17px;
    height: 17px;
}

.falling-number:nth-child(17) {
    left: 5%;
    animation-delay: 6.5s;
    width: 18px;
    height: 18px;
}

.falling-number:nth-child(18) {
    left: 11%;
    animation-delay: 7.5s;
    width: 15px;
    height: 15px;
}

.falling-number:nth-child(19) {
    left: 17%;
    animation-delay: 8.5s;
    width: 19px;
    height: 19px;
}

.falling-number:nth-child(20) {
    left: 23%;
    animation-delay: 9.5s;
    width: 16px;
    height: 16px;
}

.falling-number:nth-child(21) {
    left: 29%;
    animation-delay: 1s;
    width: 20px;
    height: 20px;
}

.falling-number:nth-child(22) {
    left: 35%;
    animation-delay: 2s;
    width: 17px;
    height: 17px;
}

.falling-number:nth-child(23) {
    left: 41%;
    animation-delay: 3s;
    width: 18px;
    height: 18px;
}

.falling-number:nth-child(24) {
    left: 47%;
    animation-delay: 4s;
    width: 15px;
    height: 15px;
}

.falling-number:nth-child(25) {
    left: 53%;
    animation-delay: 5s;
    width: 19px;
    height: 19px;
}

.falling-number:nth-child(26) {
    left: 59%;
    animation-delay: 6s;
    width: 16px;
    height: 16px;
}

.falling-number:nth-child(27) {
    left: 65%;
    animation-delay: 7s;
    width: 20px;
    height: 20px;
}

.falling-number:nth-child(28) {
    left: 71%;
    animation-delay: 8s;
    width: 17px;
    height: 17px;
}

.falling-number:nth-child(29) {
    left: 77%;
    animation-delay: 9s;
    width: 18px;
    height: 18px;
}

.falling-number:nth-child(30) {
    left: 83%;
    animation-delay: 0.5s;
    width: 15px;
    height: 15px;
}

.falling-number:nth-child(31) {
    left: 89%;
    animation-delay: 1.5s;
    width: 19px;
    height: 19px;
}

.falling-number:nth-child(32) {
    left: 95%;
    animation-delay: 2.5s;
    width: 16px;
    height: 16px;
}

.falling-number:nth-child(33) {
    left: 3%;
    animation-delay: 3.5s;
    width: 20px;
    height: 20px;
}

.falling-number:nth-child(34) {
    left: 9%;
    animation-delay: 4.5s;
    width: 17px;
    height: 17px;
}

.falling-number:nth-child(35) {
    left: 15%;
    animation-delay: 5.5s;
    width: 18px;
    height: 18px;
}

.falling-number:nth-child(36) {
    left: 21%;
    animation-delay: 6.5s;
    width: 15px;
    height: 15px;
}

.falling-number:nth-child(37) {
    left: 27%;
    animation-delay: 7.5s;
    width: 19px;
    height: 19px;
}

.falling-number:nth-child(38) {
    left: 33%;
    animation-delay: 8.5s;
    width: 16px;
    height: 16px;
}

.falling-number:nth-child(39) {
    left: 39%;
    animation-delay: 9.5s;
    width: 20px;
    height: 20px;
}

.falling-number:nth-child(40) {
    left: 45%;
    animation-delay: 0.2s;
    width: 17px;
    height: 17px;
}

.falling-number:nth-child(41) {
    left: 51%;
    animation-delay: 1.2s;
    width: 18px;
    height: 18px;
}

.falling-number:nth-child(42) {
    left: 57%;
    animation-delay: 2.2s;
    width: 15px;
    height: 15px;
}

.falling-number:nth-child(43) {
    left: 63%;
    animation-delay: 3.2s;
    width: 19px;
    height: 19px;
}

.falling-number:nth-child(44) {
    left: 69%;
    animation-delay: 4.2s;
    width: 16px;
    height: 16px;
}

.falling-number:nth-child(45) {
    left: 75%;
    animation-delay: 5.2s;
    width: 20px;
    height: 20px;
}

.falling-number:nth-child(46) {
    left: 81%;
    animation-delay: 6.2s;
    width: 17px;
    height: 17px;
}

.falling-number:nth-child(47) {
    left: 87%;
    animation-delay: 7.2s;
    width: 18px;
    height: 18px;
}

.falling-number:nth-child(48) {
    left: 93%;
    animation-delay: 8.2s;
    width: 15px;
    height: 15px;
}

.falling-number:nth-child(49) {
    left: 6%;
    animation-delay: 9.2s;
    width: 19px;
    height: 19px;
}

.falling-number:nth-child(50) {
    left: 12%;
    animation-delay: 0.8s;
    width: 16px;
    height: 16px;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

[lang="en"] {
    font-family: "Syne", Arial, sans-serif;
}

.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.035;
    background-image: linear-gradient(rgba(0, 0, 0, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.12) 1px, transparent 1px);
    background-size: 10px 10px;
    mix-blend-mode: multiply;
    z-index: -1;
}

body.dark .noise {
    opacity: 0.06;
    mix-blend-mode: screen;
}

.container {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 16px 0;
    backdrop-filter: blur(16px);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

body.dark .header-inner {
    background: rgba(10, 10, 10, 0.68);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-square {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--accent);
    color: var(--accent-contrast);
    font-family: "Syne", sans-serif;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-meta {
    display: grid;
    gap: 3px;
}

.brand-meta small {
    color: var(--muted);
    font-size: 0.78rem;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.site-nav a {
    position: relative;
    color: var(--muted);
    font-size: 0.96rem;
}

.site-nav a::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: -6px;
    width: 100%;
    height: 1px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle,
.nav-toggle {
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    cursor: pointer;
}

.theme-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text);
}

.nav-toggle {
    display: none;
    position: relative;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 14px;
    cursor: pointer;
}

.nav-toggle span {
    position: absolute;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--text);
    transition: transform 180ms ease, top 180ms ease;
}

.nav-toggle span:first-child {
    top: 18px;
}

.nav-toggle span:last-child {
    top: 28px;
}

body.menu-open .nav-toggle span:first-child {
    top: 23px;
    transform: rotate(45deg);
}

body.menu-open .nav-toggle span:last-child {
    top: 23px;
    transform: rotate(-45deg);
}

.hero {
    padding: 34px 0 56px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 42px;
    align-items: center;
    min-height: calc(100vh - 130px);
}

.kicker,
.section-kicker {
    margin: 0 0 18px;
    color: var(--muted);
    font-family: "Syne", sans-serif;
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    display: grid;
    gap: 16px;
    font-size: clamp(3rem, 7vw, 7rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.hero h1 span {
    display: block;
    color: var(--muted);
    font-size: clamp(1.04rem, 2vw, 1.6rem);
    line-height: 1.35;
    letter-spacing: normal;
}

.hero-text,
.section-head p,
.statement-card p,
.fact-card p,
.stack-card p,
.work-card p,
.timeline-item p,
.contact-copy p {
    color: var(--muted);
    line-height: 1.95;
}

.hero-text {
    max-width: 62ch;
    margin: 24px 0 0;
    font-size: 1.02rem;
}

.hero-cta,
.contact-box {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid var(--line);
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.button-solid {
    background: var(--accent);
    color: var(--accent-contrast);
}

.button-ghost {
    background: transparent;
    color: var(--text);
}

.button.full {
    width: 100%;
}

.hero-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero-strip span,
.work-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(10px);
    font-family: "Syne", sans-serif;
    font-size: 0.8rem;
}

.hero-strip i,
.stack-card i {
    font-size: 1.15rem;
}

.portrait-shell {
    position: relative;
    padding: 30px 30px 54px;
}

.portrait-shell::before {
    content: "";
    position: absolute;
    inset: 10% 6% auto auto;
    width: 76%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: var(--text);
    filter: blur(90px);
    opacity: 0.08;
}

.portrait-frame {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.portrait-frame img {
    width: 100%;
    aspect-ratio: 0.88 / 1;
    object-fit: cover;
    filter: grayscale(0.08) contrast(1.02);
}

.float-card {
    position: absolute;
    min-width: 200px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    animation: bob 5s ease-in-out infinite;
}

body.dark .float-card {
    background: rgba(12, 12, 12, 0.76);
}

.float-top {
    top: 0;
    inset-inline-start: 0;
}

.float-bottom {
    bottom: 0;
    inset-inline-end: 10px;
    animation-delay: -2.2s;
}

.float-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-family: "Syne", sans-serif;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.intro-band {
    overflow: hidden;
    border-block: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.4);
}

body.dark .intro-band {
    background: rgba(255, 255, 255, 0.03);
}

.intro-band-inner {
    display: flex;
    gap: 0;
    padding: 16px 0;
    white-space: nowrap;
    overflow: hidden;
    font-family: "Syne", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.84rem;
}

.marquee-track {
    display: flex;
    flex: 0 0 auto;
    gap: 48px;
    min-width: max-content;
    padding-inline-end: 48px;
    animation: marquee 10s linear infinite;
}

.section {
    padding: 96px 0;
}

.section-head {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 34px;
}

.section-head h2,
.contact-copy h2 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.section-head p,
.contact-copy p {
    margin: 0;
    max-width: 60ch;
}

.about-layout,
.experience-layout,
.contact-panel {
    display: grid;
    gap: 22px;
}

.about-layout {
    grid-template-columns: 1.05fr 0.95fr;
}

.statement-card,
.fact-card,
.stack-card,
.metric-card,
.work-card,
.timeline-item,
.contact-panel {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.statement-card {
    padding: 34px;
    border-radius: var(--radius-xl);
}

.statement-card p {
    margin: 0;
    font-size: clamp(1.16rem, 1.5vw, 1.42rem);
    line-height: 2;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.fact-card,
.stack-card,
.metric-card,
.work-card {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.fact-no,
.timeline-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    font-family: "Syne", sans-serif;
    font-size: 0.86rem;
}

.fact-card h3,
.stack-card h3,
.work-card h3,
.timeline-item h3 {
    margin: 16px 0 10px;
    font-size: 1.08rem;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.stack-card i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: var(--surface-soft);
    font-size: 1.6rem;
}

.stats-section {
    padding-top: 0;
    margin-top: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.metric-card {
    text-align: center;
}

.metric-value {
    display: block;
    font-family: "Syne", sans-serif;
    font-size: clamp(2.8rem, 7vw, 5rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.metric-label {
    display: block;
    margin-top: 12px;
    color: var(--muted);
}

.work-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 18px;
}

.age-text {
    font-weight: 700;
}

.company-feature,
.project-panel,
.skills-column,
.interest-card {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.company-feature {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 22px;
    padding: 22px;
    border-radius: var(--radius-xl);
}

.company-cover,
.project-media {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-strong);
}

.company-cover img,
.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-cover img {
    aspect-ratio: 1.55 / 1;
}

.company-content,
.project-copy {
    display: grid;
    align-content: start;
    gap: 16px;
}

.company-content h3,
.project-copy h3,
.skills-column h3,
.interest-card h3 {
    margin: 0;
    font-size: 1.2rem;
}

.company-content p,
.project-copy p,
.interest-card p,
.clean-list li {
    color: var(--muted);
    line-height: 1.9;
}

.info-pills,
.skill-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.5rem;
}

.info-pills span,
.skill-cluster span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.project-showcase,
.skills-layout,
.interest-grid {
    display: grid;
    gap: 18px;
}

.project-panel {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 22px;
    padding: 22px;
    border-radius: var(--radius-xl);
}

.project-panel.featured {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    var(--surface);
}

body.dark .project-panel.featured {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    var(--surface);
}

.project-media img {
    aspect-ratio: 1.6 / 1;
}

.project-headline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-link {
    justify-self: start;
}

.skills-layout {
    grid-template-columns: 1.2fr 1fr 1fr;
}

.skills-column {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.clean-list {
    margin: 16px 0 0;
    padding-left: 20px;
}

.clean-list li + li {
    margin-top: 10px;
}

.interest-grid {
    grid-template-columns: repeat(4, 1fr);
}

.interest-card {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.work-card.featured {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    var(--surface);
}

body.dark .work-card.featured {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    var(--surface);
}

.experience-layout {
    grid-template-columns: 0.8fr 1.2fr;
    align-items: start;
}

.timeline {
    display: grid;
    gap: 16px;
}

.timeline-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    padding: 22px;
    border-radius: var(--radius-lg);
}

.contact-panel {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding: 30px;
    border-radius: var(--radius-xl);
}

.contact-box {
    margin-top: 0;
    flex-direction: column;
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

@keyframes bob {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

@media (max-width: 1080px) {
    .hero-grid,
    .about-layout,
    .experience-layout,
    .contact-panel,
    .stack-grid,
    .stats-grid,
    .work-grid,
    .company-feature,
    .project-panel,
    .skills-layout,
    .interest-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        min-height: auto;
    }

    .hero-visual {
        order: -1;
    }

    .portrait-shell {
        max-width: 620px;
        margin: 0 auto;
    }

    .section-head {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .company-cover img,
    .project-media img {
        aspect-ratio: 1.7 / 1;
    }
}

@media (max-width: 860px) {
    .header-inner {
        grid-template-columns: auto auto auto;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        position: fixed;
        inset: 88px 16px auto;
        display: grid;
        gap: 14px;
        padding: 18px;
        border: 1px solid var(--line);
        background: var(--surface-strong);
        border-radius: 26px;
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 180ms ease, transform 180ms ease;
    }

    body.dark .site-nav {
        background: #111111;
    }

    body.menu-open .site-nav {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

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

    .header-actions {
        justify-self: end;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(calc(100% - 20px), var(--container));
    }

    .site-header {
        padding: 10px 0;
    }

    .header-inner {
        gap: 12px;
        padding: 12px;
        border-radius: 24px;
    }

    .brand-meta small,
    .brand-meta strong {
        max-width: 132px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero {
        padding-top: 18px;
    }

    .hero h1 {
        font-size: clamp(2.4rem, 16vw, 4.4rem);
    }

    .hero h1 span {
        max-width: 100%;
    }

    .portrait-shell {
        padding: 18px 12px 42px;
    }

    .float-card {
        min-width: 160px;
        padding: 14px;
    }

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

    .section {
        padding: 72px 0;
    }

    .contact-panel {
        padding: 22px;
    }

    .theme-toggle {
        min-height: 42px;
        padding: 0 12px;
    }
}

@media (max-width: 520px) {
    .header-actions {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .theme-toggle {
        flex: 1;
        justify-content: center;
    }

    .hero-cta .button {
        width: 100%;
    }

    .float-top {
        top: -4px;
        inset-inline-start: 8px;
    }

    .float-bottom {
        bottom: -6px;
        inset-inline-end: 8px;
    }
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
