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

html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
    padding: 0;
}

main {
    flex: 1;
}

body.menu-open {
    overflow: hidden;
}

/* Ensure all main containers fit within viewport */


main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #1a1a2e, #121212);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0055ff;
}

.navbar .logo a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.navbar .logo a:hover {
    color: #008ecc;
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.navbar .nav-links li {
    display: inline-block;
}

.navbar .nav-links li a {
    text-decoration: none;
    color: #0055ff;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar .nav-links li a:hover {
    color: #008ecc;
    transform: translateY(-3px);
}

.navbar .nav-links li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 3px;
    background: #008ecc;
    transition: width 0.3s ease;
}

.navbar .nav-links li a:hover::after {
    width: 100%;
}

.navbar .nav-links li a.active {
    color: #008ecc;
    font-weight: bold;
    border-bottom: 3px solid #008ecc;
    letter-spacing: 1.3px;
}

.social-icon {
    font-size: 1.3rem;
    color: #0055ff;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
    color: #008ecc;
}

.intro {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: auto;
    padding-top: 2rem;
    margin-bottom: 0;
    background: transparent;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tech-name {
    /* size only (visuals are unified later) */
    font-size: 8rem;
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
    line-height: 1.2;
}

.projects {
    /* Reduce top padding so the page title sits closer to the header */
    padding: clamp(1.2rem, 3.5vw, 2.6rem) 2rem;
    text-align: center;
}


/* --- Fancy title enhancements --- */
.projects {
    position: relative; /* for decorative pseudo elements */
}

.projects {
    /* Reduce top padding so the page title sits closer to the header */
    padding: clamp(1.2rem, 3.5vw, 2.6rem) 2rem;
    text-align: center;
    position: relative; /* for decorative pseudo elements */
}

/* Unified visual treatment for main titles: same gradient, stroke, animation, shadows */
.tech-name, .projects h1, .contact h1 {
    /* shared animated gradient text */
    background: linear-gradient(90deg,
        #002448 0%,      /* deeper, more saturated navy-blue edge */
        #004075 25%,
        #00b7ff 50%, /* saturated blue interior */
        #003b75 75%,
        #002448 100%
    ); 
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s linear infinite, floatTitle 6s ease-in-out infinite;
    -webkit-text-stroke: 1.1px #2d9dfffd;
    text-shadow: 0 0 12px rgba(0, 68, 255, 0.6), 0 2px 6px rgba(0, 42, 81, 0.7);
    position: relative;
    z-index: 2;
}

.projects::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 26px;
    transform: translateX(-50%);
    width: min(80vw, 900px);
    height: 240px;
    /* slightly stronger saturated radial hint behind projects title */
    background: radial-gradient(closest-side, rgba(0,140,200,0.08), rgba(0,34,66,0.0) 60%);
    filter: blur(22px);
    z-index: 0;
    pointer-events: none;
}

.projects h1::after {
    content: '';
    display: block;
    margin: 14px auto 0;
    width: 0;
    height: 6px;
    border-radius: 6px;
    /* darker edges with a more saturated blue center and modest glow */
    background: linear-gradient(90deg, rgba(0,36,72,0.98) 0%, rgba(0,170,255,1) 50%, rgba(0,36,72,0.98) 100%);
    box-shadow: 0 12px 26px rgba(0,34,66,0.36), inset 0 0 12px rgba(0,170,255,0.12);
    animation: underlineGrow 900ms cubic-bezier(.2,.9,.2,1) forwards;
}

/* Apply similar visual treatment to the main index title */
.tech-name {
    /* keep only size here; visuals are unified above */
    font-size: 8rem;
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
    line-height: 1.2;
}

.tech-name::after {
    content: '';
    display: block;
    height: 6px;
    /* always-visible underline with stronger glow */
    width: min(48%, 420px);
    margin: 12px auto 0;
    border-radius: 6px;
    /* darker rim with a more saturated blue center and subtle inset */
    background: linear-gradient(90deg, rgba(2, 40, 138, 0.98) 0%, rgb(0, 213, 255) 50%, rgba(0,36,72,0.98) 100%);
    box-shadow: 0 12px 28px rgba(0, 33, 177, 0.4), inset 0 0 12px rgba(0, 60, 255, 0.1);
    transition: width 650ms cubic-bezier(.2,.9,.2,1);
    opacity: 1;
}

/* Decorative underline for contact title to match other titles */
.contact h1::after {
    content: '';
    display: block;
    height: 6px;
    width: min(48%, 420px);
    margin: 12px auto 0;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(2, 40, 138, 0.98) 0%, rgb(0, 213, 255) 50%, rgba(0,36,72,0.98) 100%);
    box-shadow: 0 12px 28px rgba(0, 33, 177, 0.4), inset 0 0 12px rgba(0, 60, 255, 0.1);
}

/* Soft radial glow behind the main title to match other headers */
.intro::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 18px;
    transform: translateX(-50%);
    width: min(80vw, 900px);
    height: 200px;
    /* slightly stronger saturated radial behind main title */
    background: radial-gradient(closest-side, rgba(0,140,200,0.08), rgba(0,40,60,0) 60%);
    filter: blur(20px);
    z-index: 1;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatTitle {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

@keyframes underlineGrow {
    from { width: 0; opacity: 0; }
    to { width: min(40%, 360px); opacity: 1; }
}

@media (max-width: 600px) {
    .projects {
        padding-top: 1rem;
    }
    .projects h1 {
        margin-bottom: 1rem;
        /* scale down animation sizes on small screens */
        animation-duration: 5s;
    }
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    justify-items: center;
    align-items: start;
}

.project-block {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a2e, #121212);
    margin: 0 auto;
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.project-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
}

.project-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #121212;
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.project-media video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-media:hover img {
    opacity: 0;
}

.project-media:hover video {
    opacity: 1;
}

.project-content {
    flex: 1 1 50%;
    padding: 2rem;
    text-align: left;
    color: #e0e0e0;
}

.project-content h2 {
    font-size: 1.8rem;
    color: #0055ff;
    margin-bottom: 1rem;
}

.project-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.project-content .button {
    /* Gradient border using border-image; center stays transparent until hover */
    display: inline-block;
    background-color: transparent;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 180ms ease;
    box-shadow: 0 6px 18px rgba(0,86,128,0.06);
    /* border-image paints a gradient into the border area */
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, #00638f 0%, #004a6e 60%, #012530 100%) 1;
}

.project-content .button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,86,128,0.11), inset 0 -2px 6px rgba(0,0,0,0.32);
    filter: brightness(0.98);
    /* translucent fill appears on hover */
    background-color: rgba(0,99,143,0.08);
}

.project-content .button:active {
    transform: translateY(-1px) scale(0.995);
}

.project-content .button:focus {
    outline: 2px solid rgba(0,86,128,0.22);
    outline-offset: 3px;
}
 
.project-flex-layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    flex-wrap: nowrap;
}

.media-column {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.media-column img,
.media-column video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 18px;
    background: #181818;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.media-gallery {
    flex: 1 1 340px;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.media-gallery img,
.media-gallery video {
    width: 100%;
    border-radius: 12px;
    background: #181818;
}

/* Global media loader overlay (for images & videos) */
.media-loader-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* allow clicks to pass through if needed */
    background: linear-gradient(180deg, rgba(18,18,34,0.45), rgba(18,18,34,0.55));
    backdrop-filter: blur(4px);
    transition: opacity 240ms ease;
    z-index: 50;
    opacity: 1;
    border-radius: inherit; /* match media border radius when present */
}

.media-loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.media-loader-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.08);
    border-top-color: rgba(0,170,255,0.98);
    animation: loader-rotate 1s linear infinite;
    box-shadow: 0 6px 20px rgba(0,110,200,0.12);
}

@keyframes loader-rotate {
    to { transform: rotate(360deg); }
}

.media-loader-overlay.failed {
    background: linear-gradient(180deg, rgba(30,10,10,0.6), rgba(30,10,10,0.7));
}

.media-loader-overlay .loader-text {
    position: absolute;
    bottom: 10px;
    font-size: 0.85rem;
    color: rgba(230,230,230,0.9);
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.media-gallery.large-media {
    max-width: 50%;
    flex: 1 1 340px;
}
.media-gallery.large-media img,
.media-gallery.large-media video {
    width: 100%;
    height: auto;
    min-height: unset;
    max-height: 900px;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    border-radius: 18px;
    margin-bottom: 1.5rem;
    background: #181818;
}

.project-details-container {
    max-width: 1500px;
    margin: 0 auto;
    background: linear-gradient(135deg, #181a2e 80%, #121212 100%);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    padding: 2.5rem 2rem;
}

.project-title {
    font-size: 2.8rem;
    color: #0055ff;
    margin-bottom: 2.5rem;
    letter-spacing: 2px;
    text-shadow: 2px 2px 8px rgba(0,170,255,0.15);
}

.styled-description {
    background: rgba(18, 18, 34, 0.85);
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    padding: 2rem 2rem 2rem 2rem;
    color: #e0e0e0;
}

.styled-description h2 {
    color: #0055ff;
    font-size: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.styled-description ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.styled-description p {
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
    color: #e0e0e0;
}

@media (max-width: 1200px) {
    .project-details-container {
        max-width: 98vw;
        padding: 1rem;
    }
    .media-gallery.large-media {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .project-flex-layout {
        flex-direction: column;
        gap: 2rem;
    }
    .media-gallery.large-media {
        max-width: 100%;
    }
    .styled-description {
        padding: 1.2rem;
    }
}

@media (max-width: 600px) {
    .project-title {
        font-size: 2rem;
    }
    .styled-description h2 {
        font-size: 1.3rem;
    }
    .media-gallery.large-media img,
    .media-gallery.large-media video {
        min-height: 120px;
        max-height: 220px;
    }
}

.project-description {
    width: 100%;
    text-align: left;
    margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
    .project-flex-layout {
        flex-direction: column;
    }
    .media-column {
        max-width: 100%;
    }
    .media-gallery, .project-description {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
    }
}

.skills {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #1a1a2e, #121212);
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    margin: 2rem auto;
    max-width: 900px;
}

.skills h2 {
    font-size: 2.5rem;
    color: #0055ff;
    margin-bottom: 2rem;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.skill {
    text-align: center;
    width: 150px;
}

.skill-panel {
    background: linear-gradient(135deg, #1a1a2e, #121212);
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
}

.skill img {
    width: 100%;
    height: auto;
    max-width: 100px;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.skill img:hover {
    transform: scale(1.2);
}

.skill p {
    font-size: 1rem;
    color: #e0e0e0;
    margin-top: 0.5rem;
}

.bio {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #1a1a2e, #121212);
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    margin: 2rem auto;
    max-width: 900px;
    margin-top: 0;
    padding-top: 2rem;
}

.bio h2 {
    font-size: 2.5rem;
    color: #0055ff;
    margin-bottom: 1.5rem;
}

.bio p {
    font-size: 1.2rem;
    color: #e0e0e0;
    line-height: 1.8;
    margin: 0 auto;
    max-width: 700px;
}

.bio-profile-picture {
    margin: 2.5rem auto 0 auto;
    width: 340px;
    height: 340px;
    border-radius: 36px;
    background: 
        linear-gradient(135deg, #0055ff 0%, #005577 100%) border-box;
    border: 8px solid transparent;
    box-shadow: 0 8px 32px rgba(0,0,0,0.32);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.bio-profile-picture .profile-picture {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

@media (max-width: 600px) {
    .bio-profile-picture {
        width: 180px;
        height: 180px;
        border-radius: 18px;
    }
    .bio-profile-picture .profile-picture {
        border-radius: 12px;
    }
}

@media (max-width: 600px) {
    .bio-profile-picture {
        width: 120px;
        height: 120px;
    }
}

footer {
    text-align: center;
    padding: 1rem 0;
    background-color: #1a1a2e;
    color: #e0e0e0;
    font-size: 0.9rem;
    flex-shrink: 0;
}

h1, h3 {
    color: #1e90ff;
}

/* Animated gradient for all h2 subtitles */
h2 {
    /* animated gradient similar to main titles but quieter */
    background: linear-gradient(90deg,
        #0011ff 0%,
        #0033ff 25%,
        #0055ff 50%, /* lighter middle stop retained for visible highlight */
        #3370ff 75%,
        #0011ff 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s linear infinite;
    -webkit-text-stroke: 0.6px rgba(191, 189, 255, 0.724);
    text-shadow: 0 0 10px rgba(0,160,255,0.12);
}

a {
    color: #1e90ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.section {
    margin-bottom: 40px;
}

.button {
    /* Gradient border using border-image; center stays transparent until hover */
    display: inline-block;
    background-color: transparent;
    color: #ffffff;
    padding: 10px 22px;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 180ms ease;
    box-shadow: 0 6px 18px rgba(0,86,128,0.06);
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, #00638f 0%, #004a6e 60%, #012530 100%) 1;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,86,128,0.11), inset 0 -2px 6px rgba(0,0,0,0.32);
    filter: brightness(0.98);
    background-color: rgba(0,99,143,0.08);
}

.button:active {
    transform: translateY(-1px) scale(0.995);
}

.button:focus {
    outline: 2px solid rgba(0,86,128,0.22);
    outline-offset: 3px;
}

#particle-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #121212;
}

/* Hamburger Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
    padding: 10px;
    background: rgba(0, 170, 255, 0.1);
    border-radius: 4px;
    border: 1px solid #0055ff;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #0055ff;
    transition: all 0.3s ease;
    border-radius: 2px;
    display: block;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hide close button on desktop only */
@media (min-width: 769px) {
    .nav-links .nav-close {
        display: none !important;
    }
    
    .nav-links .close-btn {
        display: none !important;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .navbar {
        position: relative;
        padding: 1rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, #1a1a2e, #121212);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        padding-top: 5vh;
        transition: left 0.3s ease;
        z-index: 99999 !important; /* Much higher z-index */
        backdrop-filter: blur(10px);
    }

    .nav-links.active {
        left: 0 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .nav-links li {
        width: auto;
    }

    .nav-links li a {
        font-size: 2.2rem;
        text-align: center;
        padding: 1.2rem;
        display: block;
        font-weight: 500;
    }

    .nav-links li a:hover {
        transform: scale(1.1);
    }

    .social-icon {
        font-size: 1.8rem;
    }

    /* Close button for mobile navigation */
    .nav-close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    .close-btn {
        background: none;
        border: none;
        color: #0055ff;
        font-size: 2rem;
        cursor: pointer;
        padding: 0.5rem;
        line-height: 1;
        transition: color 0.3s ease, transform 0.3s ease;
    }

    .close-btn:hover {
        color: #008ecc;
        transform: scale(1.2);
    }

    /* Additional mobile improvements */
    .navbar .logo a {
        font-size: 1.2rem;
    }
}

/* Additional responsive improvements for smaller screens */
@media (max-width: 480px) {
    .navbar {
        padding: 0.8rem;
    }
    
    .navbar .logo a {
        font-size: 1rem;
    }
    
    .hamburger span {
        width: 22px;
        height: 2px;
    }
    
    .nav-links li a {
        font-size: 2rem;
        padding: 1rem;
    }
    
    .social-icon {
        font-size: 1.6rem;
    }
}

/* Mobile styles for homepage elements */
@media (max-width: 768px) {
    .tech-name {
        font-size: 3.5rem !important;
        margin: 10px 0;
        padding: 0 1rem;
        line-height: 1.1;
    }
    
    .intro {
        padding-top: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .bio, .skills {
        margin: 1rem auto;
        padding: 2rem 1rem;
        max-width: calc(100% - 2rem);
        box-sizing: border-box;
    }
    
    .bio-container {
        padding: 0 1rem;
    }
    
    .skills-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
    }
    
    .skill {
        width: 120px;
    }
    
    .skill-panel {
        padding: 0.8rem;
    }
    
    .skill img {
        max-width: 70px;
    }
    
    .skill p {
        font-size: 0.9rem;
    }
    
    .skills-column {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .tech-name {
        font-size: 2.5rem !important;
        margin: 5px 0;
        padding: 0 0.5rem;
    }
    
    .bio, .skills {
        margin: 0.5rem auto;
        padding: 1.5rem 0.5rem;
    }
    
    .bio h2, .skills h2 {
        font-size: 1.8rem;
    }
    
    .bio p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .skill {
        width: 100px;
    }
    
    .skill-panel {
        padding: 0.6rem;
    }
    
    .skill img {
        max-width: 60px;
    }
    
    .skill p {
        font-size: 0.8rem;
    }
    
    .skills-container {
        gap: 1rem;
        justify-content: center;
    }
}

.contact {
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

.contact h1 {
    font-size: 2.8rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 900px;
    margin: auto;
    background: linear-gradient(135deg, #1a1a2e, #121212);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.profile-picture-container {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    border: 5px solid #0055ff;
    border-radius: 50%;
    background: linear-gradient(135deg, #121212, #1a1a2e);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    width: 250px;
    height: 250px;
    overflow: hidden;
}

.contact-container .profile-picture {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.contact-container .contact-details {
    flex: 2;
    text-align: left;
    color: #e0e0e0;
    padding: 1rem;
}

.contact-container .contact-details p {
    font-size: 1.3rem;
    margin: 1rem 0;
    line-height: 1.6;
}

.contact-container .contact-details a {
    color: #0055ff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.contact-container .contact-details a:hover {
    color: #008ecc;
    text-shadow: 0 0 8px #0055ff;
}

#particle-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #121212;
}

.animated-phone {
    display: inline-flex;
    gap: 0.2rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #0055ff;
    user-select: none;
    pointer-events: none;
}

.animated-phone .digit {
    display: inline-block;
    transform: rotateX(90deg);
    animation: flipIn 0.5s ease forwards;
    animation-delay: 0s;
    user-select: none;
    pointer-events: none;
}

@keyframes flipIn {
    0% {
        transform: rotateX(90deg);
        opacity: 0;
    }
    50% {
        transform: rotateX(45deg);
        opacity: 0.5;
    }
    100% {
        transform: rotateX(0deg);
        opacity: 1;
    }
}

.social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-icon {
    font-size: 1.5rem;
    color: #e0e0e0;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
    color: #0055ff;
}

.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(18, 18, 34, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content img,
.lightbox-content video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    background: #181818;
}
.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    font-size: 3rem;
    color: #0055ff;
    cursor: pointer;
    z-index: 10000;
    user-select: none;
}
.lightbox-close:hover {
    color: #fff;
}

/* Keep projects title size responsive (visuals are shared with .tech-name) */
.projects h1 {
    font-size: clamp(2.4rem, 4.8vw, 4.2rem);
    display: inline-block;
    margin: 0 0 1.6rem 0; /* restore spacing below the title */
}

/* Align and control spacing for the action button in the About (.bio) section */
.bio-actions {
    text-align: center;
    /* small gap between the paragraph and the button */
    margin-top: 0.9rem;
    /* spacing between button and the profile image */
    margin-bottom: 1.25rem;
}