@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');
@import url('animations.css');
@import url('components.css');
@import url('sections.css');
@import url('responsive.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #0a0e1a;
    --second-bg-color: #131826;
    --third-bg-color: #1a1f2e;
    --text-color: #ededed;
    --main-color: #00d9ff;
    --accent-color: #667eea;
    --shadow-glow: 0 0 25px rgba(0, 217, 255, 0.5);
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
    scroll-padding-top: 80px;
}

body {
    background: radial-gradient(ellipse at bottom, #0b1c2a 0%, #080d13 50%, #06090f 100%);
    color: var(--text-color);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 217, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
    position: relative;
}

/* Starfield canvas sits behind home content */
#starfield {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.home-content,
.home-img {
    position: relative;
    z-index: 1;
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 1.5rem 9%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
    cursor: default;
    justify-self: start;
    background: linear-gradient(135deg, var(--main-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar {
    display: flex;
    justify-self: center;
    align-items: center;
    gap: 3rem;
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

.navbar a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--main-color), var(--accent-color));
    transition: width 0.3s ease;
}

.navbar a:hover::before,
.navbar a.active::before {
    width: 100%;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
}

.header-actions {
    justify-self: end;
}

/* SCROLLBAR STYLING */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--main-color), var(--accent-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--main-color));
}

/* SELECTION STYLING */
::selection {
    background: var(--main-color);
    color: var(--bg-color);
}

/* ============ Certificates Section ============ */
.certificates {
    padding: 80px 5%;
    background: var(--second-bg-color);
}

.certificates .heading {
    text-align: center;
    margin-bottom: 50px;
}

.certificates-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.certificate-card {
    background: var(--bg-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.certificate-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
}

.certificate-card.hidden-cert {
    display: none;
}

.certificate-card.show-cert {
    display: flex;
}

.certificate-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #1a1a1a;
}

.certificate-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.certificate-card:hover .certificate-img img {
    transform: scale(1.05);
}

.certificate-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.certificate-info h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 2.8em;
}

.certificate-info .issuer {
    color: var(--main-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.certificate-info .year {
    color: #888;
    font-size: 0.85rem;
    margin-top: auto;
}

.view-all-container {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    background: linear-gradient(135deg, var(--main-color), var(--accent-color));
    color: var(--bg-color);
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.4);
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .certificates-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .certificate-img {
        height: 180px;
    }
}