/* CSS Variables - Premium Dark Theme */
:root {
    --primary-color: #3b82f6;
    /* Bright Blue */
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary-color: #8b5cf6;
    /* Violet */
    --bg-dark: #0f172a;
    /* Slate 900 - Main Background */
    --bg-card: #1e293b;
    /* Slate 800 - Cards/Sections */
    --bg-hover: #334155;
    /* Slate 700 */
    --text-main: #f1f5f9;
    /* Slate 100 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border-color: #334155;
    --transition-speed: 0.3s;
    --header-height: 70px;
    --gradient-text: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.bg-light {
    background-color: transparent;
    /* Removed specific bg, using cards mainly */
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--text-main);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-text);
    border-radius: 2px;
}

.highlight {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header & Navigation */
.header {
    height: var(--header-height);
    background-color: rgba(15, 23, 42, 0.85);
    /* Glassmorphism */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header .container {
    max-width: 95%;
    /* Wider container for header to push elements to sides */
    padding: 0 40px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
}

.nav-list a:hover {
    color: var(--text-main);
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-list a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-main);
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    padding: 140px 0 80px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
}

.hero-name {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-title {
    font-size: 1.8rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, var(--text-muted), var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.hero-summary {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 32px;
    max-width: 700px;
}

.contact-info-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
    font-size: 1rem;
    color: var(--text-muted);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s;
}

.contact-link:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: all var(--transition-speed);
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--primary-glow);
}

.btn-outline {
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.1);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: transform var(--transition-speed);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.1);
}

/* Cards (Experience, Projects, Pubs) */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    transition: all var(--transition-speed);
    box-shadow: var(--shadow-card);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.card-subtitle {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 500;
}

.date {
    font-size: 0.85rem;
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-body ul.list-disc {
    list-style-type: disc;
    margin-left: 20px;
    color: var(--text-muted);
    margin-top: 16px;
}

.card-body ul li {
    margin-bottom: 10px;
    padding-left: 5px;
}

.tech-stack {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-style: italic;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

/* Timeline (Education) */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    padding-left: 40px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -49px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: var(--bg-dark);
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.timeline-subtitle {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.coursework {
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 8px;
}

/* Certifications List */
.cert-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.cert-list li {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.cert-list li:hover {
    background: var(--bg-hover);
    transform: translateX(5px);
    color: var(--text-main);
}

.cert-text-list {
    list-style: none;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.cert-text-list li {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cert-text-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cert-text-list strong {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
    min-width: 180px;
    /* Aligns the dash roughly */
}

/* Footer */
.footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background: var(--bg-card);
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-name {
        font-size: 2.8rem;
    }

    .header-content {
        padding: 0 16px;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger .bar {
        background-color: var(--text-main);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        transition: right 0.3s ease-in-out;
        padding-top: 60px;
        z-index: 999;
    }

    .nav-list.active {
        right: 0;
    }

    .nav-list li {
        margin: 20px 0;
    }
}

/* Animations */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100vw);
    }

    60% {
        opacity: 0.5;
        transform: translateX(20px);
        /* Slight overshoot */
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-summary {
    animation: slideInFromLeft 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s backwards;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
    /* Ensure it behaves as a block for margins */
}

/* Prevent horizontal scroll during full-width animations */
body {
    overflow-x: hidden;
}