@import url('https://fonts.googleapis.com/css2?family=Hachi+Maru+Pop&family=Space+Mono:wght@400;700&family=Inter:wght@300;400;500&display=swap');

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

:root {
    --bg: #0a0a0a;
    --text: #e8e8e8;
    --muted: #666;
    --accent: #ffffff;
    --border: rgba(255, 255, 255, 0.1);
    --glow: rgba(255, 255, 255, 0.03);
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Film grain overlay */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Floating geometric shapes */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.4s ease;
}

.shape-circle:hover {
    color: rgba(99, 179, 237, 0.7);
    filter: drop-shadow(0 0 8px rgba(99, 179, 237, 0.5)) drop-shadow(0 0 20px rgba(99, 179, 237, 0.3));
}

.shape-square:hover {
    color: rgba(183, 148, 244, 0.7);
    filter: drop-shadow(0 0 8px rgba(183, 148, 244, 0.5)) drop-shadow(0 0 20px rgba(183, 148, 244, 0.3));
}

.shape-triangle:hover {
    color: rgba(129, 230, 217, 0.7);
    filter: drop-shadow(0 0 8px rgba(129, 230, 217, 0.5)) drop-shadow(0 0 20px rgba(129, 230, 217, 0.3));
}

.shape-cross:hover {
    color: rgba(251, 182, 206, 0.7);
    filter: drop-shadow(0 0 8px rgba(251, 182, 206, 0.5)) drop-shadow(0 0 20px rgba(251, 182, 206, 0.3));
}

.shape-hexagon:hover {
    color: rgba(51, 255, 51, 0.7);
    filter: drop-shadow(0 0 8px rgba(51, 255, 51, 0.5)) drop-shadow(0 0 20px rgba(51, 255, 51, 0.3));
}

.shape-circle {
    color: rgba(99, 179, 237, 0.1); /* soft blue */
    width: 100px;
    height: 100px;
    top: 25%;
    left: 15%;
    animation: float1 20s ease-in-out infinite;
}

.shape-asterisk {
    color: rgba(255, 179, 102, 0.1); /* soft orange */
    width: 60px;
    height: 60px;
    top: 50%;
    left: 8%;
    animation: float5 21s ease-in-out infinite;
}

.shape-asterisk:hover {
    color: rgba(255, 179, 102, 0.7);
    filter: drop-shadow(0 0 8px rgba(255, 179, 102, 0.5)) drop-shadow(0 0 20px rgba(255, 179, 102, 0.3));
}

.shape-square {
    color: rgba(183, 148, 244, 0.1); /* soft purple */
    width: 160px;
    height: 160px;
    bottom: 20%;
    left: 5%;
    animation: float2 25s ease-in-out infinite;
}

.shape-triangle {
    color: rgba(129, 230, 217, 0.09); /* soft teal */
    width: 140px;
    height: 140px;
    top: 55%;
    right: 12%;
    animation: float3 18s ease-in-out infinite;
}

.shape-cross {
    color: rgba(251, 182, 206, 0.08); /* soft pink */
    width: 100px;
    height: 100px;
    top: 30%;
    right: 28%;
    animation: float4 22s ease-in-out infinite;
}

.shape-hexagon {
    color: rgba(51, 255, 51, 0.08); /* CRT green */
    width: 130px;
    height: 130px;
    top: 70%;
    right: 25%;
    animation: float6 23s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-20px, 30px) rotate(5deg); }
    50% { transform: translate(10px, -20px) rotate(-3deg); }
    75% { transform: translate(-15px, -10px) rotate(2deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(25px, -20px) rotate(-5deg); }
    66% { transform: translate(-10px, 25px) rotate(3deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, -25px) rotate(8deg); }
}

@keyframes float4 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, 20px) rotate(-10deg); }
    75% { transform: translate(-20px, 10px) rotate(5deg); }
}

@keyframes float5 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-25px, 15px) rotate(8deg); }
    40% { transform: translate(10px, -30px) rotate(-5deg); }
    60% { transform: translate(20px, 10px) rotate(3deg); }
    80% { transform: translate(-15px, -20px) rotate(-8deg); }
}

@keyframes float6 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -25px) scale(1.1); }
}

/* Main content */
main {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    padding: 8rem 2rem;
}

/* Header */
header {
    margin-bottom: 4rem;
}


.name-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.greeting {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

h1 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About */
.about {
    margin-bottom: 4rem;
    max-width: 480px;
}

.about p {
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--text);
    opacity: 0.85;
}

/* Interests */
.interests {
    margin-bottom: 5rem;
}

.tag-cloud {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--glow) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tag:hover {
    border-color: rgba(51, 255, 51, 0.5);    
    transform: translateY(-2px);
    box-shadow:
        0 0 10px rgba(51, 255, 51, 0.15),
        0 0 30px rgba(51, 255, 51, 0.1);
}

.tag:hover::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(51, 255, 51, 0.05) 0%, transparent 100%);
}

/* Current / Now section */
.current {
    margin-bottom: 5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-header .line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.section-header .label {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.current p {
    font-size: 0.95rem;
    color: var(--muted);
    font-style: italic;
}

/* Stick Figures */
.stick-figures {
    height: 100px;
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stick-figure {
    display: none;
    width: 150px;
    height: 100px;
    color: var(--muted);
    opacity: 0;
    animation: figureAppear 0.3s ease forwards;
}

@keyframes figureAppear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Show figures on tag hover using :has() */
body:has(.tag[data-activity="programming"]:hover) .stick-figure[data-for="programming"],
body:has(.tag[data-activity="ai"]:hover) .stick-figure[data-for="ai"],
body:has(.tag[data-activity="electronics"]:hover) .stick-figure[data-for="electronics"],
body:has(.tag[data-activity="immunology"]:hover) .stick-figure[data-for="immunology"],
body:has(.tag[data-activity="running"]:hover) .stick-figure[data-for="running"],
body:has(.tag[data-activity="cycling"]:hover) .stick-figure[data-for="cycling"],
body:has(.tag[data-activity="languages"]:hover) .stick-figure[data-for="languages"] {
    display: block;
}

/* Programming - typing animation */
.typing-arm-left {
    animation: typeLeft 0.15s ease-in-out infinite alternate;
    transform-origin: 35px 30px;
}
.typing-arm-right {
    animation: typeRight 0.15s ease-in-out infinite alternate-reverse;
    transform-origin: 35px 30px;
}
@keyframes typeLeft {
    from { transform: rotate(-5deg); }
    to { transform: rotate(5deg); }
}
@keyframes typeRight {
    from { transform: rotate(5deg); }
    to { transform: rotate(-5deg); }
}
.code-line {
    stroke: #90ff90;
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    animation: typeCode 1.5s ease-out infinite;
}
.code-line.cl1 { animation-delay: 0s; }
.code-line.cl2 { animation-delay: 0.3s; }
.code-line.cl3 { animation-delay: 0.6s; }
.code-line.cl4 { animation-delay: 0.9s; }
.cursor {
    fill: #90ff90;
    animation: cursorBlink 0.4s step-end infinite;
}
.monitor-screen {
    fill: rgba(51, 255, 51, 0.1);
}
@keyframes typeCode {
    0% { stroke-dashoffset: 20; }
    50%, 100% { stroke-dashoffset: 0; }
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* AI - floating nodes */
.ai-node {
    animation: pulse 1.5s ease-in-out infinite;
}
.ai-node.n1 { animation-delay: 0s; }
.ai-node.n2 { animation-delay: 0.3s; }
.ai-node.n3 { animation-delay: 0.6s; }
.ai-node.n4 { animation-delay: 0.9s; }
.ai-node.n5 { animation-delay: 1.2s; }
.ai-line {
    animation: linePulse 1.5s ease-in-out infinite;
    stroke-dasharray: 5 3;
}
@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}
@keyframes linePulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Electronics - oscilloscope */
.waveform {
    stroke: #55ff55;
    fill: rgba(51, 255, 51, 0.05);
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: waveMove 1.5s linear infinite;
}
.knob-arm {
    animation: turnKnob 2s ease-in-out infinite;
    transform-origin: 25px 35px;
}
@keyframes waveMove {
    0% { stroke-dashoffset: 60; }
    100% { stroke-dashoffset: 0; }
}
@keyframes turnKnob {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

/* Immunology - dividing cells */
.amoeba {
    animation: amoebaWobble 2s ease-in-out infinite;
}
.main-cell {
    animation: cellDivide 3s ease-in-out infinite;
}
.dividing-cell {
    animation: cellGrow 3s ease-in-out infinite;
}
.nucleus {
    fill: currentColor;
    opacity: 0.4;
    animation: nucleusPulse 1.5s ease-in-out infinite;
}
.nucleus.n2 { animation-delay: 0.5s; }
.micro {
    animation: microFloat 4s ease-in-out infinite;
}
.micro.m1 { animation-delay: 0s; }
.micro.m2 { animation-delay: 1s; }
.micro.m3 { animation-delay: 2s; }
.micro.m4 { animation-delay: 3s; }
.antibody {
    animation: antibodyFloat 2.5s ease-in-out infinite;
}
.antibody.a2 { animation-delay: 0.8s; }
.antibody.a3 { animation-delay: 1.6s; }

@keyframes amoebaWobble {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.02, 0.98) rotate(-2deg); }
    50% { transform: scale(0.98, 1.02) rotate(0deg); }
    75% { transform: scale(1.02, 0.98) rotate(2deg); }
}
@keyframes cellDivide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
}
@keyframes cellGrow {
    0%, 100% { transform: translateX(0) scale(1); opacity: 1; }
    50% { transform: translateX(5px) scale(1.1); opacity: 0.8; }
}
@keyframes nucleusPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}
@keyframes microFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(3px, -5px); }
}
@keyframes antibodyFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    50% { transform: translateY(-5px) rotate(5deg); opacity: 1; }
}

/* Running - motion */
.runner-leg-back, .runner-leg-front {
    animation: runLegs 0.2s ease-in-out infinite alternate;
    transform-origin: 70px 45px;
}
.runner-leg-front { animation-direction: alternate-reverse; }
.runner-arm-back, .runner-arm-front {
    animation: runArms 0.2s ease-in-out infinite alternate;
    transform-origin: 72px 30px;
}
.runner-arm-front { animation-direction: alternate-reverse; }
.motion-line {
    animation: motionFade 0.4s ease-in-out infinite;
}
.motion-line.m1 { animation-delay: 0s; }
.motion-line.m2 { animation-delay: 0.15s; }
.motion-line.m3 { animation-delay: 0.3s; }
@keyframes runLegs {
    from { transform: rotate(-15deg); }
    to { transform: rotate(15deg); }
}
@keyframes runArms {
    from { transform: rotate(-10deg); }
    to { transform: rotate(10deg); }
}
@keyframes motionFade {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}

/* Cycling - bike animation */
.wheel {
    animation: wheelSpin 0.5s linear infinite;
}
.wheel-back { transform-origin: 30px 50px; }
.wheel-front { transform-origin: 90px 50px; }
.spoke {
    stroke-width: 1;
}
.pedal {
    animation: pedalSpin 0.5s linear infinite;
    transform-origin: 50px 45px;
}
.bike-moving {
    animation: bikeBounce 0.25s ease-in-out infinite;
}
.bike-motion {
    animation: motionFade 0.4s ease-in-out infinite;
}
.bike-motion.bm1 { animation-delay: 0s; }
.bike-motion.bm2 { animation-delay: 0.15s; }
.bike-motion.bm3 { animation-delay: 0.3s; }
@keyframes wheelSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes pedalSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes bikeBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
.rider-leg-l, .rider-leg-r {
    animation: legPedal 0.5s ease-in-out infinite;
    transform-origin: 52px 24px;
}
.rider-leg-r {
    animation-delay: 0.25s;
}
@keyframes legPedal {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Languages - speech bubbles */
.speech {
    fill: none;
    animation: speechPop 3s ease-in-out infinite;
}
.speech.s1 { animation-delay: 0s; }
.speech.s2 { animation-delay: 1s; }
.speech.s3 { animation-delay: 2s; }
.lang-text {
    fill: currentColor;
    stroke: none;
    animation: speechPop 3s ease-in-out infinite;
}
.lang-text.t1 { animation-delay: 0s; }
.lang-text.t2 { animation-delay: 1s; }
.lang-text.t3 { animation-delay: 2s; }
.talk-arm-l {
    animation: gestureLeft 1.5s ease-in-out infinite;
    transform-origin: 25px 48px;
}
.talk-arm-r {
    animation: gestureRight 1.5s ease-in-out infinite;
    transform-origin: 115px 48px;
}
@keyframes speechPop {
    0%, 15% { opacity: 0; transform: scale(0.8); }
    25%, 65% { opacity: 1; transform: scale(1); }
    75%, 100% { opacity: 0; transform: scale(0.8); }
}
@keyframes gestureLeft {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(10deg); }
}
@keyframes gestureRight {
    0%, 100% { transform: rotate(5deg); }
    50% { transform: rotate(-10deg); }
}

/* Footer */
footer {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.links {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.link:hover {
    color: #33ff33;
    text-shadow: 0 0 8px rgba(51, 255, 51, 0.5);
}

.link:hover .link-icon {
    filter: drop-shadow(0 0 4px rgba(51, 255, 51, 0.6));
}

.link-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-icon svg {
    width: 100%;
    height: 100%;
}

.link-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coordinates {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    opacity: 0.6;
}

.copyright {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    opacity: 0.8;
}

.copyright .logo {
    font-family: 'Hachi Maru Pop', cursive;
    font-size: 1rem;
    color: var(--text);
    line-height: 1;
    transition: all 0.3s ease;
    cursor: default;
}

.copyright .logo:hover {
    color: #33ff33;
    text-shadow:
        0 0 8px rgba(51, 255, 51, 0.5),
        0 0 16px rgba(51, 255, 51, 0.3);
}

.copyright-text {
    color: var(--muted);
}

.blink {
    color: #33ff33; /* phosphor green */
    text-shadow:
        0 0 5px #33ff33,
        0 0 10px #33ff33,
        0 0 20px #33ff33,
        0 0 40px #33ff33;
    animation: crt-blink 1s step-end infinite;
}

@keyframes crt-blink {
    0%, 100% {
        opacity: 1;
        text-shadow:
            0 0 5px #33ff33,
            0 0 10px #33ff33,
            0 0 20px #33ff33,
            0 0 40px #33ff33;
    }
    50% {
        opacity: 0.3;
        text-shadow: 0 0 2px #33ff33;
    }
}

/* Responsive */
@media (max-width: 600px) {
    main {
        padding: 4rem 1.5rem;
    }

    .shape-circle, .shape-square {
        display: none;
    }

    .tag-cloud {
        gap: 0.5rem;
    }

    .tag {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Subtle entrance animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    animation: fadeUp 0.8s ease-out;
}

.about {
    animation: fadeUp 0.8s ease-out 0.1s backwards;
}

.interests {
    animation: fadeUp 0.8s ease-out 0.2s backwards;
}

.current {
    animation: fadeUp 0.8s ease-out 0.3s backwards;
}

footer {
    animation: fadeUp 0.8s ease-out 0.4s backwards;
}
