/* Custom CSS Variables */
:root {
    --color-background-dark: #121212; /* Charcoal */
    --color-background-light: #1e1e1e; /* Darker Navy/Gray for cards */
    --color-accent: #00bcd4; /* Vibrant Teal */
    --color-text-primary: #f0f0f0; /* Light Gray/White */
    --color-text-secondary: #aaaaaa; /* Medium Gray */
    --font-family: 'Roboto', sans-serif;
    --border-radius: 8px;
}

/* Base Styles & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-background-dark);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #4dd0e1; /* Lighter Teal on hover */
}

/* Reusable Components */
.section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    color: var(--color-accent);
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
}

.accent-text {
    color: var(--color-accent);
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn {
    background-color: var(--color-accent);
    color: var(--color-background-dark);
    border: 2px solid var(--color-accent);
}

.primary-btn:hover {
    background-color: transparent;
    color: var(--color-accent);
}

.card {
    background-color: var(--color-background-light);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Skill Tags (Reused for Projects) */
.skill-tag {
    display: inline-block;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
    margin-right: 5px;
    margin-bottom: 5px;
}

.basic-tag {
    background-color: rgba(0, 189, 212, 0.2);
    color: var(--color-accent);
}

.advanced-tag {
    background-color: rgba(18, 182, 100, 0.2); /* Another accent color for contrast */
    color: #12b664;
}

/* --- Header/Navigation --- */
#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-background-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    color: var(--color-text-primary);
    padding: 10px 15px;
    font-weight: 400;
    font-size: 1rem;
    border-bottom: 2px solid transparent;
}

.nav-links li a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--color-text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
}

.hero .greeting {
    font-size: 1.25rem;
    color: var(--color-accent);
    margin-bottom: 10px;
    font-weight: 300;
}

.hero .headline {
    font-size: clamp(2rem, 5vw, 4rem); /* Responsive font size */
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero .description {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
}

/* --- Skills Section --- */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

.skill-card {
    flex: 1 1 200px; /* Allows cards to wrap nicely */
    max-width: 250px;
    text-align: center;
    padding: 30px 20px;
    background-color: var(--color-background-light);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 0 15px rgba(0, 189, 212, 0.5); /* Glowing effect */
    transform: translateY(-5px);
}

.skill-icon {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 15px;
}

.skill-name {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* --- Projects Section (NEW) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    /* Inherits .card styles */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes links to the bottom */
}

.project-card .card-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-card .card-description {
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.project-tags {
    margin-bottom: 20px;
}

.project-links a {
    margin-right: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.project-links a i {
    margin-right: 5px;
}

/* --- Leadership Section --- */
.leader-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.leader-card {
    flex: 1 1 45%; /* Two cards per row on desktop */
    min-width: 300px;
    padding: 30px;
    border-left: 5px solid var(--color-accent);
    /* Inherits .card styles */
}

.leader-card .card-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.leader-card .card-description {
    color: var(--color-text-secondary);
}

/* --- Education Section (Timeline) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Vertical line */
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--color-text-secondary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: var(--color-accent);
    border-radius: 50%;
    z-index: 1;
    top: 30px;
}

/* Positioning dots */
.timeline-item:nth-child(odd) .timeline-dot {
    right: -7.5px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -7.5px;
}

.timeline-content {
    /* Inherits .card styles */
    padding: 20px;
}

.timeline-content .institution {
    font-style: italic;
    color: var(--color-text-secondary);
    margin-bottom: 5px;
}

.timeline-content .year {
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}


/* --- Contact Section (Form) --- */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    /* Inherits .card styles */
    background-color: var(--color-background-light);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--color-accent);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: var(--border-radius);
    background-color: #2a2a2a;
    color: var(--color-text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 5px rgba(0, 189, 212, 0.5);
}

.form-group textarea {
    resize: vertical;
}

.form-note {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 15px;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 25px 20px;
    background-color: #0d0d0d;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer .social-links {
    margin-top: 10px;
}

.footer .social-links a {
    font-size: 1.2rem;
    margin: 0 10px;
    color: var(--color-text-secondary);
}

.footer .social-links a:hover {
    color: var(--color-accent);
}

/* ====================================
   Media Queries (Mobile-First)
   ==================================== */

/* Tablet and Smaller Desktop (Layout Adjustments) */
@media (max-width: 768px) {
    .nav-links {
        /* Mobile menu setup */
        position: absolute;
        top: 66px; /* Below the header */
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--color-background-dark);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        height: 0; /* Initially collapsed */
        overflow: hidden;
        transition: height 0.3s ease;
    }

    .nav-links.active {
        height: 300px; /* Increased height for the new link */
        padding: 10px 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    .nav-links li a {
        display: block;
    }

    .menu-toggle {
        display: block;
    }

    .hero .headline {
        font-size: 2.5rem;
    }

    .skills-grid {
        gap: 15px;
    }
    
    .skill-card {
        flex: 1 1 45%; /* Max two cards per row on tablet */
        max-width: 45%;
    }

    /* Projects Grid - Two columns on tablet */
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    /* Education Timeline adjustments for smaller screens */
    .timeline::after {
        left: 31px; /* Move line to the left */
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0; /* All items aligned to the left */
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 23px; /* Align dots with the line */
    }
}

/* Mobile Devices (Extra Small Screens) */
@media (max-width: 500px) {
    .section {
        padding: 40px 15px;
    }

    .section-title {
        font-size: 2rem;
    }

    .skill-card {
        flex: 1 1 100%; /* One card per row on mobile */
        max-width: 100%;
    }

    /* Projects Grid - One column on mobile */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .leader-card {
        flex: 1 1 100%;
    }
}