/* General Styles */
:root {
    /* Dark Theme (Default) */
    --bg-color-dark: #000000;
    --text-primary-dark: #ffffff; /* Creme */
    --accent-color-dark: #0aff0a; /* Green */
    --secondary-accent-dark: #f5f5dc; /* Creme used as secondary accent/text */
    --card-bg-dark: #111111;
    --border-color-dark: #333;

    /* Light Theme */
    --bg-color-light: #ecece4; /* Creme */
    --text-primary-light: #000000;
    --accent-color-light: #000000; /* Black */
    --card-bg-light: #ecece4; /* Slightly darker creme for cards */
    --border-color-light: #333;

    /* Defaults (start with dark variables as base or handle via body class) */
    --font-main: 'Space Mono', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Theme Application */
body.dark-theme {
    background-color: var(--bg-color-dark);
    color: var(--text-primary-dark);
    --current-accent: var(--accent-color-dark);
    --current-card-bg: var(--card-bg-dark);
    --current-border: var(--border-color-dark);
}

body.light-theme {
    background-color: var(--bg-color-light);
    color: var(--text-primary-light);
    --current-accent: var(--accent-color-light);
    --current-card-bg: var(--card-bg-light);
    --current-border: var(--border-color-light);
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: inherit;
    border-bottom: 1px solid var(--current-border);
    backdrop-filter: blur(5px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--current-accent);
    letter-spacing: -1px;
}

.logo::before {
    content: '> ';
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    font-weight: 400;
    color: inherit;
    font-size: 0.9rem;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover {
    color: var(--current-accent);
    text-decoration: underline;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--current-accent);
}

/* Theme Switcher */
.theme-switcher {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

#theme-toggle {
    display: none;
}

.toggle-track {
    display: block;
    width: 40px;
    height: 20px;
    background-color: var(--current-border);
    border: 1px solid var(--current-accent);
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: var(--current-accent);
    transition: transform 0.3s;
}

#theme-toggle:checked + label .toggle-thumb {
    transform: translateX(20px);
}


/* Main Content */
main {
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

section {
    min-height: 80vh; /* Reduced from 100vh for better flow */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center vertically */
    padding: 4rem 0;
}

/* Titles */
h1, h2, h3, h4 {
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--current-accent);
    line-height: 1.1;
}

h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    border-bottom: 2px solid var(--current-accent);
    padding-bottom: 0.5rem;
}

h2::before {
    content: '# ';
    color: var(--current-accent);
}

/* Home Section */
.home-content {
    text-align: left;
}

.greeting {
    font-size: 1.2rem;
    margin-bottom: 0;
    opacity: 0.8;
}

.bio {
    font-size: 1.2rem;
    max-width: 600px;
    margin-top: 1rem;
    margin-bottom: 2rem;
    border-left: 3px solid var(--current-accent);
    padding-left: 1rem;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--current-accent);
    color: var(--current-accent);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
    background: transparent;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--current-accent);
    color: var(--bg-color-light); /* Invert for contrast */
}

body.light-theme .btn:hover {
    color: var(--bg-color-light); /* White text on green bg */
}

body.dark-theme .btn:hover {
    color: var(--bg-color-dark); /* Black text on green bg */
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-category h4 {
    margin-bottom: 0.5rem;
    color: var(--current-accent);
    border-bottom: 1px dashed var(--current-border);
    display: inline-block;
}

/* Experience & Education (LinkedIn Style) */
.linkedin-style-container {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    max-width: 100%;
}

.experience-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--current-card-bg);
    border: 1px solid var(--current-border);
    border-left: 4px solid var(--current-accent);
    transition: transform 0.2s;
}

.experience-item:hover {
    transform: translateX(10px);
}

.exp-logo-placeholder {
    width: 50px;
    height: 50px;
    background-color: var(--current-accent);
    color: var(--bg-color-dark); /* Always dark text on accent for contrast */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    flex-shrink: 0;
}

body.light-theme .exp-logo-placeholder {
    color: #fff;
}

.exp-details h3 {
    margin: 0;
    font-size: 1.2rem;
}

.exp-details h4 {
    margin: 0.2rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
}

.exp-date {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

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

.project-card {
    padding: 1.5rem;
    border: 1px solid var(--current-border);
    background-color: var(--current-card-bg);
    transition: all 0.3s;
}

.project-card:hover {
    border-color: var(--current-accent);
    box-shadow: 5px 5px 0px var(--current-accent);
    transform: translate(-5px, -5px);
}

.project-card h3 {
    margin-top: 0;
    color: var(--current-accent);
}

.project-card a {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--current-accent);
    font-size: 0.9rem;
}

.project-card a:hover {
    background-color: var(--current-accent);
    color: var(--bg-color-dark);
}

body.light-theme .project-card a:hover {
    color: var(--bg-color-light);
}

/* Achievements */
.achievements-list ul {
    list-style: none;
    padding: 0;
}

.achievements-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--current-border);
    display: flex;
    align-items: start;
}

.achievements-list li::before {
    content: '★';
    color: var(--current-accent);
    margin-right: 10px;
}

/* Contact Section */
.social-links {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.social-links a {
    text-decoration: none;
    font-size: 1.2rem;
    color: inherit;
    border: 1px solid var(--current-border);
    padding: 10px 20px;
    transition: all 0.3s;
    display: inline-block; /* Ensure padding works correctly and doesn't overlap */
}

.social-links a:hover {
    background-color: var(--current-accent);
    color: var(--bg-color-dark); /* Contrast */
    border-color: var(--current-accent);
}

body.light-theme .social-links a:hover {
    color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    border-top: 1px solid var(--current-border);
    margin-top: 4rem;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Header & Navigation */
    .logo {
        margin-right: auto;
    }

    .hamburger {
        display: block;
    }

    .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 ul {
        position: fixed;
        left: -100%;
        top: 60px; /* Below header */
        gap: 0;
        flex-direction: column;
        background-color: var(--current-card-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        border-bottom: 1px solid var(--current-border);
        padding: 2rem 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.5);
    }

    nav ul.active {
        left: 0;
    }

    nav ul li {
        margin: 16px 0;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 2.5rem; /* Smaller font size for mobile */
    }

    h2 {
        font-size: 1.8rem;
    }

    /* Layout adjustments */
    .about-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .linkedin-style-container {
        flex-direction: column;
    }

    .social-links {
        justify-content: flex-start; /* Or center, depending on preference. Left align matches content. */
    }
    
    .social-links a {
        width: 100%; /* Full width buttons on very small screens? Or just wrap */
        text-align: center;
        box-sizing: border-box;
    }
    
    /* Ensure padding for mobile view */
    section {
        padding: 3rem 0;
    }
}
