/* Blog page, story carousel, and reader styles. */

/* These styles apply only to this page. */
body.personal-blog {
    background: #080e19;
    color: #edf3ff;
    font-family: 'DM Sans', sans-serif;
}
.personal-blog .navbar {
    position: sticky;
    top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(8, 14, 25, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid #203049;
}
.personal-blog .nav-btn {
    min-width: 0;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: #a8b7cd;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.2px;
}
.personal-blog .nav-btn:hover,
.personal-blog .nav-btn[aria-current] {
    background: #15283a;
    border-color: #2c5865;
    color: #8debdc;
    transform: none;
}
.personal-blog a:focus-visible,
.personal-blog button:focus-visible,
.personal-blog [tabindex]:focus-visible {
    outline: 2px solid #80e7d5;
    outline-offset: 5px;
}
.personal-blog .skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    transform: translateY(-180%);
    padding: 10px 16px;
    background: #fff;
    color: #080e19;
    z-index: 2000;
    border-radius: 8px;
}
.personal-blog .skip-link:focus {
    transform: none;
}
.personal-blog .project-hero {
    position: relative;
    max-width: 1180px;
    margin: 32px auto 0;
    padding: 58px 52px;
    overflow: hidden;
    border: 1px solid #273852;
    border-radius: 24px;
    background:
        linear-gradient(100deg, rgba(10, 22, 40, 0.97), rgba(10, 22, 40, 0.76)),
        url('../../assets/bg-images/bgblogs.png') center/cover;
}
.personal-blog .project-hero::after {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    right: -130px;
    top: -170px;
    border-radius: 50%;
    background: #47cbb5;
    filter: blur(110px);
    opacity: 0.15;
    pointer-events: none;
}
.personal-blog .hero-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 36px;
    position: relative;
    z-index: 1;
}
.personal-blog .eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #86dfce;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.personal-blog .eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #86dfce;
    border-radius: 50%;
}
.personal-blog .project-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(38px, 6vw, 66px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin: 16px 0;
}
.personal-blog .hero-description {
    max-width: 540px;
    font-size: 15px;
    line-height: 1.8;
    color: #aebed3;
}
.personal-blog .hero-avatar {
    flex: none;
    width: 170px;
    height: 170px;
    object-fit: contain;
    filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.4));
}
.personal-blog .topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 25px;
    list-style: none;
    padding: 0;
}
.personal-blog .topic-list li {
    padding: 6px 11px;
    border: 1px solid #30425a;
    border-radius: 30px;
    color: #c0cee0;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.025);
}
.personal-blog .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}
.personal-blog .hero-action {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 16px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #345366;
    color: #dcf6f2;
    background: #153039;
}
.personal-blog .hero-action.secondary {
    background: transparent;
    border-color: #30425a;
    color: #c0cee0;
}
.personal-blog .explore-section {
    max-width: 1440px;
    margin: 38px auto 0;
    padding: 0 24px;
}
.personal-blog .section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    max-width: 1180px;
    margin: 0 auto 18px;
}
.personal-blog .section-toolbar h2 {
    font-size: 19px;
    font-weight: 500;
    margin: 0 0 5px;
}
.personal-blog .section-toolbar p {
    color: #8fa2bc;
    font-size: 12px;
    margin: 0;
}
.personal-blog .sound-button {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: #111f31;
    color: #bdcde0;
    border: 1px solid #2a3d56;
    border-radius: 9px;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.personal-blog .sound-button[aria-pressed='true'] {
    color: #8debdc;
    border-color: #3c8279;
}
.personal-blog .galaxy-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid #24354d;
    border-radius: 22px;
    background: radial-gradient(ellipse at 50% 45%, #112b3e 0%, #0b1425 40%, #060c16 80%);
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.22);
}
.personal-blog .galaxy-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(126, 180, 210, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(126, 180, 210, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
}
.personal-blog .solar-system-section {
    position: relative;
    display: block;
    width: 100%;
    overflow: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #335168 #0b1425;
}
.personal-blog .solar-system {
    margin: 0 auto;
}
.personal-blog .galaxy-caption {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 13px 20px;
    border-top: 1px solid #24354d;
    color: #8fa2bc;
    font-size: 11px;
}
.personal-blog .galaxy-caption span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.personal-blog .left-character {
    opacity: 0.12;
    z-index: 0;
}
.personal-blog footer {
    position: relative;
    margin-top: 48px;
    padding: 30px 20px;
    background: #0b1421;
    border-top: 1px solid #203049;
}
.personal-blog .footer-links {
    gap: 20px;
    margin-bottom: 12px;
}
.personal-blog .footer-links a {
    font-size: 20px;
}
.personal-blog footer p {
    font-size: 11px;
    margin: 4px 0;
}
@media (max-width: 800px) {
    .personal-blog .project-hero {
        margin: 18px 16px 0;
        padding: 32px 26px;
    }
    .personal-blog .hero-layout {
        gap: 16px;
    }
    .personal-blog .hero-avatar {
        width: 110px;
        height: 110px;
    }
    .personal-blog .explore-section {
        padding: 0 16px;
        margin-top: 28px;
    }
}
@media (max-width: 520px) {
    .personal-blog .navbar {
        gap: 3px;
        padding: 10px 6px;
    }
    .personal-blog .nav-btn {
        padding: 9px 10px;
        font-size: 11px;
    }
    .personal-blog .nav-btn i {
        margin-right: 4px;
    }
    .personal-blog .project-hero {
        padding: 28px 22px;
    }
    .personal-blog .hero-layout {
        align-items: flex-start;
    }
    .personal-blog .hero-avatar {
        position: absolute;
        top: 0;
        right: 0;
        width: 62px;
        height: 62px;
        opacity: 0.65;
    }
    .personal-blog .eyebrow {
        padding-right: 64px;
        font-size: 9px;
        letter-spacing: 1px;
    }
    .personal-blog .project-hero h1 {
        margin-top: 24px;
    }
    .personal-blog .hero-description {
        font-size: 13px;
    }
    .personal-blog .section-toolbar {
        align-items: flex-start;
    }
    .personal-blog .section-toolbar h2 {
        font-size: 17px;
    }
    .personal-blog .section-toolbar p {
        max-width: 220px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .personal-blog *,
    .personal-blog *::before,
    .personal-blog *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

.personal-blog .blog-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
    border: 1px solid #273852;
    border-radius: 15px;
    background: #0e1b2c;
}
.personal-blog .blog-area {
    max-width: 1180px;
    margin: 28px auto;
    padding: 0 20px;
}
.personal-blog input,
.personal-blog select {
    min-width: 0;
    padding: 11px 13px;
    background: #081321;
    border: 1px solid #30425a;
    border-radius: 8px;
    color: #dce8f7;
    font: inherit;
    font-size: 13px;
}
.personal-blog input {
    flex: 1 1 230px;
}
.personal-blog select {
    flex: 0 1 190px;
}
.personal-blog .blog-count {
    margin: 18px 0;
    font-size: 12px;
    color: #9cb0c9;
}
.personal-blog .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(0, 300px));
    justify-content: center;
    gap: 20px;
}
.personal-blog .story-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #293e56;
    border-radius: 15px;
    background: #101d2e;
    transition:
        transform 0.2s,
        border-color 0.2s;
}
.personal-blog .story-card:hover {
    transform: translateY(-3px);
    border-color: #508c91;
}
.personal-blog .story-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 150px;
    background: radial-gradient(ellipse at top right, #214c57, #101d30);
    color: #81c9c3;
    font-size: 30px;
}
.personal-blog .story-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.personal-blog .story-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
    padding: 18px;
}
.personal-blog .story-topic {
    color: #8debdc;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}
.personal-blog .story-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
}
.personal-blog .story-body p {
    color: #aebed3;
    font-size: 13px;
    line-height: 1.7;
}
.personal-blog .story-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    margin-top: auto;
    color: #a5e5db;
    font-size: 12px;
    padding: 7px 0;
}
.personal-blog .story-link:hover {
    color: #fff;
}
.personal-blog .story-reader {
    max-width: 820px;
    margin: 0 auto;
    padding: 30px clamp(20px, 5vw, 50px);
    border: 1px solid #2a3f56;
    border-radius: 18px;
    background: #0e1b2b;
}
.personal-blog .reader-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    color: #9eddd3;
    font-size: 12px;
}
.personal-blog .story-reader h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(30px, 5vw, 44px);
    font-weight: 400;
    line-height: 1.2;
    margin: 12px 0 18px;
}
.personal-blog .reader-excerpt {
    color: #b9cbe0;
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid #293e56;
}
.personal-blog .reader-content {
    color: #bfcee0;
    font-size: 15px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
.personal-blog .reader-content p,
.personal-blog .reader-content figure,
.personal-blog .reader-content h3 {
    margin: 0 0 22px;
}
.personal-blog .reader-content h3 {
    font-size: 21px;
    color: #e3edf8;
    margin-top: 30px;
}
.personal-blog .reader-content figure {
    text-align: center;
}
.personal-blog .reader-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
    border-radius: 10px;
}
.personal-blog .reader-content figcaption {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    color: #8fa2bc;
}
.personal-blog .reader-content a {
    color: #8debdc;
    text-decoration: underline;
}
.personal-blog .story-note {
    padding: 20px;
    border: 1px dashed #34536a;
    border-radius: 10px;
    color: #9fb2cb;
    font-size: 13px;
}
.personal-blog .blog-empty {
    grid-column: 1/-1;
    padding: 40px 20px;
    text-align: center;
    color: #aebed3;
}
.personal-blog [hidden] {
    display: none !important;
}
@media (max-width: 360px) {
    .personal-blog .blog-grid {
        grid-template-columns: minmax(0, 300px);
    }
}

@keyframes crystal-flash {
    0%,
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.35) rotate(0deg);
    }
    28% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(18deg);
    }
    60% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(0.75) rotate(42deg);
    }
}
@keyframes crystal-edge {
    0%,
    100% {
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    65% {
        opacity: 0.65;
    }
}
/* 3D story carousel, inspired by the skills carousel */
.personal-blog .carousel-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0 14px;
}
.personal-blog .carousel-kicker {
    color: #83ddcf;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.4px;
}
.personal-blog .carousel-heading h2 {
    margin: 8px 0 0;
    font:
        400 clamp(26px, 4vw, 38px)/1.1 'Playfair Display',
        serif;
}
.personal-blog .carousel-controls {
    display: flex;
    gap: 8px;
}
.personal-blog .carousel-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid #476d76;
    border-radius: 50%;
    background: #12273a;
    color: #c5f7ee;
    font-size: 20px;
    cursor: pointer;
}
.personal-blog .carousel-controls button:hover:not(:disabled) {
    background: #8debdc;
    color: #081521;
}
.personal-blog .carousel-controls button:disabled {
    opacity: 0.3;
    cursor: default;
}
.personal-blog .blog-grid {
    position: relative;
    display: block;
    height: 450px;
    max-width: 100%;
    overflow: hidden;
    perspective: 1200px;
    touch-action: pan-y;
}
.personal-blog .story-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(293px, 45%);
    height: 375px;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    transition:
        transform 0.6s ease,
        opacity 0.6s ease;
    box-shadow:
        0 0 8px #72fce080,
        0 0 24px #43e9d04d,
        0 20px 45px #0009;
    border-color: #69e9d3;
    cursor: pointer;
}
.personal-blog .story-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 15;
    padding: 2px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
        circle 48px at var(--spark-x, 50%) var(--spark-y, 0%),
        #fff 0%,
        #9ffff0 20%,
        #54fbe080 48%,
        transparent 100%
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}
.personal-blog .story-card::after {
    content: '';
    position: absolute;
    left: var(--spark-x, 50%);
    top: var(--spark-y, 0%);
    width: 28px;
    height: 28px;
    z-index: 16;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle, #fff 0 6%, #d6fff5 9%, #6dfce9 16%, transparent 48%),
        linear-gradient(90deg, transparent 46%, #e9fff9 50%, transparent 54%),
        linear-gradient(transparent 46%, #e9fff9 50%, transparent 54%);
    filter: drop-shadow(0 0 5px #6ffff0);
}
.personal-blog .story-card.is-sparkling::before {
    animation: crystal-edge var(--spark-duration, 1.2s) ease-out;
}
.personal-blog .story-card.is-sparkling::after {
    animation: crystal-flash var(--spark-duration, 1.2s) ease-out;
}
.personal-blog .story-card:hover {
    border-color: #b1fff1;
    box-shadow:
        0 0 12px #94ffefb3,
        0 0 36px #43e9d080,
        0 20px 45px #0009;
}
.personal-blog .story-cover {
    height: 143px;
    flex: 0 0 143px;
    font-size: 30px;
    overflow: hidden;
}
.personal-blog .story-cover img {
    object-fit: cover;
    transform: scale(1.06) translate(var(--image-x, 0px), var(--image-y, 0px));
    transition: transform 0.35s ease;
    will-change: transform;
}
.personal-blog .story-body {
    gap: 7px;
    padding: 16px;
    overflow: hidden;
}
.personal-blog .story-body h2 {
    margin: 0;
    font-size: clamp(18px, 2vw, 21px);
}
.personal-blog .story-body p {
    font-size: 12px;
    line-height: 1.45;
    overflow: auto;
}
.personal-blog .story-link {
    margin-top: auto;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 700;
}
.personal-blog .carousel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 3px 20px;
    color: #a5bbca;
    font-size: 11px;
    letter-spacing: 1.5px;
}
.personal-blog .carousel-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.personal-blog .carousel-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #40596a;
    cursor: pointer;
    transition:
        width 0.2s,
        background 0.2s;
}
.personal-blog .carousel-dots button[aria-current='true'] {
    width: 28px;
    background: #83ddcf;
}
.personal-blog .carousel-hint {
    color: #6f879c;
    font-size: 9px;
}
.personal-blog .blog-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}
@media (max-width: 700px) {
    .personal-blog .blog-grid {
        height: 430px;
    }
    .personal-blog .story-card {
        width: min(263px, 70%);
        height: 368px;
    }
    .personal-blog .carousel-hint {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .personal-blog .story-card,
    .personal-blog .carousel-dots button {
        transition: none;
    }
    .personal-blog .story-card::before,
    .personal-blog .story-card::after {
        animation: none;
    }
    .personal-blog .story-card::after {
        display: none;
    }
}

/* Shared signature and digital identity across the portfolio. */
body .navbar[aria-label='Main navigation'] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    padding: 15px 28px;
}
.navbar .nav-signature {
    justify-self: start;
    min-width: 0;
    color: #e4f4ef;
    font-family: 'Allura', 'Brush Script MT', cursive;
    font-size: 30px;
    font-weight: 400;
    line-height: 1.15;
    text-decoration: none;
    white-space: nowrap;
    text-shadow: 0 2px 12px #83dac91a;
}
.navbar .nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}
.navbar .nav-digital-life {
    justify-self: end;
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 2.5px;
    white-space: nowrap;
    color: #8debdc;
    text-shadow: 0 0 16px #63d7df33;
}
.navbar .nav-digital-life::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    background: #8debdc;
    box-shadow: 0 0 9px #8debdc66;
}
@media (max-width: 1200px) {
    body .navbar[aria-label='Main navigation'] {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px 18px;
        padding: 14px 20px;
    }
    .navbar .nav-signature {
        font-size: 29px;
    }
    .navbar .nav-menu {
        grid-row: 2;
        grid-column: 1/-1;
    }
    .navbar .nav-digital-life {
        grid-row: 1;
        grid-column: 2;
        font-size: 13px;
    }
}
@media (max-width: 540px) {
    body .navbar[aria-label='Main navigation'] {
        padding: 12px 10px;
        gap: 12px 8px;
    }
    .navbar .nav-signature {
        font-size: clamp(19px, 4.9vw, 26px);
        white-space: normal;
    }
    .navbar .nav-digital-life {
        font-size: 10px;
        letter-spacing: 1px;
    }
    .navbar .nav-digital-life::before {
        width: 4px;
        height: 4px;
        margin-right: 5px;
    }
    .navbar .nav-menu {
        gap: 2px;
    }
    body .navbar .nav-menu .nav-btn {
        padding: 9px 10px;
        font-size: 11px;
    }
}

.navbar .nav-digital-life {
    color: #8debdc;
    animation: digital-life-neon 7s ease-in-out infinite;
}
@keyframes digital-life-neon {
    0%,
    100% {
        color: #80fff0;
        text-shadow:
            0 0 8px #43e8cf88,
            0 0 22px #43e8cf44;
    }
    33% {
        color: #f6a4ff;
        text-shadow:
            0 0 8px #ed65ff88,
            0 0 22px #ed65ff44;
    }
    66% {
        color: #a6bcff;
        text-shadow:
            0 0 8px #708aff88,
            0 0 22px #708aff44;
    }
}
body footer .tesla-reflection {
    max-width: 740px;
    margin: 24px auto 0;
    padding: 20px 16px 0;
    border-top: 1px solid #7e9aac33;
    text-align: center;
}
body footer .tesla-reflection blockquote {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
}
body footer .tesla-reflection blockquote p {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.8;
    color: #c6d9e5;
}
body footer .tesla-reflection figcaption {
    margin-top: 10px;
    font-size: 11px;
    color: #92aabd;
}
body footer .tesla-reflection a {
    color: #91dfd2;
    text-decoration: underline;
    text-underline-offset: 4px;
}
body footer .tesla-reflection .tesla-history {
    display: inline-block;
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.7;
}
@media (prefers-reduced-motion: reduce) {
    .navbar .nav-digital-life {
        animation: none;
    }
}

/* Keep the existing footer centered; place the reflection in its own corner. */
body footer {
    position: relative;
    padding-bottom: 145px;
}
body footer .tesla-reflection {
    position: absolute;
    right: 22px;
    bottom: 14px;
    width: min(300px, calc(100% - 44px));
    max-width: 300px;
    margin: 0;
    padding: 0;
    border: 0;
    text-align: right;
}
body footer .tesla-reflection blockquote p {
    margin: 0;
    font-size: 11px;
    line-height: 1.6;
    color: #91a6b8;
}
body footer .tesla-reflection figcaption {
    margin-top: 5px;
    font-size: 9px;
    line-height: 1.5;
}
body footer .tesla-reflection .tesla-history {
    margin-top: 5px;
    font-size: 9px;
    line-height: 1.5;
}
body footer .tesla-reflection a {
    color: #83b4b0;
    text-underline-offset: 2px;
}
@media (max-width: 540px) {
    body footer {
        padding-bottom: 150px;
    }
    body footer .tesla-reflection {
        right: 16px;
        width: min(280px, calc(100% - 32px));
    }
}

.personal-blog model-viewer.hero-avatar {
    display: block;
    position: relative;
    background: transparent;
    pointer-events: none;
    --poster-color: transparent;
}
.blog-model-status {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 12px;
    text-align: center;
    font-size: 11px;
    color: #aebed3;
}
@media (max-width: 520px) {
    .personal-blog model-viewer.hero-avatar {
        position: absolute;
    }
}

/* Language colours belong to the article/card, never the page. */
.personal-blog .story-reader[data-language='es'],
.personal-blog .story-card[data-language='es'] {
    background: #101d30;
}
.personal-blog .story-reader[data-language='en'],
.personal-blog .story-card[data-language='en'] {
    background: #261b39;
    border-color: #685082;
}
.personal-blog .story-reader[data-language='ja'],
.personal-blog .story-card[data-language='ja'] {
    background: #112e27;
    border-color: #38765e;
}
/* Glass reflections and softly illuminated titles */
.personal-blog .story-card {
    box-shadow:
        inset 0 1px 0 #ffffff80,
        inset 1px 0 0 #c8fff333,
        inset 0 -18px 35px #ffffff09,
        0 0 8px #72fce080,
        0 0 24px #43e9d04d,
        0 20px 45px #0009;
}
.personal-blog .story-cover {
    position: relative;
}
.personal-blog .story-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            122deg,
            #ffffff33 0%,
            #ffffff0d 24%,
            transparent 38%,
            transparent 61%,
            #d9fff311 65%,
            transparent 72%
        ),
        linear-gradient(to bottom, #fff2, transparent 35%, #09162644);
}
.personal-blog .story-body {
    position: relative;
    background:
        linear-gradient(135deg, #ffffff17 0%, #d4fff109 24%, transparent 44%),
        linear-gradient(165deg, transparent 55%, #7cfde60a 76%, #ffffff0c 100%);
    border-top: 1px solid #d8fff73b;
}
.personal-blog .story-body h2 {
    color: #eafffb;
    text-shadow:
        0 0 8px #7cffe185,
        0 0 19px #44d9c75c;
    letter-spacing: 0.15px;
}
.personal-blog .story-card[aria-hidden='false'] .story-body h2 {
    color: #f4fffd;
    text-shadow:
        0 0 8px #92ffe0b3,
        0 0 20px #4bead288,
        0 0 38px #3de6cc45;
}
.personal-blog .story-topic {
    color: #a9fff0;
    text-shadow: 0 0 10px #69f9df66;
}
/* Fantasy collectible-card frame, with an original style */
.personal-blog .story-card {
    box-sizing: border-box;
    padding: 7px;
    border: 2px solid #b99b62;
    border-radius: 15px;
    background-image: linear-gradient(145deg, #ddc28b38, transparent 22%, #92fff00a 65%, #d6ae6a24);
    box-shadow:
        inset 0 0 0 2px #3e3023,
        inset 0 0 0 3px #e7c88980,
        inset 0 1px 0 #ffffffa0,
        0 0 10px #76fae16e,
        0 0 26px #55eed63d,
        0 20px 45px #0009;
}

.personal-blog .story-cover {
    height: 133px;
    flex-basis: 133px;
    border: 1px solid #d9bf80;
    border-radius: 8px 8px 3px 3px;
    box-shadow:
        inset 0 0 0 2px #1a1718,
        0 2px 9px #0008;
}
.personal-blog .story-cover::after {
    background:
        linear-gradient(
            120deg,
            #ffffff4a,
            transparent 25%,
            #62ffeb15 40%,
            #dba6ff20 49%,
            #fff9c221 54%,
            transparent 67%
        ),
        linear-gradient(to bottom, #fff2, transparent 35%, #09162655);
}
.personal-blog .story-body {
    margin-top: 5px;
    padding: 10px 11px 8px;
    gap: 5px;
    border: 1px solid #bfa36690;
    border-radius: 4px 4px 8px 8px;
    background:
        linear-gradient(125deg, #fcf2c31a, transparent 38%, #6af8dc0c 65%, #f5d89b15),
        linear-gradient(#122231dd, #091520ee);
    box-shadow:
        inset 0 1px #fff4,
        inset 0 0 18px #040b14a8;
}
.personal-blog .story-body h2 {
    padding: 5px 7px;
    border: 1px solid #d3b57888;
    border-radius: 5px;
    background: linear-gradient(90deg, #6e533a66, #132637a0, #6e533a55);
    font-size: clamp(17px, 1.7vw, 20px);
    line-height: 1.14;
}
.personal-blog .story-topic {
    order: -1;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.15px;
    color: #f5dba5;
    text-shadow: 0 0 9px #f4cb7e77;
}
.personal-blog .story-topic::before {
    content: '✦';
    color: #ddc079;
    font-size: 12px;
}
.personal-blog .story-topic::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #c6a97299, transparent);
}
.personal-blog .story-body p {
    line-height: 1.35;
}
.personal-blog .story-link {
    color: #f0dca9;
    font-size: 12px;
    padding: 3px 0;
}
/* The card palette follows the original language. */
.personal-blog .story-card[data-language='es'] {
    --card-metal: #91bbef;
    --card-base: #101d30;
    --card-panel: #132b49;
    --card-ink: #091628;
    --card-accent: #b7dcff;
}
.personal-blog .story-card[data-language='en'] {
    --card-metal: #c1a0e3;
    --card-base: #261b39;
    --card-panel: #392750;
    --card-ink: #1c142c;
    --card-accent: #e4ceff;
}
.personal-blog .story-card[data-language='ja'] {
    --card-metal: #83cda8;
    --card-base: #112e27;
    --card-panel: #174536;
    --card-ink: #0b251d;
    --card-accent: #b9f5d2;
}
.personal-blog .story-card[data-language] {
    border-color: var(--card-metal);
    background-color: var(--card-base);
    box-shadow:
        inset 0 0 0 2px #171c25,
        inset 0 0 0 3px var(--card-metal),
        inset 0 1px 0 #ffffff90,
        0 0 10px #76fae16e,
        0 0 26px #55eed63d,
        0 20px 45px #0009;
}
.personal-blog .story-card[data-language] .story-cover {
    border-color: var(--card-metal);
}
.personal-blog .story-card[data-language] .story-body {
    border-color: var(--card-metal);
    background:
        linear-gradient(125deg, #ffffff1c, transparent 38%, #a7ffe10b 65%, #fff2),
        linear-gradient(var(--card-panel), var(--card-ink));
}
.personal-blog .story-card[data-language] .story-body h2 {
    border-color: var(--card-metal);
    background: linear-gradient(90deg, #ffffff1c, transparent, #ffffff12);
}
.personal-blog .story-card[data-language] .story-topic,
.personal-blog .story-card[data-language] .story-link {
    color: var(--card-accent);
}
.personal-blog .story-card[data-language] .story-topic::before {
    color: var(--card-metal);
}
.personal-blog .story-card[data-language] .story-topic::after {
    background: linear-gradient(90deg, var(--card-metal), transparent);
}

.personal-blog .reader-language-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 14px;
}
.personal-blog .story-language-button {
    font:
        600 12px 'DM Sans',
        sans-serif;
    color: #edf3ff;
    background: inherit;
    border: 1px solid #66818c;
    border-radius: 999px;
    padding: 6px 13px;
    cursor: pointer;
    min-height: 32px;
}
.personal-blog .story-language-button:hover {
    border-color: #8debdc;
}
.personal-blog .story-language-button:disabled {
    opacity: 0.6;
    cursor: wait;
}
.personal-blog .translation-status {
    color: #c6d7df;
    font-size: 12px;
    max-width: 440px;
}
.personal-blog .translation-status[hidden] {
    display: none;
}

.personal-blog .blog-tools {
    align-items: center;
}
.personal-blog .blog-keyword-row {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
    color: #b1c4d8;
    font-size: 12px;
}
.personal-blog .blog-keyword-row {
    flex-wrap: wrap;
}
.personal-blog .blog-keyword-row select {
    width: auto;
    min-width: 170px;
    max-width: 100%;
}
.personal-blog .blog-selected-keywords {
    display: flex;
    flex: 1 1 200px;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}
.personal-blog .blog-keyword-chip {
    border: 1px solid #345269;
    border-radius: 999px;
    padding: 6px 10px;
    background: #14273a;
    color: #c8e5e1;
    font: inherit;
    cursor: pointer;
}
.personal-blog .blog-keyword-chip:hover {
    border-color: #8debdc;
}
.personal-blog .blog-tools #blogSearch {
    flex: 1 1 230px;
    min-width: 0;
}
.personal-blog .blog-date-filter {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #b1c4d8;
}
.personal-blog .blog-date-filter input {
    color-scheme: dark;
    min-width: 0;
    width: 145px;
}
.personal-blog .blog-reset-filters {
    border: 1px solid #345269;
    border-radius: 8px;
    padding: 10px 12px;
    background: #14273a;
    color: #c8e5e1;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
}
.personal-blog .blog-reset-filters:hover {
    border-color: #8debdc;
}
@media (max-width: 560px) {
    .personal-blog .blog-date-filter {
        flex: 1 1 140px;
    }
    .personal-blog .blog-date-filter input {
        width: 100%;
    }
}

.personal-blog .story-original-language {
    display: block;
    font-size: 10px;
    line-height: 1.5;
    color: #9cb0c9;
    margin: 0 0 8px;
}
.personal-blog .reader-title-cover {
    margin-right: auto;
    flex: 0 1 260px;
    max-width: 65%;
}
.personal-blog .reader-title-cover[hidden] {
    display: none;
}
.personal-blog .reader-title-cover img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2/1;
    object-fit: contain;
    border-radius: 10px;
}
.personal-blog .reader-language-bar {
    align-items: center;
}
@media (max-width: 480px) {
    .personal-blog .reader-title-cover {
        flex-basis: 180px;
        max-width: 62%;
    }
}

/* Full-width reader cover with the language control over the image. */
.personal-blog .reader-language-bar {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 10px;
    margin: 12px 0 22px;
}
.personal-blog .reader-title-cover {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #102132;
}
.personal-blog .reader-title-cover img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2/1;
    object-fit: cover;
    border-radius: inherit;
}
.personal-blog .reader-language-bar:has(.reader-title-cover:not([hidden])) .story-language-button {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    background: rgba(8, 14, 25, 0.82);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
}
.personal-blog .reader-language-bar .translation-status:not([hidden]) {
    flex: 0 0 100%;
    max-width: 100%;
}
@media (max-width: 480px) {
    .personal-blog .reader-title-cover {
        flex-basis: 100%;
        max-width: 100%;
        border-radius: 12px;
    }
    .personal-blog
        .reader-language-bar:has(.reader-title-cover:not([hidden]))
        .story-language-button {
        top: 10px;
        right: 10px;
    }
}

/* Compact cover: same 150px height as the cards in the blog listing. */
.personal-blog .reader-title-cover img {
    width: 100%;
    height: 150px;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
}

.personal-blog .hero-stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.personal-blog .hero-star {
    position: absolute;
    right: var(--x);
    top: var(--y);
    width: var(--size);
    height: var(--size);
    opacity: 0;
    background: #fff6ce;
    clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%);
    filter: drop-shadow(0 0 5px #96ecff);
    animation: fantasy-star var(--duration) linear var(--delay) infinite;
}
@keyframes fantasy-star {
    0% {
        transform: translate(0, 0) scale(0.35);
        opacity: 0;
    }
    12% {
        opacity: 0.8;
    }
    72% {
        opacity: 0.65;
    }
    100% {
        transform: translate(-40vw, 85px) scale(1);
        opacity: 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .personal-blog .hero-star {
        animation: none;
        opacity: 0.35;
    }
}
