/* ===========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   =========================================== */
:root {
    /* Colors - Primary */
    --color-accent: #4a9eff;
    --color-accent-light: #7bb5ff;
    --color-accent-glow: rgba(74, 158, 255, 0.15);

    /* Colors - Neutral */
    --color-bg-dark: #0a0a0a;
    --color-bg-input: rgba(10, 10, 10, 0.7);
    --color-border: #2a2a2a;
    --color-border-light: rgba(255, 255, 255, 0.16);

    /* Colors - Text */
    --color-text: #e6e6e6;
    --color-text-muted: #8c8c8c;
    --color-text-secondary: #b0b0b0;
    --color-text-light: #cfcfcf;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 18px;
    --radius-pill: 999px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;

    /* Grid Gaps */
    --gap-compact: var(--spacing-md);
    --gap-normal: var(--spacing-lg);
    --gap-spacious: var(--spacing-xl);
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */

/* Typography utilities */
.label-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

/* Border utilities */
.border-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

/* Hover interaction utility */
.hover-accent {
    transition: color var(--transition-normal), border-color var(--transition-normal);
}
.hover-accent:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* Grid utilities */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-normal);
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-normal);
}

.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap-compact);
}

@media (max-width: 768px) {
    .grid-2-col,
    .grid-3-col {
        grid-template-columns: 1fr;
        gap: var(--gap-compact);
    }
}

/* ===========================================
   FORM FOCUS STATES (WCAG 2.1 AA Compliance)
   =========================================== */

/* Standardized form inputs */
input,
textarea,
select {
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Focus state - keyboard navigation */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

/* Focus-visible for keyboard-only focus ring */
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* Placeholder styling */
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Disabled state */
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===========================================
   BASE STYLES
   =========================================== */

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

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-bg-dark);
    color: #e8e8e8;
    line-height: 1.2;
    overflow-x: hidden;
}

.dashboard-body {
    background: radial-gradient(circle at top, #12182a 0%, var(--color-bg-dark) 55%);
}

.site-menu {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translate(-50%, -10px);
    display: flex;
    align-items: center;
    background: rgba(12, 12, 12, 0.7);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.6rem 1.4rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal), transform 0.3s ease;
    z-index: 5;
    backdrop-filter: blur(10px);
}

.site-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 96px;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.75) 0%, rgba(10, 10, 10, 0) 100%);
    backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
    z-index: 4;
}

.site-menu.is-visible + .site-menu-backdrop,
.site-menu-backdrop.is-visible {
    opacity: 1;
}

.site-menu.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.site-menu-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid var(--color-border);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #cfcfcf;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-menu.is-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-menu.is-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.site-menu.is-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-menu a,
.site-menu button {
    color: #cfcfcf;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    transition: color var(--transition-normal);
}

.site-menu a:hover,
.site-menu button:hover,
.site-menu button.is-active {
    color: var(--color-accent);
}

.site-menu-separator {
    width: 1px;
    height: 16px;
    background: var(--color-border);
    margin: 0 0.25rem;
}

.language-switch {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, var(--color-bg-dark) 50%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
    z-index: 0;
    overflow: visible;
}

.hero-bg circle {
    filter: blur(60px);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    background: linear-gradient(90deg,
        #4ade80 0%,
        #3b82f6 25%,
        #06b6d4 50%,
        #3b82f6 75%,
        #4ade80 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #b0b0b0;
    font-weight: 300;
    letter-spacing: 0.01em;
}

/* Section Base */
section {
    padding: 8rem 2rem;
    position: relative;
}

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

/* What I Do Section */
.what-i-do {
    background: var(--color-bg-dark);
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-spacious);
    margin-top: var(--spacing-xl);
}

.card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 1px solid var(--color-border);
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.card:hover::before {
    transform: translateX(100%);
}

.card:hover {
    border-color: #3a3a3a;
    transform: translateY(-5px);
}

.card-icon {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

/* Icon-specific motion */
.card:nth-child(1) .card-icon path {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: lineDraw 5s ease-in-out infinite;
}

.card:nth-child(1) .card-icon circle {
    animation: nodePulse 3.5s ease-in-out infinite;
}

.card:nth-child(2) .card-icon path {
    transform-origin: 30px 30px;
    animation: clockSweep 6s linear infinite;
}

.card:nth-child(3) .card-icon circle {
    animation: nodePulse 3s ease-in-out infinite;
}

.card:nth-child(3) .card-icon line {
    stroke-dasharray: 6 6;
    animation: flowDash 4s linear infinite;
}

.card:nth-child(4) .card-icon rect {
    stroke-dasharray: 160;
    stroke-dashoffset: 0;
    animation: frameTrace 6s ease-in-out infinite;
}

.card:nth-child(4) .card-icon path {
    transform-origin: center;
    animation: aiSmile 4s ease-in-out infinite;
}

@keyframes lineDraw {
    0%, 20% { stroke-dashoffset: 120; }
    50%, 80% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -120; }
}

@keyframes nodePulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes clockSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes flowDash {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -24; }
}

@keyframes frameTrace {
    0%, 100% { stroke-dashoffset: 0; opacity: 0.8; }
    50% { stroke-dashoffset: 160; opacity: 1; }
}

@keyframes aiSmile {
    0%, 100% { transform: scaleX(1); opacity: 0.8; }
    50% { transform: scaleX(1.08); opacity: 1; }
}

.card-content {
    flex: 1;
}

.card h3 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.card p {
    color: #b0b0b0;
    line-height: 1.8;
    font-weight: 300;
    font-size: 1.15rem;
}

/* About Section */
.about {
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, #1a1a1a 100%);
    padding: 10rem 2rem;
    position: relative;
    overflow: hidden;
}

.about::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(74, 158, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(74, 158, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.about-item {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.about-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background: linear-gradient(180deg, transparent, var(--color-accent), transparent);
    opacity: 0.5;
}

.about-number {
    font-size: 3.5rem;
    font-weight: 200;
    background: linear-gradient(135deg, var(--color-accent), #7aaae8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1;
}

.about-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #888;
    margin-bottom: 0.5rem;
}

.about-text {
    font-size: 1.1rem;
    color: #b0b0b0;
    font-weight: 300;
}

.about-statement {
    text-align: center;
    max-width: 800px;
    margin: 4rem auto 0;
    padding: 3rem;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    position: relative;
}

.about-statement::before {
    content: "\"";
    position: absolute;
    top: -20px;
    left: 30px;
    font-size: 6rem;
    color: var(--color-accent);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

.about-statement p {
    font-size: 1.4rem;
    line-height: 1.9;
    color: #d0d0d0;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.about-statement p:last-child {
    margin-bottom: 0;
}

@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-statement {
        padding: 2rem;
    }
}

/* Writing Section */
.writing {
    background: var(--color-bg-dark);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    margin-bottom: 4rem;
    text-align: center;
    color: #ffffff;
}

.writing-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.writing-header .section-title {
    margin-bottom: 0;
}

.all-articles-link {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 500;
}

.all-articles-link:hover {
    color: var(--color-accent-light);
}

.essays {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap-normal);
}

.essay-card {
    background: #0f0f0f;
    border: 1px solid var(--color-border);
    padding: 2.5rem;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.essay-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 1.5rem;
    border: 1px solid #1f1f1f;
}

.essay-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-3px);
}

.essay-card h4 {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #ffffff;
}

.essay-card p {
    color: #a0a0a0;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.essay-subtitle {
    color: #7d7d7d;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
}

.essay-card .read-more {
    color: var(--color-accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 400;
}

/* Articles Pages */
.articles-page {
    padding: 10rem 2rem 8rem;
}

.articles-hero {
    max-width: 900px;
    margin: 0 auto 4rem;
    text-align: center;
}

.articles-hero h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 300;
    margin-bottom: 1rem;
}

.articles-hero p {
    font-size: 1.1rem;
    color: #b0b0b0;
}

.articles-list {
    max-width: 900px;
    margin: 0 auto;
}

.articles-list-container {
    display: grid;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-list-item {
    background: #0f0f0f;
    border: 1px solid var(--color-border);
    padding: 2.5rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.article-list-item:hover {
    border-color: var(--color-accent);
    transform: translateY(-3px);
}

.article-link {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.article-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid #1f1f1f;
}

.article-image-placeholder {
    width: 100%;
    height: 160px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.article-detail-image {
    width: 100%;
    height: auto;
    border-radius: 22px;
    margin: 1.5rem 0;
    border: 1px solid #1f1f1f;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.article-subtitle {
    color: #7d7d7d;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.article-abstract {
    color: #b0b0b0;
    font-weight: 300;
    line-height: 1.7;
}

.article-text {
    display: flex;
    flex-direction: column;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
}

.tag-pill {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #cfcfcf;
    background: rgba(255, 255, 255, 0.03);
}

.tag-link {
    text-decoration: none;
    color: inherit;
}

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

@media (max-width: 768px) {
    .article-link {
        grid-template-columns: 1fr;
    }

    .article-image {
        height: 200px;
    }

    .article-image-placeholder {
        height: 200px;
    }
}

.article-page {
    padding: 10rem 2rem 8rem;
}

.article-detail {
    max-width: 1040px;
    margin: 0 auto;
}

.article-detail h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 300;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 3rem;
    align-items: start;
}

.article-main {
    min-width: 0;
}

.article-sidebar {
    position: sticky;
    top: 6.5rem;
    align-self: start;
    background: rgba(15, 15, 15, 0.7);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.5rem;
}

.article-sidebar-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 500;
    color: #cfcfcf;
    margin-bottom: 1rem;
}

.article-downloads {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.article-downloads a {
    color: var(--color-accent-light);
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(123, 181, 255, 0.35);
    padding-bottom: 2px;
}

.article-downloads a:hover {
    border-bottom-color: rgba(123, 181, 255, 0.85);
}

.download-form {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.download-form.is-hidden {
    display: none;
}

.download-options {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: grid;
    gap: 0.6rem;
}

.download-option-button {
    width: 100%;
    text-align: left;
    background: rgba(15, 15, 15, 0.7);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    color: #cfcfcf;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.download-option-button:hover {
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

.download-option-button.is-active {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.download-form-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #cfcfcf;
}

.download-form-intro {
    font-size: 0.85rem;
    color: #9a9a9a;
    line-height: 1.6;
}

.download-form-selected {
    font-size: 0.8rem;
    color: #b0b0b0;
}

.download-form-field {
    display: grid;
    gap: 0.4rem;
}

.download-form-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-text-muted);
}

.download-form input,
.download-form textarea,
.download-form select {
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: #e6e6e6;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
}

.download-form textarea {
    resize: vertical;
    min-height: 80px;
}

.download-form-consent {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    font-size: 0.8rem;
    color: #a0a0a0;
    line-height: 1.5;
}

.download-form-consent input {
    margin-top: 0.15rem;
}

.download-form-submit {
    background: var(--color-accent);
    color: var(--color-bg-dark);
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-form-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 158, 255, 0.25);
}

.download-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.download-form-status {
    font-size: 0.85rem;
    line-height: 1.5;
    min-height: 1.2rem;
}

.download-form-status.is-success {
    color: #8fe0b3;
}

.download-form-status.is-error {
    color: #ff8b8b;
}

.article-detail .article-subtitle {
    margin-bottom: 1.2rem;
    letter-spacing: 0.08em;
    font-weight: 500;
    font-size: 1.05rem;
    color: #cfcfcf;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-text-muted);
    margin-bottom: 1.2rem;
    align-items: center;
}

.article-meta-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.2rem;
}

.article-reading-toggle {
    border: 0;
    padding: 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    background: transparent;
    color: var(--color-accent-light);
    cursor: pointer;
}

.article-reading-toggle:hover {
    color: #ffffff;
}

.article-slides {
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1.5rem 0 2.5rem;
    background: rgba(15, 15, 15, 0.6);
}

.article-slides-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.article-slides-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 1rem;
}

.article-slides-controls button,
.article-slides-controls a {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: transparent;
    color: #cfcfcf;
    cursor: pointer;
    text-decoration: none;
}

.article-slides-controls button:hover,
.article-slides-controls a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.article-slides-fullscreen {
    margin-left: auto;
}

.slides-status {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.slides-frame {
    width: 100%;
    height: auto;
    border: 1px solid #1f1f1f;
    border-radius: 12px;
    background: var(--color-bg-dark);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
}

.slides-canvas {
    width: 100%;
    height: auto;
    display: block;
}

.article-slides:fullscreen {
    margin: 0;
    border-radius: 0;
    border: 0;
    padding: 1rem;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-slides:fullscreen .slides-frame {
    flex: 1;
    border: 0;
    border-radius: 0;
    background: transparent;
    align-items: center;
}

.article-slides:fullscreen .slides-canvas {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.article-toc {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    position: relative;
}

.article-toc-panel {
    display: block;
}

.article-toc-toggle {
    display: none;
}

.article-toc-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.article-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #b0b0b0;
}

.article-toc-list a {
    color: inherit;
    text-decoration: none;
}

.article-toc-list a:hover {
    color: var(--color-accent);
}

.toc-item-nested {
    margin-left: 0.75rem;
}

.article-toc-media {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.article-toc-media-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent-light);
    margin-bottom: 0.6rem;
}

.article-toc-media-list {
    display: grid;
    gap: 0.5rem;
}

.article-toc-media-item {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
    background: rgba(15, 15, 15, 0.6);
    color: #cfcfcf;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
}

.article-toc-media-item:hover {
    border-color: rgba(123, 181, 255, 0.6);
    color: var(--color-accent-light);
}

.article-infographic-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 12, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 0;
}

.article-infographic-overlay.is-visible {
    display: flex;
}

.article-infographic-stage {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

.article-infographic-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    background: transparent;
    color: #cfcfcf;
    cursor: pointer;
}

.article-infographic-close:hover {
    border-color: rgba(123, 181, 255, 0.6);
    color: var(--color-accent-light);
}

.article-infographic-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: rgba(15, 15, 15, 0.7);
    color: #cfcfcf;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.65rem;
}

.article-infographic-nav.is-hidden {
    visibility: hidden;
}

.article-infographic-nav:disabled {
    opacity: 0.4;
    cursor: default;
}

.article-infographic-nav.is-prev {
    left: 1.25rem;
}

.article-infographic-nav.is-next {
    right: 1.25rem;
}

.article-infographic-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    border: 0;
    background: var(--color-bg-dark);
}

.article-infographic-caption {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: #b0b0b0;
    text-align: center;
    max-width: min(90vw, 900px);
    padding: 0.4rem 0.8rem;
    background: rgba(5, 7, 12, 0.6);
    border-radius: 999px;
}

body.is-overlay-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .article-infographic-close {
        top: 0.85rem;
        right: 0.85rem;
    }

    .article-infographic-nav {
        padding: 0.5rem 0.7rem;
    }

    .article-infographic-nav.is-prev {
        left: 0.75rem;
    }

    .article-infographic-nav.is-next {
        right: 0.75rem;
    }

    .article-infographic-caption {
        bottom: 0.85rem;
        font-size: 0.78rem;
    }
}

@supports (object-fit: contain) {
    .article-infographic-image {
        object-fit: contain;
    }
}

@media (max-width: 900px) {
    .article-toc.is-drawer {
        position: fixed;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        padding: 0;
        border: 0;
        z-index: 20;
    }

    .article-toc.is-drawer .article-toc-panel {
        background: rgba(12, 16, 26, 0.95);
        border: 1px solid var(--color-border);
        border-right: 0;
        border-radius: 16px 0 0 16px;
        padding: 1rem 1.1rem 1.2rem;
        width: min(72vw, 320px);
        max-height: 70vh;
        overflow: auto;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    }

    .article-toc.is-drawer.is-collapsed .article-toc-panel {
        display: none;
    }

    .article-toc.is-drawer .article-toc-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: 0;
        top: 50%;
        transform: translate(0, -50%) rotate(-90deg);
        transform-origin: center;
        border: 1px solid var(--color-border);
        border-left: 0;
        border-radius: 0 12px 12px 0;
        background: rgba(12, 16, 26, 0.95);
        color: #cfcfcf;
        padding: 0.5rem 0.9rem;
        font-size: 0.65rem;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        cursor: pointer;
        z-index: 21;
    }

    .article-toc.is-drawer .article-toc-toggle:hover {
        color: var(--color-accent-light);
        border-color: rgba(123, 181, 255, 0.6);
    }

    .article-toc.is-drawer .article-toc-title {
        margin-bottom: 0.6rem;
    }
}

.article-related {
    margin-top: 2.5rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
}

.article-related-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.article-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.article-related-list a {
    color: #cfcfcf;
    text-decoration: none;
    border-bottom: 1px solid rgba(123, 181, 255, 0.3);
    padding-bottom: 2px;
}

.article-related-list a:hover {
    border-bottom-color: rgba(123, 181, 255, 0.85);
    color: var(--color-accent-light);
}

.article-comments {
    margin-top: 2.5rem;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: rgba(15, 15, 15, 0.6);
}

.article-comments-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.article-comments-prompt {
    margin: 0 0 1.5rem;
    color: #cfcfcf;
    line-height: 1.8;
}

.article-comments-form {
    display: grid;
    gap: 1rem;
}

.article-comments-form.is-hidden {
    display: none;
}

.article-comments-field {
    display: grid;
    gap: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
}

.article-comments-field input,
.article-comments-field textarea {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    background: var(--color-bg-dark);
    color: #ffffff;
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0;
    font-family: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

.article-comments-field textarea {
    resize: vertical;
}

.article-comments-submit {
    justify-self: start;
    border: 1px solid var(--color-accent);
    border-radius: 999px;
    padding: 0.5rem 1.2rem;
    background: transparent;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    cursor: pointer;
}

.article-comments-submit:hover {
    background: var(--color-accent);
    color: var(--color-bg-dark);
}

.article-comments-status {
    min-height: 1.2rem;
    font-size: 0.85rem;
}

.article-comments-status.is-success {
    color: #8fe0b3;
}

.article-comments-status.is-error {
    color: #ff8b8b;
}

.article-comments-success {
    display: none;
    margin-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.2rem;
}

.article-comments-success.is-visible {
    display: grid;
    gap: 0.75rem;
}

.article-comments-success-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #8fe0b3;
}

.article-comments-success-copy {
    margin: 0;
    color: #cfcfcf;
    line-height: 1.8;
}

.article-comments-success-link {
    color: var(--color-accent-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(123, 181, 255, 0.35);
    width: fit-content;
}

.article-comments-success-link:hover {
    border-bottom-color: rgba(123, 181, 255, 0.85);
}

body.is-reading {
    background: var(--color-bg-dark);
}

body.is-reading .site-menu,
body.is-reading .article-sidebar,
body.is-reading .article-share {
    display: none !important;
}

body.is-reading .article-detail {
    max-width: 980px;
}

body.is-reading .article-page {
    padding-top: 6rem;
}

@media (max-width: 900px) {
    body.is-reading .article-detail {
        max-width: none;
        width: 100%;
    }
    body.is-reading .article-page {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.article-share {
    margin: 1.2rem 0 0.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.article-meta-stack {
    margin: 1rem 0 2rem;
}

.article-share-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 0.6rem;
}

.article-share-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #cfcfcf;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
}

.share-button:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.share-status {
    font-size: 0.75rem;
    color: #8fe0b3;
}

.article-body h2,
.article-body h3 {
    scroll-margin-top: 120px;
}

#article-audio,
#article-slides,
#article-top {
    scroll-margin-top: 120px;
}
.article-detail .article-abstract {
    font-size: 1.80rem;
    line-height: 1.9;
    margin-bottom: 3rem;
    color: #cfcfcf;
    font-family: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

.article-audio {
    margin: 1.5rem 0 2rem;
    background: rgba(15, 15, 15, 0.7);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.25rem;
}

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

.article-audio audio {
    width: 100%;
}

.article-body {
    font-family: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

.article-body p {
    margin-bottom: 1.8rem;
    color: #d6d6d6;
    font-weight: 400;
    line-height: 2;
    font-size: 1.30rem;
}

.article-body h2,
.article-body h3 {
    margin: 2.5rem 0 1rem;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.article-body h2 {
    font-size: 1.8rem;
}

.article-body h3 {
    font-size: 1.4rem;
}

.article-body ul {
    margin: 0 0 2rem 1.5rem;
    color: #d6d6d6;
}

.article-body li {
    margin-bottom: 0.75rem;
    line-height: 1.9;
}

.article-body a {
    color: var(--color-accent-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(123, 181, 255, 0.35);
}

.article-body a:hover {
    border-bottom-color: rgba(123, 181, 255, 0.85);
}

.article-filters {
    max-width: 900px;
    margin: 0 auto 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-filters-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
}

.article-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-filter {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #cfcfcf;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.tag-filter.is-active {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.article-back-link {
    display: inline-block;
    margin-bottom: 3rem;
    color: var(--color-accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
}

.article-back-link:hover {
    color: var(--color-accent-light);
}

/* For Whom Section */
.for-whom {
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, #1a1a2e 100%);
    padding: 8rem 2rem;
}

.for-whom-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.for-whom h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 3rem;
    color: #ffffff;
}

.for-whom ul {
    list-style: none;
    font-size: 1.3rem;
    color: #c0c0c0;
    margin-bottom: 3rem;
}

.for-whom li {
    margin: 1rem 0;
    font-weight: 300;
}

.for-whom li::before {
    content: "•";
    margin-right: 0.8rem;
    color: var(--color-accent);
}

.disclaimer {
    font-size: 1.1rem;
    color: #888;
    font-style: italic;
    font-weight: 300;
    margin-top: 2rem;
}

/* Contact Section */
.contact {
    background: var(--color-bg-dark);
    padding: 8rem 2rem;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact p {
    font-size: 1.4rem;
    color: #c0c0c0;
    font-weight: 300;
    margin-bottom: 1rem;
}

.contact a {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 1.3rem;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.contact a:hover {
    border-bottom-color: var(--color-accent);
}

/* Footer */
.site-footer {
    padding: 3.5rem 2rem 5rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.9) 0%, rgba(14, 14, 14, 0.98) 100%);
    border-top: 1px solid #1f1f1f;
}

.footer-text {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* Dashboard */
.dashboard-body {
    background: radial-gradient(circle at 20% 20%, rgba(14, 20, 40, 0.9), var(--color-bg-dark) 60%);
}

.dash-hero {
    padding: 6.5rem 2rem 4rem;
    background: radial-gradient(circle at 15% 20%, rgba(74, 158, 255, 0.22), transparent 60%);
}

.dash-hero-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

.dash-kicker {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.7rem;
    color: #7aaae8;
    margin-bottom: 1rem;
}

.dash-hero h1 {
    font-size: clamp(2.3rem, 5vw, 3.8rem);
    font-weight: 300;
    margin-bottom: 1rem;
}

.dash-subtitle {
    color: #b0b0b0;
    max-width: 520px;
}

.dash-meta {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7d7d7d;
}

.dash-hero-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dash-link {
    text-decoration: none;
    color: #cfcfcf;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.6rem 1.2rem;
}

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

.dash-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.dash-tabs {
    display: inline-flex;
    gap: 0.6rem;
    padding: 0.4rem;
    border: 1px solid #22304a;
    border-radius: 999px;
    background: rgba(10, 12, 18, 0.65);
    margin: -2rem auto 1rem;
    position: sticky;
    top: 1rem;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.dash-tab {
    background: transparent;
    border: 0;
    color: #cfcfcf;
    padding: 0.6rem 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
    cursor: pointer;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.dash-tab.is-active {
    background: rgba(74, 158, 255, 0.18);
    color: var(--color-accent);
    transform: translateY(-1px);
}

.dash-panel {
    display: none;
}

.dash-panel.is-active {
    display: block;
    animation: panelIn 0.4s ease;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dash-section-header h2 {
    font-size: 1.6rem;
    font-weight: 300;
}

.dash-status {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #7d7d7d;
}

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--gap-compact);
}

.dash-kpi {
    background: rgba(12, 16, 26, 0.85);
    border: 1px solid #22304a;
    border-radius: 20px;
    padding: 1.6rem;
    display: grid;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}

.dash-kpi::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(74, 158, 255, 0.15), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.dash-kpi:hover::after {
    opacity: 1;
}

.dash-kpi-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #8aa1c6;
}

.dash-kpi-value {
    font-size: 2rem;
    font-weight: 300;
    color: #ffffff;
}

.dash-kpi-detail {
    color: var(--color-accent-light);
    font-size: 0.85rem;
}

.dash-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.dash-columns-wide {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dash-card {
    background: rgba(10, 12, 18, 0.8);
    border: 1px solid #1f2b3d;
    border-radius: 18px;
    padding: 1.5rem;
}

.dash-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    color: #cfcfcf;
}

.dash-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.7rem;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.dash-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.dash-list strong {
    color: #ffffff;
    font-weight: 500;
}

.dash-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.dash-bar-list {
    display: grid;
    gap: 0.8rem;
}

.dash-bar-row {
    display: grid;
    grid-template-columns: 120px 1fr 40px;
    gap: 0.8rem;
    align-items: center;
    font-size: 0.85rem;
    color: #b0b0b0;
}

.dash-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.dash-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), #4ade80);
    transform-origin: left;
    transform: scaleX(0);
    animation: barGrow 0.6s ease forwards;
}

@keyframes barGrow {
    to { transform: scaleX(1); }
}

.dash-table {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.dash-table-row {
    display: grid;
    grid-template-columns: 1.4fr 1.4fr 0.8fr;
    gap: 1rem;
    align-items: center;
}

.dash-table-row strong {
    color: #ffffff;
    text-align: right;
}

.dash-table-comments {
    gap: 1rem;
}

.dash-table-row-comments {
    grid-template-columns: 1.1fr 2fr 0.7fr;
    align-items: start;
}

.dash-comment-detail {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: #cfcfcf;
}

.dash-pill {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dash-pill.is-new {
    color: #8fe0b3;
    border-color: rgba(143, 224, 179, 0.6);
}

.dash-pill.is-muted {
    color: #cfcfcf;
}

.dash-comments-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dash-comments-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}

.dash-filter {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #7aaae8;
}

.dash-filter select,
.dash-filter input {
    background: #0f1216;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
    color: #e8e8e8;
    font-size: 0.85rem;
    letter-spacing: 0;
    text-transform: none;
}

.dash-filter-search {
    min-width: 260px;
    flex: 1;
}

.dash-filter-reset {
    border: 1px solid rgba(122, 170, 232, 0.4);
    background: transparent;
    color: #7aaae8;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
}

.dash-filter-reset:hover {
    border-color: rgba(122, 170, 232, 0.8);
    color: #d6e7ff;
}

.dash-comments-action-status {
    font-size: 0.8rem;
    color: #9fd7b7;
}

.dash-comments-action-status.is-error {
    color: #f5a3a3;
}

.dash-comments-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    color: #cfcfcf;
    table-layout: fixed;
}

.dash-comments-table th,
.dash-comments-table td {
    text-align: left;
    padding: 0.75rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
    word-break: break-word;
}

.dash-comments-table th {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.7rem;
    color: #7aaae8;
}

.dash-table-empty {
    text-align: center;
    color: #7a7a7a;
    padding: 1.5rem 0.5rem;
}

.dash-comment-row-secondary td {
    padding-top: 0.3rem;
    padding-bottom: 1rem;
}

.dash-comment-row td {
    border-bottom: none;
}

.dash-comment-row-secondary td,
.dash-comment-reply-row td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.dash-cell-label {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.65rem;
    color: #7aaae8;
    margin-bottom: 0.35rem;
}

.dash-contact-muted {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.dash-comment-response {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
    color: #9bd6f5;
    font-size: 0.82rem;
}

.dash-select {
    background: #0f1216;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    color: #e8e8e8;
    font-size: 0.82rem;
}

.dash-select-inline {
    width: 100%;
}

.dash-reply-input {
    width: 100%;
    min-width: 220px;
    background: #0f1216;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 0.5rem 0.7rem;
    color: #e8e8e8;
    font-size: 0.85rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.dash-reply-toggle {
    border: 1px solid rgba(122, 170, 232, 0.4);
    background: transparent;
    color: #7aaae8;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
}

.dash-reply-toggle:hover {
    border-color: rgba(122, 170, 232, 0.8);
    color: #d6e7ff;
}

.dash-comment-reply-row {
    display: none;
}

.dash-comment-reply-row.is-open {
    display: table-row;
}

.dash-reply-panel {
    padding: 0.75rem 0.5rem 1rem;
    background: rgba(20, 26, 36, 0.7);
    border: 1px solid rgba(122, 170, 232, 0.2);
    border-radius: 14px;
}

.dash-reply-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dash-reply-button {
    border: none;
    border-radius: 999px;
    background: #7aaae8;
    color: #0b0f14;
    padding: 0.45rem 0.9rem;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

.dash-reply-button:hover {
    background: #9dc0f2;
}

.dash-reply-button:disabled {
    opacity: 0.6;
    cursor: progress;
}

.dash-reply-status {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: #9fd7b7;
}

.dash-reply-status.is-error {
    color: #f5a3a3;
}

.dash-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: #b0b0b0;
}

.dash-matrix th,
.dash-matrix td {
    text-align: left;
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-matrix th {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.7rem;
    color: #7aaae8;
}

.dash-matrix th.dash-matrix-group {
    text-align: center;
    color: #cfe3ff;
}

.dash-matrix td.is-ok {
    color: #8fe0b3;
}

.dash-matrix td.is-missing {
    color: #ff8b8b;
}

@media (max-width: 768px) {
    .dash-hero {
        padding: 4rem 1.5rem 2.5rem;
    }

    .dash-main {
        padding: 0 1.5rem 4rem;
    }

    .dash-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-table-row {
        grid-template-columns: 1fr;
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
    .card-icon,
    .scroll-indicator,
    .card:nth-child(1) .card-icon path,
    .card:nth-child(1) .card-icon circle,
    .card:nth-child(2) .card-icon path,
    .card:nth-child(3) .card-icon circle,
    .card:nth-child(3) .card-icon line,
    .card:nth-child(4) .card-icon rect,
    .card:nth-child(4) .card-icon path {
        animation: none;
    }
}

@media (max-width: 768px) {
    section { padding: 5rem 1.5rem; }
    .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .card {
        padding: 2rem 1.5rem;
        flex-direction: column;
        gap: 1.5rem;
    }
    .card-icon {
        width: 80px;
        height: 80px;
    }
    .site-menu {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(12px);
        width: 100%;
        padding: 0.75rem 1.2rem;
        border-radius: 0;
        justify-content: flex-end;
    }
    .site-menu.is-visible {
        transform: translateY(0);
    }
    .site-menu-links {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 64px;
        background: rgba(10, 10, 10, 0.98);
        border-top: 1px solid var(--color-border);
        padding: 1.5rem 1.2rem 2rem;
        flex-direction: column;
        gap: 1rem;
        opacity: 0;
        pointer-events: none;
        transform: translateY(10px);
        transition: opacity var(--transition-fast), transform 0.2s ease;
    }
    .site-menu.is-open .site-menu-links {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .site-menu a,
    .site-menu button {
        font-size: 0.8rem;
    }
    .menu-toggle {
        display: inline-flex;
    }
    .site-menu-separator {
        width: 100%;
        height: 1px;
        margin: 0.75rem 0;
        background: #1f1f1f;
    }
    .language-switch {
        justify-content: center;
    }
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        position: static;
        width: 100%;
    }
}

/* ===========================================
   ADDITIONAL RESPONSIVE BREAKPOINTS
   =========================================== */

/* Tablet Breakpoint (769px-900px) - non-menu adjustments only */
@media (max-width: 900px) and (min-width: 769px) {
    /* Reserved for tablet-specific layout adjustments */
}

/* WCAG 2.1 minimum touch targets (44px) - mobile only */
@media (max-width: 768px) {
    .menu-toggle,
    .site-menu a,
    .site-menu button,
    .tag-link,
    .essay-link,
    .article-list-item a,
    .tag-filter {
        min-height: 44px;
    }
}

/* Safe Area Support (Notched Devices) - mobile only */
@media (max-width: 768px) {
    @supports (padding: max(0px)) {
        .site-menu {
            padding-left: max(0.75rem, env(safe-area-inset-left));
            padding-right: max(0.75rem, env(safe-area-inset-right));
        }
    }
}

/* Landscape Mobile */
@media (max-height: 500px) {
    .site-menu {
        padding: 0.5rem 1.2rem;
    }
    .site-menu a,
    .site-menu button {
        font-size: 0.7rem;
    }
}

/* ===========================================
   ERROR CONTAINER
   =========================================== */
.error-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transform: translateY(-100%);
    transition: transform var(--transition-normal);
    font-size: 0.9rem;
}

.error-container.is-visible {
    transform: translateY(0);
}

.error-container.is-error {
    background: rgba(220, 53, 69, 0.95);
    color: #fff;
}

.error-container.is-warning {
    background: rgba(255, 193, 7, 0.95);
    color: #1a1a1a;
}

.error-container.is-info {
    background: rgba(74, 158, 255, 0.95);
    color: #fff;
}

.error-message {
    flex: 1;
}

.error-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.error-close:hover {
    opacity: 1;
}
