/* --- GENERAL STYLES --- */
:root {
    --bg-color-light: #f5f5f7;
    --text-color-light: #1d1d1f;
    --primary-color-light: #1d1d1f; /* Black for headers */
    --link-color-light: #0066cc;
    --card-bg-light: #ffffff;
    --border-color-light: #d2d2d7;

    --bg-color-dark: #000000;
    --text-color-dark: #f5f5f7;
    --primary-color-dark: #f5f5f7; /* White for headers */
    --link-color-dark: #2997ff;
    --card-bg-dark: #1a1a1a;
    --border-color-dark: #424245;

    --bg-color: var(--bg-color-light);
    --text-color: var(--text-color-light);
    --primary-color: var(--primary-color-light);
    --link-color: var(--link-color-light);
    --card-bg: var(--card-bg-light);
    --border-color: var(--border-color-light);

    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --header-font-weight: 600;
    --body-font-weight: 400;
    --transition-speed: 0.3s;
}

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

body.dark-mode {
    --bg-color: var(--bg-color-dark);
    --text-color: var(--text-color-dark);
    --primary-color: var(--primary-color-dark);
    --link-color: var(--link-color-dark);
    --card-bg: var(--card-bg-dark);
    --border-color: var(--border-color-dark);
}



.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 2rem;
}

h1, h2, h3 {
    font-weight: var(--header-font-weight);
    color: var(--primary-color);
}

h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    text-decoration: underline;
}

/* --- HEADER & NAV --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* Default translucent */
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

body.dark-mode .main-header {
    background-color: rgba(30, 30, 30, 0.8); /* Default translucent */
}

nav {
    display: flex;
    justify-content: space-between; /* Spreads items out */
    align-items: center;
    padding: 1rem 2rem;
}

.menu-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001; /* Ensure it's above the overlay */
}

.menu-toggle .hamburger {
    fill: none;
    stroke: var(--text-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s ease;
}

.menu-toggle.open .hamburger line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.open .hamburger line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open .hamburger line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between icons */
}

.nav-links {
    list-style: none;
    display: flex; /* Show on desktop */
    gap: 1.5rem;
    overflow-x: auto; /* Enable horizontal scrolling */
    white-space: nowrap; /* Prevent wrapping */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding-bottom: 5px; /* Space for scrollbar */
}

.nav-links a {
    font-weight: 400; /* Adjusted for Apple font */
    font-size: 0.9rem;
    color: var(--text-color);
    text-decoration: none; /* Start with no underline */
    transition: text-decoration-color var(--transition-speed), opacity var(--transition-speed);
    flex-shrink: 0; /* Prevent links from shrinking */
    padding: 0 0.5rem; /* Add some horizontal padding */
}

.nav-links a:hover {
    text-decoration: underline;
    text-decoration-color: var(--link-color); /* Use link color for underline */
    text-underline-offset: 0.2em; /* Space between text and underline */
    opacity: 1; /* Ensure full opacity on hover */
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-overlay.open {
    visibility: visible;
    opacity: 1;
}

.mobile-menu-overlay .nav-links {
    flex-direction: column;
    gap: 2rem;
    font-size: 1.5rem;
    text-align: center;
}

.mobile-menu-overlay .nav-links a {
    color: var(--text-color);
    font-size: 1.5rem;
}

/* --- THEME TOGGLE BUTTON --- */
.theme-toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.theme-toggle-button:hover {
    background-color: var(--border-color);
}

.theme-toggle-button svg {
    width: 24px;
    height: 24px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.theme-toggle-button .sun-icon {
    display: block; /* Show sun by default */
}

.theme-toggle-button .moon-icon {
    display: none; /* Hide moon by default */
}

body.dark-mode .theme-toggle-button .sun-icon {
    display: none;
}

body.dark-mode .theme-toggle-button .moon-icon {
    display: block;
}

.github-header-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    margin-left: 10px; /* Add some spacing from the theme toggle */
}

.github-header-link:hover {
    background-color: var(--border-color);
}

.github-header-link svg {
    width: 24px;
    height: 24px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.linkedin-header-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    margin-left: 10px; /* Add some spacing from the github icon */
}

.linkedin-header-link:hover {
    background-color: var(--border-color);
}

.linkedin-header-link svg {
    width: 24px;
    height: 24px;
    color: #0A66C2; /* LinkedIn blue */
    transition: color 0.3s ease;
}

/* --- SECTIONS --- */
section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section:last-child {
    border-bottom: none;
}

/* --- HERO SECTION --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding-top: 80px; /* Offset for fixed header */
    padding-bottom: 0; /* Remove bottom padding */
}

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

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
    margin-bottom: 1.5rem;
}

/* --- LIST STYLES (Formerly Cards) --- */
.card {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* --- SKILLS SECTION --- */
.skill-category {
    margin-bottom: 2rem;
}

.skill-category h3 {
    margin-bottom: 1rem;
    text-align: left; /* Override the centered h2 */
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background-color: var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* --- CONTACT SECTION --- */
.contact-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    font-size: 1.2rem;
    margin-top: 2rem;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 1rem;
    }

    nav {
        padding: 1rem;
        flex-wrap: nowrap; /* Prevent wrapping of main nav items */
        justify-content: space-between; /* Keep items spread out */
    }

    .desktop-nav-links {
        display: none; /* Hide desktop nav links on mobile */
    }

    .menu-toggle {
        display: block; /* Show hamburger on mobile */
    }

    .header-icons {
        /* No specific width, let flexbox handle it */
        justify-content: flex-end; /* Align icons to the right */
    }

    .contact-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-icons {
        gap: 5px; /* Reduce gap between icons on mobile */
    }

    .theme-toggle-button,
    .github-header-link,
    .linkedin-header-link {
        width: 36px;
        height: 36px;
        padding: 0.3rem; /* Reduce padding */
    }

    .theme-toggle-button svg,
    .github-header-link svg,
    .linkedin-header-link svg {
        width: 20px;
        height: 20px;
    }
}