/* Resets and Base Settings */
* {
    box-sizing: border-box;
    scroll-behavior: smooth; /* Smooth scrolling to sections */
}

body {
    font-family: 'Lora', Georgia, serif;
    color: #2c2c2c;
    background-color: #faf9f7;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    font-size: 18px;
}

/* =========================================
   SIDEBAR (Dark Theme matched from Image)
   ========================================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: #111111; /* Dark moody background */
    padding: 60px 30px;
    overflow-y: auto;
}

.profile-img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    opacity: 0.95;
}

.sidebar-name {
    font-family: 'Lora', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 5px 0;
    letter-spacing: -0.5px;
}

.sidebar-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    color: #888888;
    margin: 0 0 40px 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
    padding: 0;
}

.sidebar-nav li + li {
    margin-top: 4px;
}

.sidebar-nav li.sidebar-nav-external {
    margin-top: 14px;
}

.sidebar-nav a {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: block;
    padding: 10px 16px;
    color: #cccccc;
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 8px; /* Rounded highlight box */
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-nav a:hover {
    background-color: #222222;
    color: #ffffff;
}

/* The active highlighted box */
.sidebar-nav a.active {
    background-color: #262626; 
    color: #ffffff;
    font-weight: 500;
}

/* Mailto row: same box model as other .sidebar-nav a; long address wraps cleanly */
.sidebar-email a {
    word-break: break-all;
    hyphens: none;
}

/* =========================================
   MAIN CONTENT AREA (Academic Style)
   ========================================= */
.main-content {
    margin-left: 280px; /* Offset to make room for sidebar */
    max-width: 800px;
    padding: 60px 50px;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2.2em;
    margin-bottom: 0.8em;
    font-weight: 600;
    color: #111111;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

/* Removes top margin from the very first section so it aligns cleanly */
section:first-child h2 {
    margin-top: 0;
}

a {
    color: #1a56db;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #111111;
    text-decoration: underline;
}

p {
    margin-bottom: 1.4em;
}

/* Lists for Projects and Courses */
.item-list {
    list-style-type: none;
    padding: 0;
}

.item-list li {
    margin-bottom: 1.8em;
}

.item-list p {
    margin: 0.4em 0 0 0;
    color: #4b4b4b;
    font-size: 1rem;
}

.item-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111111;
}

.tech-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    background-color: #f0f0f0;
    color: #555555;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
    border: 1px solid #e4e4e4;
}

/* Make images responsive inside blog posts */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
    display: block;
}

/* Mobile Adjustments */
@media (max-width: 850px) {
    body {
        display: flex;
        flex-direction: column;
    }
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 40px 20px;
        order: 1;
    }
    .main-content {
        margin-left: 0;
        padding: 40px 20px;
        order: 2;
    }
}