/* style.css */
:root {
    /* Dark Theme (Default) */
    --primary-bg: #121212; /* Even darker for more contrast with secondary */
    --secondary-bg: #1e1e1e; /* Dark gray for cards/sections */
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --accent-color: #00b894; /* Refined teal/green */
    --accent-hover: #00a383;
    --border-color: #333333; /* Slightly lighter border */
    --link-color: var(--accent-color);
    --icon-color: var(--text-color);

    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Roboto Mono', monospace;

    --container-width: 1100px;
    --spacing-unit: 1rem; /* approx 16px */
    --header-height: 70px; /* Approximate header height, adjust as needed */
}

/* Light Theme Variables */
html[data-theme="light"] {
    --primary-bg: #f4f4f8; /* Light grayish blue */
    --secondary-bg: #ffffff;
    --text-color: #333333;
    --heading-color: #111111;
    /* --accent-color: #00796b; Darker teal for light bg */
    /* --accent-hover: #005f56; */
    --border-color: #d1d1d1;
    --icon-color: var(--text-color);
}


*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    font-family: var(--font-primary);
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* --- Header & Navigation --- */
.site-header {
    background-color: rgba(var(--primary-bg-rgb, 26, 26, 26), 0.85); /* Use RGB for transparency */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0; /* Height will be controlled by header-container */
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
/* Need to update primary-bg-rgb when theme changes, or use separate vars */
html[data-theme="light"] .site-header {
    background-color: rgba(244, 244, 248, 0.85); /* Light theme primary bg with alpha */
}
html[data-theme="dark"] .site-header {
    background-color: rgba(18, 18, 18, 0.85); /* Dark theme primary bg with alpha */
}


.header-container { /* Renamed from .site-header .container for clarity */
    display: flex;
    justify-content: center; /* Centers main-nav */
    align-items: center;
    height: 100%;
    position: relative; /* For absolute positioning of controls */
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: calc(var(--spacing-unit) * 1.5);
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    padding: 0.5rem 0.2rem; /* Smaller horizontal padding */
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.header-controls {
    position: absolute;
    right: var(--spacing-unit);
    display: flex;
    align-items: center;
    gap: var(--spacing-unit);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--icon-color);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle svg {
    width: 22px;
    height: 22px;
    transition: color 0.3s ease;
}
.theme-toggle:hover svg {
    color: var(--accent-color);
}
.moon-icon { display: none; } /* Initially hide moon */
html[data-theme="light"] .sun-icon { display: none; }
html[data-theme="light"] .moon-icon { display: block; }
html[data-theme="dark"] .sun-icon { display: block; }
html[data-theme="dark"] .moon-icon { display: none; }


.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001; /* Above nav */
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 2px; /* Thinner lines */
    background-color: var(--heading-color);
    margin: 6px 0; /* More spacing */
    transition: all 0.3s ease-in-out;
}


/* --- Hero Section --- */
.hero-section {
    min-height: 100vh; /* Full viewport height */
    display: flex; /* For vertical centering of hero-content-wrapper */
    padding-top: var(--header-height); /* Account for sticky header */
    box-sizing: border-box;
    background: linear-gradient(rgba(var(--primary-bg-rgb, 18, 18, 18), 0.7), rgba(var(--primary-bg-rgb, 18, 18, 18), 0.9));
    /* Optional: , url('your-subtle-background-image.jpg') no-repeat center center/cover; */
    transition: background 0.3s ease;
}
html[data-theme="light"] .hero-section {
    background: linear-gradient(rgba(244, 244, 248, 0.7), rgba(244, 244, 248, 0.9));
}
html[data-theme="dark"] .hero-section {
    background: linear-gradient(rgba(18, 18, 18, 0.7), rgba(18, 18, 18, 0.9));
}

.hero-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center content in the remaining space */
    align-items: center; /* Horizontally center content */
    text-align: center;
    flex-grow: 1; /* Take up available space in hero-section */
    padding-bottom: var(--header-height); /* Balance top padding if needed for perfect center */
}


.hero-section h1 {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--heading-color);
    margin-bottom: var(--spacing-unit);
    font-weight: 700;
}

.hero-section .subtitle {
    font-family: var(--font-primary);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--accent-color);
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    font-weight: 400;
}

.hero-section .hero-intro {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto calc(var(--spacing-unit) * 2);
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-bg);
    padding: calc(var(--spacing-unit) * 0.8) calc(var(--spacing-unit) * 2);
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
    border: 2px solid var(--accent-color);
}

.cta-button:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
}
html[data-theme="light"] .cta-button { /* Ensure contrast for light mode CTA */
    color: #fff; /* Or a very dark color if accent changes significantly */
}


/* --- General Content Sections --- */
.content-section {
    padding: calc(var(--spacing-unit) * 4) 0;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}
.content-section:last-of-type {
    border-bottom: none;
}

.content-section h2 {
    font-family: var(--font-primary);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--heading-color);
    margin-bottom: calc(var(--spacing-unit) * 2);
    text-align: center;
    position: relative;
    padding-bottom: var(--spacing-unit);
    font-weight: 700;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    transition: background-color 0.3s ease;
}

/* --- About Section --- */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}
.about-content p {
    margin-bottom: var(--spacing-unit);
    font-size: 1.1rem;
}

/* --- Experience Section (Timeline) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--border-color);
    transition: background-color 0.3s ease;
}

.timeline-item {
    position: relative;
    margin-bottom: calc(var(--spacing-unit) * 2.5);
    padding-left: calc(var(--spacing-unit) * 3);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 3px solid var(--primary-bg); /* Use primary-bg for the "cutout" effect */
    z-index: 1;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.timeline-date {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: calc(var(--spacing-unit) * 0.25);
    font-weight: 700;
    transition: color 0.3s ease;
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--heading-color);
    margin-bottom: calc(var(--spacing-unit) * 0.25);
    font-weight: 600;
}

.timeline-content .company {
    font-style: italic;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

/* --- Expertise Section --- */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
}

.expertise-item {
    background-color: var(--secondary-bg);
    padding: calc(var(--spacing-unit) * 1.5);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.expertise-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); /* Softer shadow */
}
html[data-theme="light"] .expertise-item:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}


.expertise-item .icon-placeholder {
    font-family: var(--font-secondary);
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: var(--spacing-unit);
    font-weight: bold;
    transition: color 0.3s ease;
}

.expertise-item h3 {
    font-size: 1.2rem;
    color: var(--heading-color);
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    font-weight: 600;
}

/* --- Contact Section --- */
.contact-section p {
    text-align: center;
    max-width: 600px;
    margin: 0 auto calc(var(--spacing-unit) * 1.5);
    font-size: 1.1rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: var(--spacing-unit);
    flex-wrap: wrap;
}

.contact-button {
    display: inline-block;
    background-color: var(--secondary-bg);
    color: var(--accent-color);
    padding: calc(var(--spacing-unit) * 0.7) calc(var(--spacing-unit) * 1.5);
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
    border: 2px solid var(--accent-color);
    min-width: 150px;
    text-align: center;
}

.contact-button:hover {
    background-color: var(--accent-color);
    color: var(--primary-bg); /* Text color should contrast with accent */
    transform: translateY(-2px);
}
html[data-theme="light"] .contact-button:hover {
    color: #fff; /* Ensure good contrast on light theme hover */
}


/* --- Footer --- */
.site-footer {
    background-color: var(--secondary-bg);
    color: var(--text-color);
    opacity: 0.8;
    padding: calc(var(--spacing-unit) * 2) 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.site-footer p {
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}
.site-footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.site-footer a:hover {
    text-decoration: underline;
}


/* --- Responsive Design --- */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height); /* Align below header */
        left: 0;
        right: 0;
        background-color: var(--secondary-bg); /* Solid background */
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        padding: var(--spacing-unit) 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 999; /* Below header controls, above content */
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .main-nav li {
        width: 100%;
        text-align: center;
    }
    .main-nav a {
        display: block;
        padding: var(--spacing-unit) 0;
        width: 100%;
    }
    .main-nav a::after { display: none; }

    .mobile-nav-toggle {
        display: block; /* Show hamburger */
    }
    .theme-toggle { /* Keep theme toggle visible */
       /* It's already part of .header-controls which is fine */
    }
    
    .mobile-nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .mobile-nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .timeline::before { left: 10px; }
    .timeline-item { padding-left: calc(var(--spacing-unit) * 2.5); }
    .timeline-item::before { width: 15px; height: 15px; left: 3px; }

    .hero-section h1 { font-size: clamp(2rem, 8vw, 3rem); }
    .hero-section .subtitle { font-size: clamp(1rem, 4vw, 1.5rem); }
    .hero-intro { font-size: 1rem; }
}

/* --- Scroll Down Indicator --- */
.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 1;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    display: flex; /* Use flexbox for alignment */
    flex-direction: column; /* Stack text and arrow vertically */
    align-items: center; /* Center items horizontally */
    text-decoration: none; /* Remove underline from <a> tag */
    cursor: pointer;
}

.scroll-down-indicator.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.scroll-down-text {
    font-size: 0.8rem; /* Adjust size as needed */
    color: var(--text-color);
    margin-bottom: 5px; /* Space between text and arrow */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.scroll-down-indicator svg {
    color: var(--text-color);
    width: 28px; /* Slightly smaller arrow if text is present */
    height: 28px;
    animation: bounce 2s infinite;
    transition: color 0.3s ease;
}

.scroll-down-indicator:hover .scroll-down-text,
.scroll-down-indicator:hover svg {
    color: var(--accent-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px); /* Adjusted bounce height */
    }
    60% {
        transform: translateY(-4px); /* Adjusted bounce height */
    }
}

/* Responsive adjustments for scroll indicator */
@media (max-width: 768px) {
    .scroll-down-indicator {
        bottom: 20px;
    }
    .scroll-down-text {
        font-size: 0.75rem;
    }
    .scroll-down-indicator svg {
        width: 24px;
        height: 24px;
    }
}