/* UNIFIED THEME: Sidebar Layout */
:root {
    --bg-color: #2b2824; 
    --paper-bg: #36322d; 
    --text-main: #e8e1d5;
    --text-muted: #a39c91;
    --accent: #8c9e7e; 
    --border-color: #4f4a43;
}

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

body {
    font-family: 'Lora', serif; 
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.7;
}

h1, h2, h3, .nav-links, .sidebar, .meta, .tag, .back-link {
    font-family: 'DM Sans', sans-serif; 
}

/* Layout */
.layout-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background-color: var(--bg-color);
    border-right: 1px solid var(--border-color);
    padding: 4rem 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.logo {
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text-main);
    text-decoration: none;
    margin-bottom: 3rem;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 1.05rem;
    font-weight: 500;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
    padding-left: 0.5rem;
    border-left: 2px solid var(--accent);
}

.sub-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1.2rem;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.sub-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.2rem 0;
    border-left: none !important;
}

.sub-nav a:hover, .sub-nav a.active {
    color: var(--accent);
    padding-left: 0 !important;
}

.sidebar-footer {
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Main Content */
.main-area {
    padding: 4rem;
    background-color: var(--paper-bg);
}

.content-container {
    max-width: 800px; 
}

h1 { font-size: 2.2rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-main); }
h2 { font-size: 1.5rem; font-weight: 600; margin-top: 3rem; margin-bottom: 1rem; color: var(--text-main); }
p { margin-bottom: 1.5rem; font-size: 1.1rem; }

/* Featured Plot */
.featured-plot {
    width: 100%;
    margin-bottom: 2.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: block;
}

.featured-plot img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
    font-family: 'DM Sans', sans-serif;
    margin: 0;
}

/* Project Cards */
.project-card {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--paper-bg);
}

.project-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.project-thumb {
    flex-shrink: 0;
    width: 180px;
    height: 130px;
    background-color: var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    padding: 1rem;
}

.project-info {
    display: flex;
    flex-direction: column;
}

.project-info h3 { 
    font-size: 1.25rem; 
    font-weight: 600; 
    margin-bottom: 0.2rem; 
    color: var(--text-main); 
}

.meta { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    margin-bottom: 0.75rem; 
    display: block; 
}

.project-info p { 
    margin-bottom: 0; 
    font-size: 1.05rem; 
    line-height: 1.5;
}

/* Project Hero & Meta */
.project-hero {
    width: 100%;
    margin: 2rem 0 3rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: block;
}

.project-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.project-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.meta-block {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.meta-value {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
}
.back-link:hover { color: var(--text-main); }

a.text-link {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(71, 93, 110, 0.3);
    text-underline-offset: 3px;
}
a.text-link:hover { text-decoration-color: var(--accent); }

.contact-links {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border-color);
    display: flex;
    gap: 1.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
}

ul { padding-left: 1.5rem; margin-bottom: 1.5rem; }
li { margin-bottom: 0.5rem; font-size: 1.05rem; }

.prompt { color: #b91c1c; font-family: monospace; font-size: 0.95rem; background: #fee2e2; padding: 0.1rem 0.3rem; border-radius: 3px; }

.tag-container { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.tag { background: var(--bg-color); color: var(--text-muted); padding: 0.3rem 0.8rem; border-radius: 99px; font-size: 0.85rem; border: 1px solid var(--border-color); }

@media (max-width: 850px) {
    .layout-wrapper { grid-template-columns: 1fr; }
    .sidebar { height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border-color); padding: 2rem; }
    .nav-links { flex-direction: row; flex-wrap: wrap; gap: 1.5rem; }
    .nav-links a:hover, .nav-links a.active { border-left: none; border-bottom: 2px solid var(--accent); padding-left: 0; padding-bottom: 0.2rem; }
    .main-area { padding: 2rem; }
}

@media (max-width: 600px) {
    .sidebar { padding: 1.5rem 1.2rem; }
    .main-area { padding: 1.5rem 1.2rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.35rem; }
    .nav-links { flex-direction: column; gap: 0.8rem; }
    .nav-links a:hover, .nav-links a.active { border-bottom: none; border-left: 2px solid var(--accent); padding-left: 0.5rem; padding-bottom: 0; }
    .project-meta-bar { flex-direction: column; gap: 1.2rem; }
    .project-hero iframe, .project-hero embed { height: 350px !important; }
    .contact-links { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .project-card { flex-direction: column; padding: 1.2rem; }
}
