html {
    scroll-behavior: smooth;
}

:root {
    /* Light theme (default) */
    --bg-dark: #e6e7ee;
    --bg-light: #e6e7ee;
    --bg-darker: #d1d9e6;
    --text-primary: #4f5d75;
    --text-secondary: #6c7b95;
    --accent: #a8dadc;
    --accent-hover: #81c3c6;
    --shadow-light: #ffffff;
    --shadow-dark: #b8c5d1;
    --transition-speed: 0.3s;
    --tile-width: 170px;
    --tile-height: 220px;
    --tile-gap: 3rem;
    --neumorphic-distance: 8px;
    --neumorphic-blur: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 1rem;
    font-family: 'Baloo 2', 'Courier New', monospace;
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Fixed Spinning Geometric Shapes Background */
.bubble-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: var(--bg-light);
    box-shadow:
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light),
        8px 8px 20px var(--shadow-dark),
        -8px -8px 20px var(--shadow-light);
    opacity: 0.4;
    will-change: transform, border-radius;
}

/* Circle shapes */
.shape-circle {
    border-radius: 50%;
    animation: spin-morph-circle 15s infinite ease-in-out;
}

/* Soft rounded square shapes */
.shape-rounded-square {
    border-radius: 35%;
    animation: spin-morph-rounded-square 14s infinite ease-in-out;
}

/* Soft triangle shapes */
.shape-soft-triangle {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 50% 50% 50% 10%;
    box-shadow:
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light),
        8px 8px 20px var(--shadow-dark),
        -8px -8px 20px var(--shadow-light);
    animation: spin-morph-soft-triangle 16s infinite ease-in-out;
}

/* Oval shapes */
.shape-oval {
    border-radius: 50%;
    animation: spin-morph-oval 18s infinite ease-in-out;
}

/* Positioning for each shape */
.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 8%;
    animation-delay: 0s;
}

.shape-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    left: 15%;
    animation-delay: -3s;
}

.shape-3 {
    top: 40%;
    left: 25%;
    animation-delay: -6s;
}

.shape-4 {
    top: 15%;
    left: 45%;
    animation-delay: -9s;
}

.shape-5 {
    width: 120px;
    height: 120px;
    top: 70%;
    left: 40%;
    animation-delay: -12s;
}

.shape-6 {
    width: 90px;
    height: 90px;
    top: 25%;
    left: 65%;
    animation-delay: -15s;
}

.shape-7 {
    top: 55%;
    left: 70%;
    animation-delay: -18s;
}

.shape-8 {
    top: 10%;
    left: 85%;
    animation-delay: -21s;
}

.shape-9 {
    top: 45%;
    left: 88%;
    animation-delay: -24s;
}

.shape-10 {
    width: 70px;
    height: 50px;
    top: 80%;
    left: 80%;
    animation-delay: -27s;
}

.shape-11 {
    width: 80px;
    height: 80px;
    top: 35%;
    left: 90%;
    animation-delay: -30s;
}

.shape-12 {
    width: 60px;
    height: 60px;
    top: 75%;
    left: 5%;
    animation-delay: -33s;
}

/* Animation keyframes for soft rounded shapes */
@keyframes spin-morph-circle {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
        border-radius: 50%;
    }

    25% {
        transform: rotate(90deg) scale(1.15);
        border-radius: 40%;
    }

    50% {
        transform: rotate(180deg) scale(0.9);
        border-radius: 45%;
    }

    75% {
        transform: rotate(270deg) scale(1.1);
        border-radius: 35%;
    }
}

@keyframes spin-morph-rounded-square {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
        border-radius: 35%;
    }

    50% {
        transform: rotate(180deg) scale(1.2);
        border-radius: 50%;
    }
}

@keyframes spin-morph-soft-triangle {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
        border-radius: 50% 50% 50% 10%;
    }

    25% {
        transform: rotate(90deg) scale(1.1);
        border-radius: 50% 50% 10% 50%;
    }

    50% {
        transform: rotate(180deg) scale(0.9);
        border-radius: 50% 10% 50% 50%;
    }

    75% {
        transform: rotate(270deg) scale(1.05);
        border-radius: 10% 50% 50% 50%;
    }
}

@keyframes spin-morph-oval {

    0%,
    100% {
        transform: rotate(0deg) scale(1) scaleX(1.3);
        border-radius: 50%;
    }

    25% {
        transform: rotate(90deg) scale(1.1) scaleX(1.1);
        border-radius: 45%;
    }

    50% {
        transform: rotate(180deg) scale(0.9) scaleX(1.4);
        border-radius: 50%;
    }

    75% {
        transform: rotate(270deg) scale(1.05) scaleX(1.2);
        border-radius: 40%;
    }
}

.hidden.mobile {
    display: none;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.skills.backup {
    display: none;
}

.skills.backup.hidden {
    display: none;
}

/* Header */
.header {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: auto;
    background-color: var(--bg-light);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "profile"
        "nav";
    align-items: center;
    justify-items: center;
    gap: 1.5rem;
    grid-template-rows: auto auto;
    box-shadow:
        var(--neumorphic-distance) var(--neumorphic-distance) var(--neumorphic-blur) var(--shadow-dark),
        calc(-1 * var(--neumorphic-distance)) calc(-1 * var(--neumorphic-distance)) var(--neumorphic-blur) var(--shadow-light);
    transition: all var(--transition-speed) ease;
    border-radius: 25px;
    margin: 2rem auto;
}

.header:hover {
    box-shadow:
        calc(var(--neumorphic-distance) + 2px) calc(var(--neumorphic-distance) + 2px) calc(var(--neumorphic-blur) + 4px) var(--shadow-dark),
        calc(-1 * var(--neumorphic-distance) - 2px) calc(-1 * var(--neumorphic-distance) - 2px) calc(var(--neumorphic-blur) + 4px) var(--shadow-light);
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.8rem;
    transition: all var(--transition-speed) ease;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
}

.social-links a:hover {
    color: var(--accent);
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
    transform: translateY(2px);
}

.profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    transition: all var(--transition-speed) ease-in-out;
    box-shadow:
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light),
        6px 6px 16px var(--shadow-dark),
        -6px -6px 16px var(--shadow-light);
    border: none;
    margin-bottom: 1rem;
    image-rendering: -webkit-optimize-contrast;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow:
        inset 8px 8px 16px var(--shadow-dark),
        inset -8px -8px 16px var(--shadow-light),
        8px 8px 20px var(--shadow-dark),
        -8px -8px 20px var(--shadow-light);
}


.about-me {
    grid-area: profile;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    max-width: 500px;
}

.about-me h1 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin: 0;
    transition: color var(--transition-speed) ease;
    font-weight: 600;
}

.about-me h1:hover {
    color: var(--accent);
}

.about-me h3 {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0 2rem 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

section {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 25px;
    box-shadow:
        var(--neumorphic-distance) var(--neumorphic-distance) var(--neumorphic-blur) var(--shadow-dark),
        calc(-1 * var(--neumorphic-distance)) calc(-1 * var(--neumorphic-distance)) var(--neumorphic-blur) var(--shadow-light);
    transition: all var(--transition-speed) ease;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1,
h2,
h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color var(--transition-speed) ease;
}

h1:hover,
h2:hover,
h3:hover {
    color: var(--accent);
}

.employment-tile {
    background-color: var(--bg-light);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 1rem;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    transition: all var(--transition-speed) ease-in-out;
}

.employment-tile.current-place::before {
    content: "Current";
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--accent);
    color: var(--bg-light);
    padding: 0.3rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow:
        2px 2px 4px var(--shadow-dark),
        -2px -2px 4px var(--shadow-light);
}

.employment-tile:hover {
    transform: translateY(-2px);
    box-shadow:
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
}

.employment-tile img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin-right: 1rem;
    transition: transform var(--transition-speed) ease-in-out;
}

.employment-tile:hover img {
    transform: scale(1.1);
}

#employment {
    grid-area: employment;
}

#education {
    grid-area: education;
}

.employment-tile li {
    font-size: 0.9rem;
}

/* Skills */
.skills-grid {
    margin-left: 0;
    margin-right: 0;
    margin-top: 0.5rem;
    margin-bottom: 4rem;
    padding: 2rem;
    padding-right: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--tile-width), 1fr));
    gap: var(--tile-gap);
    row-gap: 2rem;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    max-height: 390px;
    /* Adjust this value as needed */
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.skills-grid.expanded {
    max-height: 3000px;
    /* Adjust this value as needed */
    margin-bottom: -2rem;
}

.skill-tile {
    top: -1rem;
    background-color: var(--bg-light);
    border-radius: 15px;
    padding: 1.25rem;
    text-align: center;
    transition: all var(--transition-speed) ease-in-out;
    position: relative;
    width: 100%;
    height: auto;
    z-index: 1000;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
}

.skill-tile.dark-tile {
    background-color: var(--bg-dark);
}

.skill-tile.dark-tile::before {
    visibility: hidden;
}

.skill-tile::before {
    content: "Skill";
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: var(--accent);
    color: var(--bg-light);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2000;
    box-shadow:
        2px 2px 4px var(--shadow-dark),
        -2px -2px 4px var(--shadow-light);
}

.skill-tile:hover {
    transform: translateY(-3px);
    box-shadow:
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light),
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
    background-color: var(--accent);
    color: var(--text-primary);
    z-index: 2000;
}

.skill-tile:hover h3 {
    color: var(--bg-dark);
}

.skill-tile img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: transform var(--transition-speed) ease-in-out;
}

.skill-tile:hover img {
    transform: scale(1.1) rotate(5deg);
}

.skill-tile.degree-tile {
    background-color: var(--text-primary);
    color: var(--bg-dark);
    border: 2px solid var(--bg-light);
    position: relative;
    overflow: hidden;
}

.skill-tile.degree-tile::before {
    content: "Degree";
}

.skill-tile.degree-tile h3 {
    color: var(--bg-dark);
    /* Ensure the text is visible */
    transition: color var(--transition-speed) ease;
}

.skill-tile.degree-tile:hover {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.skill-tile.degree-tile:hover h3 {
    color: var(--text-primary);
}

.skill-tile.a-level-tile {
    background-color: var(--text-primary);
    color: var(--bg-dark);
    border: 2px solid var(--bg-light);
    position: relative;
    overflow: hidden;
}

.skill-tile.a-level-tile::before {
    content: "A-Levels";
}

.skill-tile.a-level-tile h3 {
    color: var(--bg-dark);
    /* Ensure the text is visible */
    transition: color var(--transition-speed) ease;
}

.skill-tile.a-level-tile:hover {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.skill-tile.a-level-tile:hover h3 {
    color: var(--text-primary);
}

#projects {
    grid-area: projects;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    row-gap: 1rem;
    /* Adjusted vertical gap */
}

.project-tile {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    background-color: var(--bg-light);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-speed) ease-in-out;
    position: relative;
    width: 100%;
    height: var(--tile-height);
    box-shadow:
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
}

.project-tile:hover,
.project-tile.selected {
    transform: translateY(-4px);
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light),
        12px 12px 24px var(--shadow-dark),
        -12px -12px 24px var(--shadow-light);
}

.project-tile.selected {
    border: 2px solid var(--accent);
}

.project-tile img {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) ease-in-out;
    display: block;
}

.project-tile:hover img,
.project-tile.selected img {
    transform: scale(1.1);
}

.project-tile h3 {
    padding: 1rem;
    margin: 0;
    background-color: rgba(30, 30, 30, 0.8);
    position: absolute;
    bottom: 0;
    width: 100%;
    transition: all var(--transition-speed) ease-in-out;
    color: var(--text-secondary);
}

.project-tile:hover h3,
.project-tile.selected h3 {
    background-color: var(--accent);
    color: var(--bg-dark);
}

.project-details {
    background-color: var(--bg-light);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow:
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);
    transition: all var(--transition-speed) ease-in-out;
}

.project-details:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-details.changing {
    opacity: 0;
    transform: translateY(-10px);
}

.project-details span {
    position: relative;
    display: block;
}

.project-tile.faded {
    opacity: 0.5;
    transform: scale(0.95);
}

.project-tile.selected {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid var(--accent);
}

.project-tile.selected h3 {
    background-color: var(--accent);
    color: var (--bg-dark);
}

.header-nav {
    grid-area: nav;
    width: 100%;
    margin-top: 0.5rem;
}

.header-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.header-nav li {
    margin: 0;
}

.header-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1rem;
    display: block;
    border-radius: 15px;
    background-color: var(--bg-light);
    box-shadow:
        3px 3px 6px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
    transition: all var(--transition-speed) ease;
    white-space: nowrap;
    font-size: 0.9rem;
}

.header-nav a:hover {
    background-color: var(--accent);
    color: var(--text-primary);
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
    transform: translateY(2px);
}

#skills {
    grid-area: skills;
    position: relative;
    padding-bottom: 2rem;
}

#toggle-skills {
    position: absolute;
    bottom: 1.5rem;
    right: 2rem;
    background-color: var(--bg-light);
    color: var(--text-primary);
    border: none;
    padding: .75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    transition: all var(--transition-speed) ease;
    font-family: 'Baloo 2', 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    z-index: 10;
}

#toggle-skills:hover {
    background-color: var(--accent);
    color: var(--text-primary);
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
    transform: translateY(2px);
}

#toggle-skills:focus {
    outline: none;
}

#website-button {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: var(--bg-light);
    color: var(--text-primary);
    border: 2px solid var(--accent);
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Baloo 2', 'Courier New', monospace;
    font-size: 1rem;
    margin-top: 1rem;
}

#website-button:hover {
    background-color: var(--accent);
    color: var(--text-primary);
    box-shadow:
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
    transform: translateY(1px);
}

#website-button:focus {
    outline: none;
}

#website-button {
    display: none;
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: var(--bg-light);
    color: var(--text-primary);
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
    transition: all var(--transition-speed) ease;
    font-family: 'Baloo 2', 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
}

#website-button:hover {
    background-color: var(--accent);
    color: var(--text-primary);
    box-shadow:
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
    transform: translateY(1px);
}

#website-button:focus {
    outline: none;
}

@keyframes fadeOutUp {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Add these media queries at the end of the CSS file */

@media screen and (max-width: 768px) {
    body {
        padding: 0.5rem;
    }

    .hidden.mobile {
        display: block;
        font-size: 1.25rem;
    }

    .skills.backup.hidden {
        display: block;
    }

    .header {
        grid-template-columns: 1fr;
        grid-template-areas:
            "profile";
        grid-template-rows: auto;
        padding: 1.5rem 1rem;
        gap: 1rem;
        margin: 0.5rem auto;
        width: calc(100% - 1rem);
        max-width: calc(100vw - 1rem);
    }

    .about-me {
        max-width: none;
    }

    .about-me h1 {
        font-size: 1.3rem;
        margin: 0;
    }

    .about-me p,
    .about-me h3 {
        display: none;
    }

    .header-nav {
        display: none;
    }

    .profile-photo {
        width: 100px;
        height: 100px;
        margin-bottom: 0.8rem;
    }

    .social-links {
        gap: 0.8rem;
        margin-top: 0.8rem;
    }

    .social-links a {
        font-size: 1.4rem;
        padding: 0.6rem;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }

    .main-content {
        display: block;
        padding: 0.5rem;
        width: 100%;
        max-width: 100%;
    }

    section {
        padding: 1rem;
        margin-bottom: 1rem;
        width: 100%;
        max-width: 100%;
    }

    .skills-grid {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0.5rem;
        margin-bottom: 4rem;
        padding: 2rem;
        padding-right: 2rem;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(var(--tile-width), 1fr));
        gap: var(--tile-gap);
        row-gap: 2rem;
        transition: max-height 0.5s ease, opacity 0.5s ease;
        max-height: 575px;
        /* Mobile collapsed height */
        overflow: hidden;
        width: 100%;
        box-sizing: border-box;
    }

    .skills-grid.expanded {
        max-height: 5350px;
        /* Mobile expanded height */
        margin-bottom: -2rem;
    }

    s .skill-tile {
        min-height: 120px;
    }

    #website-button {
        display: none;
    }

    /* Reduce shape complexity on mobile */
    .shape {
        opacity: 0.2;
        transform: scale(0.7);
    }

    .shape-6,
    .shape-9,
    .shape-11,
    .shape-12 {
        display: none;
    }

    /* Disable hover effects on mobile */
    .shape:hover {
        transform: scale(0.7);
        opacity: 0.2;
        filter: none;
    }
}


@media screen and (min-width: 769px) and (max-width: 1200px) {
    .hidden.mobile {
        display: none;
    }

    .skills.backup.hidden {
        display: block;
    }

    .header {
        grid-template-columns: 1fr;
        grid-template-areas:
            "profile"
            "nav";
        grid-template-rows: auto auto;
        padding: 1.5rem;
    }

    .about-me {
        margin-top: 0;
    }

    .about-me h1 {
        font-size: 1.6rem;
    }

    .about-me p {
        display: none;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }

    .social-links a {
        font-size: 1.6rem;
        padding: 0.7rem;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 52px;
        height: 52px;
        font-size: 1.15rem;
    }

    .main-content {
        display: block;
        padding: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-height: 350px;
        /* Tablet collapsed height */
    }

    .skills-grid.expanded {
        max-height: 2500px;
        /* Tablet expanded height */
    }
}

@media screen and (max-width: 1200px) {
    .main-content {
        display: block;
    }

    section {
        margin-bottom: 2rem;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem 0;
    background: var(--bg-light);
    color: var(--text-secondary);
    border-top: 1px solid var(--accent);
}

.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background-color: var(--bg-light);
    color: var(--text-primary);
    border: none;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    transition: all var(--transition-speed) ease;
    z-index: 1000;
}

.theme-toggle:hover {
    background-color: var(--accent);
    color: var(--text-primary);
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
    transform: translateY(2px);
}

:root.dark-theme {
    /* Dark theme */
    --bg-dark: #2d3748;
    --bg-light: #2d3748;
    --bg-darker: #1a202c;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e0;
    --accent: #81c3c6;
    --accent-hover: #a8dadc;
    --shadow-light: #3a4a5c;
    --shadow-dark: #1a1f2b;
}

/* Enhanced Ripple Effect */
.theme-ripple {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
    animation: rippleEffect 0.5s ease-out forwards;
}

@keyframes rippleEffect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }

    100% {
        width: 100%;
        height: 100%;
        opacity: 0;
    }
}

/* Smooth Theme Transition */
:root,
:root.dark-theme {
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Custom Cursor */
@media (hover: hover) and (pointer: fine) {
    * {
        cursor: none !important;
    }

    .cursor-dot {
        width: 8px;
        height: 8px;
        background-color: var(--text-primary);
    }

    .cursor-outline {
        width: 40px;
        height: 40px;
        border: 2px solid var(--text-secondary);
        transition: transform 0.15s ease-out, width 0.2s, height 0.2s, background-color 0.2s, left 0.15s ease-out, top 0.15s ease-out;
    }

    .cursor-dot,
    .cursor-outline {
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        z-index: 9999;
        pointer-events: none;
    }

    /* Hover State */
    .cursor-hover {
        transform: translate(-50%, -50%) scale(1.5);
        background-color: rgba(108, 123, 149, 0.1);
        /* Semi-transparent text-secondary */
        border-color: transparent;
    }
}

@media (hover: none),
(pointer: coarse) {

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}