* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: white;
    background: linear-gradient(135deg, #0f2027, #203a43, #00c6ff, #00ffd5);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.logo-img { width: 60px; }
.nav-links { display: flex; list-style: none; gap: 35px; }
.nav-links a { text-decoration: none; color: white; font-weight: 500; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: #00ffd5; transition: 0.3s; }
.nav-links a:hover::after { width: 100%; }

/* CERTIFICATIONS SECTION */
.certifications-section {
    padding: 80px 20px;
    flex: 1;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.certifications-section h1 {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    align-items: start; /* Fixes the stretching bug */
}

.cert-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 255, 213, 0.1);
}

.cert-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #fff;
}

.issuer {
    color: #00ffd5;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.date {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 20px;
}

/* DROPDOWN LOGIC */
.cert-dropdown summary::-webkit-details-marker { display: none; }

.cert-dropdown summary {
    list-style: none;
    cursor: pointer;
    color: white;
    font-size: 0.9rem;
    padding: 15px 0 5px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: 0.3s;
    outline: none;
}

.cert-dropdown summary:hover { color: #00ffd5; }

.cert-content {
    padding-top: 10px;
    animation: slideDown 0.4s ease-out;
}

.open-cert {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 100%;
}

.cert-content img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: block;
}

/* MODAL / POPOVER STYLE */
.cert-modal {
    border: none;
    background: transparent;
    max-width: 90vw;
    margin: auto;
    padding: 0;
    overflow: visible;
}

/* The Instagram Blur Effect */
.cert-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-inner img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.close-cert {
    margin-top: 20px;
    padding: 10px 30px;
    background: #00ffd5;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    color: #0f2027;
}

/* SKILLS & HELPERS */
.skills { padding: 60px 20px; text-align: center; }
.skills h2 { margin-bottom: 30px; font-size: 2rem; }
.skills-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.skill-card { padding: 15px 25px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(10px); transition: 0.25s; }
.skill-card:hover { transform: translateY(-6px); background: rgba(255, 255, 255, 0.18); }

.gradient-text {
    background: linear-gradient(90deg, #00eaff, #00ffd5);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

footer { text-align: center; padding: 25px; opacity: 0.7; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}