* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    color: rgba(255, 255, 255, 0.85);
    font-family: "Rubik", sans-serif;
}

body {
    margin-top: 2rem;
    background-color: #0a0a0f;
    margin-inline: 6rem;
    overflow-x: hidden;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(73, 158, 233, 0.3); }
    50% { box-shadow: 0 0 40px rgba(146, 87, 245, 0.5); }
}

/* ========== HEADER & NAV ========== */
header {
    margin-bottom: 12rem;
    animation: fadeIn 0.8s ease-out;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    animation: slideInLeft 0.6s ease-out;
}

.logo span:first-child {
    background: linear-gradient(135deg, #9257f5, #499ee9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo span:last-child {
    color: rgba(255, 255, 255, 0.9);
}

nav ul {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    animation: slideInRight 0.6s ease-out;
}

nav li {
    list-style: none;
    padding: 0.8rem 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 120px;
    backdrop-filter: blur(10px);
}

nav li:hover {
    background: linear-gradient(135deg, rgba(146, 87, 245, 0.2), rgba(73, 158, 233, 0.2));
    border-color: rgba(146, 87, 245, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(146, 87, 245, 0.2);
}

nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

nav a:hover {
    color: white;
}

/* ========== MAIN TITLE ========== */
span {
    font-size: 52px;
    text-transform: uppercase;
    font-weight: 700;
    background: linear-gradient(135deg, #9257f5 0%, #7474f0 25%, #499ee9 50%, #11d4e0 75%, #9257f5 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
    display: inline-block;
    margin: 30px auto;
}

/* ========== HERO SECTION ========== */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.hero > p:first-child {
    animation: fadeInUp 0.6s ease-out 0.2s both;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6);
}

.hero > span {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero > p:nth-of-type(2) {
    animation: fadeInUp 0.6s ease-out 0.6s both;
    line-height: 1.8;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
}

/* ========== NEXT LINK ========== */
.next {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

.next a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}

.next a:hover {
    color: white;
    border-color: rgba(146, 87, 245, 0.5);
    background: linear-gradient(135deg, rgba(146, 87, 245, 0.15), rgba(73, 158, 233, 0.15));
    box-shadow: 0 10px 40px rgba(146, 87, 245, 0.25);
    transform: translateY(-3px);
}

.next p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* ========== FOOTER ========== */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10rem;
    padding-bottom: 4rem;
    animation: fadeInUp 0.6s ease-out;
}

footer > p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

footer ul {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 1.5rem 0;
}

footer li {
    list-style: none;
    display: flex;
    text-align: center;
    padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: center;
    min-width: 150px;
    backdrop-filter: blur(10px);
}

footer li:hover {
    background: linear-gradient(135deg, rgba(146, 87, 245, 0.2), rgba(73, 158, 233, 0.2));
    border-color: rgba(146, 87, 245, 0.4);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(146, 87, 245, 0.25);
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

footer a:hover {
    color: white;
}

footer img {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

footer li:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* ========== PARAGRAPH STYLES ========== */
p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    line-height: 1.7;
}

/* ========== ABOUT CONTENT ========== */
.about-content {
    padding: 2rem;
    color: rgba(255, 255, 255, 0.85);
    animation: fadeInUp 0.6s ease-out;
}

/* ========== SKILLS GRID ========== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out both;
}

.skill-card:nth-child(1) { animation-delay: 0.1s; }
.skill-card:nth-child(2) { animation-delay: 0.2s; }
.skill-card:nth-child(3) { animation-delay: 0.3s; }

.skill-card:hover {
    background: linear-gradient(135deg, rgba(146, 87, 245, 0.1), rgba(73, 158, 233, 0.1));
    border-color: rgba(146, 87, 245, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(146, 87, 245, 0.2);
}

.skill-card h3 {
    background: linear-gradient(135deg, #499ee9, #11d4e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.skill-card ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.skill-card li {
    margin: 0.7rem 0;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.skill-card:hover li {
    color: rgba(255, 255, 255, 0.9);
}

/* ========== WORKS SECTION ========== */
.works-container {
    padding: 2rem;
    margin-top: -8rem;
}

.works-container h1 {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.work-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out both;
    backdrop-filter: blur(10px);
}

.work-card:nth-child(1) { animation-delay: 0.1s; }
.work-card:nth-child(2) { animation-delay: 0.2s; }
.work-card:nth-child(3) { animation-delay: 0.3s; }

.work-card:hover {
    transform: translateY(-10px);
    border-color: rgba(146, 87, 245, 0.4);
    box-shadow: 0 25px 60px rgba(146, 87, 245, 0.2);
}

.work-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.work-card:hover img {
    transform: scale(1.05);
}

.work-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.work-content h3 {
    color: #fff;
    margin: 0;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.work-card:hover .work-content h3 {
    background: linear-gradient(135deg, #9257f5, #499ee9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.work-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.work-tags span {
    font-size: 0.75rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.work-tags span:hover {
    background: linear-gradient(135deg, rgba(146, 87, 245, 0.3), rgba(73, 158, 233, 0.3));
    border-color: rgba(146, 87, 245, 0.5);
    color: white;
}

.work-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: flex-start;
    align-items: center;
}

.live-demo, .github-link {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    white-space: nowrap;
    font-weight: 500;
}

.live-demo {
    background: linear-gradient(135deg, #9257f5, #499ee9);
    color: white;
    box-shadow: 0 4px 15px rgba(146, 87, 245, 0.3);
}

.live-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(146, 87, 245, 0.4);
}

.github-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.github-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

.github-link img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ========== CAROUSEL (Legacy) ========== */
.carousel {
    min-width: 900px;
    max-width: 1236px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 48px;
    padding-right: 48px;
    position: relative;
}

.activator { display: none; }

.controls {
    display: none;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    top: 0;
    right: 16px;
    left: 16px;
    bottom: 0;
}

.controls:first-of-type { justify-content: flex-end; }
.controls:last-of-type { justify-content: flex-start; }

.control {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-size: 36px;
    height: 48px;
    justify-content: center;
    transition: all 0.3s ease;
    width: 48px;
    z-index: 1;
    text-align: center;
    line-height: 44px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control:hover {
    transform: scale(1.1);
    background: rgba(146, 87, 245, 0.3);
    border-color: rgba(146, 87, 245, 0.5);
}

.activator:nth-of-type(1):checked ~ .controls:nth-of-type(1) { display: flex; }
.activator:nth-of-type(1):checked ~ .screen .track { transform: translateX(0%); }
.activator:nth-of-type(2):checked ~ .controls:nth-of-type(2) { display: flex; }
.activator:nth-of-type(2):checked ~ .screen .track { transform: translateX(-100%); }
.activator:nth-of-type(3):checked ~ .controls:nth-of-type(3) { display: flex; }
.activator:nth-of-type(3):checked ~ .screen .track { transform: translateX(-200%); }
.activator:nth-of-type(4):checked ~ .controls:nth-of-type(4) { display: flex; }
.activator:nth-of-type(4):checked ~ .screen .track { transform: translateX(-300%); }
.activator:nth-of-type(5):checked ~ .controls:nth-of-type(5) { display: flex; }
.activator:nth-of-type(5):checked ~ .screen .track { transform: translateX(-400%); }

.screen {
    overflow: hidden;
    margin-left: -16px;
    margin-right: -16px;
}

.track {
    font-size: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.item {
    display: inline-flex;
    padding-left: 16px;
    padding-right: 16px;
    vertical-align: top;
    white-space: normal;
}

.item--desktop-in-1 { width: 100%; }
.item--desktop-in-2 { width: 50%; }
.item--desktop-in-3 { width: 33.3333333333%; }

.demo-content {
    color: #fff;
    display: flex;
    font-family: Helvetica;
    font-weight: 100;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    border-radius: 12px;
    font-size: 56px;
    height: 250px;
    width: 100%;
    transition: all 0.3s ease;
}

.item:nth-child(1) .demo-content { background: linear-gradient(135deg, #216485, #499ee9); }
.item:nth-child(2) .demo-content { background: linear-gradient(135deg, #3692b6, #11d4e0); }
.item:nth-child(3) .demo-content { background: linear-gradient(135deg, #6fccc9, #aff0be); }
.item:nth-child(4) .demo-content { background: linear-gradient(135deg, #a6e3cf, #6fccc9); }
.item:nth-child(5) .demo-content { background: linear-gradient(135deg, #aff0be, #6fccc9); }

/* ========== RESPONSIVE ========== */
@media screen and (max-width: 1023px) {
    .carousel {
        padding-left: 0;
        padding-right: 0;
    }

    .activator:nth-of-type(n):checked ~ .controls:nth-of-type(n) {
        display: none;
    }

    .activator:nth-of-type(n):checked ~ .screen .track {
        transform: none;
    }

    .screen {
        margin-left: 0;
        margin-right: 0;
    }

    .track {
        overflow-x: auto;
        width: auto;
        padding-left: 48px;
        padding-right: 48px;
    }

    .item--tablet-in-1 { width: 90%; }
    .item--tablet-in-2 { width: 45%; }
}

@media screen and (max-width: 992px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skill-card {
        margin: 0;
    }
}

@media screen and (max-width: 650px) {
    .track {
        padding-left: 0;
        padding-right: 0;
    }

    .item--mobile-in-1 { width: 90%; }
    .item--mobile-in-2 { width: 45%; }
}

@media screen and (max-width: 576px) {
    body {
        margin-inline: 1.5rem;
    }

    nav {
        flex-direction: column;
        gap: 1.5rem;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav li {
        width: 100%;
    }

    span {
        font-size: 28px;
    }

    header {
        margin-bottom: 6rem;
    }

    footer {
        margin-top: 6rem;
    }

    footer ul {
        flex-direction: column;
        width: 100%;
    }

    footer li {
        width: 100%;
        justify-content: center;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .works-container {
        margin-top: -4rem;
    }

    .hero > p:nth-of-type(2) {
        font-size: 1rem;
    }
}

@media screen and (min-width: 577px) and (max-width: 768px) {
    body {
        margin-inline: 2.5rem;
    }

    header {
        margin-bottom: 10rem;
    }
}

@media screen and (min-width: 769px) and (max-width: 992px) {
    body {
        margin-inline: 4rem;
    }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #9257f5, #499ee9);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7474f0, #11d4e0);
}

/* ========== SELECTION ========== */
::selection {
    background: rgba(146, 87, 245, 0.4);
    color: white;
}
