:root {
    --bg: #050505;
    --fg: #f7f6ef;
    --muted: #949097;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #ff244d;
    --accent-rgb: 255, 36, 77;
    --particle: rgba(255, 255, 255, 0.42);
    --mx: 50vw;
    --my: 50vh;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
    background: var(--bg);
    color: var(--fg);
}

html {
    overflow: hidden;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    font-family: Inter, sans-serif;
    cursor: none;
}

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

button {
    font: inherit;
}

.noise {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.045;
    mix-blend-mode: soft-light;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
}

.cursor,
.cursor-ring {
    position: fixed;
    z-index: 2000;
    pointer-events: none;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor {
    width: 6px;
    height: 6px;
    background: var(--accent);
    box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.65);
}

.cursor-ring {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(var(--accent-rgb), 0.7);
    transition: width 0.2s, height 0.2s, border-color 0.2s, background 0.2s;
}

body.hovering .cursor-ring {
    width: 58px;
    height: 58px;
    border-color: var(--fg);
    background: rgba(var(--accent-rgb), 0.08);
}

.scene {
    position: fixed;
    inset: 0;
    min-height: 100vh;
    min-height: 100dvh;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(
            circle at var(--mx) var(--my),
            rgba(var(--accent-rgb), 0.15),
            transparent 18%
        ),
        linear-gradient(180deg, #070707, var(--bg));
}

.scene::before {
    content: "";
    position: absolute;
    inset: -22%;
    z-index: -3;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 89px,
            var(--line) 89px 90px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0 89px,
            var(--line) 89px 90px
        );
    opacity: 0.22;
    transform: perspective(850px) rotateX(62deg) translateY(48%);
    transform-origin: center bottom;
}

.scene::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(
            circle at center,
            transparent 33%,
            rgba(52, 0, 13, 0.62) 100%
        );
}

canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.62;
}

.boot {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
        max(24px, env(safe-area-inset-top))
        max(20px, env(safe-area-inset-right))
        max(24px, env(safe-area-inset-bottom))
        max(20px, env(safe-area-inset-left));
    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(var(--accent-rgb), 0.11),
            transparent 34%
        ),
        #020202;
    color: var(--fg);
    transition: opacity 0.7s, visibility 0.7s;
}

.boot.hide {
    opacity: 0;
    visibility: hidden;
}

.terminal {
    width: min(900px, 92vw);
    font: 500 clamp(14px, 1.6vw, 20px) / 1.8 "IBM Plex Mono", monospace;
}

.terminal-line {
    min-height: 1.8em;
}

.prompt {
    color: var(--accent);
}

.blink {
    display: inline-block;
    width: 0.62em;
    height: 1.05em;
    vertical-align: -0.12em;
    background: var(--accent);
    box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.55);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.skip {
    position: fixed;
    top: max(22px, env(safe-area-inset-top));
    right: max(24px, env(safe-area-inset-right));
    border: 0;
    background: none;
    color: var(--muted);
    font: 500 11px "IBM Plex Mono";
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: none;
}

.main {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
        max(22px, env(safe-area-inset-top))
        max(28px, env(safe-area-inset-right))
        max(20px, env(safe-area-inset-bottom))
        max(28px, env(safe-area-inset-left));
    display: grid;
    grid-template-rows: 1fr auto;
    opacity: 0;
    transform: scale(1.025);
    transition: opacity 0.8s, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.main.show {
    opacity: 1;
    transform: none;
}

.identity {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(80vw, 1020px);
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 30s linear infinite;
    pointer-events: none;
}

.orbit::before,
.orbit::after {
    content: "";
    position: absolute;
    border: 1px dashed var(--line);
    border-radius: 50%;
}

.orbit::before {
    inset: 11%;
}

.orbit::after {
    inset: 24%;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.name-wrap {
    position: relative;
    width: min(1450px, 94vw);
    text-align: center;
    transform: translate3d(var(--tx, 0), var(--ty, 0), 0);
    transition: transform 0.14s ease-out;
}

.eyebrow {
    margin-bottom: 18px;
    color: var(--muted);
    font: 500 clamp(10px, 1vw, 13px) "IBM Plex Mono";
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

.name {
    font-family: "Archivo Black", sans-serif;
    font-size: clamp(4rem, 15.5vw, 14.5rem);
    line-height: 0.76;
    letter-spacing: -0.065em;
    text-transform: uppercase;
    user-select: none;
}

.word {
    position: relative;
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
    will-change: transform, filter, opacity;
}

.char {
    display: inline-block;
}


.word.one {
    transform: translateX(-7vw);
}

.word.two {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--fg);
    transform: translateX(6vw);
}

.word.three {
    color: var(--accent);
    text-shadow: 0 0 46px rgba(var(--accent-rgb), 0.16);
    transform: translateX(-1vw);
}

.char {
    display: inline-block;
    will-change: transform;
}

.tag {
    margin-top: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--muted);
    font: 500 clamp(10px, 1vw, 13px) "IBM Plex Mono";
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.tag i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.giant {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: -1;
    color: transparent;
    opacity: 0.48;
    white-space: nowrap;
    pointer-events: none;
    font: 400 clamp(8rem, 31vw, 34rem) / 0.7 "Archivo Black";
    -webkit-text-stroke: 1px var(--line);
    transform: translate(-50%, -50%) rotate(var(--rot, -10deg));
    transition: transform 0.2s;
}

.socials {
    position: absolute;
    right: max(28px, env(safe-area-inset-right));
    top: 50%;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(-50%);
}

.social {
    position: relative;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(12px);
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.25s, color 0.25s;
}

.social i {
    position: absolute;
    right: 17px;
    font-size: 17px;
}

.social span {
    position: absolute;
    left: 16px;
    opacity: 0;
    transform: translateX(8px);
    font: 500 11px "IBM Plex Mono";
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: 0.28s;
}

.social:hover {
    width: 170px;
    border-color: var(--accent);
    background: var(--accent);
    color: #050505;
}

.social:hover span {
    opacity: 1;
    transform: none;
}

.bottom {
    position: relative;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.contact {
    position: relative;
    font: 500 13px "IBM Plex Mono";
    letter-spacing: 0.05em;
}

.contact::after {
    content: "contactsolaimanshahria@gmail.com";
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    padding: 10px 12px;
    white-space: nowrap;
    background: var(--fg);
    color: var(--bg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: 0.25s;
    font: 500 11px "IBM Plex Mono";
}

.contact:hover::after {
    opacity: 1;
    transform: none;
}

.flash {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: var(--accent);
    opacity: 0;
    pointer-events: none;
}

.flash.go {
    animation: flash 0.35s ease;
}

@keyframes flash {
    0% {
        opacity: 0;
    }

    42% {
        opacity: 0.45;
    }

    100% {
        opacity: 0;
    }
}

.shake {
    animation: shake 0.48s;
}

@keyframes shake {
    10%,
    90% {
        transform: translateX(-2px);
    }

    20%,
    80% {
        transform: translateX(4px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-7px);
    }

    40%,
    60% {
        transform: translateX(7px);
    }
}

.leave {
    position: fixed;
    inset: 0;
    z-index: 850;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #020202;
    color: var(--fg);
    opacity: 0;
    visibility: hidden;
    transition: 0.45s;
}

.leave.show {
    opacity: 1;
    visibility: visible;
}

.leave p {
    text-align: center;
    font: 500 clamp(18px, 3vw, 40px) / 1.8 "IBM Plex Mono";
}

@media (max-width: 760px) {
    body {
        cursor: auto;
        touch-action: manipulation;
    }

    .cursor,
    .cursor-ring {
        display: none;
    }

    .scene {
        background:
            radial-gradient(
                circle at 50% 38%,
                rgba(var(--accent-rgb), 0.18),
                transparent 30%
            ),
            linear-gradient(180deg, #080305, var(--bg));
    }

    .scene::before {
        inset: -45%;
        opacity: 0.15;
        background-size: 64px 64px;
        transform: perspective(680px) rotateX(66deg) translateY(53%);
    }

    .scene::after {
        background:
            radial-gradient(
                circle at 50% 44%,
                transparent 25%,
                rgba(52, 0, 13, 0.74) 100%
            );
    }

    canvas {
        opacity: 0.42;
    }

    .main {
        padding:
            max(18px, env(safe-area-inset-top))
            max(16px, env(safe-area-inset-right))
            max(16px, env(safe-area-inset-bottom))
            max(16px, env(safe-area-inset-left));
        grid-template-rows: 1fr auto;
    }

    .identity {
    padding: 3vh 0 11vh;
}

    .name-wrap {
        width: 100%;
        transform: none !important;
    }

    .eyebrow {
        margin-bottom: 14px;
        font-size: clamp(9px, 2.7vw, 11px);
        letter-spacing: 0.24em;
    }

    .name {
        width: 100%;
        font-size: clamp(2.75rem, 16vw, 5.75rem);
        line-height: 0.86;
        letter-spacing: -0.06em;
    }

    .word {
        width: 100%;
        white-space: nowrap;
    }

    .word.one,
    .word.two,
    .word.three {
        transform: none;
    }

    .word.two {
        -webkit-text-stroke-width: 1px;
    }

    .tag {
        max-width: 92%;
        margin: 22px auto 0;
        gap: 8px;
        flex-wrap: wrap;
        font-size: clamp(8px, 2.5vw, 10px);
        letter-spacing: 0.1em;
        line-height: 1.65;
    }

    .tag i {
        width: 3px;
        height: 3px;
    }

    .orbit {
        top: 47%;
        width: min(142vw, 640px);
        opacity: 0.75;
    }

    .giant {
        top: 48%;
        max-width: none;
        font-size: 47vw;
        opacity: 0.33;
        transform: translate(-50%, -50%) rotate(-8deg);
    }

    .socials {
        left: 50%;
        right: auto;
        top: auto;
        bottom: calc(max(95px, env(safe-area-inset-bottom) + 75px));
        width: calc(100% - 32px);
        max-width: 330px;
        justify-content: center;
        flex-direction: row;
        gap: 9px;
        transform: translateX(-50%);
    }

    .social,
    .social:hover {
        width: clamp(43px, 12vw, 48px);
        height: clamp(43px, 12vw, 48px);
        flex: 0 0 auto;
        border-radius: 12px;
        background: rgba(10, 5, 7, 0.72);
        color: var(--fg);
    }

    .social:active {
        border-color: var(--accent);
        background: rgba(var(--accent-rgb), 0.16);
        transform: scale(0.94);
    }

    .social span {
        display: none;
    }

    .social i {
        position: static;
        font-size: 16px;
    }

    .bottom {
        min-height: 28px;
        justify-content: center;
    }

    .contact {
        font-size: 11px;
        color: var(--muted);
    }

    .contact::after {
        display: none;
    }

    .terminal {
        width: 100%;
        font-size: clamp(13px, 3.8vw, 17px);
        line-height: 1.72;
    }

    .skip {
        top: max(16px, env(safe-area-inset-top));
        right: max(16px, env(safe-area-inset-right));
        font-size: 10px;
    }
}

@media (max-width: 430px) {
    .identity {
        padding-top: 5vh;
        padding-bottom: 17vh;
    }

    .name {
        font-size: clamp(2.55rem, 15.8vw, 4.6rem);
    }

    .socials {
        bottom: calc(max(88px, env(safe-area-inset-bottom) + 68px));
        gap: 7px;
    }

    .social,
    .social:hover {
        width: 42px;
        height: 42px;
        border-radius: 11px;
    }
}

@media (max-height: 690px) and (max-width: 760px) {
 .identity {
    padding-top: 0;
    padding-bottom: 12vh;
}
    .eyebrow {
        margin-bottom: 9px;
    }

    .name {
        font-size: clamp(2.35rem, 14.8vw, 4.1rem);
    }

    .tag {
        margin-top: 14px;
    }

    .socials {
        bottom: 78px;
    }

    .contact {
        font-size: 10px;
    }
}

@media (max-width: 350px) {
    .main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .name {
        font-size: 15.2vw;
        letter-spacing: -0.065em;
    }

    .eyebrow {
        font-size: 8px;
        letter-spacing: 0.18em;
    }

    .tag {
        max-width: 100%;
        font-size: 7.5px;
        gap: 6px;
    }

    .socials {
        width: calc(100% - 20px);
        gap: 6px;
    }

    .social,
    .social:hover {
        width: 40px;
        height: 40px;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    .identity {
        padding: 0 0 56px;
    }

    .name {
        font-size: min(12vh, 10vw);
        line-height: 0.82;
    }

    .eyebrow,
    .tag {
        display: none;
    }

    .orbit {
        width: min(75vh, 70vw);
    }

    .socials {
        bottom: 10px;
    }

    .bottom {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Ambient motion: keeps the page alive without requiring a mouse. */
.name-wrap {
    animation: nameFloat 6.5s ease-in-out infinite;
}

.word.one {
    animation: wordDriftOne 7.2s ease-in-out infinite;
}

.word.two {
    animation: wordDriftTwo 8.1s ease-in-out infinite;
}

.word.three {
    animation: wordDriftThree 6.8s ease-in-out infinite;
}

.char {
    transform-origin: 50% 70%;
    animation: letterPop 5.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
    animation-delay: calc(var(--char-index, 0) * 90ms);
}

.orbit {
    animation: spin 30s linear infinite, orbitBreathe 5.5s ease-in-out infinite;
}

.orbit::before {
    animation: orbitInner 8s ease-in-out infinite alternate;
}

.orbit::after {
    animation: orbitInner 6.5s ease-in-out infinite alternate-reverse;
}

.giant {
    animation: giantAmbient 12s ease-in-out infinite;
}

.scene::before {
    animation: gridAmbient 16s ease-in-out infinite alternate;
}

.footer-line {
    width: 100%;
    color: var(--muted);
    text-align: center;
    font: 500 11px "IBM Plex Mono", monospace;
    letter-spacing: 0.04em;
    line-height: 1.55;
}

.footer-line,
.footer-line span {
    display: inline;
}

.footer-divider {
    padding: 0 8px;
    color: rgba(var(--accent-rgb), 0.72);
}

.footer-email {
    color: var(--fg);
    transition: color 0.2s, text-shadow 0.2s;
}

.footer-email:hover,
.footer-email:focus-visible {
    color: var(--accent);
    text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.4);
}

@keyframes nameFloat {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: 0 -8px;
    }
}

@keyframes wordDriftOne {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: 8px -3px;
    }
}

@keyframes wordDriftTwo {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: -7px 2px;
    }
}

@keyframes wordDriftThree {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: 5px 4px;
    }
}

@keyframes letterPop {
    0%, 72%, 100% {
        scale: 1;
        translate: 0 0;
        filter: brightness(1);
    }
    78% {
        scale: 1.1;
        translate: 0 -0.08em;
        filter: brightness(1.35);
    }
    84% {
        scale: 0.98;
        translate: 0 0.025em;
    }
    90% {
        scale: 1;
        translate: 0 0;
    }
}

@keyframes orbitBreathe {
    0%, 100% {
        scale: 1;
        opacity: 0.72;
    }
    50% {
        scale: 1.035;
        opacity: 0.95;
    }
}

@keyframes orbitInner {
    from {
        scale: 0.96;
        rotate: -7deg;
        opacity: 0.55;
    }
    to {
        scale: 1.04;
        rotate: 7deg;
        opacity: 1;
    }
}

@keyframes giantAmbient {
    0%, 100% {
        translate: -1.2vw 0;
        rotate: -1deg;
    }
    50% {
        translate: 1.2vw -1.2vh;
        rotate: 1.5deg;
    }
}

@keyframes gridAmbient {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 44px 0, 0 44px;
    }
}

@media (max-width: 760px) {
    .name-wrap {
        animation-duration: 5.2s;
    }

    .char {
        animation-duration: 4.9s;
        animation-delay: calc(var(--char-index, 0) * 75ms);
    }

    .word.one,
    .word.two,
    .word.three {
        animation-duration: 6s;
    }

    .orbit {
        animation-duration: 24s, 4.8s;
    }

    .giant {
        animation-duration: 9s;
    }

    .bottom {
        width: 100%;
        padding-inline: 4px;
    }

    .footer-line {
        font-size: clamp(8px, 2.55vw, 10px);
        letter-spacing: 0;
    }

    .footer-divider {
        padding-inline: 4px;
    }
}

@media (max-width: 430px) {
    .footer-line span:not(.footer-divider) {
        display: block;
    }

    .footer-divider {
        display: none;
    }
}


/* Final mobile ambient animation and content layout */
.eyebrow {
    display: none !important;
}

.name-wrap .tag {
    margin-top: 0;
    margin-bottom: 22px;
}

.footer-line {
    display: block;
}

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

@keyframes mobileLetterPopStrong {
    0%, 68%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        filter: brightness(1);
    }
    75% {
        transform: translate3d(0, -0.12em, 0) scale(1.13);
        filter: brightness(1.45) drop-shadow(0 0 8px rgba(var(--accent-rgb), .35));
    }
    82% {
        transform: translate3d(0, 0.035em, 0) scale(.97);
    }
    90% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes mobileWordOneStrong {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(5px, -2px, 0); }
}

@keyframes mobileWordTwoStrong {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-5px, 2px, 0); }
}

@keyframes mobileWordThreeStrong {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(4px, 3px, 0); }
}

@keyframes mobileOrbitStrong {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: .65;
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg) scale(1.045);
        opacity: .95;
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(1);
        opacity: .65;
    }
}

@keyframes mobileGiantStrong {
    0%, 100% {
        transform: translate(-51.5%, -50%) rotate(-11deg);
    }
    50% {
        transform: translate(-48.5%, -52%) rotate(-8deg);
    }
}

@media (hover: none), (pointer: coarse), (max-width: 760px) {
    .name-wrap {
        animation: mobileNameFloatStrong 5.4s ease-in-out infinite !important;
        will-change: transform;
    }

    .word.one {
        animation: mobileWordOneStrong 6.4s ease-in-out infinite !important;
    }

    .word.two {
        animation: mobileWordTwoStrong 7.1s ease-in-out infinite !important;
    }

    .word.three {
        animation: mobileWordThreeStrong 5.9s ease-in-out infinite !important;
    }

    .char {
        animation-name: mobileLetterPopStrong !important;
        animation-duration: 4.2s !important;
        animation-timing-function: cubic-bezier(.2,.8,.2,1) !important;
        animation-iteration-count: infinite !important;
        animation-delay: calc(var(--char-index, 0) * 110ms) !important;
        transform-origin: 50% 70%;
        will-change: transform, filter;
    }

    .orbit {
        animation: mobileOrbitStrong 22s linear infinite !important;
        will-change: transform, opacity;
    }

    .giant {
        animation: mobileGiantStrong 10s ease-in-out infinite !important;
        will-change: transform;
    }

    .scene::before {
        animation: gridAmbient 13s linear infinite alternate !important;
    }

    .tag {
        margin-bottom: clamp(14px, 4vw, 22px);
    }
}

@media (max-width: 430px) {
    .name-wrap .tag {
        margin-bottom: 14px;
    }

    .footer-line {
        font-size: clamp(7.5px, 2.45vw, 9.5px);
        white-space: nowrap;
    }
}
