:root {
    /* Define a distinct Linux terminal palette */
    --desktop-bg: #111111;    /* Very dark gray background */
    --window-bg: #000000;     /* True black for the section 'windows' */
    --text-main: #ffffff;     /* Bright white text */
    --text-muted: #a1a1a1;    /* Muted gray for subtitles/metadata */
    
    /* Classic console green for links and accents */
    --accent-color: #22c55e;  
    --accent-hover: #4ade80;
    
    /* Subtle border for the windows */
    --border-color: #333333; 
    
    --max-width: 900px; /* Slightly wider to feel more like a 'desktop' space */
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Account for the fixed desktop 'header' */
}

body {
    /* Set the mono-spaced font globally for that console vibe */
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--desktop-bg);
    color: var(--text-main);
    line-height: 1.6;
}

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

/* Header (The Desktop Top-Bar) */
header {
    background-color: var(--window-bg);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    /* Give it a distinctive 'bar' shadow */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

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

header h1 {
    font-size: 1.3rem;
    font-weight: bold;
}

.logo-link {
    color: var(--accent-color);
    text-decoration: none;
}

.logo-link::before {
    content: ">_ "; /* Add a prompt prefix to the logo */
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    margin-left: 1.5rem;
    font-weight: normal;
    transition: color 0.2s ease;
}

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

/* Base style for main sections, transforming them into 'Application Windows' */
main section,
.page-content section {
    padding: 2.5rem;
    background-color: var(--window-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px; /* Slightly rounded corners for modern window feel */
    margin-bottom: 3rem; /* Increase spacing to make windows distinct */
    position: relative; /* Setup for the window decorations */
    
    /* Add a deep shadow to create depth, as if it's floating on the desktop */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
}

/* Add the window 'title bar' buttons (decorative only) */
main section::before,
.page-content section::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 15px;
    height: 12px;
    width: 12px;
    background-color: #ff5f56; /* Linux/macOS 'close' button color */
    border-radius: 50%;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f; /* 'Minimize' and 'Maximize' buttons */
}

section h2 {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    /* Pad the title slightly to account for the corner window buttons */
    padding-left: 60px;
}

section h2::after {
    content: ':~$'; /* Add a prompt suffix to titles */
}

/* Individual Content Styling */
.intro p,
#publications p,
#contact p,
.detailed-pub p {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

/* Clear the padding for sections on the publications page that aren't 'windows' */
.page-content section {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
}

.page-content section h2 {
    padding-left: 0;
}

/* Internal Windows for the Detailed Publications Page */
.detailed-pub {
    padding: 2rem;
    background-color: var(--window-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 2.5rem;
    position: relative;
    
    /* Deep shadow to create depth, as if it's floating on the desktop */
    box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.6);
}

/* Corner buttons for the detailed publications sub-windows */
.detailed-pub::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 15px;
    height: 10px;
    width: 10px;
    background-color: #ff5f56;
    border-radius: 50%;
    box-shadow: 18px 0 0 #ffbd2e, 36px 0 0 #27c93f;
}

.detailed-pub h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    padding-left: 55px; /* Offset title for buttons */
}

/* Publication Item Styling (Homepage Cards) */
.publication-list {
    margin-bottom: 2rem;
}

.pub-card {
    background: transparent; /* Remove card bg for cleaner internal layout */
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.pub-card h3 {
    color: var(--text-main);
    margin-bottom: 0.3rem;
    font-size: 1.2rem;
}

.pub-card h3::before {
    content: '[*] '; /* Bullet points for publications */
    color: var(--accent-color);
}

.pub-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

/* Detailed Publication Meta (Page 2) */
.pub-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-left: 55px; /* Offset meta for buttons */
}

/* Buttons (Terminal Style) */
.btn {
    display: inline-block;
    background-color: var(--window-bg);
    color: var(--accent-color);
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    border: 2px solid var(--accent-color);
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
    background-color: var(--accent-color);
    color: var(--window-bg);
}

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

/* Offset top spacing on Hero section slightly since header padding changed */
.hero-section {
    padding-top: 3.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 2px solid var(--border-color);
    margin-top: 1rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    
    /* Make windows stack cleanly on mobile with less padding */
    main section,
    .detailed-pub {
        padding: 1.5rem;
    }
    
    /* Standardize titles on mobile */
    section h2,
    .detailed-pub h3 {
        padding-left: 0;
        margin-top: 2rem; /* Add space below decorative buttons on mobile */
    }
    
    .pub-meta {
        padding-left: 0;
    }
    
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    nav {
        margin-top: 1rem;
    }
    
    nav a {
        margin: 0 0.5rem;
        font-size: 0.9rem;
    }
}
