/* ============================================================
   TOKENS & THEMES
   ============================================================ */
:root {
    --accent:       #8875f5;
    --accent-dim:   #6c5ce7;
    --accent-glow:  rgba(136, 117, 245, 0.15);
    --teal:         #00cba9;
    --teal-glow:    rgba(0, 203, 169, 0.12);
    --blue:         #4da6ff;
    --blue-glow:    rgba(77, 166, 255, 0.12);
    --rose:         #ff6b9d;
    --rose-glow:    rgba(255, 107, 157, 0.12);
    --radius:       22px;
    --radius-sm:    12px;
    --radius-xs:    8px;
    --transition:   0.2s ease;
    --nav-h:        60px;
    --font-body:    'Inter', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
    --gap:          12px;
}

[data-theme="dark"] {
    --bg:           #0c0c12;
    --card:         #14141c;
    --card2:        #1a1a24;
    --card3:        #1f1f2c;
    --border:       rgba(255, 255, 255, 0.06);
    --border-hover: rgba(136, 117, 245, 0.45);
    --text:         #eeedf8;
    --text-muted:   #7a7890;
    --text-faint:   #363650;
    --shadow:       0 2px 24px rgba(0, 0, 0, 0.6);
    --nav-bg:       rgba(12, 12, 18, 0.82);
}

[data-theme="light"] {
    --bg:           #eaeaf2;
    --card:         #ffffff;
    --card2:        #f4f4fa;
    --card3:        #eeeeف5;
    --border:       rgba(0, 0, 0, 0.07);
    --border-hover: rgba(136, 117, 245, 0.45);
    --text:         #16162a;
    --text-muted:   #68677e;
    --text-faint:   #b5b4cc;
    --shadow:       0 2px 16px rgba(0, 0, 0, 0.07);
    --nav-bg:       rgba(234, 234, 242, 0.88);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dim); }

img { display: block; max-width: 100%; }
strong { font-weight: 600; }

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.accent { color: var(--accent); }
.teal   { color: var(--teal); }
.mono   { font-family: var(--font-mono); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.05rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-dim);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn-icon {
    background: var(--card2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-decoration: none;
    flex-shrink: 0;
}
.btn-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Theme icon visibility */
[data-theme="dark"]  .icon-sun  { display: none; }
[data-theme="dark"]  .icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ============================================================
   TAGS
   ============================================================ */
.tag {
    background: var(--card3);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 6px;
    font-family: var(--font-mono);
    transition: all var(--transition);
    display: inline-block;
}
.tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition);
}

.nav__inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav__logo {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}
.nav__logo-bracket { color: var(--accent); }
.nav__logo:hover { color: var(--accent); }

.nav__links {
    display: flex;
    list-style: none;
    gap: 2px;
    margin: 0;
    flex: 1;
}

.nav__links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
    text-decoration: none;
}
.nav__links a:hover {
    color: var(--text);
    background: var(--card2);
}

.nav__actions {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}
.nav__burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ============================================================
   BENTO PAGE WRAPPER
   ============================================================ */
.bento-page {
    padding-top: calc(var(--nav-h) + 20px);
    padding-bottom: 48px;
    min-height: 100vh;
}

/* ============================================================
   BENTO GRID
   ============================================================ */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
}

.c2 { grid-column: span 2; }
.c3 { grid-column: span 3; }
.c4 { grid-column: span 4; }
.r2 { grid-row: span 2; }

/* ============================================================
   BENTO CARD — BASE
   ============================================================ */
.bento-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    overflow: hidden;
    position: relative;
    transition: border-color var(--transition), box-shadow var(--transition);
}

/* ============================================================
   HERO CARD
   ============================================================ */
.bento-card--hero {
    min-height: 270px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-card--hero::before {
    content: '';
    position: absolute;
    top: -100px; right: -60px;
    width: 350px; height: 350px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
    pointer-events: none;
}

.hero-greeting {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hero-greeting::before {
    content: '';
    display: block;
    width: 24px; height: 1px;
    background: var(--accent);
}

.hero-name {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.05;
    background: linear-gradient(135deg, var(--text) 20%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.hero-role {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.hero-cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================================
   AVATAR CARD
   ============================================================ */
.bento-card--avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card2);
    padding: 20px;
}

.avatar-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 6px var(--accent-glow);
    position: relative;
    z-index: 1;
}

.avatar-ring {
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    border: 1px dashed rgba(136, 117, 245, 0.3);
    animation: spin 24s linear infinite;
}

/* ============================================================
   ABOUT CARD
   ============================================================ */
.bento-card--about {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    margin-bottom: 14px;
}

.about-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.75;
}
.about-text p + p { margin-top: 12px; }

/* ============================================================
   STATUS CARD
   ============================================================ */
.bento-card--status {
    background: rgba(0, 203, 169, 0.05);
    border-color: rgba(0, 203, 169, 0.18);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--teal);
}

.status-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 203, 169, 0.25);
    animation: pulse 2s ease infinite;
    flex-shrink: 0;
}

.status-detail {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.83rem;
    color: var(--text-muted);
}

.stat-icon { font-size: 0.95rem; flex-shrink: 0; }

/* ============================================================
   SKILL CARDS
   ============================================================ */
.bento-card--skill {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bento-card--skill::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}
.skill--purple::before { background: linear-gradient(90deg, var(--accent), #b39af7); }
.skill--blue::before   { background: linear-gradient(90deg, var(--blue),   #93c5fd); }
.skill--teal::before   { background: linear-gradient(90deg, var(--teal),   #5eead4); }
.skill--rose::before   { background: linear-gradient(90deg, var(--rose),   #fda4af); }

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

.skill-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

/* ============================================================
   BLOG CARDS (on index)
   ============================================================ */
a.bento-card--post {
    display: flex;
    flex-direction: column;
    gap: 9px;
    color: inherit;
    text-decoration: none;
}
a.bento-card--post:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 24px rgba(136, 117, 245, 0.07);
}

.post-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.post-tag {
    background: var(--accent-glow);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

.post-date {
    font-size: 0.73rem;
    color: var(--text-faint);
    font-family: var(--font-mono);
}

.post-title {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
}

.post-excerpt {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-readmore {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    transition: gap var(--transition);
}
a.bento-card--post:hover .post-readmore { gap: 8px; }

/* ============================================================
   ALL POSTS CARD
   ============================================================ */
.bento-card--all-posts {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--card2);
    text-align: center;
    min-height: 140px;
}

.all-posts-icon {
    font-size: 2rem;
    opacity: 0.5;
}

/* ============================================================
   CONTACT CARD (quick, on index)
   ============================================================ */
.bento-card--contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.contact-card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-q-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition);
    font-size: 0.85rem;
}
.contact-q-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.contact-q-link-icon { font-size: 1rem; flex-shrink: 0; }
.contact-q-link-label {
    font-size: 0.68rem;
    color: var(--text-faint);
    font-family: var(--font-mono);
    display: block;
    line-height: 1.2;
}
.contact-q-link-val {
    font-size: 0.82rem;
    font-weight: 500;
}

.contact-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}

@media (max-width: 900px) {
    .contact-links-grid { grid-template-columns: 1fr; }
}

@media (min-width: 601px) and (max-width: 900px) {
    .contact-links-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   CV CARDS
   ============================================================ */
.bento-card--cv {
    display: flex;
    flex-direction: column;
}

.cv-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 22px;
    display: block;
}

.timeline {
    position: relative;
    padding-left: 20px;
    flex: 1;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 6px; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 22px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px; top: 6px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.timeline-year {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-faint);
    margin-bottom: 3px;
}

.timeline-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.timeline-company {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.timeline-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.cv-download { margin-top: 20px; }

/* ============================================================
   PIPELINE CARD
   ============================================================ */
.bento-card--pipeline {
    background: var(--card2);
    padding: 22px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pipeline-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    row-gap: 12px;
}

.pl-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pl-box {
    background: var(--card);
    border: 1px solid rgba(0, 203, 169, 0.3);
    border-radius: 8px;
    padding: 7px 14px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--teal);
    white-space: nowrap;
    position: relative;
}

.pl-box::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 203, 169, 0.12);
}

.pl-status {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--teal);
    opacity: 0.7;
}

.pl-arrow {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    flex-shrink: 0;
}

.pl-arrow__line {
    width: 36px;
    height: 1px;
    background: rgba(0, 203, 169, 0.2);
    position: relative;
    overflow: hidden;
}

.pl-arrow__line::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -100%;
    width: 14px;
    height: 5px;
    border-radius: 3px;
    background: var(--teal);
    opacity: 0.8;
    animation: pl-flow 2.5s linear infinite;
}

.pl-arrow:nth-child(2)  .pl-arrow__line::after { animation-delay: 0s; }
.pl-arrow:nth-child(4)  .pl-arrow__line::after { animation-delay: 0.5s; }
.pl-arrow:nth-child(6)  .pl-arrow__line::after { animation-delay: 1s; }
.pl-arrow:nth-child(8)  .pl-arrow__line::after { animation-delay: 1.5s; }
.pl-arrow:nth-child(10) .pl-arrow__line::after { animation-delay: 2s; }

.pl-arrow__head {
    font-size: 0.7rem;
    color: rgba(0, 203, 169, 0.4);
    margin-left: -2px;
    padding-bottom: 2px;
    line-height: 1;
}

@keyframes pl-flow {
    0%   { left: -20%; }
    100% { left: 110%; }
}

/* ============================================================
   SECTION DIVIDER (bento group label)
   ============================================================ */
.bento-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.bento-divider__label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-faint);
    white-space: nowrap;
}

.bento-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    margin-top: 8px;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer__logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.footer__made, .footer__copy {
    font-size: 0.78rem;
    color: var(--text-faint);
}

/* ============================================================
   BLOG PAGE (blog.php)
   ============================================================ */
.blog-page {
    padding-top: calc(var(--nav-h) + 48px);
    padding-bottom: 80px;
    min-height: 100vh;
}

.blog-page__header { margin-bottom: 36px; }

.blog-page__header h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    margin-bottom: 6px;
}
.blog-page__header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.blog-filter {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.filter-btn {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-mono);
}
.filter-btn.active,
.filter-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.post-row {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 20px;
    align-items: center;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}
.post-row:hover {
    border-color: var(--border-hover);
    transform: translateX(3px);
}

.post-row__date {
    font-family: var(--font-mono);
    font-size: 0.73rem;
    color: var(--text-faint);
}

.post-row__content h3 {
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 3px;
}
.post-row__content p {
    font-size: 0.83rem;
    color: var(--text-muted);
}

.post-row__tags {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

/* ============================================================
   POST PAGE (post.php)
   ============================================================ */
.post-page {
    padding-top: calc(var(--nav-h) + 64px);
    padding-bottom: 96px;
    min-height: 100vh;
}

.post-page__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 40px;
    transition: color var(--transition);
    text-decoration: none;
}
.post-page__back:hover { color: var(--accent); }

.post-header { max-width: 760px; margin-bottom: 48px; }

.post-header__tags {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.post-header h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    margin-bottom: 14px;
}

.post-header__meta {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.post-content {
    max-width: 760px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content h2 { margin: 40px 0 16px; }
.post-content h3 { margin: 28px 0 12px; }
.post-content p  { margin-bottom: 20px; color: var(--text-muted); }
.post-content ul, .post-content ol { margin-bottom: 20px; padding-left: 24px; color: var(--text-muted); }
.post-content li { margin-bottom: 6px; }

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--card2);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent);
}

.post-content pre {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 22px;
    overflow-x: auto;
    margin-bottom: 24px;
}
.post-content pre code {
    background: none; border: none; padding: 0;
    color: var(--text); font-size: 0.9rem; line-height: 1.6;
}

.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 10px 20px;
    margin: 24px 0;
    background: var(--card2);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: var(--accent-dim); }

.post-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin: 24px 0;
}

.post-content hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

/* section-heading kept for cv.php / blog.php compatibility */
.section-heading { margin-bottom: 40px; }
.section-heading h2 {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.section-heading p { color: var(--text-muted); font-size: 0.95rem; max-width: 540px; }
.section-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
}

/* ============================================================
   INTRO OVERLAY
   ============================================================ */
#intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#intro-overlay.hide {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}

.intro-name {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-faint);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.intro-pipeline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    row-gap: 16px;
}

.intro-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.intro-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 18px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-faint);
    white-space: nowrap;
    transition: color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.intro-node.active .intro-box {
    color: var(--teal);
    border-color: rgba(0, 203, 169, 0.45);
    box-shadow: 0 0 14px rgba(0, 203, 169, 0.15);
}

.intro-status {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-faint);
    transition: color 0.4s ease;
    min-height: 14px;
}

.intro-node.active .intro-status {
    color: var(--teal);
    opacity: 0.8;
}

.intro-arrow {
    display: flex;
    align-items: center;
    padding-bottom: 22px;
    flex-shrink: 0;
}

.intro-arrow__line {
    width: 32px;
    height: 1px;
    background: var(--border);
    transition: background 0.4s ease;
    position: relative;
    overflow: hidden;
}

.intro-arrow.active .intro-arrow__line {
    background: rgba(0, 203, 169, 0.3);
}

.intro-arrow.active .intro-arrow__line::after {
    content: '';
    position: absolute;
    top: -2px; left: -20%;
    width: 14px; height: 5px;
    border-radius: 3px;
    background: var(--teal);
    opacity: 0.8;
    animation: pl-flow 0.6s ease forwards;
}

/* Desktop vs mobile pipeline layout */
.intro-pipeline--desktop { display: flex; }
.intro-pipeline--mobile  { display: none; flex-direction: column; align-items: stretch; }

.intro-snake-row {
    display: flex;
    align-items: center;
}
.intro-snake-row--rtl {
    flex-direction: row-reverse;
    justify-content: flex-start; /* v row-reverse = vizuálně vpravo */
}

@media (max-width: 640px) {
    .intro-box { min-width: 90px; text-align: center; }
}

/* RTL arrow in mobile row 2 */
.intro-arrow--rtl .intro-arrow__line::after {
    animation: intro-flow-rtl 2s linear infinite;
}
@keyframes intro-flow-rtl { 0% { left: 110%; } 100% { left: -20%; } }

/* Vertical turn connector */
.intro-snake-turn {
    display: flex;
    justify-content: flex-end;
    padding-right: 45px;
    height: 32px;
    align-self: stretch;
}
.intro-snake-turn--left {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 45px;
}
.intro-turn__line {
    width: 1px;
    height: 100%;
    background: var(--border);
    position: relative;
    overflow: hidden;
    transition: background .4s;
}
.intro-snake-turn.active .intro-turn__line {
    background: rgba(0, 203, 169, .35);
}
.intro-snake-turn.active .intro-turn__line::after {
    content: '';
    position: absolute;
    left: -2px; top: -20%;
    width: 5px; height: 12px;
    border-radius: 3px;
    background: var(--teal);
    opacity: .7;
    animation: intro-flow-down .5s ease forwards;
}
@keyframes intro-flow-down { 0% { top: -20%; } 100% { top: 110%; } }

@media (max-width: 640px) {
    .intro-pipeline--desktop { display: none; }
    .intro-pipeline--mobile  { display: flex; }
}

.intro-cursor {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    min-height: 1.2em;
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.animate-on-scroll {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .c3, .c4 { grid-column: span 2; }
    .r2 { grid-row: span 1; }
    .bento-card--avatar { display: none; }

    .post-row { grid-template-columns: 1fr; gap: 4px; }
    .post-row__date { min-width: unset; }
    .post-row__tags { display: none; }
}

@media (max-width: 600px) {
    .bento { grid-template-columns: 1fr; }
    .c2, .c3, .c4 { grid-column: span 1; }

    .nav__links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-h); left: 0; right: 0;
        background: var(--nav-bg);
        border-bottom: 1px solid var(--border);
        padding: 12px 20px;
        backdrop-filter: blur(20px);
    }
    .nav__links.open { display: flex; }
    .nav__burger { display: flex; }
    .nav__actions { margin-left: 0; }

    .footer__inner { flex-direction: column; text-align: center; gap: 8px; }
}
