/* --- 1. Global Styles & Variables --- */
:root {
    --accent-primary: #e8bd33;
    --bg-primary: #0d1a22;
    --bg-secondary: #0a1318;
    --hero-gradient-2: #0d1920;
    --hero-gradient-1: #216994;
    --text-light: #ecf3f6;
    --text-dark: #171821;
    scroll-behavior: smooth;
}

body {
    font-family: "Outfit", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-primary);
    color: var(--text-light);
    text-align: center;
}

button {
    font-family: "Outfit", Arial, sans-serif;
    transition: 0.3s ease all;
}

p {
    font-size: 20px;
}

p a {
    font-weight: bold;
    color: var(--accent-primary);
    text-decoration: none;
    transition: 0.3s ease all;
}

p a:hover {
    color: var(--accent-primary);
}

h1, h2, h3 {
    color: var(--accent-primary);
}
h1 { font-size: 48px; }
h2 { 
    font-size: 36px;
    padding: 24px 0;
    margin: 0;
    text-decoration: underline;
    text-underline-offset: 12px;
}
h3 { font-size: 28px; margin-top: 14px; }

section {
    margin: auto;
    z-index: 0;
    position: relative;
}

body section:nth-child(even) {
    background-color: var(--bg-secondary);
    z-index: 1;
}


button:hover, .button:hover {
    scale: 1.05;
}

.button {
    display: inline-block;
    font-weight: 700;
    padding: 16px 44px;
    border-radius: 32px;
    font-size: 22px;
    text-decoration: none;
    filter: drop-shadow(0 0px 8px #000a);
    transition: 0.3s ease all;
    border: none;
    cursor: pointer;
    letter-spacing: 1px;
    min-width: 160px;
    animation: zoomIn 1s ease;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--text-dark);
}

.btn-primary:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
}

.highlight {
    color: var(--accent-primary);
    background: none;
}

.cky-btn-revisit-wrapper .cky-btn-revisit img {
    filter: invert(1);
}

/* --- 2. Hero Section --- */
#about {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    margin-bottom: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at 50% 50%, var(--hero-gradient-1) 0%, var(--hero-gradient-2) 100%);
    background-size: 200% 200%;
    opacity: 0.95;
    transition: background 0.3s;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    margin: auto;
    padding: 80px 20px 60px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 60px;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 900;
}


.hero-content h2 {
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
}

.hero-content p {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.6;
}

.cta-btns {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .hero-content h1 { font-size: 38px; }
    .hero-content h2 { font-size: 22px; }
    .hero-content { padding: 48px 10px 32px 10px; }
}


/* --- 3. Skills Section --- */

.skills-header {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    padding-bottom: 24px;
    box-shadow: 0px 12px 12px var(--bg-secondary);
    z-index: 3;
}
.skills-legend {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .skills-legend > button {
        width: 35%;
        flex-grow: 1;
    }

    .skills-legend {
        padding: 0 12px;
    }
}

@media (max-width: 300px) {
    .skills-legend {
        flex-direction: column;
        align-items: center;
    }

    .skills-legend > button {
        width: 100%;
    }
}

.legend-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 12px;
    background: #232634;
    color: var(--text-light);
    cursor: pointer;
    outline: none;
    border: 2px solid transparent;
    transition: 0.3s ease all;
    animation: zoomIn 1s ease;
}


.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    margin: 0 auto;
    padding: 24px 12px;
    transition: 0.3s ease all;
    max-width: 1200px;
}

.chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: 0.3s ease all;
    color: var(--text-light);
    font-size:14px;
    animation: zoomIn 1s ease;
    width: 8%;
    flex-direction: column;
    border: 2px solid transparent;
    flex-grow: 1;
}

.chip span a {
    color: inherit;
    text-decoration: inherit;
    cursor: inherit;
    transition: inherit;
}

@media (max-width: 1200px) {
    .chip {
        width: 10%;
    }
}

@media (max-width: 992px) {
    .chip {
        width: 15%;
    }
}

@media (max-width: 768px) {
    .chip {
        width: 15%;
        padding: 10px 12px;
    }

    .skills-cloud {
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .chip {
        width: 20%;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .chip {
        width: 30%;
        padding: 6px 8px;
    }
}

.chip.front-end, .legend-chip.front-end { 
    border-color: #4fc3f7; 
}
.chip.misc,  .legend-chip.misc { 
    border-color: #ba68c8; 
}
.chip.back-end, .legend-chip.back-end { 
    border-color: #81c784; 
}
.chip.soft,  .legend-chip.soft { 
    border-color: #ff8600; 
}

.chip.front-end .icon, .legend-chip.front-end i { 
    color: #4fc3f7; 
}
.chip.misc .icon, .legend-chip.misc i { 
    color: #ba68c8; 
}
.chip.back-end .icon, .legend-chip.back-end i { 
    color: #81c784; 
}
.chip.soft .icon, .legend-chip.soft i { 
    color: #ff8600; 
}

.chip:hover, .legend-chip:hover, .legend-chip.active {
    /* Default fallback, will be overridden by category-specific rules */
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--accent-primary)0a;
    scale: 1.05;
}

/* Category-specific hover styles */
.chip.front-end:hover, .legend-chip.front-end:hover, .legend-chip.front-end.active {
    border-color: #4fc3f7;
    color: #4fc3f7;
    background: #4fc3f70a;
}
.chip.misc:hover, .legend-chip.misc:hover, .legend-chip.misc.active {
    border-color: #ba68c8;
    color: #ba68c8;
    background: #ba68c80a;
}
.chip.back-end:hover, .legend-chip.back-end:hover, .legend-chip.back-end.active {
    border-color: #81c784;
    color: #81c784;
    background: #81c7840a;
}
.chip.soft:hover, .legend-chip.soft:hover, .legend-chip.soft.active {
    border-color: #ff8600;
    color: #ff8600;
    background: #ff86000a;
}


.chip .icon {
    margin: 0 auto;
    padding: 5px;
}
.chip span {
    margin: auto;
}

/* --- 4. Projects Section --- */
#projects {
    padding:0;
}

#projects h2 {
    z-index: 3;
    background-color: var(--bg-primary);
    position: sticky;
    top: 0;
    box-shadow: 0px 12px 12px var(--bg-primary);
}

.project-item {
    position: relative;
    width: 100%;
    text-align: center;
    margin-top: -50px;
    margin-bottom: -50px;
    padding:50px 0;
    overflow: hidden;
    background-color: #222;
    color: var(--text-light);
}
.project-item:first-child { margin-top: 0; }
.project-item:last-child { clip-path:polygon(0px 50px, 100% 0px, 100% 100%, 0px 100%) }
.project-item:nth-child(even) {
    clip-path: polygon(0 50px, 100% 0, 100% 100%, 0 calc(100% - 50px));
    z-index: 2;
}
.project-item:nth-child(even) .project-item-content {
    flex-direction: row-reverse;
}

.project-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #222 !important;
}
.project-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(8px);
}

@media (max-width: 768px) {
    .project-background-image  {
        filter: blur(16px);
    }
}

.project-item-header,
.project-item-content {
    position: relative;
    z-index: 2;
}

.project-item-header .icon {
    color: var(--accent-primary);
}

.project-item-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 48px 24px;
    flex-wrap: wrap-reverse;
    gap:24px
}
.project-item-content > div {
    width: 40%;
    flex-grow: 1;
}


@media (max-width: 768px) {
    .project-item-content > div { width: 100%; }
}

.project-image-container {
    display: flex;
    flex-direction: column;
    gap: 24px;;
}

.project-image-container .button {
    width: fit-content;
    margin: auto;
}

/* Gallery */
.gallery {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
    overflow: hidden;
    filter: drop-shadow(0px 0px 8px #000a);
}
.slides {
    border-radius: 16px;
    overflow: hidden;
}
.slides img {
    width: 100%;
    display: block;
}
button.prev, button.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--text-light);
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
}
button.prev { left: 10px; }
button.next { right: 10px; }

.icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}
.icon {
    font-size: 24px;
    color: var(--text-dark);
    transition: 0.3s ease all;
}
.icon:hover {
    color: var(--accent-primary);
}

/* --- 5. Clients Section --- */

#clients {
    z-index: 1;
}

#clients h2 {
    z-index: 3;
    background-color: var(--bg-secondary);
    position: sticky;
    top: 0;
    box-shadow: 0px 12px 12px var(--bg-secondary);
}

.client-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
    justify-content: space-evenly;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 48px;
}
.client-logo {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease all;
    animation: zoomIn 1s ease;
}

.client-logo:hover {
    scale: 1.05;
}

.client-logo img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

@media (max-width: 480px) {
    .client-logos {
        grid-template-columns: 1fr;
    }

    .client-logo img {
        width: 90%;
        height: 90%;
    }
}

/* --- 6. Contact Section --- */

#contact {
    background: linear-gradient(135deg, var(--hero-gradient-1) 0%, var(--hero-gradient-2) 100%);
    padding: 24px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

