/* Base Variables & Theming */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --primary-color: #000000;
    --secondary-color: #f5f5f5;
    --border-color: #eaeaea;
    --card-bg: #ffffff;
    --card-hover: #fafafa;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: 0.3s ease;
}

html.dark {
    --bg-color: #0a0a0a;
    --text-color: #ededed;
    --text-muted: #a1a1aa;
    --primary-color: #ffffff;
    --secondary-color: #1f1f1f;
    --border-color: #333333;
    --card-bg: #141414;
    --card-hover: #1a1a1a;
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed header */
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: rgba(var(--bg-color-rgb), 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background-color var(--transition), border-color var(--transition);
}
/* Adding RGB fallback trick for backdrop filter */
:root { --bg-color-rgb: 255, 255, 255; }
html.dark { --bg-color-rgb: 10, 10, 10; }

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-color);
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
#theme-toggle:hover {
    color: var(--text-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Account for navbar */
}

.hero-content {
    max-width: 700px;
}

.greeting {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.name {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.role {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.bio {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Sections General */
section {
    padding: 6rem 0;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    background-color: var(--card-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
html.dark .project-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-icon {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.project-link {
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap var(--transition);
}

.project-card:hover .project-link {
    gap: 0.75rem;
}

/* Skills */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    transition: transform var(--transition);
}
.skill-pill:hover {
    transform: translateY(-2px);
}

/* Education Timeline */
.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding-left: 3rem;
    margin-top: 0.5rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background-color: var(--border-color);
}
.timeline-item {
    position: relative;
}
.timeline-dot {
    position: absolute;
    left: -2.45rem;
    top: 1.6rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-muted);
    border: 2px solid var(--bg-color);
    outline: 2px solid var(--border-color);
}
.timeline-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 2.25rem;
    transition: box-shadow var(--transition), transform var(--transition);
}
.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.07);
}
html.dark .timeline-content:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.timeline-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}
.timeline-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
}
.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
}
.timeline-sub {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.timeline-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.1rem;
}
.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.timeline-tags span {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
}

/* Certifications */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
}
.cert-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: all var(--transition);
}
.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.07);
}
html.dark .cert-card:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}
.cert-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.cert-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-muted);
}
.cert-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.25rem 0.7rem;
}
.cert-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}
.cert-issuer {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.cert-meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    margin-top: 0.1rem;
}
.cert-date,
.cert-skill {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.cert-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    transition: all var(--transition);
    width: fit-content;
    margin-top: auto;
}
.cert-link:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}


/* Contact Section */
.contact-wrapper {
    max-width: 600px;
}
.contact-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}

.submit-btn {
    align-self: flex-start;
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.2rem;
    transition: color var(--transition);
}
.social-links a:hover {
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* In a real app, you'd add a mobile hamburger menu */
    }
    
    #theme-toggle {
        display: block; /* Ensure it stays visible */
    }

    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Floating Music Button */
.floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all var(--transition);
    z-index: 100;
}
.floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.floating-btn.playing i {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}
