html, body {
    overflow-x: hidden; /* Prevents the whole screen from swiping left/right */
}
:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --link-color: #79a6d2;
    --accent: #ffb86c;
    --text-xs: clamp(0.8rem, 0.77rem + 0.12vw, 0.9rem);
    --text-sm: clamp(0.9rem, 0.86rem + 0.18vw, 1rem);
    --text-base: clamp(1rem, 0.94rem + 0.28vw, 1.12rem);
    --text-lg: clamp(1.08rem, 1rem + 0.35vw, 1.24rem);
    --text-xl: clamp(1.3rem, 1.15rem + 0.8vw, 1.7rem);
    --text-2xl: clamp(1.55rem, 1.32rem + 1.4vw, 2.4rem);
    --text-3xl: clamp(1.9rem, 1.55rem + 1.6vw, 2.7rem);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: var(--text-base);
    line-height: 1.7;
    max-width: 1000px; /* Keeps the text centered and readable */
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    font-size: var(--text-3xl) !important;
    line-height: 1.1;
}

h2 {
    font-size: var(--text-2xl) !important;
    line-height: 1.15;
}

h3 {
    font-size: var(--text-xl) !important;
    line-height: 1.2;
}

h4 {
    font-size: var(--text-lg) !important;
    line-height: 1.25;
}

p, li {
    font-size: inherit;
}

main [style*="font-size"] {
    font-size: var(--text-sm) !important;
}

main pre,
main code,
main [style*="font-family: monospace"] {
    font-size: var(--text-sm) !important;
    line-height: 1.6;
}

main section h1,
main section h2,
main section h3,
main section h4,
main article h1,
main article h2,
main article h3,
main article h4 {
    letter-spacing: normal;
}

main a[style*="font-size"] {
    font-size: var(--text-lg) !important;
}

main p[style*="font-size"],
main span[style*="font-size"] {
    font-size: var(--text-sm) !important;
}

main button[style*="font-size"] {
    font-size: var(--text-xs) !important;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

nav {
    margin-bottom: 3rem;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--text-color);
    font-weight: bold;
}
/* Header Flexbox Layout */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

header nav {
    margin-bottom: 0; /* overrides the previous margin */
}

/* Social Icon Buttons */
.icon-container {
    display: flex;
    gap: 0.75rem;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #333;
    border-radius: 10px;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.icon-btn:hover {
    border-color: var(--link-color);
    color: var(--link-color);
    background: rgba(121, 166, 210, 0.1);
    text-decoration: none;
}



/* =========================================
   MOBILE RESPONSIVENESS (Screens under 768px)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Reduce the massive desktop padding */
    body {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: clamp(1.9rem, 1.35rem + 1.8vw, 2.45rem) !important;
    }

    h2 {
        font-size: clamp(1.45rem, 1.15rem + 1.5vw, 2.1rem) !important;
    }

    h3 {
        font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem) !important;
    }

    h4 {
        font-size: clamp(1.02rem, 0.96rem + 0.45vw, 1.15rem) !important;
    }

    /* 2. Stack the header elements so they don't squish */
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        border-bottom: none; /* Looks cleaner on mobile */
    }

    /* 3. Allow text navigation links to wrap neatly */
    header nav {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* 4. Ensure terminal blocks and the cURL command can be swiped horizontally instead of breaking the screen width */
    div[style*="monospace"],
    pre,
    code {
        overflow-x: auto;
        white-space: nowrap;
        font-size: var(--text-xs) !important;
        padding: 1rem !important;
    }

    /* 5. Adjust the footer to stack */
    footer div {
        flex-wrap: wrap;
        justify-content: center;
    }
}






/* =========================================
   FLOATING DESKTOP SIDEBARS (CENTERED)
   ========================================= */
.floating-left, .floating-right {
    position: fixed;
    top: 50%;
    transform: translateY(-50%); /* This mathematically centers it on the Y-axis */
    z-index: 10;
    display: none; /* Hidden by default, shown on desktop */
}

.floating-left {
    left: 40px;
}

.floating-right {
    right: 40px;
}

.social-links-vertical, .email-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Note: The bottom ::after lines were removed to keep the centered look clean */

.social-links-vertical a {
    color: #8b949e;
    transition: all 0.2s ease;
}

.social-links-vertical a:hover {
    color: var(--link-color);
    transform: translateY(-3px) scale(1.1); /* Added a slight scale for a more tactile hover */
}

.email-vertical a {
    writing-mode: vertical-rl;
    font-family: monospace;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: #8b949e;
    text-decoration: none;
    transition: all 0.2s ease;
}

.email-vertical a:hover {
    color: var(--link-color);
    transform: translateY(-3px);
}

/* Only show on screens wider than 1200px */
@media (min-width: 1200px) {
    .floating-left, .floating-right {
        display: block;
    }
}
/* The vertical tail line (restored) */
.social-links-vertical::after, .email-vertical::after {
    content: "";
    display: block;
    width: 1px;
    height: 90px;
    background-color: #333; /* Darkened slightly to match your borders */
    margin-top: 1rem;
}

/* Symmetrical top and bottom tracking lines */
.social-links-vertical::before, .email-vertical::before,
.social-links-vertical::after, .email-vertical::after {
    content: "";
    display: block;
    width: 1px;
    height: 60px;
    background-color: #333;
}

.social-links-vertical::before, .email-vertical::before { margin-bottom: 1rem; }
.social-links-vertical::after, .email-vertical::after { margin-top: 1rem; }





/* =========================================
   PROJECT ICON HOVER EFFECTS
   ========================================= */
.project-icon {
    color: #8b949e; /* Default inactive gray */
    display: inline-flex;
    /* This specific cubic-bezier gives it a slight bouncy spring effect */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.project-icon:hover {
    color: #fff; /* Lights up white */
    transform: scale(1.2) translateY(-2px); /* Scales up and moves up slightly */
}

.live-icon:hover {
    color: var(--link-color); /* Makes the live link pop in your accent color instead of white */
}




/* =========================================
   HIDE ON MOBILE UTILITY
   ========================================= */
.hide-on-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-on-mobile {
        display: block; /* or 'flex' depending on your layout, block works for standard divs */
    }
}

/* =========================================
   SQUARE PROFILE AVATAR (RIGHT SIDE)
   ========================================= */
/*
.profile-avatar-square {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #333;
    background-color: #0d1117;
    filter: grayscale(100%) contrast(1.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}
*/

/* .profile-avatar-square:hover {
    filter: grayscale(0%) contrast(1);
    border-color: var(--link-color);
    transform: scale(1.03);
} */

/* Optional: Make it stack vertically on small mobile screens 
@media (max-width: 768px) {
    div[style*="justify-content: space-between"] {
        flex-direction: column-reverse;
        align-items: flex-start !important;
    }
} 
*/