/* "Engineering Notebook" Design - Warm, Technical, Personal */

:root {
    --bg-color: #FDFBF7;
    /* Slightly lighter warm paper */
    --sidebar-bg: #FDFBF7;
    --text-color: #2A2A2A;
    /* Softer black */
    --header-color: #111111;
    /* Deep black for headers */
    --accent-color: #E35205;
    /* International Orange - Engineering/Aerospace vibe */
    --accent-hover: #B33F00;
    --sidebar-width: 380px;
    /* Wider as requested */
    --content-max-width: 680px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --sidebar-bg: #1e1e1e;
        --text-color: #e0e0e0;
        --header-color: #ffffff;
        --accent-color: #FF6B2B;
        /* Slightly brighter orange for dark mode */
        --accent-hover: #FF8552;
    }

    img {
        opacity: 0.9;
        /* Slightly dim images */
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(227, 82, 5, 0.3);
    /* Low opacity accent */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-color);
}

/* Selection Color */
::selection {
    background-color: rgba(227, 82, 5, 0.2);
    color: var(--header-color);
}

/* Focus States for Accessibility */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 2px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: Georgia, "Times New Roman", Times, serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Layout Container */
.layout {
    display: flex;
    width: 100%;
    height: 100%;
    /* Removed max-width to ensure scrollbar is at the edge */
    margin: 0;
}

/* Sidebar - Fixed & Independent */
.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--sidebar-bg);
    padding: 60px 40px;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}



.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure full height for footer positioning */
}

.home-link {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 1.2em;
    text-decoration: none;
    color: var(--header-color);
    letter-spacing: -0.5px;
    display: block;
    margin-bottom: 50px;
    /* More space after name */
}

nav {
    display: flex;
    flex-direction: column;
    gap: 40px;
    /* Space between Project and Connect sections */
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-header {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    margin-bottom: 8px;
    font-weight: 600;
}

nav a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95em;
    /* Slightly smaller */
    line-height: 1.5;
    transition: color 0.2s ease;
}

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

nav a.active {
    color: var(--accent-color);
    font-style: italic;
}

/* Main Content - Scrollable */
.content {
    flex-grow: 1;
    height: 100%;
    overflow-y: auto;
    padding: 60px 80px 100px 80px;
    /* Increased padding */
    scroll-behavior: smooth;
}

.content-wrapper {
    max-width: var(--content-max-width);
    /* No margin auto to align left-ish, or keep centered? 
       User didn't specify, but standard is usually somewhat centered or left-aligned.
       Let's keep it left-aligned relative to the padding for a cleaner look. */
}

/* Typography */
h1 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -1px;
    margin-top: 0;
    margin-bottom: 0.5em;
    color: var(--header-color);
}

h2 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 5px;
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--header-color);
}

p {
    margin-bottom: 1em;
    font-size: 1.05em;
}

/* Inline Links */
.content a {
    color: var(--accent-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.content a:hover {
    color: var(--accent-hover);
    text-decoration-thickness: 2px;
}

/* Lists */
ul {
    padding-left: 20px;
    margin-bottom: 1.5em;
}

li {
    margin-bottom: 0.5em;
    padding-left: 5px;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: block;
    margin: 30px 0;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Footer Message */
.sidebar-footer {
    margin-top: auto;
    /* Push to bottom */
    padding-top: 40px;
    font-size: 0.75em;
    color: #bbb;
    /* Subtler */
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.heart {
    color: var(--accent-color);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    body {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }

    .layout {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 30px 20px;
        border-right: none;
        border-bottom: 1px solid #eee;
        position: relative;
    }

    .sidebar-content {
        height: auto;
        gap: 0;
    }

    .home-link {
        margin-bottom: 30px;
    }

    nav {
        gap: 30px;
    }

    .content {
        height: auto;
        overflow: visible;
        padding: 40px 20px;
    }
}