:root {
    /* VS Code Dark Theme Palette */
    --bg-color: #1e1e1e;
    /* VS Code Main Background */
    --card-bg: #252526;
    /* VS Code Sidebar/Panel Background */
    --text-main: #d4d4d4;
    /* VS Code Default Text */
    --text-secondary: #858585;
    /* VS Code Comment Color */
    --accent-blue: #569cd6;
    /* VS Code Keyowrd Blue */
    --accent-green: #4ec9b0;
    /* VS Code Class Green */
    --accent-orange: #ce9178;
    /* VS Code String Orange */
    --border-color: #3e3e42;
    /* VS Code Border */

    /* Pastels for Tags (Dracula/Monokai vibes to fit dark theme) */
    --tag-bg: #3c3c3c;
    --tag-text: #9cdcfe;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;

    /* Spacing */
    --section-padding: 100px 20px;
    --max-width: 1000px;
    --border-radius: 8px;
    /* Slightly sharper for code look */

    /* Transitions */
    --transition-smooth: all 0.4s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    font-smoothing: antialiased;
}

/* Scrollbar similar to VS Code */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 6px;
    border: 3px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: #4f4f4f;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

.center-text {
    text-align: center;
}

/* Typography Utilities */
h1,
h2,
h3 {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 64px;
    margin-bottom: 10px;
}

.hero-tagline {
    font-family: var(--font-mono);
    /* Code feel */
    font-size: 28px;
    color: var(--accent-green);
    margin-bottom: 30px;
    font-weight: 400;
}

h2 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    /* Removed positioning hacks */
}

/* Subtle underline for H2 */
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-blue);
    margin: 10px auto 0;
    border-radius: 2px;
}

h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--accent-blue);
}

p {
    color: var(--text-main);
    font-size: 18px;
    margin-bottom: 20px;
}

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Styling */
section {
    padding: var(--section-padding);
}

/* Hero Section Specifics */
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 85vh;
}

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

.hero-image img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--card-bg);
    box-shadow: 0 0 0 4px var(--accent-blue);
    /* Glowing ring effect */
    filter: grayscale(100%);
    /* B&W photo as requested indirectly by style */
    transition: var(--transition-smooth);
}

.hero-image img:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
}

/* Button Component - VS Code Style */
.hero-actions {
    margin-top: 40px;
    /* Increased separation */
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-block;
    background: var(--accent-blue);
    color: white;
    padding: 14px 32px;
    /* INCREASED PADDING */
    border-radius: 4px;
    /* Flatter buttons */
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn:hover {
    background: #4ea6ea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
    }

    /* Navbar Adjustment */
    .navbar {
        position: relative;
        /* Unstick on mobile if it causes issues, or keep fixed */
        padding: 15px 0;
    }

    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        display: flex;
        gap: 15px;
        font-size: 13px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        padding: 0;
    }

    .nav-logo img {
        height: 40px;
    }

    /* Hero Section */
    .hero-container {
        display: flex;
        flex-direction: column-reverse;
        /* Image on top */
        align-items: center;
        justify-content: center;
        text-align: center;
        /* Center text */
        padding-top: 40px;
        /* Reduced since nav might not be fixed or is smaller */
        padding-bottom: 60px;
        min-height: auto;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
        margin: 20px auto 0;
        /* Center block */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-image {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-bottom: 20px;
    }

    .hero-image img {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }

    h1 {
        font-size: 32px;
        line-height: 1.2;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-tagline {
        font-size: 18px;
        margin: 10px auto 20px;
        text-align: center;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px;
        /* Constrain width */
        margin: 0 auto;
    }

    .btn {
        width: 100%;
        display: block;
        text-align: center;
    }

    /* Section Headers */
    h2 {
        font-size: 28px;
        margin-bottom: 30px;
        text-align: center;
        width: 100%;
    }

    h2::after {
        margin: 10px auto 0;
        /* Ensure underline is centered */
    }

    /* Grid Layouts - Force Column */
    .grid-2-col {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    /* Projects Grid - Explicit Fix */
    .projects-grid {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    /* Timeline Fixes */
    .timeline {
        border-left: 2px solid var(--border-color);
        padding-left: 20px;
        margin-left: 10px;
        width: auto;
    }

    .timeline-item {
        width: 100%;
        margin-bottom: 40px;
        padding: 20px;
        /* Internal padding */
    }

    .timeline-item::before {
        left: -27px;
        /* Align dot */
        top: 25px;
        /* Align with top padding */
    }

    /* Typography */
    p {
        text-align: center;
        /* Center paragraph text generally */
    }

    /* Exception for timeline, left align looks better for reading */
    .timeline-item p,
    .timeline-item li,
    .project-card p {
        text-align: left;
    }

    .timeline-item li {
        margin-left: 0;
        padding-left: 0;
        list-style-position: inside;
        font-size: 14px;
        margin-bottom: 8px;
    }

    .card {
        width: 100%;
        box-sizing: border-box;
    }
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
    transform: translateY(-2px);
}

/* Card Style - VS Code Panels */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 35px;
    transition: var(--transition-smooth);
    height: 100%;
    box-sizing: border-box;
    width: 100%;
}

.card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

@media (max-width: 768px) {
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        /* Center align text for mobile flow */
    }

    /* Tech Stack Centering */
    .skills-list h3 {
        text-align: center;
    }

    .tags {
        justify-content: center;
        /* Center balloons */
    }

    /* Timeline Fixes */
    .timeline {
        border-left: 2px solid var(--border-color);
        padding-left: 25px;
        /* Reduced padding */
        margin-left: 5px;
        /* Reduced margin */
        margin-right: 0;
    }

    .timeline-item {
        margin-bottom: 40px;
        font-size: 28px;
    }
}

/* Tags - Pastel Code Tokens */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-family: var(--font-mono);
    /* Monospace tags */
    border: 1px solid var(--border-color);
    transition: 0.2s;
}

.tag:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(78, 201, 176, 0.1);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card h3 {
    font-family: var(--font-mono);
}

.project-card .lang {
    color: var(--accent-orange);
    font-family: var(--font-mono);
    font-size: 13px;
    margin-bottom: 15px;
}

.mini-tags span {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 5px;
}

.link-arrow {
    display: inline-block;
    margin-top: auto;
    /* Push to bottom */
    padding-top: 20px;
    color: var(--accent-blue);
    font-weight: 500;
    text-decoration: none;
}

.link-arrow:hover {
    text-decoration: underline;
}

/* Navigation Right Side (Links + Lang) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(30, 30, 30, 0.85);
    /* Matches VS Code bg */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

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

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
}

.lang-btn {
    background: transparent;
    /* Explicit transparent */
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 5px;
    font-weight: 500;
    transition: var(--transition-smooth);
    -webkit-appearance: none;
    /* Remove iOS default button styling */
    -webkit-tap-highlight-color: transparent;
    /* Remove tap highlight */
    outline: none;
}

.lang-btn:hover {
    color: var(--text-main);
}

.lang-btn.active {
    color: var(--accent-green);
    font-weight: 700;
}

.divider {
    color: var(--border-color);
    font-size: 10px;
}

.nav-logo img {
    height: 40px;
    /* Adjust based on signature aspect ratio */
    filter: invert(1);
    /* Invert black signature to white for dark mode */
    opacity: 0.9;
    transition: var(--transition-smooth);
}

.nav-logo:hover img {
    opacity: 1;
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.btn-nav {
    background: rgba(86, 156, 214, 0.1);
    color: var(--accent-blue) !important;
    padding: 8px 16px;
    border-radius: 4px;
}

.btn-nav:hover {
    background: var(--accent-blue);
    color: white !important;
}

/* Mobile Responsiveness for Nav Switcher */
@media (max-width: 768px) {
    .nav-right {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: center;
    }

    .lang-switcher {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-color);
        /* Top border instead of left */
        padding-top: 10px;
        width: 100%;
        justify-content: center;
    }
}

/* Timeline/Experience - Symmetrical Fix */
.timeline {
    border-left: 2px solid var(--border-color);
    padding-left: 40px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item h3 {
    margin-top: -5px;
    /* Align text vertically with dot */
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -47px;
    /* Perfectly centered on the line */
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    /* Cutout effect */
    border: 3px solid var(--accent-blue);
    border-radius: 50%;
    z-index: 1;
    transition: var(--transition-smooth);
}

.timeline-item:hover::before {
    background: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue);
}

.timeline .date {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Contact Links */
/* Contact Links */
.contact-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 50px 0 80px;
}

.social-row {
    display: flex;
    gap: 5px;
    /* Minimized gap */
}

.btn-icon {
    background: transparent;
    color: #ffffff;
    border: none;
    padding: 0;
    width: 44px;
    /* Maintain touch target size */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    background: transparent;
    color: var(--accent-blue);
    /* Hover color */
    transform: scale(1.2);
    /* Hover effect */
    box-shadow: none;
}

/* Fix Mobile Navbar Overlap & Contact Layout */
/* Fix Mobile Navbar Overlap & Contact Layout */
@media (max-width: 768px) {

    /* Adjust global section padding for mobile to be proportional */
    section {
        padding: 50px 20px;
    }

    .navbar {
        position: relative;
        margin-bottom: 0;
        /* Reduced as section padding handles it */
    }

    .hero-container {
        padding-top: 30px;
        padding-bottom: 30px;
        /* Reduced from 60px */
    }

    /* Reduce gap between About components (Text/Skills) */
    .grid-2-col {
        gap: 30px;
    }

    .contact-links {
        flex-direction: column;
        gap: 20px;
    }

    .contact-links .btn {
        min-width: 200px;
    }
}