:root {
    --bg-color: #050511;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-glow: rgba(34, 197, 94, 0.25);
    --card-bg: rgba(10, 20, 15, 0.5);
    /* Slightly darker card blend for the green aura */
    --border-color: rgba(255, 255, 255, 0.15);
    --primary: #22c55e;
    --secondary: #10b981;
    --gradient: linear-gradient(135deg, #22c55e, #10b981);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image: linear-gradient(rgba(5, 5, 17, 0.8), rgba(5, 5, 17, 0.9)), url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* initial fade in */
    animation: contentFade 1s forwards;
}

/* --- ANIMATIONS --- */
@keyframes contentFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-7px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes neonPulse {
    0% {
        box-shadow: 0 0 5px rgba(34, 197, 94, 0.1), inset 0 0 5px rgba(34, 197, 94, 0.05);
    }

    50% {
        box-shadow: 0 0 25px rgba(34, 197, 94, 0.3), inset 0 0 10px rgba(34, 197, 94, 0.15);
    }

    100% {
        box-shadow: 0 0 5px rgba(34, 197, 94, 0.1), inset 0 0 5px rgba(34, 197, 94, 0.05);
    }
}

/* --- HEADER / NAV --- */
header {
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(5, 5, 17, 0.7);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    animation: slideDown 0.8s ease-out forwards;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

nav li {
    animation: slideDown 0.8s ease-out backwards;
}

nav li:nth-child(1) {
    animation-delay: 0.1s;
}

nav li:nth-child(2) {
    animation-delay: 0.2s;
}

nav li:nth-child(3) {
    animation-delay: 0.3s;
}

nav li:nth-child(4) {
    animation-delay: 0.4s;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    left: 0;
    background: var(--gradient);
    transition: width 0.3s ease;
    border-radius: 2px;
}

nav a:hover,
nav a.active {
    color: var(--text-main);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* --- MAIN SECTIONS --- */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 5%;
}

section {
    padding: 6rem 0;
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(to right, #ffffff, #86efac);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeUp 0.8s ease-out 0.2s both;
}

h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 4px;
    bottom: -8px;
    left: 0;
    background: var(--gradient);
    border-radius: 2px;
    transition: width 0.4s ease;
}

section:hover h2::after {
    width: 100%;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    max-width: 750px;
    font-weight: 300;
}

/* Hero Section Specifics */
#about {
    min-height: 85vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.about-content {
    flex: 1;
    max-width: 650px;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: fadeUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.6s both;
}

.image-wrapper {
    position: relative;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, #ff1a1a, #b30000, transparent);
    box-shadow: 0 0 30px rgba(255, 26, 26, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.5);
    animation: float 5s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 26, 26, 0.5);
    animation: spin 20s linear infinite;
    z-index: -1;
}

.image-wrapper::after {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 26, 26, 0.2);
    animation: spin 25s linear reverse infinite;
    z-index: -1;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.6s ease;
}

.image-wrapper:hover img {
    transform: scale(1.08);
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.role-title {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeUp 0.8s ease-out 0.4s both;
}

.impact-list {
    list-style: none;
    margin-bottom: 2rem;
    max-width: 800px;
    animation: fadeUp 0.8s ease-out 0.6s both;
}

.impact-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
    transition: transform 0.3s ease, color 0.3s ease;
}

.impact-list li:hover {
    transform: translateX(10px);
    color: var(--text-main);
}

.impact-list li::before {
    content: '>>';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 800;
    animation: float 2s infinite ease-in-out;
}

.impact-list strong {
    color: var(--text-main);
}

/* Glassmorphism Cards */
.card,
.cert-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.cert-card {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.card::before,
.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.card>*,
.cert-card>* {
    position: relative;
    z-index: 2;
}

.card:hover,
.cert-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

/* Certifications */
.cert-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.badge-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem 3rem;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 3rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: neonPulse 4s infinite;
}

.badge-wrapper:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(34, 197, 94, 0.4);
    border-color: rgba(34, 197, 94, 0.6);
    animation: none;
}

.badge-info h3 {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.badge-info p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 0;
    max-width: 600px;
}

.cert-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    width: 100%;
}

.cert-img-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
}

.cert-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px;
}

.cert-card:hover .cert-img-wrapper img {
    transform: scale(1.1) rotate(2deg);
}

.cert-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.cert-content h3 {
    color: var(--text-main);
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.cert-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Projects List */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.project-card h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.project-card p {
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-link:hover {
    gap: 1rem;
}

/* Buttons & Links */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    background: var(--gradient);
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 1.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.2);
    animation: fadeUp 0.8s ease-out 0.8s both;
}

.btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(34, 197, 94, 0.5);
    color: #ffffff;
}

.btn svg {
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: translateX(5px);
}

.contact-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2rem;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(8px);
}

.contact-link:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 197, 94, 0.3);
}

.contact-link svg {
    color: var(--secondary);
    transition: transform 0.3s ease;
}

.contact-link:hover svg {
    transform: scale(1.1) rotate(5deg);
}

footer {
    text-align: center;
    padding: 4rem 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    margin-top: 2rem;
    background: rgba(5, 5, 17, 0.6);
    backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 900px) {
    #about {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        padding-top: 8rem;
    }

    .about-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .impact-list li {
        text-align: left;
    }

    .image-wrapper {
        width: 300px;
        height: 300px;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    section {
        padding: 4rem 0;
    }

    .logo {
        font-size: 1.5rem;
    }

    .btn {
        width: 100%;
    }

    .contact-link {
        width: 100%;
        justify-content: center;
    }

    .badge-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}