:root {
    --bg-primary: #140022;
    --bg-secondary: #14002f;
    --bg-card: #1a0d24;
    --text-primary: #ffffff;
    --text-secondary: #f3f1ff;
    --text-tertiary: #d7d1ef;
    --border-color: #4b3f86;
    --accent-color: #6f59bf;
    --accent-soft: #d8ccff;
    --ui-grad-start: #3a2a77;
    --ui-grad-mid: #523c9a;
    --ui-grad-end: #7158c2;
    --ui-hover-start: #3c2a6d;
    --ui-hover-mid: #563c97;
    --ui-hover-end: #7860c0;
    --ui-shadow-color: rgba(34, 22, 72, 0.62);
    --panel-overlay: rgba(21, 10, 30, 0.96);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.62);
    --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.74);
}

body.dark-mode {
    --bg-primary: #140022;
    --bg-secondary: #14002f;
    --bg-card: #1a0d24;
    --text-primary: #ffffff;
    --text-secondary: #f3f1ff;
    --text-tertiary: #d7d1ef;
    --border-color: #4b3f86;
    --accent-color: #6f59bf;
    --accent-soft: #d8ccff;
    --ui-grad-start: #3a2a77;
    --ui-grad-mid: #523c9a;
    --ui-grad-end: #7158c2;
    --ui-hover-start: #3c2a6d;
    --ui-hover-mid: #563c97;
    --ui-hover-end: #7860c0;
    --ui-shadow-color: rgba(34, 22, 72, 0.62);
    --panel-overlay: rgba(21, 10, 30, 0.96);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.62);
    --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.74);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html.theme-preload *,
html.theme-preload *::before,
html.theme-preload *::after {
    transition: none !important;
}

*:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 4px;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 16px;
    color: var(--text-primary);
    background:
        radial-gradient(circle at 15% 20%, rgba(107, 70, 179, 0.20) 0%, transparent 42%),
        radial-gradient(circle at 85% 10%, rgba(200, 180, 255, 0.11) 0%, transparent 44%),
        linear-gradient(145deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
    line-height: 1.65;
    min-height: 100vh;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--bg-card);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    display: block;
    transition: transform 0.3s ease;
}

body.dark-mode .theme-icon {
    transform: rotate(180deg);
}

.page-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr 280px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    gap: 0;
}

.sidebar {
    background: linear-gradient(150deg, var(--panel-overlay) 0%, rgba(8, 6, 14, 0.98) 100%);
    padding: 36px 20px;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-right {
    padding: 32px 16px;
    background: linear-gradient(150deg, var(--panel-overlay) 0%, rgba(8, 6, 14, 0.98) 100%);
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    position: sticky;
    top: 0;
    max-height: 100vh;
}

.main-content {
    padding: 36px 32px;
    max-width: 800px;
}

button {
    background: linear-gradient(135deg, var(--ui-grad-start) 0%, var(--ui-grad-mid) 55%, var(--ui-grad-end) 100%);
    color: #f8f1e5;
    padding: 8px 16px;
    border: 1px solid rgba(200, 180, 255, 0.45);
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover {
    box-shadow: 0 10px 24px var(--ui-shadow-color);
    border-color: rgba(216, 200, 255, 0.68);
}

.profile-image {
    margin-bottom: 20px;
    text-align: center;
}

.profile-image a.home-button-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-image a.home-button-nav:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.24);
    border-color: rgba(255, 255, 255, 0.28);
}

.avatar-placeholder {
    width: 92px;
    height: 92px;
    margin: 0 auto;
    background: linear-gradient(135deg, #3b256a 0%, #5a37a0 55%, #8f68d8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 600;
    color: white;
    font-family: 'Cinzel', serif;
    box-shadow: 0 8px 22px rgba(59, 37, 106, 0.4);
}

.avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(200, 180, 255, 0.55);
    box-shadow: 0 0 0 2px rgba(107, 70, 179, 0.35), 0 10px 24px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px rgba(107, 70, 179, 0.45), 0 12px 28px rgba(0, 0, 0, 0.55);
}

.hero {
    text-align: center;
    margin-bottom: 24px;
}

.hero h1,
.bio-page h1 {
    font-family: 'Pirata One', serif;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: 0.4px;
    font-size: 1.7rem;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--accent-soft) 0%, #f3ecff 55%, #7f5ad4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 0 10px rgba(200, 180, 255, 0.18);
    word-break: break-word;
    overflow-wrap: break-word;
}

.tagline {
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

.about,
.links-section {
    text-align: left;
    margin-bottom: 24px;
    background: linear-gradient(150deg, var(--panel-overlay) 0%, rgba(8, 6, 14, 0.98) 100%);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.sidebar-links-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 12px;
}

.secondary-link {
    color: var(--text-secondary);
}

.secondary-link:hover {
    color: var(--accent-soft);
}

.about h2,
.links-section h2,
section h2,
.sidebar section h2,
.widget h3,
.bio-section h2,
.portfolio-item h3,
.modal-title {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: var(--text-primary);
    letter-spacing: 0.45px;
}

.about h2,
.links-section h2 {
    font-size: 1.05rem;
}

.sidebar section h2 {
    font-size: 0.95rem;
}

.about p,
.sidebar-right p,
.bio-section p,
.cv-description {
    color: var(--text-secondary);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.98rem;
    line-height: 1.5;
    margin: 0;
}

.links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 24px 0;
}

.link-button,
.back-button,
.bio-link,
.scroll-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ui-grad-start) 0%, var(--ui-grad-mid) 55%, var(--ui-grad-end) 100%);
    color: #f8f1e5;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    letter-spacing: 0.2px;
    border: 1px solid rgba(200, 180, 255, 0.45);
}

.link-button:hover,
.back-button:hover,
.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--ui-shadow-color);
    border-color: rgba(216, 200, 255, 0.68);
    background: linear-gradient(135deg, var(--ui-grad-mid) 0%, var(--ui-grad-start) 100%);
}

.link-button:active,
.back-button:active,
.scroll-to-top:active {
    transform: translateY(0);
}

.back-button {
    gap: 6px;
    margin-top: 20px;
    font-weight: 600;
    padding: 8px 16px;
    position: relative;
}

.back-button::before {
    content: '← ';
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-button:hover::before {
    transform: translateX(-3px);
}

.bio-link {
    gap: 4px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 6px 16px rgba(86, 60, 140, 0.26);
    margin-top: 0;
    color: var(--text-primary);
    font-size: 0.8rem;
    line-height: 1.1;
    font-weight: 700;
    white-space: nowrap;
    position: relative;
}

.bio-link::after {
    content: '→';
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bio-link:hover {
    color: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(98, 72, 159, 0.35);
}

.bio-link:hover::after {
    transform: translateX(3px);
}

.inline-link {
    color: var(--accent-soft);
    text-decoration: none;
    font-weight: 600;
}

.inline-link:hover {
    color: var(--text-primary);
}

.blog-page,
.blog-post-detail {
    max-width: 800px;
    margin-bottom: 36px;
}

.blog-header-row {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 16px;
}

.eyebrow {
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-soft);
}

.blog-search-wrap {
    min-width: 180px;
}

.blog-search-wrap input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.blog-filter,
.blog-read-more {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.blog-filter.active,
.blog-filter:hover,
.blog-read-more:hover {
    background: linear-gradient(135deg, var(--ui-grad-mid) 0%, var(--ui-grad-start) 100%);
    color: white;
    border-color: transparent;
}

.blog-posts {
    display: grid;
    gap: 16px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.blog-card-top,
.blog-card-bottom,
.blog-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-card h3 {
    margin: 10px 0 8px;
    font-size: 1.15rem;
    line-height: 1.25;
    color: var(--text-primary);
}

.blog-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card h3 a:hover {
    color: var(--accent-soft);
    text-shadow: 0 0 10px rgba(200, 180, 255, 0.2);
}

.blog-card p,
.blog-post-body p {
    color: var(--text-secondary);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.02rem;
    line-height: 1.45;
    margin: 0;
}

.blog-card-bottom {
    margin-top: 14px;
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.blog-empty-state {
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
}

.blog-post-article {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.blog-post-header {
    background: linear-gradient(135deg, #3f245f 0%, #5c3c87 100%);
    padding: 24px 20px 14px;
    color: white;
}

.blog-post-header .eyebrow {
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.blog-post-header h2 {
    margin: 0 0 8px;
    font-size: 1.6rem;
    line-height: 1.15;
    color: white;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.blog-post-meta {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.blog-post-body {
    padding: 20px;
    max-width: 720px;
    margin: 0 auto;
}

.blog-post-body h1,
.blog-post-body h2,
.blog-post-body h3,
.blog-post-body h4,
.blog-post-body h5,
.blog-post-body h6 {
    margin-top: 1.4em;
    margin-bottom: 0.5em;
    line-height: 1.2;
    color: var(--text-primary);
    font-weight: 700;
    font-family: 'Cinzel', serif;
}

.blog-post-body h1 { font-size: 1.5rem; }
.blog-post-body h2 { font-size: 1.25rem; }
.blog-post-body h3 { font-size: 1.1rem; }
.blog-post-body h4,
.blog-post-body h5,
.blog-post-body h6 { font-size: 0.95rem; }

.blog-post-body p {
    margin-bottom: 12px;
    font-size: 1.02rem;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.blog-post-body ul,
.blog-post-body ol {
    color: var(--text-primary);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.02rem;
    line-height: 1.5;
    margin-bottom: 18px;
    padding-left: 24px;
}

.blog-post-body li {
    margin-bottom: 6px;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
}

.blog-post-body a {
    color: var(--accent-soft);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed rgba(226, 212, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-post-body a:hover {
    color: var(--text-primary);
    border-bottom: 1px solid var(--accent-soft);
    text-shadow: 0 0 8px rgba(226, 212, 255, 0.5);
}

.blog-post-actions {
    padding: 0 20px 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bio-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 16px;
}

.bio-section {
    margin-bottom: 28px;
    padding: 20px;
    background: linear-gradient(150deg, var(--panel-overlay) 0%, rgba(8, 6, 14, 0.98) 100%);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.bio-section h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--accent-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.cv-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.cv-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cv-item h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.cv-institution {
    font-style: italic;
    color: var(--accent-soft);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 4px;
}

.cv-date {
    color: var(--text-tertiary);
    font-size: 0.78rem;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cv-description {
    color: var(--text-secondary);
    line-height: 1.48;
    font-size: 0.95rem;
}

.subsection-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.04em;
    margin-top: 22px;
    margin-bottom: 12px;
}

.publication-list {
    list-style: none;
    padding-left: 0;
}

.publication-list li {
    padding-left: 20px;
    margin-bottom: 10px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.48;
}

.publication-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent-soft);
    font-size: 1rem;
    top: 2px;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    list-style: none;
    padding-left: 0;
}

.skills-list li {
    background: var(--bg-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.88rem;
}

.portfolio-content {
    animation: slideDown 0.3s ease forwards;
    padding: 12px;
    border: 1px solid rgba(226, 212, 255, 0.18);
    border-radius: 12px;
    background: linear-gradient(155deg, rgba(11, 8, 19, 0.58) 0%, rgba(18, 12, 32, 0.68) 100%);
    box-shadow: inset 0 0 0 1px rgba(200, 180, 255, 0.08);
}

.portfolio-content[hidden] {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.portfolio-filter {
    background: rgba(36, 24, 35, 0.9);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.portfolio-filter:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-soft);
}

.portfolio-filter.active {
    background: linear-gradient(135deg, var(--ui-grad-start) 0%, var(--ui-grad-mid) 55%, var(--ui-grad-end) 100%);
    color: white;
    border-color: transparent;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(155deg, rgba(74, 54, 120, 0.94) 0%, rgba(53, 37, 92, 0.96) 100%);
    border: 1px solid rgba(220, 206, 255, 0.35);
    margin: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 18px rgba(20, 12, 38, 0.55);
}

.portfolio-item:hover {
    transform: translateY(-4px);
    border-color: rgba(226, 212, 255, 0.7);
    box-shadow: 0 12px 26px rgba(31, 19, 56, 0.68);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    opacity: 0;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.04);
}

.portfolio-item figcaption {
    padding: 12px;
    background: linear-gradient(180deg, rgba(58, 41, 98, 0.92) 0%, rgba(45, 31, 78, 0.94) 100%);
    border-top: 1px solid rgba(220, 206, 255, 0.25);
}

.portfolio-item h3 {
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.portfolio-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal[hidden] {
    display: none !important;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 4, 9, 0.82);
    z-index: -1;
}

.modal-content {
    position: relative;
    background: linear-gradient(150deg, var(--panel-overlay) 0%, rgba(8, 6, 14, 0.98) 100%);
    border-radius: 14px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    border: 1px solid var(--border-color);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(32, 20, 30, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    color: var(--text-primary);
}

.modal-close:hover {
    background: #231a35;
    color: var(--accent-soft);
    transform: rotate(90deg);
}

.modal-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
}

.modal-info {
    padding: 20px;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.modal-description {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0;
}

#cursor-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.particle {
    position: fixed;
    pointer-events: none;
    font-size: 20px;
    opacity: 1;
    animation: fadeOut 1.5s ease-out forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.5);
    }
}

.site-footer {
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
}

.widget {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.widget:last-child {
    border-bottom: none;
}

.featured-illustrations {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.featured-illustration-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(32, 20, 30, 0.92);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.featured-illustration-item:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px var(--ui-shadow-color);
}

.featured-illustration-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    opacity: 0;
}

.featured-illustration-title {
    padding: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.quotation-block {
    margin: 24px 0;
    padding: 18px 22px;
    border-left: 4px solid var(--accent-color);
    background: var(--bg-secondary);
    border-radius: 8px;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-primary);
    position: relative;
}

.quotation-block::before {
    content: '„';
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-color);
    opacity: 0.4;
    position: absolute;
    top: -6px;
    left: 8px;
    font-family: Georgia, serif;
    line-height: 1;
}

.quotation-block p {
    margin: 0;
}

.quotation-block em {
    font-style: normal;
    font-weight: 600;
}

.scroll-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.skeleton {
    background: linear-gradient(90deg, 
        var(--bg-card) 25%, 
        var(--bg-secondary) 50%, 
        var(--bg-card) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-card {
    height: 160px;
    margin-bottom: 16px;
}

.skeleton-text {
    height: 12px;
    margin-bottom: 6px;
}

.skeleton-text.title {
    height: 18px;
    width: 60%;
}

.portfolio-image.loaded,
.featured-illustration-image.loaded,
img.loaded {
    opacity: 1;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#portfolio-home-section {
    display: none;
}

#portfolio-home-section:has(.portfolio-item) {
    display: block;
}

.blog-post-article img,
.blog-card img,
.main-content article img {
    max-width: min(100%, 260px);
    width: 100%;
    height: auto;
    display: block;
    margin: 1.8rem auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-article img:hover,
.main-content article img:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

@media (max-width: 1200px) {
    .sidebar-right {
        padding: 20px 14px;
    }
    
    .widget {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
}

@media (max-width: 1100px) {
    .page-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        height: auto;
        padding: 24px 20px;
    }
    
    .main-content {
        padding: 24px 20px;
    }
}

@media (max-width: 768px) {
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 640px) {
    .sidebar {
        padding: 20px 16px;
    }
    
    .main-content {
        padding: 20px 16px;
    }
    
    .hero h1 {
        font-size: 1.25rem;
    }
    
    .avatar-placeholder, .avatar {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
}
