:root {
    --bg-dark: #020617;
    --bg-card: rgba(30, 41, 59, 0.5);
    --accent: #38bdf8;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Canvas */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 10%;
    background: rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}
nav a {
    text-decoration: none;
    color: white;
}

/* --- Hamburger Menu Logic --- */

/* Hide hamburger on desktop */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex; /* Show on mobile */
    }

    .nav-links {
        position: fixed;
        right: -100%; /* Hide off-screen */
        top: 0;
        flex-direction: column;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(15px);
        width: 70%;
        height: 100vh;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        right: 0; /* Slide in */
    }

    /* Transform Burger to 'X' */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    nav ul li {
        margin-left: 0; /* Reset desktop margin */
    }
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span { color: var(--accent); }

nav ul { display: flex; list-style: none; }

nav ul li { margin-left: 2rem; }

nav ul li a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: 0.3s;
}

nav ul li a:hover { color: var(--accent); }

/* home Section */
#home {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

#home h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 0.5rem;
}

#home h1 span { color: var(--accent); }

.typewriter {
    font-family: monospace;
    color: var(--text-secondary);
    font-size: 1.2rem;
    border-right: 2px solid var(--accent);
    white-space: nowrap;
    overflow: hidden;
    margin: 0 auto;
    animation: typing 3s steps(30, end), blink 0.8s infinite;
}

/* Buttons */
.btn {
    display: inline-block;
    margin-top: 2.5rem;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--bg-dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
}

/* Education Section */
#education, #certifications {
    padding: 100px 10%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.card-icon { font-size: 3rem; margin-bottom: 1.5rem; }

.certification-logo img {
    display: block;
    width: 15rem;
    margin: auto;
}
.ccna {
    margin-top: 2.5rem;
}

/* Footer */
footer {
    padding: 80px 10%;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
}

.icon img {
    width: 2em;
}

.email-link, .links {
    display: block;
    font-size: 1em;
    color: var(--accent);
    text-decoration: none;
    margin: 1.5rem 0;
    font-weight: 600;
}

.footer-content .links {
    letter-spacing: 1rem;
}

.copyright {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Animations */
@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink { from, to { border-color: transparent } 50% { border-color: var(--accent) } }

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Update the grid to handle 3 cards better */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Status Badge for UPEI */
.card.current {
    position: relative;
    border: 1px solid var(--accent);
    background: rgba(56, 189, 248, 0.1); /* Slight glow for current studies */
}

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: var(--bg-dark);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}




/* Responsive adjustment for small screens */
@media (max-width: 768px) {
    .card-container {
        grid-template-columns: 1fr;
    }
}
