@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
    --font-mono: 'SF Mono', ui-monospace, Monaco, monospace;

    /* Light mode — premium cool-white / blue-gray theme */
    --bg-color: #f6f9fc;
    --bg-deep: #edf2f7;
    --bg-section-color: rgba(255, 255, 255, 0.75);
    --text-color: #0f172a;
    --text-muted: #475569;
    --text-italic: #64748b;
    --accent-color: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.18);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-subtle: rgba(15, 23, 42, 0.04);
    --timeline-line: #cbd5e1;
    --card-bg: rgba(255, 255, 255, 0.86);
    --card-border: rgba(15, 23, 42, 0.08);
    --card-glow: rgba(37, 99, 235, 0.06);
    --pub-venue-color: #2563eb;
    --hr-gradient-start: rgba(15, 23, 42, 0);
    --hr-gradient-mid: rgba(15, 23, 42, 0.12);
    --hr-gradient-end: rgba(15, 23, 42, 0);
    --toggle-bg: rgba(255, 255, 255, 0.9);
    --toggle-color: #0f172a;
    --toggle-hover-bg: #ffffff;
    --link-color: #64748b;
    /* Aurora blobs for light mode — strong blue/indigo tint */
    --blob-1-color: rgba(99, 140, 255, 0.52);
    --blob-2-color: rgba(147, 112, 255, 0.40);
    --blob-3-color: rgba(80, 210, 180, 0.30);
    --blob-4-color: rgba(255, 180, 150, 0.24);
    --mesh-opacity: 0.022;
}

[data-theme="dark"] {
    /* Dark mode — deep space premium feel */
    --bg-color: #08080a;
    --bg-deep: #050507;
    --bg-section-color: rgba(18, 18, 22, 0.65);
    --text-color: #f0eeeb;
    --text-muted: #8a8785;
    --text-italic: #6b6865;
    --accent-color: #60a5fa;
    --accent-glow: rgba(96, 165, 250, 0.22);
    --border-color: rgba(240, 238, 235, 0.08);
    --border-subtle: rgba(240, 238, 235, 0.04);
    --timeline-line: #2e2e36;
    --card-bg: rgba(18, 18, 24, 0.72);
    --card-border: rgba(240, 238, 235, 0.08);
    --card-glow: rgba(96, 165, 250, 0.08);
    --pub-venue-color: #60a5fa;
    --hr-gradient-start: rgba(240, 238, 235, 0);
    --hr-gradient-mid: rgba(240, 238, 235, 0.15);
    --hr-gradient-end: rgba(240, 238, 235, 0);
    --toggle-bg: rgba(22, 22, 28, 0.90);
    --toggle-color: #f0eeeb;
    --toggle-hover-bg: #1a1a22;
    --link-color: #6b6865;
    /* Aurora blobs for dark mode */
    --blob-1-color: rgba(59, 80, 180, 0.22);
    --blob-2-color: rgba(100, 50, 180, 0.18);
    --blob-3-color: rgba(20, 120, 100, 0.15);
    --blob-4-color: rgba(180, 60, 80, 0.10);
    --mesh-opacity: 0.045;
}

/* Global Transition for Smooth Theme Switching */
*, *::before, *::after {
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
    box-sizing: border-box;
}

html {
    background-color: var(--bg-color);
    /* HD/4K text rendering — crisp at all DPIs */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1, 'ss01' 1;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-color);
    /* Crisp subpixel text */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ═══════════════════════════════════════
   PREMIUM AURORA BACKGROUND SYSTEM
   ═══════════════════════════════════════ */
.bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    /* Base gradient behind blobs */
    background: radial-gradient(ellipse 120% 80% at 50% -10%, var(--bg-deep) 0%, var(--bg-color) 60%);
    transition: background-color 0.8s ease;
}

/* Aurora blob base */
.bg-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

/* Blob 1 — top-left, primary accent (blue/indigo) */
.bg-blob-1 {
    width: 55vmax;
    height: 55vmax;
    top: -20vmax;
    left: -15vmax;
    background: radial-gradient(ellipse at center, var(--blob-1-color) 0%, transparent 70%);
    filter: blur(70px);
    animation: aurora-drift-1 22s ease-in-out infinite alternate;
}

/* Blob 2 — bottom-right, purple/violet */
.bg-blob-2 {
    width: 48vmax;
    height: 48vmax;
    bottom: -18vmax;
    right: -12vmax;
    background: radial-gradient(ellipse at center, var(--blob-2-color) 0%, transparent 70%);
    filter: blur(80px);
    animation: aurora-drift-2 28s ease-in-out infinite alternate;
}

/* Blob 3 — center-right, teal/green */
.bg-blob-3 {
    width: 36vmax;
    height: 36vmax;
    top: 35%;
    right: -5vmax;
    background: radial-gradient(ellipse at center, var(--blob-3-color) 0%, transparent 70%);
    filter: blur(100px);
    animation: aurora-drift-3 34s ease-in-out infinite alternate;
}

/* Blob 4 — bottom-left, warm rose */
.bg-blob-4 {
    width: 30vmax;
    height: 30vmax;
    bottom: 10%;
    left: 5%;
    background: radial-gradient(ellipse at center, var(--blob-4-color) 0%, transparent 70%);
    filter: blur(90px);
    animation: aurora-drift-4 26s ease-in-out infinite alternate;
}

/* Grain / film texture overlay */
.bg-grain {
    position: absolute;
    inset: 0;
    opacity: var(--mesh-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
    pointer-events: none;
}



/* Aurora keyframe animations */
@keyframes aurora-drift-1 {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(3vmax, 2vmax) scale(1.05); }
    66%  { transform: translate(-2vmax, 4vmax) scale(0.97); }
    100% { transform: translate(4vmax, -3vmax) scale(1.08); }
}
@keyframes aurora-drift-2 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-4vmax, -3vmax) scale(1.06); }
    100% { transform: translate(2vmax, 5vmax) scale(0.95); }
}
@keyframes aurora-drift-3 {
    0%   { transform: translate(0, 0) scale(1); }
    40%  { transform: translate(-3vmax, 2vmax) scale(1.1); }
    100% { transform: translate(2vmax, -4vmax) scale(0.92); }
}
@keyframes aurora-drift-4 {
    0%   { transform: translate(0, 0) scale(1); }
    60%  { transform: translate(3vmax, -2vmax) scale(1.07); }
    100% { transform: translate(-4vmax, 3vmax) scale(0.98); }
}

/* Layout */
.container {
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    position: relative;
    z-index: 1;
}
@media (min-width: 992px) {
    .container {
        width: 970px;
     }
}
.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
}

/* Section styling — glassmorphic panels */
.bg-section {
    background: var(--bg-section-color);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding-top: 1px;
    margin-top: 14px;
    transition: background-color 0.4s ease;
    position: relative;
    z-index: 1;
}
.featured-writing-section {
    margin-top: 56px;
    padding-bottom: 40px;
}

/* Theme Toggle Button */
.theme-toggle-container {
    position: absolute;
    top: 20px;
    right: 15px;
    z-index: 100;
}
#theme-toggle {
    background-color: var(--toggle-bg);
    color: var(--toggle-color);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
#theme-toggle:hover {
    background-color: var(--toggle-hover-bg);
    transform: scale(1.05);
}
#theme-toggle svg {
    width: 20px;
    height: 20px;
}
/* Toggle Icons Show/Hide */
[data-theme="dark"] .sun-icon {
    display: block;
}
[data-theme="dark"] .moon-icon {
    display: none;
}
.sun-icon {
    display: none;
}
.moon-icon {
    display: block;
}

/* Links */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover {
    text-decoration: none;
    color: var(--accent-color);
    opacity: 0.8;
}

/* Props */
#dhead {
    margin-top: 20px;
}
#dpic {
    grid-column: span 6;
    text-align: right;
}
#ddesc {
    padding-top: 40px;
    padding-left: 20px;
    grid-column: span 6;
}
@media (max-width: 991px) {
    #dpic {
      grid-column: span 12;
      text-align: center;
    }
    #ddesc {
      grid-column: span 12;
      padding-top: 20px;
      text-align: center;
    }
}
h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 400;
    padding: 0;
    margin: 0;
    /* HD text: prevent blurry text at high DPI */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    color: var(--text-muted);
    font-size: 1.625rem;
    padding: 0;
    margin: 5px 0 10px 0;
    -webkit-font-smoothing: antialiased;
}
#ddesc h1 {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 3.8rem;
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 0.98;
    margin-bottom: 8px;
    color: var(--text-color);
    /* Crisp, HD headline */
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}
#ddesc h2 {
    font-family: var(--font-sans);
    font-style: normal;
    color: var(--text-muted);
    font-size: 14.5px;
    margin-bottom: 28px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    -webkit-font-smoothing: antialiased;
}
@media (max-width: 640px) {
    #ddesc h1 {
        font-size: 2.8rem;
    }
}
@media (min-width: 992px) {
    #ddesc h2 {
        max-width: 300px;
    }
}
#dpic img {
    width: 244px;
    height: 244px;
    border-radius: 50%;
    border: 2px solid var(--card-border);
    box-shadow:
        0 0 0 6px var(--accent-glow),
        0 8px 32px rgba(0,0,0,0.14),
        0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}
#dpic img:hover {
    transform: scale(1.025);
    box-shadow:
        0 0 0 8px var(--accent-glow),
        0 16px 48px rgba(0,0,0,0.18),
        0 4px 12px rgba(0,0,0,0.10);
}
.iico {
    width: 40px;
    height: 40px;
    color: var(--link-color);
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.iico:hover {
    transform: scale(1.1);
}
/* Brand Colors on Hover/Active */
#link-twitter:hover .iico, #link-twitter:active .iico {
    color: var(--text-color); /* X: black/white */
}
#link-github:hover .iico, #link-github:active .iico {
    color: #24292e;
}
[data-theme="dark"] #link-github:hover .iico, [data-theme="dark"] #link-github:active .iico {
    color: #ffffff;
}
#link-linkedin:hover .iico, #link-linkedin:active .iico {
    color: #0a66c2; /* LinkedIn Blue */
}
#iemail:hover, #iemail:active {
    color: #ea4335; /* Email Red */
}
#link-rss:hover .iico, #link-rss:active .iico {
    color: #f26522; /* RSS Orange */
}
#demail {
    margin-top: 10px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.7s;
}
hr {
    height: 1px;
    background-image: linear-gradient(to right, var(--hr-gradient-start), var(--hr-gradient-mid), var(--hr-gradient-end));
    padding: 0;
    margin: 20px 0px 20px 0px;
    border: 0;
    position: relative;
    z-index: 1;
}
.ico {
    grid-column: span 1;
    vertical-align: top;
    position: relative;
}
.ico::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background-color: var(--timeline-line);
}
.entry:first-child .ico::before {
    top: 8px; /* Start at the center of the first dot */
}
.entry:last-child .ico::before {
    bottom: calc(100% - 8px); /* End at the center of the last dot */
}
/* Mobile-only logo — hidden on desktop */
.ico-logo-mobile {
    display: none;
}
.ico img {
    border-radius: 5px;
    width: 100%;
    max-width: 80px;
    margin-left: 10px;
}
.desc {
    grid-column: span 9;
    vertical-align: top;
    font-size: 17px;
    padding-left: 20px;
    padding-bottom: 30px; /* Consistent spacing between entries */
}
.entry {
}
.entry-dot {
    position: absolute;
    top: 8px; /* Center-aligned with the first line of text */
    left: -6px; /* Center-aligned with the vertical line */
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--timeline-line);
    border: 2px solid var(--bg-color);
    z-index: 2;
}
.timespan {
    grid-column: span 2;
    font-size: 14px;
    text-align: right;
    padding-right: 10px;
    color: var(--text-muted);
    white-space: nowrap !important;
}
.hassets {
    position: relative;
}
@media (max-width: 991px) {
    .hassets {
        display: none;
    }
}
.hasset {
    position: absolute;
    margin: 0;
    padding: 0;
}
.ctitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 2.7rem;
    font-weight: 400;
    letter-spacing: -0.03em;
    color: var(--text-color);
    margin-bottom: 22px;
    margin-top: 44px;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
    /* Subtle gradient shimmer on section titles */
    background: linear-gradient(135deg, var(--text-color) 60%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
#featured-talks .row {
    grid-column-gap: 10px;
    grid-row-gap: 10px;
    padding-bottom: 30px;
}
.card {
    grid-column: span 4;
    vertical-align: top;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 12px;
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow:
        0 1px 3px rgba(0,0,0,0.05),
        0 4px 16px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.08);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}
.card:hover {
    transform: translateY(-6px) scale(1.008);
    box-shadow:
        0 2px 6px rgba(0,0,0,0.08),
        0 12px 32px rgba(0,0,0,0.12),
        0 0 0 1px var(--accent-glow),
        inset 0 1px 0 rgba(255,255,255,0.12);
}
@media (max-width: 991px) {
    .card {
        grid-column: span 6;
    }
    #featured-talks .row {
        grid-column-gap: 5px;
        grid-row-gap: 5px;
    }
}
@media (max-width: 575px) {
    .card {
        grid-column: span 12;
    }
}
.card img {
    border-radius: 8px;
    width: 100%;
    border: 1px solid var(--card-border);
}
.project-card-custom {
    grid-column: span 12 !important;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow:
        0 2px 8px rgba(0,0,0,0.06),
        0 8px 32px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.10);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s ease;
    text-decoration: none !important;
    color: var(--text-color) !important;
    position: relative;
}
.project-card-custom:hover,
.project-card-custom:focus,
.project-card-custom:active {
    transform: translateY(-5px) scale(1.005);
    color: var(--text-color) !important;
    text-decoration: none !important;
    box-shadow:
        0 4px 16px rgba(0,0,0,0.10),
        0 24px 56px rgba(0,0,0,0.14),
        0 0 0 1px var(--accent-glow),
        inset 0 1px 0 rgba(255,255,255,0.14);
}
/* Hover overlay shimmer */
.project-card-custom::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
    border-radius: 20px;
}
.project-card-custom:hover::before {
    opacity: 1;
}
.project-card-custom .img-container {
    grid-column: span 5;
    display: flex;
    align-items: stretch;
    justify-content: center;
    position: relative;
    z-index: 1;
    min-height: 300px;
}
.project-card-custom .img-container img {
    width: 100%;
    height: 100%;
    max-height: 340px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}
/* UAV Project Card Carousel */
.uav-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    overflow: hidden;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--card-border);
}
.carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}
.carousel-slides::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}
.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
}
.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.carousel-dots .dot.active {
    background-color: #ffffff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}
.project-card-custom .text-container {
    grid-column: span 7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 36px 40px;
    position: relative;
    z-index: 1;
}
.project-card-custom .project-label {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 14px;
    opacity: 0.85;
}
.project-card-custom .project-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}
.project-card-custom .project-role {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-top: 6px;
}
@media (max-width: 767px) {
    .project-card-custom {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .project-card-custom .img-container {
        grid-column: span 12;
        min-height: 220px;
    }
    .uav-carousel {
        min-height: 220px;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
    }
    .project-card-custom .text-container {
        grid-column: span 12;
        padding: 24px;
    }
}
.cdesc {
    height: 30px;
    vertical-align: top;
    margin-bottom: 10px;
    font-size: 15px;
}
@media (max-width: 768px) {
    .cdesc {
        font-size: 14px;
        padding-bottom: 10px;
    }
}
#pet-projects .row {
    grid-column-gap: 10px;
    grid-row-gap: 10px;
}
.project {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.pico {
    float: left;
    margin-right: 10px;
}
.pdesc {
}
.pend {
    clear: both;
}
.pico img {
    height: 80px;
    border-radius: 5px;
    border: 1px solid var(--card-border);
}
.pub {
    font-size: 14px;
    border-left: 4px solid var(--timeline-line);
    padding: 2px 0px 2px 10px;
    margin-bottom: 10px;
}
.pub-title {
    display: inline;
    color: var(--text-color);
}
.pub-venue {
    display: inline;
    color: var(--pub-venue-color);
}
.pub-authors {
    display: block;
    color: var(--text-muted);
}
.tul {
    text-align: center;
    padding: 0;
}
.til {
    display: inline-block;
    padding: 3px 15px 3px 15px;
    margin-bottom: 5px;
}
.tilb {
    border-right: 1px solid var(--border-color);
}
.nodot {
    list-style-type: none;
    padding-left: 0;
}

#dico {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}
@media (max-width: 991px) {
    #dico {
        justify-content: center;
    }
}

/* Nisarga-Style Blog Section */
.blog-list-custom {
    margin-top: 30px;
    padding-bottom: 20px;
}
.blog-post-custom {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.blog-post-custom:first-child {
    border-top: 1px solid var(--border-color);
}
.blog-post-custom .blog-date-custom {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    margin-top: 0;
}
.blog-post-custom h3 {
    margin: 0;
    font-family: Georgia, Cambria, "Times New Roman", Times, serif;
    font-weight: normal;
    font-style: normal;
}
.blog-post-custom h3 a {
    color: var(--text-color) !important;
    font-size: 1.375rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
    transition: color 0.2s ease;
}
.blog-post-custom h3 a:hover {
    color: var(--accent-color) !important;
    text-decoration: none;
}

/* ═══════════════════════════════════════
   SITE HEADER & NAVIGATION (for inner pages)
   ═══════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-header.header-hidden {
    transform: translateY(-100%);
}
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    background: linear-gradient(to bottom, var(--bg-color), rgba(244, 244, 245, 0.4) 60%, transparent);
}
[data-theme="dark"] .site-header::before {
    background: linear-gradient(to bottom, var(--bg-color), rgba(9, 9, 11, 0.4) 60%, transparent);
}
.site-header > * {
    pointer-events: auto;
}
.header-logo {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: opacity 0.2s ease;
}
.header-logo:hover {
    opacity: 0.5;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-header #theme-toggle {
    position: static;
    width: 38px;
    height: 38px;
}

/* Non-hero container layout */
main:not(.hero), .post-container, .blog-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 140px 24px 100px;
    position: relative;
    z-index: 1;
}
@media (min-width: 641px) {
    main:not(.hero), .post-container, .blog-container {
        padding: 160px 32px 100px;
    }
}

.back, .post-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 40px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.back:hover, .post-back:hover {
    color: var(--text-color);
    opacity: 1;
}

/* Dedicated blog list page styling */
.blog-header {
    margin-bottom: 40px;
}
.blog-title {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: -0.03em;
}
.blog-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 0;
}
.blog-list {
    margin-top: 40px;
}
.blog-post {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}
.blog-post:first-child {
    border-top: 1px solid var(--border-color);
}
.blog-post h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 1.5rem;
}
.blog-post a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    transition: color 0.2s ease;
}
.blog-post a:hover {
    color: var(--accent-color);
}
.blog-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.standard-amp {
    font-family: var(--font-sans) !important;
    font-style: normal !important;
    font-weight: 400;
}

@media (max-width: 767px) {
    .entry.row {
        display: grid;
        grid-template-columns: 16px 1fr;
        grid-template-rows: auto auto;
        column-gap: 16px;
        row-gap: 2px;
    }
    .timespan {
        grid-column: 2;
        grid-row: 1;
        text-align: left !important;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-muted);
        padding-right: 0;
        white-space: nowrap !important;
    }
    .ico {
        grid-column: 1;
        grid-row: 1 / span 2;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    /* Line runs down the center of the 16px column */
    .ico::before {
        left: 7px;
        width: 2px;
    }
    .entry:first-child .ico::before {
        top: 8px;
    }
    .entry:last-child .ico::before {
        bottom: calc(100% - 8px);
    }
    /* Dot centered on the line */
    .entry-dot {
        left: 3px;  /* (16px - 10px dot) / 2 = 3px */
        top: 8px;
    }
    /* Logo hidden from ico column on mobile — shown in desc instead */
    .ico img {
        display: none;
    }
    .desc {
        grid-column: 2;
        grid-row: 2;
        padding-left: 0;
        padding-bottom: 25px;
    }
    /* Show logo inline inside the desc text block on mobile */
    .desc::before {
        content: '';
        display: none;
    }
    /* Inject logo via a wrapper — handled by showing it via the ico-mobile class */
    .ico-logo-mobile {
        display: block !important;
        width: 36px;
        height: 36px;
        object-fit: contain;
        border-radius: 6px;
        margin-bottom: 10px;
        border: 1px solid var(--border-color);
    }
}
