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

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    color: #e5e5e5;
    line-height: 1.7;
}

/* Light theme */
[data-theme="light"] body {
    background: #f5f5f5;
    color: #171717;
}

[data-theme="light"] .cert-tile {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .cert-title {
    color: #171717;
}

[data-theme="light"] .section-subtitle {
    color: #525252;
}

[data-theme="light"] #nav {
    background: rgba(245, 245, 245, 0.85);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nav-links a {
    color: #525252;
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
    color: #0284c7;
}

[data-theme="light"] .logo {
    color: #0284c7;
}

[data-theme="light"] footer {
    border-top-color: rgba(0, 0, 0, 0.08);
    color: #737373;
}

[data-theme="light"] .cert-thumb {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.05) 0%, rgba(2, 132, 199, 0.02) 100%);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .cert-thumb svg {
    color: #0284c7;
}

/* Navigation */
#nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #0ea5e9;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #a3a3a3;
    transition: color 0.3s;
    text-decoration: none;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #0ea5e9;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0ea5e9;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#theme-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #a3a3a3;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#theme-toggle:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
}

#menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #e5e5e5;
    cursor: pointer;
}

/* Mobile menu */
#mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#mobile-menu.open {
    display: flex;
}

#menu-close {
    position: absolute;
    top: 1.2rem;
    right: 2rem;
    background: none;
    border: none;
    color: #e5e5e5;
    cursor: pointer;
}

#mobile-menu ul {
    list-style: none;
    text-align: center;
}

#mobile-menu li {
    margin: 1.5rem 0;
}

#mobile-menu a {
    font-size: 1.5rem;
    font-weight: 500;
    color: #a3a3a3;
    text-decoration: none;
    transition: color 0.3s;
}

#mobile-menu a:hover {
    color: #0ea5e9;
}

/* Main content */
.certs-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: #0ea5e9;
    margin-top: 0.5rem;
    border-radius: 2px;
}

.section-subtitle {
    color: #a3a3a3;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    margin-top: -0.5rem;
}

/* Certifications grid */
.certs-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cert-tile {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s;
}

.cert-tile.revealed {
    opacity: 1;
    transform: translateY(0);
}

.cert-tile:hover {
    border-color: #0ea5e9;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.4);
}

.cert-thumb {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(14, 165, 233, 0.02) 100%);
    padding: 1.8rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cert-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.cert-tile:hover .cert-thumb img {
    transform: scale(1.05);
}

.cert-thumb svg {
    width: 70px;
    height: 70px;
    color: #0ea5e9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.cert-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cert-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    line-height: 1.4;
    color: #fff;
}

.cert-issuer {
    font-size: 0.8rem;
    color: #0ea5e9;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.cert-date {
    font-size: 0.7rem;
    color: #737373;
    margin-bottom: 0.8rem;
}

.cert-credential {
    margin-top: auto;
    font-size: 0.75rem;
}

.cert-credential span {
    color: #525252;
    font-style: italic;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: #525252;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

footer a {
    color: #525252;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #0ea5e9;
}

/* Back to top */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 90;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e5e5e5;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #fff;
    transform: translateY(-3px);
}

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
    z-index: 101;
    transition: width 0.1s linear;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    #menu-toggle {
        display: block;
    }
    .certs-section {
        padding: 5rem 1.5rem 3rem;
    }
    .certs-tiles-grid {
        gap: 1rem;
    }
    .cert-thumb img {
        width: 60px;
        height: 60px;
    }
    #back-to-top {
        bottom: 1.2rem;
        left: 1.2rem;
        width: 40px;
        height: 40px;
    }
}