html,
body {
    position: fixed;
    min-height: 100%;
    height: 100%;
    min-height: 100vh;
    margin: 0;
    background-color: #101010;
    position: relative;
    overflow-y: auto;
    font-family: "Red Hat Display", sans-serif;
    display: flex;
    flex-direction: column;
    animation: page-fade 1.2s ease;
    scroll-behavior: smooth;
}
/* Film grain overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='noise'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23noise)'/></svg>");
    opacity: 0.99;
    mix-blend-mode: overlay;
    
}

img,
video {
    max-width: 100%;
    height: auto;
}


/* Heading styles */
h1 {
    text-align: left;
    font-family: "Parisienne", cursive;
    color: bisque;
    font-weight: 500;
    z-index: 2;
}

.hero {
    min-height: 10vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: clamp(32px, 5vw, 96px);
    padding-top: 300px;
    padding-bottom: clamp(80px, 10vw, 220px);
    gap: clamp(20px, 3vw, 48px);
}

.hero-title {
    font-size: clamp(56px, 13vw, 360px);
    margin: 0;
    width: auto;
    max-width: 70%;
    align-self: flex-start;
    white-space: nowrap;
}
.hero-title-outline {
    color: transparent;
    -webkit-text-stroke: 2px bisque;
}

h2 {
    font-size: clamp(28px, 6vw, 60px);
    z-index: 1;
}

h3 {
    font-size: clamp(20px, 4.5vw, 50px);
    z-index: 1;
}

.profile-frame {
    width: clamp(30vb, 90vb);
    padding: clamp(24px, 3.5vw, 60px);
    gap: clamp(20px, 6vw, 140px);
    display: flex;
    align-items: flex-end;
    align-self: flex-end;
    margin-top: clamp(20px, 4vw, 60px);
    transition: transform 0.4s ease;
}
.profile-frame:hover {
    transform: scale(1.08);
}
.Profile {
    flex-shrink: 0;
    overflow: hidden;
}

.Profile img {
    width: clamp(250px, 35vw, 450px);
    border-radius: 45px;
    height: auto ;
}

.Margin-box{
    padding-bottom: 4vb;
}

.TextBlock {
    font-family: "Poppins", sans-serif;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.7;
    max-width: 60ch;
    background: rgba(23, 23, 23, 0.65);
    padding: clamp(24px, 3vw, 40px);
    border-radius: 36px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: bisque;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    align-self: flex-start;
    white-space: pre-line;
    backdrop-filter: blur(14px);
    transition: box-shadow 0.4s ease;
}
.TextBlock:hover {
    box-shadow: 0 0 24px rgba(222, 184, 135, 0.4);
}

/* Button container layout */
.button {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px;
}


/* Auto hide while scrolling */
.hide {
    opacity: 0;
    transition: opacity 0.4s;
}

/* Base button styles */
button {
    border: 0;
    border-radius: 50px;
    padding: 10px 30px;
    width: 200px;
    height: 100px;
    cursor: pointer;
    font-size: 30px;
    font-family: "Momo Trust Display", sans-serif;
    font-weight: 400;
    z-index: 2;
}

/* Orange button */
.orange {
    background: linear-gradient(90deg, #f1a60a, #f46f03);
    backdrop-filter: blur(10px);
    color: white;
    transition: background 0.5s ease, color 0.5s ease;
}

.orange:hover {
    color: black;
    background: white;
}

/* Gray button */
.gray {
    background: linear-gradient(90deg, #545454, #2e2e2e);
    backdrop-filter: blur(10px);
    color: white;
    transition: background 0.5s ease, color 0.5s ease;
}

.gray:hover {
    background: white;
    color: black;
}

/* White button */
.white {
    background: linear-gradient(120deg, #8a8a8a, #b8b8b8);
    backdrop-filter: blur(10px);
    color: black;
    transition: background 0.5s ease, color 0.5s ease;
}

.white:hover {
    background: white;
    color: black;
}

.centered-text {
    text-align: center;
}

.centered-text h2:first-of-type {
    color: #ffffff;
}

.centered-text h3:last-of-type {
    color: #909090;
}

/* Header */
header {
    z-index: 4;
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1200px, calc(100% - 300px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-radius: 9999px;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(100px);
    border: 2px solid #3b3b3b79;
    transition: background 0.5s ease;
}

header:hover {
    background-color: rgba(0, 0, 0, 0.51);
}

.header-left {
    display: flex;
}

.header-right {
    margin-left: auto;
    display: flex;
    gap: 20px;
}

#icon {
    width: 200px;
    height: auto;
    margin-right: 15px;
    position: relative;
    display: block;
}
#icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../pictures/icon2.png") no-repeat center;
    background-size: contain;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
#icon:hover::after {
    opacity: 1;
}

#logo-Github {
    width: 50px;
    height: auto;
    margin-right: 30px;
    order: 1;
    transition: box-shadow 0.35s ease;
    border-radius: 999px;

}
#logo-Github:hover {
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.8);
}

/* Circle hover effect */
.circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
}

.circle .avatar {
    background: white;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.circle .gif {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.circle:hover .avatar {
    opacity: 0;
}

.circle:hover .gif {
    opacity: 1;
}


/* Animated blob background */
body {
    position: relative;
}

.glow {
    z-index: 1;
    position: fixed;
    width: 300px;
    height: 300px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 60%);
    filter: blur(80px);
    transform: translate(-50%, -50%);
    mix-blend-mode: soft-light;
    /* The glow visually lights the background */
}

.profile-wrapper {
    display: flex;
    justify-content: center;
}

@keyframes page-fade {
    from {
        background-color: #171717;
    }
    to {
        background-color: #101010;
    }
}

/* Reduced motion and responsive tweaks */
@media (prefers-reduced-motion: reduce) {
    body::after {
        animation: none;
    }
}

/* Legibility */
@media (max-width: 1250px) {
    body::after {
        filter: blur(10px);
    }

    .orange {
        background: linear-gradient(90deg, #f17e0a, #f44303);
        color: white;
        transition: opacity 0.8s ease, transform 0.65s ease;
    }
}



.footer {
    display: flex;
    margin: 1vmax 3vmax auto 3vmax;
    flex-direction: column;
    border-top: 3px groove dimgrey;

    a {
        margin: 2vb;
        font-size: clamp(28px, 4vw, 90px);
        font-family: "Exo", sans-serif;
        text-align: center;
        color: white;
        text-decoration: none;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #server {
        display: none;
    }

    #logo-Github {
        display: none;
    }

    .button {
        align-items: center;
        flex-direction: column;
        gap: 12px;
    }

    .hero {
        min-height: auto;
        padding-bottom: 40px;
    }

    .hero-title {
        margin: 40px 24px 10px;
        font-size: clamp(48px, 14vw, 120px);
        max-width: 100%;
        white-space: normal;
    }

    .profile-frame {
        align-self: flex-start;
        flex-direction: column;
        gap: 24px;
        width: 100%;
    }

    .TextBlock {
        max-width: none;
        width: 100%;
        padding: 24px;
    }

    .Profile {
        width: 100%;
        justify-content: flex-start;
    }

    .Profile img {
        width: 100%;
        max-width: 360px;
    }

    button {
        width: 100vb;
        max-width: 260px;
        height: auto;
        padding: 12px 18px;
        font-size: 20px;

    }

    .footer {
        backdrop-filter: blur(15px);
        border-radius: 50px;
        background: rgba(0, 0, 0, 0.1);
        margin: 2vb;
        transition: background 0.5s ease;
    }

    .footer:hover {
        background: rgba(24, 24, 24, 0.8);
    }

    .divider-orange {
        .row {
            flex-direction: column;
            align-items: center;
            gap: 1px;
        }
    }

    .divider-gray {
        .row {
            flex-direction: column;
            align-items: center;
            gap: 1px;
        }
    }

    body:before {
        display: none;
    }

    body::after {
        content: "";
        position: fixed;
        bottom: -20vb;
        left: 0;
        top: auto;
        transform: translateX(-50%);
        width: 120vmin;
        height: 120vmin;
        background: url("../pictures/blob.svg") no-repeat center bottom;
        background-size: contain;
        opacity: 1;
        pointer-events: none;
        filter: blur(10px);
        animation: blobSwingReverse 7s ease-in-out infinite alternate;
        z-index: -1;
        will-change: transform;
    }
}

/* Hide headings on very small screens */
@media (max-height: 600px) {
    h2 {
        display: none;
    }

    h3 {
        display: none;
    }
}

/* Hide the server image on small screens */
@media (max-height: 1020px) {
    #server {
        display: none;
    }
}

.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
    opacity: 0.85;
    z-index: 5;
}

.back-to-top:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.3);
}
