/* ==========================================================================
   ROMANIKA.BLOG — CLEAN EDITORIAL PERSONAL BLOG (DARK / LIGHT)
   ========================================================================== */

:root,
[data-theme="dark"] {
    --bg: #0b0f14;
    --bg-soft: #10161f;
    --card: #121923;
    --card-hover: #16202d;
    --text: #f1f5f9;
    --text-2: #cbd5e1;
    --muted: #8a9bb0;
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(148, 163, 184, 0.30);
    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.12);
    --accent-text: #bae6fd;
    --shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
    --header-bg: rgba(11, 15, 20, 0.86);
}

[data-theme="light"] {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --card: #ffffff;
    --card-hover: #ffffff;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.10);
    --line-strong: rgba(15, 23, 42, 0.22);
    --accent: #0284c7;
    --accent-soft: rgba(2, 132, 199, 0.09);
    --accent-text: #0369a1;
    --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    --header-bg: rgba(248, 250, 252, 0.88);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s ease, color 0.25s ease;
}

[data-theme="dark"] body {
    background:
        radial-gradient(ellipse 75% 40% at 50% -10%, rgba(56, 189, 248, 0.09) 0%, transparent 65%),
        var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }

.wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 clamp(18px, 4vw, 32px);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-dot-box {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid var(--accent);
    background: var(--accent-soft);
    display: grid;
    place-items: center;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.brand-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav a {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
    white-space: nowrap;
}

.nav a:hover {
    background: var(--accent-soft);
    color: var(--text);
    text-decoration: none;
}

.nav a.ext {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent);
}

.controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
    padding: 2px;
}

.lang-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.lang-btn:hover { color: var(--text); }
.lang-btn.active {
    background: var(--accent);
    color: #fff;
}
[data-theme="dark"] .lang-btn.active { color: #061018; }

.theme-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: border-color 0.18s ease;
}
.theme-btn:hover { border-color: var(--accent); }

.menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Sections */
main { padding: 36px 0 64px; }

.section {
    padding: 36px 0;
    scroll-margin-top: 76px;
}

.section + .section {
    border-top: 1px solid var(--line);
}

.sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.sec-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
    display: block;
}

.sec-title {
    font-size: clamp(1.5rem, 3vw, 2.05rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.18;
}

.sec-sub {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 560px;
}

/* Card Primitive */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

/* 1. About Hero */
.about-card {
    padding: clamp(24px, 4vw, 38px);
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 30px;
    align-items: center;
}

.about-photo {
    width: 168px;
    height: 196px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    background: var(--bg-soft);
    flex: none;
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.about-name {
    font-size: clamp(1.85rem, 4vw, 2.7rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 6px 0 10px;
}

.about-name span { color: var(--accent); }

.about-bio {
    color: var(--text-2);
    font-size: 1.02rem;
    line-height: 1.68;
    max-width: 680px;
    margin-bottom: 18px;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--text-2);
}

.about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--line-strong);
    background: var(--bg-soft);
    color: var(--text);
    transition: all 0.18s ease;
}

.btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
[data-theme="dark"] .btn.primary { color: #061018; }
.btn.primary:hover {
    filter: brightness(1.08);
    color: #fff;
}
[data-theme="dark"] .btn.primary:hover { color: #061018; }

.about-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.pillar {
    padding: 18px 20px;
}

.pillar-k {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.pillar h3 {
    font-size: 1.02rem;
    margin-bottom: 6px;
}

.pillar p {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.55;
}

/* 4. Thought of the Day */
.thought-box {
    padding: clamp(24px, 4vw, 36px);
    border-left: 4px solid var(--accent);
    position: relative;
}

.thought-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: var(--muted);
}

.thought-pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-text);
    border: 1px solid var(--line-strong);
    font-weight: 600;
}

.thought-quote {
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.015em;
    color: var(--text);
    margin-bottom: 12px;
}

.thought-note {
    color: var(--text-2);
    font-size: 0.96rem;
    line-height: 1.65;
    max-width: 780px;
    margin-bottom: 20px;
}

.thought-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.thought-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.thought-btns .btn {
    padding: 7px 13px;
    font-size: 0.82rem;
}

.thought-idx {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--muted);
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.flt {
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text-2);
    padding: 8px 15px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.flt:hover { border-color: var(--accent); color: var(--text); }
.flt.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
[data-theme="dark"] .flt.active { color: #061018; }

/* Grid Cards (Recommendations & Sites) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(305px, 1fr));
    gap: 16px;
}

.item-card {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    color: inherit;
    text-decoration: none;
}

.item-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
}

.item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.69rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent);
}

.badge {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-text);
    border: 1px solid var(--line);
    font-size: 0.66rem;
    font-weight: 600;
}

.item-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text);
    margin: 9px 0 7px;
    line-height: 1.28;
}

.item-desc {
    font-size: 0.91rem;
    color: var(--text-2);
    line-height: 1.6;
}

.specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
}

.spec {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.71rem;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--muted);
}

.item-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.77rem;
}

.item-domain {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-go {
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 0 38px;
    color: var(--muted);
    font-size: 0.86rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a {
    color: var(--text-2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}

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

@media (max-width: 860px) {
    .nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--card);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        padding: 12px;
        gap: 4px;
    }
    .nav.open { display: flex; }
    .nav a { width: 100%; justify-content: center; padding: 10px; }
    .menu-btn { display: grid; place-items: center; }

    .about-card { grid-template-columns: 1fr; gap: 20px; }
    .about-photo { width: 124px; height: 146px; }
    .about-pillars { grid-template-columns: 1fr; }
}

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