/* style.css */
:root {
    --text-main: #222222;
    --text-muted: #555555;
    --link-color: #0056b3;
    --link-hover: #003d82;
    --border-color: #eaeaea;
    --bg-color: #ffffff;
    
    --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: "Georgia", "Charter", "Times New Roman", serif;
}

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

:lang(or), .odia {
    font-family: 'Noto Serif Oriya', serif;
    font-size: 1.1rem;
}

body {
    font-family: 'EB Garamond', serif;
    lang: en;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 1.15rem;
    -webkit-font-smoothing: antialiased;
}

.subtitle {
    display: block;
    line-height: 1.3;
    min-height: 2.6em; /* ~2 lines */
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

h1, h2, h3 {
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--text-main);
}

h1 {
    font-size: 2.25rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 1.25rem;
    color: #333;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    max-width: 100ch;
}
li {
    text-align: justify;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Header & Profile Image */
.header-top {
    margin-bottom: 2rem;
}

.subtitle {
    font-family: var(--font-ui);
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.personal-photo-container {
    margin-bottom: 2rem;
}

.personal-photo {
    width: 100%;
    max-width: 250px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    object-fit: cover;
}

/* Navigation */
nav {
    font-family: var(--font-ui);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    margin-bottom: 2.5rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    padding-bottom: 2px;
}

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

nav a.active {
    color: var(--link-color);
    font-weight: 700;
    border-bottom: 2px solid var(--link-color);
}

/* Lists */
ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
    color: var(--text-muted);
}

li {
    margin-bottom: 0.75rem;
}

/* Footer */
footer {
    font-family: var(--font-ui);
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .container {
        padding: 2.5rem 1.5rem;
    }
    nav {
        gap: 1rem;
    }
}

/* --- New Image & Layout Styles --- */

/* Responsive grid for side-by-side text and images */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

/* On desktop, make the text take up more space than the image */
@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: 2fr 1fr; 
    }
    
    /* Optional modifier class if you want the image on the left */
    .content-grid.image-left {
        grid-template-columns: 1fr 2fr;
    }
}

/* Image container and styling */
.figure-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    display: block;
    object-fit: cover;
}

/* Academic-style captions */
.image-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.75rem;
    font-family: var(--font-ui);
    line-height: 1.4;
}