/* ==========================================================================
   HOMEPAGE - All sections
   ========================================================================== */

/* Main container */
.home-main {
    padding-top: 72px;
    background: var(--bg-secondary);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.section-spacing {
    /* Base spacing between sections */
}

.alt-section {
    background: var(--bg-dark);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 350px 20px 40px 20px;
    text-align: center;
    background-color: var(--bg-dark);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.hero-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.hero-content p {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
}

.highlight {
    color: var(--primary-color);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--accent);
}

.cta-button-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */

.about-section {
    padding: 80px 20px;
    background-color: var(--bg-secondary);
    width: 100vw;
    box-sizing: border-box;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
    width: 100%;
}

.about-content h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
    word-break: break-word;
    font-size: 1.07rem;
}

.skills-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    list-style: disc;
}

.skills-list li {
    margin-bottom: 0.5rem;
}

.about-image {
    display: flex;
    justify-content: center;
    margin-top: 0;
}

.code-snippet {
    background: var(--bg-dark);
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    max-width: 100vw;
    width: 100%;
    box-sizing: border-box;
    word-break: break-all;
}

.code-snippet pre {
    margin: 0;
    color: var(--primary-color);
    font-size: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */

.skills-section {
    padding: 80px 20px;
    background-color: var(--bg-dark);
}

.skills-content {
    max-width: 800px;
    margin: 0 auto;
}

.skills-content h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-light);
}

.skills-category {
    margin-bottom: 2.5rem;
}

.skills-subtitle {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.skill-tag {
    background-color: rgba(142, 99, 243, 0.15);
    color: var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.95rem;
    border: 1px solid rgba(142, 99, 243, 0.3);
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background-color: rgba(142, 99, 243, 0.25);
    transform: translateY(-2px);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */

.projects-section {
    width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
    background-color: var(--bg-secondary);
    padding: 80px 20px;
}

.projects-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
    width: 100%;
    overflow-x: visible;
}

.projects-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-light);
}

.carousel-outer {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    width: 52px;
    height: 52px;
    font-size: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    transition: color 0.18s, opacity 0.15s, box-shadow 0.16s, background 0.17s;
}

.carousel-arrow.left {
    left: -20px;
}

.carousel-arrow.right {
    right: -20px;
}

.carousel-arrow:focus,
.carousel-arrow:active {
    background: rgba(142, 99, 243, 0.16);
    outline: 2px solid var(--primary-color);
    box-shadow: 0 0 0 1.5px var(--primary-color);
}

.projects-list {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    overflow-y: visible;
    width: 1084px;
    max-width: 100vw;
    margin: 0 auto;
    padding: 0;
    scroll-padding-left: 0;
    scroll-padding-right: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
    z-index: 1;
    scroll-snap-type: x mandatory;
}

.projects-list::-webkit-scrollbar {
    display: none;
}

.project-card {
    flex: 0 0 auto;
    background-color: var(--bg-dark);
    padding: 2.2rem 1.4rem 1.7rem 1.4rem;
    padding-inline: 1rem;
    border-radius: 15px;
    transition: transform 0.3s ease, z-index 0s;
    border: 1.5px solid var(--border-color);
    min-width: 340px;
    max-width: 340px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    scroll-snap-align: start;
    position: relative;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-5px);
    z-index: 2;
}

.project-card h3 {
    font-size: 1.45rem;
    margin-bottom: 1.1rem;
    color: var(--primary-color);
    font-weight: 700;
    text-align: center;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    text-align: center;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 0.8rem;
    justify-content: center;
    margin-bottom: 1.3rem;
    margin-top: 0.4rem;
}

.tech-badge {
    background-color: rgba(142, 99, 243, 0.13);
    color: var(--primary-color);
    border-radius: 999px;
    padding: 0.43em 1.1em;
    font-size: 0.98em;
    font-weight: 500;
    letter-spacing: 0.01em;
    border: 1px solid rgba(142, 99, 243, 0.19);
    transition: background 0.2s, transform 0.2s;
}

.tech-badge:hover {
    background-color: rgba(142, 99, 243, 0.21);
    transform: translateY(-2px);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 7px;
    background-color: rgba(142, 99, 243, 0.14);
    transition: all 0.18s;
    font-size: 0.98rem;
    text-decoration: none;
    border: none;
    box-shadow: none;
}

.project-link:hover {
    background-color: rgba(142, 99, 243, 0.22);
    transform: translateY(-1px);
}

.project-link span {
    font-size: 1em;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.contact-section {
    padding: 80px 20px;
    text-align: center;
}

.contact-section h2 {
    font-size: 2.3rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.contact-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.2rem;
    gap: 0.45rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    font-size: 1rem;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    padding: 0.7em 1em;
    margin-top: 0.25em;
    background: var(--bg-secondary);
    color: var(--text-light);
    transition: border 0.2s;
    resize: vertical;
}

.contact-form textarea {
    min-height: 120px;
    max-height: 240px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.contact-form button {
    margin-top: 0.5rem;
    padding: 0.7em 0;
    border-radius: 7px;
    border: none;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.08rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-form button:hover {
    background: var(--accent);
}

.contact-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-error {
    color: #ff5656;
    margin-top: 0.5rem;
    text-align: center;
}

.form-success {
    color: #45d483;
    margin-top: 0.5rem;
    text-align: center;
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1100px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        margin-top: 2rem;
    }

    .about-content {
        padding: 0 0.5rem;
    }

    .projects-list {
        width: 724px;
    }
}

@media (max-width: 900px) {
    .home-main {
        padding-top: 60px;
    }
}

@media (max-width: 800px) {
    .projects-list {
        width: 340px;
    }
}

@media (max-width: 700px) {
    .hero-section {
        align-items: center;
        padding: 0px 20px 40px 20px;
    }

    .hero-content {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .home-main {
        padding-top: 48px;
    }

    .about-section {
        padding: 40px 5px;
    }

    .about-content {
        padding: 0 0.2rem;
    }

    .code-snippet {
        font-size: 0.92rem;
        padding: 1rem;
    }

    .about-content h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .about-text p {
        font-size: 0.98rem;
    }

    .carousel-arrow {
        display: none !important;
    }

    .contact-form {
        padding: 1rem;
        max-width: 98vw;
    }

    .contact-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 380px) {
    .about-content {
        padding: 0;
    }

    .code-snippet {
        padding: 0.4rem;
        font-size: 0.87rem;
    }
}
