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

:root {
    --parchment: #f8f6f1;
    --ink: #2a2520;
    --dark: #000000;
    --border: #d4c5a9;
    --shadow: rgba(42, 37, 32, 0.08);
    --accent: #8b7355;
}

body {
    font-family: 'Crimson Text', serif;
    background: linear-gradient(to bottom, #faf9f6 0%, var(--parchment) 100%);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Navigation */
nav {
    position: relative;
    overflow: hidden;
    background: white;
    border-bottom: 2px solid var(--border);
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px var(--shadow);
}
.nav-painting-bg {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 475px;
    pointer-events: none;
    z-index: 0;
}
nav a {
  text-shadow: 1px 1px 2px rgb(255, 246, 218), 1px 1px 2px rgb(255, 246, 218);
}

.nav-painting-bg img {
    position: absolute;
    right: 0;
    transform: translateY(-25%) translateX(11%);
    height: 600%;
    width: auto;
    object-fit: cover;
    object-position: center right;
}

/* Gradient fade from white (left) to transparent (right) */
.nav-painting-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient( to right, white 0%, white 7%, rgba(255, 255, 255, 0.25) 35%, rgba(255, 255, 255, 0.20) 65%, rgba(255, 255, 255, 0) 100% );
    z-index: 1;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.site-title {
    font-family: 'EB Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-subtitle {
    font-size: 0.9rem;
    color: var(--accent);
    font-style: italic;
    margin-left: 1rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    color: var(--accent);
}

.nav-menu a {
    font-family: 'EB Garamond', serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--dark);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--dark);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 80%;
}

.nav-menu a.active {
    color: var(--accent);
    font-weight: 600;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #fff7dd;
    cursor: pointer;
}

/* Layout */
.layout-container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    align-items: stretch;
}

.sidebar {
    width: 180px;
    background: #fcfbf9;
    height: calc(100vh - 20px);
    position: sticky;
    top: 0;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0.5rem;
    font-family: 'EB Garamond', serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--parchment);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #6f5c44;
}

/* Page List */
.page-list {
    list-style: none;
    padding: 0.1rem 0;
    margin: 0;
}

.volume-section {
    margin: 0;
}

.volume-toggle {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid #e8e6e1;
    padding: 0.30rem 0.75rem;
    text-align: left;
    font-family: 'EB Garamond', serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.toggle-icon {
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}

.volume-toggle.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.page-count {
    font-size: 0.7rem;
    color: #999;
    margin-left: auto;
}

.volume-pages {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 50000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}


.volume-pages.collapsed {
    max-height: 0 !important;
}

/* Index Section Styling */
.index-section {
    margin: 0;
    list-style: none;
}

.index-toggle {
    background: linear-gradient(to right, #f8f6f4 0%, #fff 100%);
    border: none;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-family: 'EB Garamond', serif;
}

.index-toggle:hover {
    background: #f5f3ef;
    border-left-color: var(--accent);
}

.index-entries {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.index-entry {
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    font-size: 0.8rem;
}

.index-entry:not(:last-child) {
    padding-bottom: 0.25rem;
    border-bottom: 1px dotted var(--border);
}

.toggle-icon-small {
    font-size: 0.65rem;
    color: var(--accent);
    transition: transform 0.2s ease;
    display: inline-block;
    flex-shrink: 0;
}

.index-toggle.expanded .toggle-icon-small {
    transform: rotate(90deg);
}

/* Index Pages (nested list under each section) */
.index-pages {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 50000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.index-pages.collapsed {
    max-height: 0;
}

/* Page List Items */
.page-list-item {
    list-style: none;
    margin: 0;
}

.page-list-link {
    display: block;
    padding: 0.25rem 0.75rem 0.1rem 1.5rem;
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
}

.page-list-link:hover {
    color: var(--ink);
    background: #f5f3ef;
    border-left-color: var(--accent);
}

.page-list-link.active {
    color: var(--accent);
    background: #f5f3ef;
    border-left-color: var(--accent);
    font-weight: 600;
}

/* Page links inside index sections */
.index-pages .page-list-link {
    padding-left: 2rem;
    font-size: 0.78rem;
    background: #fafaf8;
}

.index-pages .page-list-link:hover {
    background: #f0ede8;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0.5rem;
    overflow-y: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Disclaimer Box */
.disclaimer-box {
    display: flex;
    gap: 1rem;
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    border: 1px solid #e6d9a8;
    border-left: 4px solid #c9a227;
    border-radius: 2px;
    padding: 0.5rem 1.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.1);
}

.disclaimer-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.disclaimer-content {
    flex: 1;
}

.disclaimer-content h4 {
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    color: #8a6d1b;
    margin: 0 0 0.5rem 0;
}

.disclaimer-content p, .disclaimer-content ul {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #665518;
    margin: 0 0 0.35rem 0;
}

.disclaimer-content strong {
    color: #8a6d1b;
}

/* Page Navigation */
.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    gap: 1rem;
    box-shadow: 0 1px 4px var(--shadow);
}

.nav-link {
    font-family: 'EB Garamond', serif;
    font-size: 1rem;
    color: var(--accent);
    text-decoration: none;
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--accent);
    border-radius: 2px;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.nav-link:hover {
    background: var(--accent);
    color: white;
}

.nav-link.disabled {
    color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

.current-page {
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink);
    padding: 0.65rem 1rem;
    background: var(--parchment);
    border-radius: 2px;
    white-space: nowrap;
}

/* Page Content */
.pages-grid {
    display: grid;
    gap: 2.5rem;
}

.page-entry {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 0.75rem;
    box-shadow: 0 2px 8px var(--shadow);
    transition: box-shadow 0.3s ease;
}

.page-entry:hover {
    box-shadow: 0 4px 16px var(--shadow);
}

.image-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #fafafa;
    border: 1px solid var(--border);
    padding: 1rem;
    position: relative;
}

.page-image {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

.text-container {
    display: flex;
    flex-direction: column;
    padding: 0 1rem 1rem;
}

.page-label {
    font-family: 'EB Garamond', serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.latin-text {
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--ink);
    padding: 0.05rem 1rem 1rem;
    background: var(--parchment);
    border-left: 3px solid var(--accent);
    border-radius: 2px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.page-number {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    box-shadow: 0 1px 4px var(--shadow);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--accent);
    font-style: italic;
}

/* Mobile Sidebar Toggle Button */
.sidebar-toggle {
    display: none;
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: white;
    border: none;
    font-family: 'EB Garamond', serif;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
}

.sidebar-toggle:hover {
    background: #6f5c44;
}

.inline-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.inline-link:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: white;
    border-top: 2px solid var(--border);
    margin-top: 4rem;
    padding: 3rem 2rem 1.5rem;
    box-shadow: 0 -2px 8px var(--shadow);
}

.footer-container {
    max-width: 1600px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-family: 'EB Garamond', serif;
    font-size: 1.5rem;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

.footer-section h4 {
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.footer-section p {
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--accent);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 968px) {
    .layout-container {
        flex-direction: column;
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 0;
        overflow: hidden;
        border-right: none;
        border-bottom: 2px solid var(--border);
        position: relative;
        transition: max-height 0.3s ease;
    }

    .sidebar.active {
        max-height: 60vh;
        overflow-y: auto;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .page-entry {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        border-bottom: 2px solid var(--border);
        box-shadow: 0 4px 8px var(--shadow);
        display: none;
        z-index: 100;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border);
        text-shadow: 1px 1px 2px rgb(255, 246, 218), 1px 1px 2px rgb(255, 246, 218);
    }

    .nav-menu a::after {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        position: relative;
        overflow: visible;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer {
        padding: 2rem 1rem 1rem;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 1rem 0.5rem;
    }

    .page-entry {
        padding: 1rem;
        gap: 1rem;
    }

    .page-navigation {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .nav-link {
        width: 100%;
    }

    nav {
        padding: 1rem;
        overflow: visible;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .nav-subtitle {
        display: none;
    }
}

.search-container {
  padding: 0.75rem;
  margin-bottom: 1rem;
  background: white;
  border-bottom: 1px solid var(--border);
}

.search-input {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--parchment);
  transition: border-color 0.3s ease;
}

.search-button {
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #8b7355;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  margin-left: 0.5rem;
}

.search-header {
  margin-bottom: 2rem;
}
.search-header h1 {
  font-family: 'EB Garamond', serif;
  font-size: 2.5rem;
  color: #2c1810;
  margin-bottom: 1.5rem;
}

.search-info {
  margin-top: 1rem;
  color: #666;
  font-size: 1.1rem;
}

.search-results {
  margin-top: 2rem;
}

.search-result-item {
  background: white;
  border: 1px solid #e5ddd5;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5ddd5;
}

.result-page-link {
  text-decoration: none;
}

.similarity-score {
  background: #f0ebe5;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #666;
  font-weight: 600;
}

.result-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.result-text {
  display: flex;
  flex-direction: column;
}

/* Search Results Styling */
.result-page-link h2 {
    font-family: 'EB Garamond', serif;
    font-size: 1.3rem;
    color: var(--accent);
    margin: 0;
}

.result-page-link:hover h2 {
    color: var(--ink);
}

.result-image {
    flex-shrink: 0;
}

.result-image img {
    width: 200px;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: 0 2px 8px var(--shadow);
}

.latin-text-preview {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ink);
    padding: 0.75rem 1rem;
    background: var(--parchment);
    border-left: 3px solid var(--accent);
    border-radius: 2px;
    margin: 0.5rem 0;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.latin-text-preview mark {
    background: #f5e6a3;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
    color: var(--ink);
}

.view-full-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    font-family: 'EB Garamond', serif;
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.view-full-link:hover {
    color: var(--ink);
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--accent);
    font-style: italic;
    font-size: 1.1rem;
}

.empty-hint {
    color: #999;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .result-content {
        grid-template-columns: 1fr;
    }

    .result-image img {
        width: 100%;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* About Page */
.about-hero {
    text-align: center;
    padding: 3rem 2rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    background: white;
    border-bottom: 2px solid var(--border);
}

.about-hero-painting {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.about-hero-painting img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    opacity: 0.12;
    filter: sepia(20%) saturate(80%);
}

/* Overlay for text readability */
.about-hero-painting::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(248, 246, 241, 0.3) 0%,
        rgba(255, 255, 255, 0.5) 40%,
        rgba(255, 255, 255, 0.6) 100%
    );
}

.about-hero-content {
    position: relative;
    z-index: 1;
}

.painting-credit {
    font-size: 0.8rem;
    color: var(--accent);
    opacity: 0.7;
    font-style: italic;
}

/* Decorative ornament */
.hero-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-ornament .line {
    width: 80px;
    height: 1px;
    background: var(--border);
}

.hero-ornament .diamond {
    width: 8px;
    height: 8px;
    background: var(--accent);
    transform: rotate(45deg);
    opacity: 0.5;
}

.about-hero h1 {
    font-family: 'EB Garamond', serif;
    font-size: 2.5rem;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

.about-subtitle {
    font-size: 1.15rem;
    color: var(--accent);
    font-style: italic;
}

.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    font-family: 'EB Garamond', serif;
    font-size: 1.75rem;
    color: var(--ink);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.section-number {
    color: var(--accent);
    font-weight: 600;
    margin-right: 0.5rem;
}

.about-intro {
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-intro p {
    margin-bottom: 1rem;
}

.about-intro ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.about-intro li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.about-note {
    background: var(--parchment);
    border-left: 3px solid var(--accent);
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    border-radius: 2px;
}

.about-note p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow);
}

.detail-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.detail-value {
    font-family: 'EB Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--ink);
}

/* Code Block */
.code-block {
    background: #1e1e1e;
    border-radius: 4px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-header {
    background: #2d2d2d;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #444;
}

.code-label {
    color: #aaa;
    font-size: 0.85rem;
}

.code-block pre {
    padding: 1rem;
    overflow-x: auto;
}

.code-block code {
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Project Showcase */
.project-showcase {
    margin-bottom: 2rem;
}

.project-description {
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.project-description p {
    margin-bottom: 1rem;
}

.project-features {
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.project-features h4 {
    font-family: 'EB Garamond', serif;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.project-features ul {
    padding-left: 1.5rem;
}

.project-features li {
    margin-bottom: 0.35rem;
    line-height: 1.6;
}

.project-results {
    margin-bottom: 2rem;
}

.project-results h4 {
    font-family: 'EB Garamond', serif;
    font-size: 1.25rem;
    color: var(--ink);
    margin-bottom: 1rem;
}

.project-results p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.project-image {
    margin: 1.5rem 0;
    text-align: center;
}

.project-image img {
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: 0 2px 12px var(--shadow);
}

.image-caption {
    font-size: 0.9rem;
    color: var(--accent);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Project Link Box */
.project-link-box {
    margin-top: 1.5rem;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    text-decoration: none;
    color: var(--ink);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.project-link:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--shadow);
}

.link-icon {
    font-size: 1.5rem;
}

.link-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.link-text strong {
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
}

.link-text small {
    color: var(--accent);
    font-size: 0.85rem;
}

.link-arrow {
    font-size: 1.25rem;
    color: var(--accent);
}

/* Collapsible Sections */
.collapsible-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
}

.collapse-icon {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.collapsible-content {
    max-height: 5000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.collapsed {
    max-height: 0;
}

/* Contact CTA */
.contact-cta {
    text-align: center;
    padding: 2.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: 0 2px 8px var(--shadow);
}

.contact-cta h2 {
    font-family: 'EB Garamond', serif;
    font-size: 1.75rem;
    color: var(--ink);
    margin-bottom: 0.75rem;
    border-bottom: none;
}

.contact-cta p {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 968px) {
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .about-hero h1 {
        font-size: 1.75rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    .nav-painting-bg {
        width: 500px;
        overflow: hidden;
    }
}

@media (max-width: 640px) {
    .nav-painting-bg {
        width: 500px;
        overflow: hidden;
    }
    .nav-painting-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient( to right, white 0%, white 7%, rgba(255, 255, 255, 0.25) 35%, rgba(255, 255, 255, 0.20) 65%, rgba(255, 255, 255, 0) 100% );
    z-index: 1;
}
}
/* External links section */
.external-links-section {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: rgba(248, 246, 241, 0.6);
}

.external-links-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.external-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.external-link-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.external-link {
    color: var(--ink);
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    transition: color 0.15s;
}

.external-link:hover {
    color: var(--accent);
}

.external-link-title {
    font-family: "Crimson Text", serif;
    font-size: 1rem;
    text-decoration: underline;
    text-decoration-color: var(--border);
}

.external-link-type {
    font-size: 0.8rem;
    color: var(--accent);
    font-style: italic;
}

.external-link-description {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
    padding-left: 0.25rem;
}

/* Sidebar notes indicator */
.notes-indicator {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.85rem;
    vertical-align: middle;
    cursor: default;
    flex-shrink: 0;
    line-height: 1;
}

/* Emoji prefix on link/note entries in the Notlar ve Kaynaklar section */
.external-link-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* Plain note entry (no URL) */
.external-link--note {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    cursor: default;
    color: var(--ink);
}
.external-link--note .external-link-title {
    text-decoration: none;
}
