/* ============================================= */
/* GLOBAL STYLES & SETUP */
/* ============================================= */
:root {
    --primary-color: #007BFF;
    --dark-grey: #333333;
    --light-grey: #f4f4f4;
    --background-color: #FFFFFF;
    --text-color: #333333;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    position: relative; /* Needed for pseudo-elements */
    overflow-x: hidden; /* Prevents horizontal scroll from shapes */
}

/* ============================================= */
/* LOADING SCREEN */
/* ============================================= */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#loading-screen.loaded {
    opacity: 0;
    pointer-events: none; /* Allows clicking through after fade */
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-grey);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================= */
/* DECORATIVE BACKGROUNDS */
/* ============================================= */

.overlay {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--home-section-height, 100vh) + 40px); /* Use dynamic height */
  pointer-events: none; /* decorative only */
}

/* Left blue shape */
.overlay-1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    background: linear-gradient(135deg, #007BFF 0%, #00C6FF 60%, #6A82FB 100%);
    clip-path: circle(70% at 0% 50%);
    z-index: -2;
}

/* bottom gradient */
.overlay-2 {
    position: absolute;
    left: 0;
    top: var(--home-section-height, 100vh);
    width: 100%;
    height: 40px;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0) 0%,
        var(--background-color) 100%
    );
}

/* Right wavy lines */
.overlay-3 {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cdefs%3E%3Cpattern id='wavy' patternUnits='userSpaceOnUse' width='80' height='80' patternTransform='rotate(45)'%3E%3Cpath d='M 0 40 C 20 40 20 0 40 0 C 60 0 60 40 80 40' stroke='%23007BFF' stroke-width='1' fill='none' opacity='0.125'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23wavy)'/%3E%3C/svg%3E");
    z-index: -3;
}

/* ============================================= */
/* SIDE NAVIGATION */
/* ============================================= */
.side-nav {
    position: fixed;
    top: 50%;
    left: 25px; /* Positioned within the blue shape */
    transform: translateY(-50%);
    z-index: 1000;
}

.side-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-nav ul li a {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-grey);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px); /* ADDED: Frosted glass effect */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* ADDED: Subtle shadow for depth */
}

.side-nav ul li a:hover {
    background-color: white;
    color: var(--primary-color);
    transform: scale(1.1);
}

.side-nav ul li a.active {
    background-color: white;
    color: var(--primary-color);
}

/* ============================================= */
/* MAIN CONTENT & SECTION STYLING */
/* ============================================= */
.content-wrapper {
    position: relative;
    z-index: 1;
    padding-left: 100px;
}

.section {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    margin: auto;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    text-align: center;
    color: var(--dark-grey);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* ============================================= */
/* HOME SECTION */
/* ============================================= */
#home {
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 120px;
    position: relative; /* To contain the pseudo-element */
    overflow: hidden; /* To prevent the shape from spilling out */
    opacity: 1;
    transform: translateY(0);
}

.home-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.home-left {
    flex-basis: 40%;
}

.photo-container {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: white;
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-left: auto;
    /* === PHOTO ANIMATION STYLES === */
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.photo-container.loaded {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.2s; /* Photo appears after a short delay */
}

.home-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.home-right {
    display: flex;
    flex-direction: column;
    flex-basis: 60%;
    text-align: left;
    padding-left: 50px;
}

/* === HOME SECTION ITEM ANIMATIONS === */
.home-right > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.home-right.loaded > * {
    opacity: 1;
    transform: translateY(0);
}

/* Entrance for social links */
.home-right .social-links a {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.home-right.loaded .social-links a {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger entrance delays */
.home-right.loaded .main-name { transition-delay: 0.2s; }
.home-right.loaded .current-position { transition-delay: 0.4s; }
.home-right.loaded .social-links a:nth-of-type(1) { transition-delay: 0.6s; }
.home-right.loaded .social-links a:nth-of-type(2) { transition-delay: 0.7s; }
.home-right.loaded .social-links a:nth-of-type(3) { transition-delay: 0.8s; }
.home-right.loaded .social-links a:nth-of-type(4) { transition-delay: 0.9s; }

.main-name {
    flex-basis: 40%;
    font-size: 4rem;
    font-weight: 700;
    white-space: nowrap; 
}

.current-position {
    flex-basis: 30%;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary-color);
    position: relative;
    height: 1.2em;
    line-height: 1.2em;
    overflow: hidden;
    white-space: nowrap;
    display: inline-flex;       
    align-items: center;        
}

/* Cursor */
.current-position::after {
    content: "";
    width: 2px;
    height: 1.2em; /* match text height */
    background: var(--primary-color);
    margin-left: 3px;
}



/* When paused (we add .blinking via JS) the cursor blinks */
.current-position.blinking::after {
    animation: blink 0.8s ease-in-out infinite;
}

/* blink toggles opacity (works reliably) */
@keyframes blink {
    0%   { opacity: 1; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
}


.social-links {
    flex-basis: 30%;
    margin-top: 25px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-links a {
    color: #555;
    font-size: 28px;
    text-decoration: none;
}

.social-links a:hover {
    transition: color 0.3s ease; 
    transition-delay: 0s !important;
}

/* Float animation only on icons */
.social-links a i {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

/* Stagger float animation start times */
.social-links a:nth-of-type(2) i { animation-delay: 0.2s; }
.social-links a:nth-of-type(3) i { animation-delay: 0.4s; }
.social-links a:nth-of-type(4) i { animation-delay: 0.6s; }

/* === Hover colors (kept as-is) === */
.social-links a[href*="linkedin.com"]:hover { color: #0077b5; }
.social-links a[href*="github.com"]:hover { color: #333; }
.social-links a[href*="mailto"]:hover { color: #d44638; }
.social-links a[href*="wa.me"]:hover { color: #25d366; }


/* ============================================= */
/* ABOUT SECTION */
/* ============================================= */
#about {
    position: relative;
    overflow: hidden;
}

.about-bio {
    max-width: 800px;
    text-align: justify;
}

.about-bio p {
    font-size: 1rem;
    color: #555;
}

/* ============================================= */
/* SKILLS SECTION */
/* ============================================= */
.skills-layout {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-areas:
        "languages libraries"
        "tools tools";
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
}

.skill-group.languages { grid-area: languages; }
.skill-group.libraries { grid-area: libraries; }
.skill-group.tools { grid-area: tools; }

.skill-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-group h3 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
    color: var(--dark-grey);
}

.skill-group-image-1 {
    height: 120px;
    width: auto;
    max-width: 100%;
    display: inline-block;
    transition: transform 0.3s ease;
}

.skill-group-image-1:hover {
    transform: scale(1.05);
}

.skill-group-image-2 {
    height: 60px;
    width: auto;
    max-width: 100%;
    display: inline-block;
    transition: transform 0.3s ease;
}

.skill-group-image-2:hover {
    transform: scale(1.1);
}

/* ============================================= */
/* PROJECTS SECTION */
/* ============================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

.project-card {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.project-card .project-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px auto;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.project-card .icon-red {
    background-color: #f3e5f5;
    color: #E0245E;
}
.project-card:hover .icon-red {
    background-color: #E0245E;
    color: #f3e5f5;
}

.project-card .icon-orange {
    background-color: #fff3e0;
    color: #f57c00;
}
.project-card:hover .icon-orange {
    background-color: #f57c00;
    color: #fff3e0;
}

.project-card .icon-purple {
    background-color: #e7f3ff;
    color: #8e24aa;
}
.project-card:hover .icon-purple {
    background-color: #8e24aa;
    color: #e7f3ff;
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--dark-grey);
}

.project-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 12px rgba(0,123,255,0.10);
    border: 1px solid #e7f3ff;
    background: rgba(227,252,236,0.7); /* Soft green overlay */
    color: #00695c;
    border-color: #b2f7ef;
}

.project-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.project-link i {
    color: var(--primary-color);
}

.project-link:hover {
    transform: translateX(5px);
}

.tech-skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 20px;
}

.tech-badge {
    background-color: #e7f3ff;
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.tech-badge:hover {
    background-color: var(--primary-color);
    color: #e7f3ff;
}

/* ============================================= */
/* AWARD SECTION */
/* ============================================= */

.award-container {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
    width: 100%;
}

.award-image {
    flex: 1;
}

.award-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.award-description {
    flex: 1;
}

.award-description h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.award-description p {
    text-align: justify;
}

/* ============================================= */
/* EXPERIENCE SECTION */
/* ============================================= */
.experience-item {
    background-color: var(--light-grey);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 800px;
    border-left: 5px solid var(--primary-color);
}

.experience-item h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.experience-details {
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
}

.experience-item ul {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.experience-item li {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.experience-item li::before {
    content: '•';
    font-size: 1.5rem;
    line-height: 1;
    margin-right: 10px;
    flex-shrink: 0;
}

/* ============================================= */
/* CONTACT SECTION */
/* ============================================= */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 50px;
    margin-bottom: 60px;
    max-width: 800px;
    width: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e7f3ff; /* Light blue background */
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.contact-icon a:hover {
    background-color: var(--primary-color);
    color: #e7f3ff;
}

.contact-details h4 {
    font-size: 1rem;
    color: var(--dark-grey);
    margin: 0;
}

.contact-details p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    word-break: break-all;
}

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

.contact-details a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.resume-subtitle {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #555;
    text-align: center;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
}

/* ============================================= */
/* PROJECT MODAL (POP-UP) */
/* ============================================= */

body.modal-open {
    overflow:hidden; /* Prevent background from scrolling */
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex; /* Changed from none to flex */
    justify-content: center;
    align-items: flex-start;
    z-index: 2000;
    font-family: 'Poppins', sans-serif;
    padding: 2.5vh 2.5vw;
    overflow-y: auto;
    /* --- ANIMATION --- */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0s 0.3s;
}

.modal-overlay.visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease-in-out, visibility 0s;
}

/* Modal Container */
.modal {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 1400px;
    position: relative;
    padding: 45px 35px 30px 35px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    /* --- ANIMATION --- */
    transform: scale(0.97);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.modal-overlay.visible .modal {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.modal-close-btn:hover {
    color: var(--dark-grey);
    transform: rotate(90deg);
}

/* Main Content Grid */
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Two columns */
    gap: 30px;
    align-items: start;
}

/* Left Column: Project Info */
.project-info {
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 2rem;
    margin: 0 0 10px;
    color: #333;
}

.modal-project-type {
    display: inline-block;
    padding: 6px 14px; /* a bit larger */
    border-radius: 8px; /* less rounded */
    font-size: 0.9rem; /* slightly bigger text */
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 12px rgba(0,123,255,0.15);
    border: 1px solid #cce5ff;
    background: rgba(0, 123, 255, 0.15);  /* soft blue overlay */
    color: #004085; /* dark blue text */
    text-align: left; /* align left */
    width: fit-content;
}



.project-info .simple-desc {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
}

/* Tools List */
.tools-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tools-list li {
    background-color: #eef2f7;
    color: #556a85;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.tools-list li:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Project Links */
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.project-links a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background-color: #c8e6c9; /* Darker green background */
    color: #2e7d32; /* Darker green text */
    padding: 5px 20px 5px 5px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.project-links a:hover {
    background-color: #a5d6a7; /* Slightly darker on hover */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.project-links i {
    background-color: #689f38; /* Solid green for icon background */
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%; /* Make it a circle */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 12px; /* Space between icon circle and text */
}

/* Right Column: Image Slider */
.image-slider {
    display: flex;
    flex-direction: column;
}

.video-slider {
    display: flex;
    flex-direction: column;
}

.slider-visual-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden; /* This will contain the slides */
}

.slider-container {
    display: flex;
    /* This enables the smooth sliding animation */
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    padding: 0 2.1rem; /* leaves room for arrows */
    box-sizing: border-box;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; /* CHANGED: Ensures the whole image is visible */
}

.slide video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; /* CHANGED: Ensures the whole image is visible */
}

/* Slider navigation container */
.slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    z-index: 10;
}

/* Minimal arrow buttons */
.slider-nav button {
    background: none; /* no background */
    border: none; /* remove borders */
    color: var(--dark-grey); /* arrow color */
    font-size: 2rem; /* larger and clean */
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

/* Hover effect: color highlight + subtle scaling */
.slider-nav button:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* Optional: add subtle shadow to make arrows visible on light backgrounds */
.slider-nav button {
    text-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.image-caption {
    width: 100%;
    text-align: center;
    padding-top: 10px; /* Add space above caption */
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    min-height: 2.5em; /* Reserve space */
    display: flex;
    align-items: center;
    justify-content: center;
    order: 3; /* Ensure it appears last */
}

/* Detailed Explanation Section */
.detailed-explanation {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 0.2em;
}

.detailed-explanation ol {
  margin-left: 1em;  /* push numbers in */
  padding-left: 0;     /* reset default padding */
}

.detailed-explanation ol li {
    margin-top: 0.2em;
}

/* ============================================= */
/* FOOTER */
/* ============================================= */
.site-footer {
    padding: 20px 40px;
    background-color: var(--light-grey);
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

.footer-name {
    font-weight: 600;
    color: var(--dark-grey);
}

/* ============================================= */
/* SCROLL TO TOP BUTTON */
/* ============================================= */
#scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 999;
}

#scroll-to-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

#scroll-to-top-btn:hover {
    transform: translateY(-3px);
}

/* ============================================= */
/* RESPONSIVE DESIGN */
/* ============================================= */
@media (max-width: 992px) {
    /*body::before {
        clip-path: circle(75% at -15% 50%); /* Pull the circle further left 
    }*/
    .overlay-1 {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #007BFF 0%, #00C6FF 60%, #6A82FB 100%);
        clip-path: circle(420px at -15% 50%);
        z-index: -2;
    }

    #home {
        padding-top: 90px;
        padding-bottom: 90px;
    }
    .home-container {
        gap: 0px;
    }
    .photo-container {
        width: 300px;
        height: 300px;
    }
    .main-name {
        font-size: 2.5rem;
    }
    .current-position {
        font-size: 1.2rem;
    }

    .skills-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "languages"
            "libraries"
            "tools";
        width: 100%;
    }

    .award-description h3 {
        font-size: 1.2rem;
    }

    .award-description p {
        font-size: 0.9rem;
        text-align: justify;
    }

    .modal-grid {
    grid-template-columns: 1fr; /* One column */
    }

    .project-info {
        align-items: center;
    }

    .project-info h3 {
        font-size: 1.8rem;
        text-align: center;
    }

    .project-info .simple-desc {
        text-align: center;
    }

    .modal-project-type {
        width: 100%;
        text-align: center;
    }

    .project-links {
        justify-content: center;
    }

    .project-links a {
        margin-right: 0px;
    }

    .detailed-explanation {
        align-items: center;
    }

    .detailed-explanation p {
        text-align: justify;
    }

    .detailed-explanation h4 {
        text-align: center;
        margin-bottom: 10px;
    }

    .detailed-explanation ol li {
        text-align: justify;
    }
}


@media (max-width: 768px) {
    .content-wrapper {
        padding-left: 0; /* REMOVED padding for mobile layout */
    }

    /* blue shape */
    .overlay-1 {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #007BFF 0%, #00C6FF 60%, #6A82FB 100%);
        clip-path: circle(500px at 50% -50%);
        overflow: hidden;
        z-index: -2;
    }

    .side-nav {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        transform: none;
        background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        padding: 10px 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    .side-nav ul {
        flex-direction: row;
        justify-content: space-around;
        gap: 0;
    }

    .side-nav ul li a {
        width: 45px;
        height: 45px;
        font-size: 18px;
        box-shadow: none;
        color: var(--dark-grey);
        background-color: transparent;
    }
    .side-nav ul li a.active {
        color: white;
        background-color: var(--primary-color);
    }

    #home {
        min-height: 0;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .home-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .home-left, .home-right {
        flex-basis: 100%;
        margin: 0;
        padding: 0;
        width: 100%;
        align-items: center;
    }
    .photo-container {
        margin: 0 auto;
    }

    .section {
        padding: 50px 20px;
    }

    .main-name {
        font-size: 2.5rem;
        align-content: center;
    }
    .current-position {
        font-size: 1.2rem;
        align-content: center;
    }

    .award-container {
        flex-direction: column;
        gap: 20px;
    }

    .award-description h3 {
        font-size: 1.5rem;
        text-align: center;
    }

    .contact-grid {
        align-self: center;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 40px;
        width: auto;
        padding-bottom: 20px;
    }

    .site-footer {
        margin-left: 0;
        margin-bottom: 65px;
    }

    #scroll-to-top-btn {
        bottom: 95px;
    }

}

/* Float animation for social links */
@keyframes float {
    0%,100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}
