html {
    font-size: 80%;
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #10131a 0%, #181c22 100%);
    color: #eaf6ff;
    min-height: 80vh;
    overflow-x: hidden;
    position: relative;
    transition: background 0.4s cubic-bezier(.4,2,.6,1), color 0.4s;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    transition: opacity 0.5s, filter 0.5s;
    mix-blend-mode: lighten;
}

body::before {
    top: 0;
    left: 0;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle at 30% 30%, #2196f3 0%, #111 70%);
    animation: animatedBlob1 18s ease-in-out infinite alternate;
}

body::after {
    bottom: 0;
    right: 0;
    width: 90vw;
    height: 90vw;
    background: radial-gradient(circle at 70% 70%, #00bcd4 0%, #111 70%);
    animation: animatedBlob2 22s ease-in-out infinite alternate;
}

@keyframes animatedBlob1 {
    0% {
        transform: scale(1) translate(0, 0) rotate(0deg);
        opacity: 0.18;
    }
    30% {
        transform: scale(1.1, 0.95) translate(8vw, 4vw) rotate(10deg);
        opacity: 0.22;
    }
    60% {
        transform: scale(0.95, 1.1) translate(4vw, 10vw) rotate(-8deg);
        opacity: 0.15;
    }
    100% {
        transform: scale(1.05) translate(0, 0) rotate(0deg);
        opacity: 0.18;
    }
}

@keyframes animatedBlob2 {
    0% {
        transform: scale(1) translate(0, 0) rotate(0deg);
        opacity: 0.18;
    }
    40% {
        transform: scale(1.12, 0.9) translate(-8vw, -6vw) rotate(-10deg);
        opacity: 0.23;
    }
    80% {
        transform: scale(0.95, 1.08) translate(-12vw, 8vw) rotate(7deg);
        opacity: 0.13;
    }
    100% {
        transform: scale(1.03) translate(0, 0) rotate(0deg);
        opacity: 0.18;
    }
}

.container {
    width: 92%;
    max-width: 960px;
    margin: 0 auto;
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(33,150,243,0.10), 0 1.5px 8px 0 #111;
    background: rgba(33, 150, 243, 0.04);
    backdrop-filter: blur(8px);
    margin-bottom: 2rem;
    padding: 2rem 1.2rem;
    transition: background 0.4s, box-shadow 0.4s;
}

.navbar {
    background: rgba(17, 17, 17, 0.85);
    color: #fff;
    padding: 0.1rem 0; /* Smaller navbar height */
    min-height: 38px;
    box-shadow: 0 8px 32px 0 rgba(33,150,243,0.10), 0 1.5px 8px 0 #111;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(18px);
    border-bottom: 1.5px solid rgba(64,201,255,0.10);
    border-radius: 0 0 24px 24px;
    will-change: transform;
    transition: transform 0.35s cubic-bezier(.4,2,.6,1), background 0.4s;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Place hamburger next to logo */
.logo {
    display: flex;
    align-items: center;
}

.nav-toggle {
    display: none;
    margin-left: 1rem;
    /* ...existing code... */
}

@media (max-width: 975px) {
    .nav-toggle {
        display: block;
        position: static;
        margin-left: 1rem;
        /* ...existing code... */
    }
    .navbar .container {
        flex-wrap: nowrap;
    }
    .logo {
        margin-right: 0.5rem;
    }
    /* ...existing code... */
}

.navbar .logo {
    font-size: 2.5rem; /* Bigger logo */
    font-weight: 900;
    color: #40c9ff;
    text-decoration: none;
    letter-spacing: 1px;
    text-shadow: none;
    transition: color 0.2s, text-shadow 0.2s;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.2rem; /* Reduce gap for smaller navlinks */
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: #eaf6ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem; /* Smaller navlinks */
    letter-spacing: 0.01em;
    padding: 0.4rem 1rem; /* Less padding */
    border-radius: 9px;
    background: rgba(33,150,243,0.10);
    box-shadow: 0 2px 8px rgba(33,150,243,0.08);
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.nav-links li a:hover,
.nav-links li a:focus {
    background: linear-gradient(90deg, #2196f3 0%, #00bcd4 100%);
    color: #fff;
    box-shadow: 0 4px 24px #2196f3, 0 2px 8px #40c9ff44;
    transform: translateY(-2px) scale(1.05);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.4rem; /* Bigger theme toggle */
    cursor: pointer;
    text-shadow: 0 0 8px #2196f3, 0 0 16px #40c9ff;
    transition: text-shadow 0.2s, color 0.2s;
    border-radius: 9px;
    padding: 0.6rem 1.5rem;
    background: rgba(33,150,243,0.10);
    /* Enlarge border by 10% */
    border: 1.65px solid #2196f3;
}

.nav-toggle:hover,
.nav-toggle:focus {
    color: #40c9ff;
    text-shadow: 0 0 16px #40c9ff, 0 0 32px #2196f3;
}

.hero,
#welcome.container {
    position: relative;
    min-height: 52vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.2rem 2rem 2.4rem 2rem;
    text-align: center;
    overflow: hidden;
    background: rgba(33, 150, 243, 0.06);
    border-radius: 25px;
    box-shadow: 0 8px 32px 0 rgba(64,201,255,0.18), 0 1.5px 8px 0 #111;
    border: 1.5px solid rgba(64,201,255,0.12);
    transition: background 0.4s, box-shadow 0.4s;
}

.hero-bg-shape {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(circle at 60% 40%, #2196f3 0%, #00bcd4 60%, transparent 100%);
    opacity: 0.32;
    z-index: 0;
    filter: blur(30px);
    pointer-events: none;
    animation: heroShapeMove 10s ease-in-out infinite alternate;
}

@keyframes heroShapeMove {
    0% {
        transform: translateX(-50%) scale(1) rotate(0deg);
        opacity: 0.22;
    }
    100% {
        transform: translateX(-48%) scale(1.08) rotate(8deg);
        opacity: 0.28;
    }
}

.hero .container {
    position: relative;
    z-index: 1;
    background: rgba(33, 150, 243, 0.18);
    border-radius: 32px;
    box-shadow: 0 8px 32px 0 rgba(64,201,255,0.18), 0 1.5px 8px 0 #111;
    border: 1.5px solid rgba(64,201,255,0.18);
    padding: 3.5rem 2.5rem 3rem 2.5rem;
    max-width: 560px;
    transition: background 0.4s, box-shadow 0.4s;
}

.hero h1 {
    font-size: 2.1rem;
    font-weight: 900;
    margin-bottom: 1.1rem;
    color: #fff;
    text-shadow: 0 2px 24px #2196f3, 0 1px 2px #000;
    letter-spacing: -1.2px;
}

.hero p {
    font-size: 1.08rem;
    margin-bottom: 2rem;
    color: #b3e5fc;
    text-shadow: 0 1px 8px #2196f3;
    font-weight: 400;
    line-height: 2.2;
    /* Add spacing between sentences */
    display: block;
    white-space: pre-line;
}

.btn {
    background: linear-gradient(90deg, #40c9ff 0%, #2196f3 100%);
    color: #fff;
    padding: 0.88rem 2.4rem;
    border: 2px solid #40c9ff;
    border-radius: 29px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 24px #2196f3, 0 2px 8px rgba(33,150,243,0.12);
    transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 1s, border 0.2s;
    letter-spacing: 1.2px;
    position: relative;
    z-index: 1;
}

.btn:hover, .btn:focus {
    background: linear-gradient(90deg, #00fff7 0%, #2196f3 100%);
    border-color: #00fff7;
    color: #fff;
    transform: translateY(-2px) scale(1.07);
    box-shadow: 0 12px 32px #00fff7, 0 2px 8px #2196f3;
    animation: btnGlow 1s forwards;
}

@keyframes btnGlow {
    0% {
        box-shadow: 0 0 0px 0 #00fff7, 0 2px 8px #2196f3;
    }
    60% {
        box-shadow: 0 0 24px 12px #00fff7, 0 2px 8px #2196f3;
    }
    100% {
        box-shadow: 0 0 16px 8px #00fff7, 0 2px 8px #2196f3;
    }
}

/* Add vertical gap between main sections */
section.container {
    background: rgba(255,255,255,0.07);
    border-radius: 22px;
    box-shadow: 0 4px 32px 0 rgba(33,150,243,0.10);
    margin-bottom: 3.5rem;
    margin-top: 3.5rem;
    padding: 2.5rem 2.2rem;
    transition: background 0.4s, box-shadow 0.4s;
}

section.container:first-of-type {
    margin-top: 2.5rem;
}

section.container h2 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #40c9ff;
    letter-spacing: 1.2px;
    text-shadow: 0 2px 18px #2196f3, 0 1px 2px #000;
}

section.container h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: #40c9ff;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 8px #2196f3;
}

section.container p,
section.container li {
    font-size: 0.95rem;
    color: #eaf6ff;
    opacity: 0.96;
}

section.container ul {
    gap: 1.2rem;
}

section.container a {
    font-weight: 600;
    border-radius: 8px;
    padding: 0.2rem 0.7rem;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

section.container a:hover,
section.container a:focus {
    background: linear-gradient(90deg, #2196f3 0%, #40c9ff 100%);
    color: #fff;
    box-shadow: 0 2px 12px #2196f3;
}

form input,
form textarea {
    border-radius: 12px !important;
    border: 1.5px solid #2196f3 !important;
    background: rgba(33,150,243,0.10) !important;
    color: #eaf6ff !important;
    font-size: 1.08rem !important;
    box-shadow: 0 2px 8px #2196f344;
    padding: 1rem 1.2rem !important;
    margin-bottom: 0.5rem;
    transition: border 0.2s, box-shadow 0.2s;
}

/* Remove browser autofill background for all input fields */
input:-webkit-autofill,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(33,150,243,0.10) inset !important;
    box-shadow: 0 0 0 1000px rgba(33,150,243,0.10) inset !important;
    background-color: rgba(33,150,243,0.10) !important;
    color: #eaf6ff !important;
    -webkit-text-fill-color: #eaf6ff !important;
    transition: background-color 5000s ease-in-out 0s;
}

form input:focus,
form textarea:focus {
    border-color: #40c9ff !important;
    box-shadow: 0 0 0 2px #40c9ff44;
    outline: none;
}

form button.btn {
    margin-top: 0.5rem;
    font-size: 0.88rem;
    padding: 0.7rem 1.7rem;
    border-radius: 18px;
}

.footer {
    background: #181c22;
    color: #eaf6ff;
    padding: 1.7rem 0 0.9rem 0;
    margin-top: 4rem;
    font-size: 0.88rem;
    border-radius: 20px 20px 0 0;
    background: rgba(24,28,34,0.98);
    transition: background 0.4s;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
}

.footer-content p {
    font-size: 3rem;
    color: #40c9ff;
    text-shadow: 0 2px 18px #2196f3, 0 1px 2px #000;
}

.social-links {
    display: flex;
    gap: 1.2rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(33,150,243,0.22);
    border-radius: 12px;
    width: 38px;
    height: 38px;
    color: #40c9ff;
    border: 2px solid #2196f3;
    box-shadow: 0 2px 16px #2196f3;
    transition: background 0.18s, color 0.18s, transform 0.15s;
    font-size: 1.1rem;
}

.social-links a:hover,
.social-links a:focus {
    background: linear-gradient(90deg, #2196f3 0%, #00bcd4 100%);
    color: #fff;
    border-color: #00fff7;
    box-shadow: 0 0 32px 12px #00fff7;
}

.social-links svg {
    display: block;
    width: 24px;
    height: 24px;
}

.theme-toggle {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    margin-left: 0.9rem;
    font-size: 2.4rem; /* Bigger theme toggle */
    color: #40c9ff;
    transition: color 0.2s;
    position: relative;
    z-index: 101;
    display: flex;
    align-items: center;
    padding: 0.6rem 1.5rem;
    /* Remove oval border and background */
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.theme-toggle:hover,
.theme-toggle:focus {
    color: #fff;
}

.theme-label {
    color: #40c9ff !important;
    text-shadow: 0 0 8px #2196f3, 0 0 16px #40c9ff;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: text-shadow 0.2s, color 0.2s;
    margin-left: 7px;
    font-size: 0.95rem;
}

.theme-toggle:hover .theme-label,
.theme-toggle:focus .theme-label {
    color: #fff !important;
    text-shadow: 0 0 16px #40c9ff, 0 0 32px #2196f3;
}

.theme-switch {
    width: 30px;
    height: 17px;
    border-radius: 12px;
    display: inline-block;
    position: relative;
    transition: background 0.3s;
    box-shadow: 0 2px 16px #2196f344;
}

.theme-slider {
    position: absolute;
    top: 2.5px;
    left: 2.5px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #40c9ff 60%, #2196f3 100%);
    border-radius: 50%;
    transition: left 0.35s cubic-bezier(.4,2,.6,1), background 0.35s;
    box-shadow: 0 2px 16px #2196f355;
}

body.light-theme .theme-switch {
    background: #eaf6ff;
}

body.light-theme .theme-slider {
    left: 19px;
    background: linear-gradient(135deg, #ffd740 60%, #fffde4 100%);
    box-shadow: 0 2px 8px #ffd74055;
}

body.light-theme {
    background: #f5faff;
    color: #1a222c; /* Darker text */
    transition: background 0.4s cubic-bezier(.4,2,.6,1), color 0.4s;
}

body.light-theme .navbar {
    background: rgba(255,255,255,0.97);
    color: #1a222c; /* Darker */
    box-shadow: 0 2px 16px rgba(33,150,243,0.10);
    border-bottom: 1.5px solid #b3e5fc;
    border-radius: 0 0 24px 24px;
}

body.light-theme .navbar .logo {
    color: #1769aa; /* Slightly darker blue */
    text-shadow: none;
}

body.light-theme .nav-links li a {
    color: #1a222c !important; /* Darker */
    background: rgba(33,150,243,0.06);
}

body.light-theme .nav-links li a:hover,
body.light-theme .nav-links li a:focus {
    background: linear-gradient(90deg, #2196f3 0%, #00bcd4 100%);
    color: #fff;
}

body.light-theme .hero {
    background: #f5faff;
}

body.light-theme .hero-bg-shape {
    opacity: 0.18;
}

body.light-theme .hero .container {
    background: rgba(33, 150, 243, 0.09);
    border: 1.5px solid rgba(64,201,255,0.10);
    border-radius: 32px;
    box-shadow: 0 8px 32px 0 #b3e5fc44, 0 1.5px 8px 0 #fff;
}

body.light-theme .hero h1 {
    color: #181c22;
    text-shadow: 0 2px 16px #b3e5fc, 0 1px 2px #fff;
}

body.light-theme .hero p {
    color: #2196f3;
    text-shadow: 0 1px 8px #b3e5fc;
}

body.light-theme .btn {
    background: linear-gradient(90deg, #2196f3 0%, #00bcd4 100%);
    color: #fff;
    border: 1.5px solid #2196f3;
    box-shadow: 0 2px 16px #b3e5fc, 0 2px 8px rgba(33,150,243,0.10);
}

body.light-theme .btn:hover, 
body.light-theme .btn:focus {
    background: linear-gradient(90deg, #00bcd4 0%, #2196f3 100%);
    border-color: #00bcd4;
}

body.light-theme .footer {
    background: #f5faff;
    color: #1a222c;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 24px #b3e5fc;
    border-top: 1.5px solid #2196f3;
    /* Remove/override any dark background */
}

/* --- Modern visible animated background shapes --- */
.animated-bg-shapes {
    display: none !important;
}
.bg-shape {
    display: none !important;
}

/* Remove keyframes for moveShape1, moveShape2, moveShape3 if not used */

/* Modern Welcome Section */
#welcome.container {
    background: rgba(33, 150, 243, 0.10);
    border-radius: 36px;
    box-shadow: 0 12px 48px 0 rgba(64,201,255,0.18), 0 2px 12px 0 #111;
    border: 8px solid rgba(64,201,255,0.28);
    padding: 5rem 2.5rem 4rem 2.5rem;
    max-width: 700px;
    margin: 3.5rem auto 2.5rem auto;
    backdrop-filter: blur(18px);
    text-align: center;
    position: relative;
    z-index: 2;
    transition: background 0.4s, box-shadow 0.4s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#welcome-header {
    /* Ensures header is at the top */
    margin-bottom: 2.5rem;
}

#welcome-description {
    /* Centers description in the middle */
    flex: 1 1 auto;
    margin-bottom: 2.5rem;
    width: 100%;
}

#welcome-action {
    /* Button at the bottom */
    margin-top: auto;
}

#welcome h1 {
    font-size: 3.2rem !important;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: #40c9ff !important;
    text-shadow: 0 4px 32px #2196f3, 0 1px 2px #000;
    letter-spacing: -1.
    display flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#welcome-header {
    /* Ensures header is at the top */
    margin-bottom: 2.5rem;
}

#welcome-description {
    /* Centers description in the middle */
    flex: 1 1 auto;
    margin-bottom: 2.5rem;
    width: 100%;
}

#welcome-action {
    /* Button at the bottom */
    margin-top: auto;
}

#welcome h1 {
    font-size: 3.2rem !important;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: #40c9ff !important;
    text-shadow: 0 4px 32px #2196f3, 0 1px 2px #000;
    letter-spacing: -1.5px;
    line-height: 1.1;
}

#welcome p {
    font-size: 1.35rem !important;
    margin-bottom: 2.5rem;
    color: #b3e5fc !important;
    text-shadow: 0 1px 8px #2196f3;
    font-weight: 400;
    line-height: 2.2;
    /* Add spacing between sentences */
    display: block;
    white-space: pre-line;
}

#welcome .btn {
    margin-top: 1.2rem;
    font-size: 1.22rem;
    padding: 1.1rem 3.2rem;
    border-radius: 40px;
    font-weight: 800;
    letter-spacing: 1.2px;
    box-shadow: 0 8px 32px #2196f3, 0 2px 8px rgba(33,150,243,0.12);
    background: linear-gradient(90deg, #40c9ff 0%, #2196f3 100%);
    border: 2px solid #40c9ff;
    transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 1s, border 0.2s;
}

#welcome .btn:hover, #welcome .btn:focus {
    background: linear-gradient(90deg, #00fff7 0%, #2196f3 100%);
    border-color: #00fff7;
    color: #fff;
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 16px 40px #00fff7, 0 2px 8px #2196f3;
    animation: btnGlow 1s forwards;
}

/* Light theme adjustments for welcome section */
body.light-theme #welcome.container {
    background: rgba(33,150,243,0.04);
    border: 8px solid #b3e5fc;
    box-shadow: 0 8px 32px #b3e5fc44, 0 2px 12px #fff;
}

body.light-theme #welcome h1 {
    color: #2196f3 !important;
    text-shadow: 0 2px 24px #b3e5fc, 0 1px 2px #fff;
}

body.light-theme #welcome p {
    color: #2196f3 !important;
    text-shadow: 0 1px 8px #b3e5fc;
}

body.light-theme #welcome .btn {
    background: linear-gradient(90deg, #2196f3 0%, #00bcd4 100%);
    border: 2px solid #2196f3;
    color: #fff !important;
    box-shadow: 0 2px 16px #b3e5fc, 0 2px 8px rgba(33,150,243,0.10);
}

body.light-theme #welcome .btn:hover, 
body.light-theme #welcome .btn:focus {
    background: linear-gradient(90deg, #00bcd4 0%, #2196f3 100%);
    border-color: #00bcd4;
}

/* Make all description texts (about, welcome, contact, projects, reviews) consistent with reviews box text */
#welcome-description p,
#about p,
#contact > p,
#projects .container > div > div > p,
#reviews .container > div > div > p,
section.container p {
    font-size: 1.1rem !important;
    color: #b3e5fc !important;
    font-family: inherit !important;
    margin-bottom: 1.2rem;
    text-shadow: none !important;
    font-weight: 400 !important;
    line-height: 1.8 !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .container {
        max-width: 80vw;
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }
}

@media (max-width: 900px) {
    .container {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }
    section.container {
        padding: 1.6rem 1.2rem;
    }
    #welcome.container {
        padding: 1.8rem 0.7rem 1.2rem 0.7rem;
    }
    .hero .container {
        padding: 1.6rem 0.7rem;
    }
    .footer-content {
        gap: 0.7rem;
    }
    .footer-content p {
        font-size: 2rem;
    }
    #welcome-description p,
    #welcome-description,
    #contact > p {
        font-size: 1rem !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .navbar .logo {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    .nav-links {
        width: 70vw;
        max-width: 220px;
        right: 0.3rem;
        padding: 0.7rem 0.3rem;
    }
    .nav-links li a {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
    .nav-toggle {
        font-size: 1.1rem; /* Smaller hamburger */
        top: 0.6rem;
        right: 0.7rem;
        padding: 0.3rem 0.7rem;
    }
    #welcome.container {
        padding: 1.2rem 0.3rem 0.8rem 0.3rem;
        min-width: 0;
        max-width: 90vw;
    }
    #welcome h1 {
        font-size: 1.8rem !important;
    }
    #welcome p {
        font-size: 1rem !important;
    }
    .btn, #welcome .btn {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
    .footer-content {
        font-size: 0.8rem;
    }
    .social-links a {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 88%;
    }
    .container,
    section.container,
    #welcome.container {
        padding: 0.8rem 0.5rem 1rem 0.5rem;
        max-width: 100vw;
    }
    #welcome h1 {
        font-size: 1.8rem !important;
        margin-bottom: 0.4rem;
    }
    #welcome p {
        font-size: 1rem !important;
        margin-bottom: 0.7rem;
    }
    .btn, #welcome .btn {
        font-size: 0.77rem;
        padding: 0.5rem 0.7rem;
    }
    .footer-content {
        font-size: 0.77rem;
        gap: 0.3rem;
    }
    .footer-content p {
        font-size: 1.1rem;
    }
    #welcome-description p,
    #welcome-description,
    #contact > p {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 400px) {
    .footer-content p {
        font-size: 0.7rem;
    }
    #welcome-description p,
    #welcome-description,
    #contact > p {
        font-size: 1rem !important;
    }
}

/* Scroll to Top Button */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 120;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1.4rem;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #40c9ff 0%, #2196f3 100%);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 4px 18px 0 rgba(33,150,243,0.18), 0 1.5px 8px 0 #111;
    transition: background 0.25s, transform 0.18s, box-shadow 0.25s, color 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0.92;
}

#scrollTopBtn:hover, #scrollTopBtn:focus {
    background: linear-gradient(135deg, #00fff7 0%, #2196f3 100%);
    color: #181c22;
    transform: translateY(-4px) scale(1.12);
    box-shadow:
        
        0 0 24px 8px #40c9ff,
        0 0 48px 16px #40c9ff88,
        0 2px 8px #2196f3;
    opacity: 1;
}

/* Responsive adjustments for scroll to top button */
@media (max-width: 600px) {
    #scrollTopBtn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
        font-size: 1rem;
        bottom: 12px;
        right: 12px;
    }
}

/* ...existing code... */
.theme-toggle {
    font-size: 2.4rem; /* Bigger theme toggle */
    padding: 0.6rem 1.5rem;
}

/* Show desktop theme toggle by default */
#themeToggle {
    display: inline-flex;
}

/* Hide desktop theme toggle in hamburger/mobile */
@media (max-width: 975px) {
    #themeToggle {
        display: none !important;
    }
    .theme-toggle-mobile {
        display: block !important;
        width: 100%;
        margin-top: 1.2rem;
        text-align: right;
    }
    .theme-toggle-mobile .theme-toggle {
        width: 100%;
        justify-content: flex-end;
        border-radius: 0;
        background: none;
        box-shadow: none;
        font-size: 2.1rem;
        padding: 0.7rem 1.2rem;
        color: #40c9ff;
        border: none;
        margin: 0;
    }
    .theme-toggle-mobile .theme-toggle:hover,
    .theme-toggle-mobile .theme-toggle:focus {
        color: #fff;
        background: linear-gradient(90deg, #2196f3 0%, #00bcd4 100%);
    }
}

/* 3D Rotating Cube Background */
.giant-cube-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.giant-cube {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 220px;
    height: 220px;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) rotateX(30deg) rotateY(30deg);
    animation: rotateCube 18s linear infinite;
    opacity: 0.13;
    filter: blur(0.5px);
}

.giant-cube .face {
    position: absolute;
    width: 220px;
    height: 220px;
    background: linear-gradient(135deg, #2196f3 60%, #40c9ff 100%);
    opacity: 0.7;
    border: 2px solid #40c9ff44;
    box-shadow: 0 8px 32px #2196f344;
}

.giant-cube .face-front  { transform: rotateY(0deg) translateZ(110px);}
.giant-cube .face-back   { transform: rotateY(180deg) translateZ(110px);}
.giant-cube .face-right  { transform: rotateY(90deg) translateZ(110px);}
.giant-cube .face-left   { transform: rotateY(-90deg) translateZ(110px);}
.giant-cube .face-top    { transform: rotateX(90deg) translateZ(110px);}
.giant-cube .face-bottom { transform: rotateX(-90deg) translateZ(110px);}

@keyframes rotateCube {
    0%   { transform: translate(-50%, -50%) rotateX(30deg) rotateY(0deg);}
    100% { transform: translate(-50%, -50%) rotateX(30deg) rotateY(360deg);}
}

/* ...existing code... */
@media (max-width: 975px) {
    /* ...existing code... */
    body.light-theme .nav-links {
        background: #fff !important;
    }
    body.light-theme .nav-links li a {
        color: #181c22 !important;
        background: rgba(33,150,243,0.06) !important;
    }
    body.light-theme .nav-links li a:hover,
    body.light-theme .nav-links li a:focus {
        color: #fff !important;
        background: linear-gradient(90deg, #2196f3 0%, #00bcd4 100%) !important;
    }
    /* ...existing code... */
}

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

body {
  font-family: 'Segoe UI', sans-serif;
  overflow-x: hidden;
  background-color: #111;
  color: white;
  height: 100vh;
  position: relative;
}

/* Background container */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

/* Cube styles */
.cube {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
  animation: floatCube linear infinite;
  border-radius: 4px;
}

@keyframes floatCube {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) rotate(360deg);
    opacity: 0;
  }
}

main {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
  text-align: center;
}

/* Project/About/Review Box Hover Effect */
#projects .container > div > div,
#about .container > div,
#reviews .container > div > div {
    transition: transform 0.18s cubic-bezier(.4,2,.6,1), box-shadow 0.18s, background 0.18s;
    will-change: transform, box-shadow;
}

#projects .container > div > div:hover,
#about .container > div:hover,
#reviews .container > div > div:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 8px 32px #40c9ff55, 0 2px 12px #2196f366;
    background: rgba(33,150,243,0.14);
    z-index: 2;
}

/* Section appear animation: reversal of fading (fade in from transparent and blurred, to sharp and visible) */
.section-hidden {
    opacity: 1;
    filter: blur(18px);
    transition: opacity 3s cubic-bezier(0.4,0,0.2,1), filter 3s cubic-bezier(0.4,0,0.2,1);
    will-change: opacity, filter;
}

.section-visible {
    opacity: 1;
    filter: blur(0);
}

canvas {
      position: fixed;
      top: 0;
      left: 0;
      z-index: -1;
    }

/* Make texts darker in light theme */
body.light-theme,
body.light-theme section.container,
body.light-theme #welcome-description p,
body.light-theme #about p,
body.light-theme #contact > p,
body.light-theme #projects .container > div > div > p,
body.light-theme #reviews .container > div > div > p,
body.light-theme section.container p,
body.light-theme section.container li {
    color: #222f3e !important;
}

body.light-theme input,
body.light-theme textarea {
    color: #222f3e !important;
    background: rgba(33,150,243,0.06) !important;
    border-color: #2196f3 !important;
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
    color: #1769aa !important;
    opacity: 0.8;
}