/* Color palette for deep dark premium black with red text and white icons */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



:root {
    --premium-black: #0a0a0a;
    --dark-black: #1c1c1c;
    --medium-black: #333333;
    --bright-red: #cc0000;
    --light-red: #ff6666;
    --white: #ffffff;
    --light-bg: #f5f5f5;
    --light-text: #333333;
    --light-accent: #0066cc;
    --success-green: #28a745;
    --error-red: #dc3545;
}

/* Light theme overrides */
.light-theme {
    --premium-black: var(--light-bg);
    --dark-black: #e0e0e0;
    --medium-black: #cccccc;
    --light-red: var(--light-accent);
    --white: var(--light-text);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--premium-black);
    color: var(--light-red);
    overflow-x: hidden;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: transform 320ms cubic-bezier(.2, .9, .2, 1), background 300ms ease, padding 300ms ease;
}

header.sticky {
    background: rgba(28, 28, 28, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 50px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform: scaleY(0.9);
}

/* Hide header by moving it up and disabling pointer events when scrolling down */
.header-hidden {
    transform: translateY(-120%);
    pointer-events: none;
}

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background-color: var(--light-red);
    z-index: 1001;
    transition: width 0.3s ease;
}

/* Center the navigation items */
.navigation-wrapper {
    display: flex;
    justify-content: center;
    flex-grow: 1;
}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--light-red);
    text-transform: uppercase;
    text-decoration: none;
}

.logo span {
    color: var(--light-red);
}

.navigation {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navigation li {
    margin-left: 30px;
}

.navigation li a {
    text-decoration: none;
    color: var(--light-red);
    font-weight: 500;
    letter-spacing: 1px;
    transition: 0.3s;
}

.navigation li a:hover,
.navigation li a:focus,
.navigation li a.active {
    color: var(--white);
    outline: none;
}

.toggle {
    display: none;
}

.toggle .hamburger,
.toggle .hamburger::before,
.toggle .hamburger::after {
    content: '';
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    margin: 5px 0;
    transition: transform 200ms ease, opacity 200ms ease;
}

.toggle.open .hamburger {
    transform: rotate(45deg) translateY(6px);
}

.toggle.open .hamburger::before {
    transform: rotate(-90deg) translateX(-6px);
}

.toggle.open .hamburger::after {
    opacity: 0;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.2em;
    cursor: pointer;
    transition: 0.3s;
    margin-left: 20px;
}

.theme-toggle:hover,
.theme-toggle:focus {
    color: var(--light-red);
    outline: none;
}

/* Hero Section */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: var(--premium-black);
}

/* Parallax layers (subtle depth) */
.parallax-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    opacity: 0.9;
}

/* disable heavy parallax on small screens */
@media (max-width: 900px),
(prefers-reduced-motion: reduce) {
    .parallax-layer {
        display: none;
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: clamp(15px, 4vw, 20px);
}

.hero-subtitle {
    font-size: clamp(1.1em, 4vw, 1.5em);
    color: var(--white);
    letter-spacing: 1px;
    margin-bottom: clamp(5px, 2vw, 10px);
}

.hero-title {
    font-size: clamp(2.5em, 10vw, 5em);
    font-weight: 700;
    color: var(--white);
    margin-bottom: clamp(15px, 4vw, 20px);
    line-height: 1.2;
}

.hero-description {
    font-size: clamp(0.95em, 3vw, 1.2em);
    color: var(--light-red);
    margin-bottom: clamp(20px, 6vw, 30px);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 clamp(10px, 3vw, 20px);
}

#typed-text {
    display: inline-block;
    min-height: 1.2em;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.cta-button {
    padding: 15px 30px;
    background-color: transparent;
    border: 2px solid var(--dark-black);
    color: var(--light-red);
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    border-radius: 30px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-width: 150px;
    text-align: center;
}

.cta-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--dark-black);
    transition: 0.3s;
    z-index: -1;
}

.cta-button:hover:before,
.cta-button:focus:before {
    width: 100%;
}

.cta-button:hover,
.cta-button:focus {
    color: var(--white);
    outline: 2px solid var(--white);
}

.cta-button.primary {
    background-color: var(--dark-black);
    color: var(--white);
}

.cta-button.primary:before {
    background-color: var(--medium-black);
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#code-canvas {
    width: 100%;
    height: 100%;
}

/* About Section */
#about {
    padding: clamp(50px, 10vw, 100px) clamp(20px, 5vw, 50px);
    background-color: var(--premium-black);
    position: relative;
}

.section-title {
    font-size: clamp(1.8em, 5vw, 2.5em);
    text-align: center;
    margin-bottom: clamp(30px, 7vw, 50px);
    color: var(--white);
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    width: clamp(60px, 15vw, 100px);
    height: 4px;
    background-color: var(--dark-black);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.about-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: clamp(25px, 5vw, 50px);
}

.about-image {
    flex: 1;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: 0.5s;
}

.about-image:hover img,
.about-image:focus-within img {
    transform: scale(1.05);
}

.about-content {
    flex: 1;
}

.about-content h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: var(--light-red);
}

.about-content p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--light-red);
}

.skills {
    margin-top: 30px;
    display: block;
}

.skill-title {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: var(--white);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item {
    background-color: var(--medium-black);
    color: var(--light-red);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: 0.3s;
}

.skill-item:hover,
.skill-item:focus {
    background-color: var(--dark-black);
    color: var(--white);
    transform: translateY(-3px);
    outline: none;
}

/* Skills chart wrapper to create a larger visual gap around the radar chart */
#skills-chart-wrapper {
    max-width: 420px;
    margin: 3.5rem auto 1.5rem;
    background-color: rgba(28, 28, 28, 0.5);
    padding: clamp(16px, 4vw, 34px); /* responsive padding that scales with viewport */
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
    transition: background-color 0.3s ease, transform 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
}

#skills-chart {
    width: 100% !important;
    height: clamp(280px, 50vh, 360px) !important; /* responsive height based on viewport */
    display: block;
}

/* On larger screens put skills list next to chart */
@media (min-width: 900px) {
    .skills {
        display: grid;
        grid-template-columns: 1fr 420px;
        gap: 30px;
        align-items: start;
    }

    .skill-list {
        margin-bottom: 0;
    }

    #skills-chart {
        margin: 12px 0 0 0;
    }
}

/* Mobile skill chart adjustments */
@media (max-width: 767px) {
    #skills-chart-wrapper {
        max-width: 340px;
        margin: 2rem auto;
    }
    
    #skills-chart {
        height: 260px !important;
    }
    
    .skills {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    #skills-chart-wrapper {
        max-width: 100%;
        padding: 12px;
        margin: 1.5rem -10px; /* negative margin to expand chart */
    }
    
    #skills-chart {
        height: 240px !important;
    }
}

.light-theme #skills-chart-wrapper {
    background-color: rgba(224, 224, 224, 0.5);
}

/* Projects Section */
#projects {
    padding: 100px 50px;
    background-color: var(--premium-black);
    perspective: 1000px;
}

.project-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background-color: var(--dark-black);
    color: var(--light-red);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1em;
    min-width: 100px;
    text-align: center;
}

.filter-btn:hover,
.filter-btn:focus,
.filter-btn.active {
    background-color: var(--medium-black);
    color: var(--white);
    outline: none;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
    gap: clamp(15px, 3vw, 30px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(10px, 3vw, 20px);
}

.project-card {
    background-color: var(--medium-black);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
    width: 100%;
}

.project-card:hover,
.project-card:focus-within {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: clamp(160px, 30vw, 200px);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.project-card:hover .project-image img,
.project-card:focus-within .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 20px;
}

.project-content h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--white);
}

.project-content p {
    color: var(--light-red);
    margin-bottom: 15px;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tag {
    background-color: var(--dark-black);
    color: var(--light-red);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
}

.project-link {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--dark-black);
    color: var(--white);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9em;
    transition: 0.3s;
    min-width: 120px;
    text-align: center;
}

.project-link:hover,
.project-link:focus {
    background-color: var(--medium-black);
    color: var(--light-red);
    outline: 2px solid var(--white);
}

/* Education Section */
#education {
    padding: 100px 50px;
    background-color: var(--premium-black);
}

.timeline {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: var(--dark-black);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    transform-style: preserve-3d;
}

.timeline-content {
    width: 45%;
    padding: 20px;
    background-color: var(--medium-black);
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-content:before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background-color: var(--dark-black);
    border-radius: 50%;
    left: -60px;
}

.timeline-item:nth-child(even) .timeline-content:before {
    right: -60px;
    left: auto;
}

.timeline-date {
    font-size: 0.9em;
    color: var(--light-red);
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.2em;
    color: var(--white);
    margin-bottom: 10px;
}

.timeline-description {
    color: var(--light-red);
    line-height: 1.5;
}

/* Contact Section */
#contact {
    padding: 100px 50px;
    background-color: var(--premium-black);
    position: relative;
    overflow: hidden;
}

.contact-container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    gap: clamp(30px, 5vw, 50px);
    position: relative;
    z-index: 10;
    padding: 0 clamp(15px, 3vw, 30px);
}

/* On larger screens use two columns */
@media (min-width: 768px) {
    .contact-container {
        flex-direction: row;
    }
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: clamp(1.5em, 5vw, 1.8em);
    margin-bottom: clamp(15px, 4vw, 20px);
    color: var(--white);
}

.contact-info p {
    margin-bottom: clamp(15px, 4vw, 20px);
    line-height: 1.6;
    color: var(--light-red);
    font-size: clamp(0.95em, 2.5vw, 1em);
}

.contact-details {
    margin-top: clamp(20px, 5vw, 30px);
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-icon {
    width: clamp(36px, 10vw, 40px);
    height: clamp(36px, 10vw, 40px);
    background-color: var(--dark-black);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-text {
    color: var(--light-red);
    font-size: clamp(0.9em, 2.5vw, 1em);
}

.contact-form {
    flex: 1;
    background-color: var(--medium-black);
    padding: clamp(20px, 4vw, 30px);
    border-radius: clamp(15px, 4vw, 30px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    position: absolute;
    top: 12px;
    left: 15px;
    color: var(--white);
    font-size: 1em;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-control:focus~.form-label,
.form-control:not(:placeholder-shown)~.form-label {
    top: -10px;
    left: 10px;
    font-size: 0.8em;
    background-color: var(--medium-black);
    padding: 0 5px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--dark-black);
    border: 1px solid var(--medium-black);
    border-radius: 15px;
    color: var(--light-red);
    font-size: 1em;
    transition: 0.3s;
    min-height: 50px;
}

.form-control:focus {
    outline: none;
    border-color: var(--premium-black);
    background-color: var(--medium-black);
}

.form-control.valid {
    border-color: var(--success-green);
}

.form-control.invalid {
    border-color: var(--error-red);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.form-feedback {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    display: none;
}

.form-control.valid~.form-feedback.success {
    display: block;
    color: var(--success-green);
}

.form-control.invalid~.form-feedback.error {
    display: block;
    color: var(--error-red);
}

.submit-btn {
    padding: 12px 30px;
    background-color: var(--dark-black);
    color: var(--white);
    border: none;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 400;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
    min-height: 50px;
}

.submit-btn:hover,
.submit-btn:focus {
    background-color: var(--medium-black);
    transform: translateY(-3px);
    outline: 2px solid var(--white);
}

/* Footer */
footer {
    padding: 50px;
    background-color: var(--premium-black);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--dark-black);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.3s;
}

.social-link:hover,
.social-link:focus {
    background-color: var(--medium-black);
    color: var(--light-red);
    transform: translateY(-5px);
    outline: 2px solid var(--white);
}

.footer-text {
    color: var(--light-red);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--dark-black);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    z-index: 1000;
    font-size: 1.5em;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover,
.back-to-top:focus {
    background-color: var(--medium-black);
    transform: translateY(-5px);
    outline: 2px solid var(--white);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(28, 28, 28, 0.95);
    backdrop-filter: blur(8px);
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.25);
}

.mobile-bottom-nav a {
    flex: 1;
    text-align: center;
    color: var(--light-red);
    font-size: 1.2em;
    text-decoration: none;
    padding: 12px 8px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mobile-bottom-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--light-red);
    transition: width 0.3s ease;
}

.mobile-bottom-nav a:hover::before,
.mobile-bottom-nav a:focus::before,
.mobile-bottom-nav a.active::before {
    width: 40%;
}

.mobile-bottom-nav a:hover,
.mobile-bottom-nav a:focus,
.mobile-bottom-nav a.active {
    color: var(--white);
}

/* Add spacing at the bottom to account for bottom nav */
@media (max-width: 991px) {
    body {
        padding-bottom: 60px;
    }
    
    footer {
        padding-bottom: 80px;
    }
}

/* Mobile Navigation */
@media (max-width: 991px) {

    header,
    header.sticky {
        padding: 15px 20px;
    }

    .toggle {
        display: block;
        position: relative;
        width: 40px; /* larger touch target */
        height: 40px; /* larger touch target */
        cursor: pointer;
        outline: none;
        z-index: 1001; /* ensure above overlay */
    }

    .toggle:focus {
        outline: 2px solid var(--white);
    }

    .toggle:before {
        content: '';
        position: absolute;
        top: 12px; /* centered in larger area */
        width: 85%;
        height: 2px;
        background-color: var(--white);
        transition: 0.3s;
        box-shadow: 0 10px 0 var(--white);
        transform-origin: 0 0;
    }

    .toggle:after {
        content: '';
        position: absolute;
        bottom: 12px; /* centered in larger area */
        width: 85%;
        height: 2px;
        background-color: var(--white);
        transition: 0.3s;
        transform-origin: 0 100%;
    }

    header.active .toggle:before {
        transform: rotate(45deg);
        box-shadow: 0 0 0 var(--white);
        top: 14px; /* adjusted for animation */
    }

    header.active .toggle:after {
        transform: rotate(-45deg);
        bottom: 14px; /* adjusted for animation */
    }

    .navigation-wrapper {
        display: none;
    }

    header.active .navigation-wrapper {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(28, 28, 28, 0.95); /* slightly transparent */
        backdrop-filter: blur(8px); /* modern blur effect */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 999;
        visibility: visible;
        opacity: 1;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .navigation {
        flex-direction: column;
        width: 100%;
        max-width: 85vw;
        text-align: center;
    }

    .navigation li {
        margin: 18px 0; /* increased touch area */
    }

    .navigation li a {
        font-size: 1.5em;
        padding: 10px 15px; /* increased touch target */
        display: inline-block;
    }

    .theme-toggle {
        position: absolute;
        top: 15px;
        right: 60px;
        width: 40px; /* larger touch target */
        height: 40px; /* larger touch target */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .about-container {
        flex-direction: column;
    }

    .contact-container {
        flex-direction: column;
    }

    .timeline:before {
        left: 20px;
    }

    .timeline-content {
        width: 85%;
        margin-left: auto !important;
    }

    .timeline-content:before {
        left: -40px;
    }

    /* Disable parallax on mobile */
    #projects,
    #about,
    #education {
        perspective: none;
    }

    .project-card,
    .about-container,
    .timeline-item {
        transform: none !important;
    }

    .mobile-bottom-nav {
        display: flex;
    }
}

@media (max-width: 600px) {
    /* Hero section */
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 10px;
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
    }

    .section-title {
        padding: 0 10px;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    /* Project filters */
    .project-filter {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        padding: 0 5px;
    }
    
    .filter-btn {
        font-size: 0.9em;
        padding: 8px 15px;
        min-width: auto;
    }

    .project-content h3 {
        font-size: 1.2em;
    }

    .project-link {
        font-size: 0.8em;
        padding: 8px 15px; /* slightly larger touch target */
    }

    /* Timeline */
    .timeline-title {
        font-size: 1em;
    }
    
    /* Form controls */
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-control {
        padding: 12px; /* larger touch target */
        font-size: 16px; /* prevent zoom on iOS */
        min-height: 48px; /* improved touch target */
    }
    
    .form-label {
        font-size: 0.9em;
    }

    .submit-btn {
        padding: 12px 20px; /* larger touch target */
        font-size: 16px; /* prevent zoom on iOS */
        min-height: 48px;
    }
    
    /* Skills section */
    .skill-list {
        gap: 8px;
        justify-content: center;
    }
    
    .skill-item {
        font-size: 0.85em;
        padding: 6px 12px;
    }
}

/* Animation Classes */
.reveal {
    position: relative;
    opacity: 0;
    transition: 1s all ease;
}

.reveal.active {
    opacity: 1;
}

.reveal.fade-bottom {
    transform: translateY(100px);
}

.reveal.fade-bottom.active {
    transform: translateY(0);
}

.reveal.fade-left {
    transform: translateX(-100px);
}

.reveal.fade-left.active {
    transform: translateX(0);
}

.reveal.fade-right {
    transform: translateX(100px);
}

.reveal.fade-right.active {
    transform: translateX(0);
}

/* Floating animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.float {
    animation: float 6s ease-in-out infinite;
}

/* Blob animation */
.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--medium-black);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    opacity: 0.3;
}

#blob1 {
    top: -100px;
    right: -100px;
}

#blob2 {
    bottom: -100px;
    left: -100px;
}

#blob3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Cursor effect */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--dark-black);
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
    display: none;
}

@media (min-width: 992px) {
    .cursor {
        display: block;
    }
}

/* Additional responsive polish */
/* Tablet layout (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    /* Two-column layout for project cards on tablets */
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 15px;
    }
    
    /* Adjust about container for tablet */
    .about-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .about-image {
        flex: 0 0 100%;
        max-width: 500px;
        margin: 0 auto 30px;
    }
    
    .about-content {
        flex: 1 1 100%;
    }
    
    /* Skills layout for tablet */
    .skills {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
        align-items: start;
    }
    
    #skills-chart-wrapper {
        grid-column: 1 / -1;
        max-width: 380px;
        margin: 20px auto;
    }
}

/* Medium and small screens */
@media (max-width: 900px) {
    /* Disable heavy canvas animations on smaller devices for performance */
    #canvas-container,
    #code-canvas {
        pointer-events: none;
        opacity: 0.08;
        transition: opacity 300ms ease;
    }

    /* Make hero content comfortably padded and stacked */
    .hero-content {
        padding: 18px;
        max-width: 720px;
    }

    .cta-button {
        padding: 14px 22px;
        min-width: 140px;
        font-size: 1rem;
    }

    /* Forms should be full width on mobile */
    .contact-form {
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }

    .contact-form .form-control {
        width: 100%;
        padding: 12px 14px;
        font-size: 1rem;
    }

    .submit-btn {
        padding: 12px 18px;
        font-size: 1rem;
    }

    /* About section image stacks above text */
    .about-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    /* Add extra small screen adjustments */
    .section-title {
        font-size: 1.8em;
    }
    
    .about-image {
        height: auto;
    }
    
    .project-image {
        height: 140px;
    }
    
    #canvas-container {
        opacity: 0.05; /* even lower opacity for tiny screens */
    }
    
    .contact-form {
        padding: 20px 15px;
    }
}

@media (max-width: 420px) {
    header {
        padding: 12px 14px;
    }

    .hero-title {
        font-size: 2.2em;
    }

    .hero-description {
        font-size: 0.95em;
    }

    .cta-button {
        width: 100%;
        min-width: auto;
        padding: 12px 16px;
    }

    .mobile-bottom-nav a {
        padding: 12px 6px;
        font-size: 1.25em;
    }
}

.cursor.grow {
    width: 50px;
    height: 50px;
    background-color: var(--medium-black);
}

