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

:root {
    --bg: #0b0d17;
    --panel: rgba(16, 21, 36, 0.28);
    --panel-strong: rgba(20, 27, 46, 0.58);
    --text: #e7ecff;
    --muted: #bcc5e0;
    --soft: #8f99ba;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #8c7cff;
    --accent-2: #3ea8ff;
    --accent-warm: #ffb86b;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 18%, rgba(78, 142, 255, 0.18), transparent 30%),
        radial-gradient(circle at 82% 22%, rgba(140, 124, 255, 0.14), transparent 28%),
        radial-gradient(circle at 50% 62%, rgba(255, 184, 107, 0.08), transparent 22%),
        linear-gradient(180deg, #090c15 0%, #0b1020 48%, #0a0d17 100%);
    overflow-x: hidden;
}

a {
    color: inherit;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    position: relative;
    z-index: 10;
}

.glass-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        var(--panel);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    border-radius: 18px;
}

header {
    padding: 72px 0 72px;
    text-align: center;
    background: linear-gradient(135deg, rgba(140, 124, 255, 0.1) 0%, rgba(62, 168, 255, 0.08) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

header h1 {
    font-size: clamp(2.6rem, 6vw, 4rem);
    margin-bottom: 12px;
    color: #fff;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

header p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.08rem;
}

nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0 12px;
    background:
        linear-gradient(180deg, rgba(8, 12, 22, 0.82), rgba(8, 12, 22, 0.42)),
        rgba(10, 14, 24, 0.5);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

nav .container {
    position: relative;
}

nav .container::before {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    top: 0;
    height: 100%;
    border-radius: 18px;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        rgba(14, 18, 30, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 10px 26px rgba(0, 0, 0, 0.14);
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 1;
    padding: 8px 0;
}

nav a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    text-decoration: none;
    color: #d7defa;
    font-weight: 600;
    border-radius: 14px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

nav a i {
    font-size: 0.95rem;
    opacity: 0.92;
}

nav a:hover {
    color: #fff;
    background: rgba(140, 124, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

nav a.active {
    color: #fff;
    background:
        linear-gradient(180deg, rgba(140, 124, 255, 0.18), rgba(140, 124, 255, 0.08)),
        rgba(255, 255, 255, 0.03);
    border-color: rgba(140, 124, 255, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(140, 124, 255, 0.08);
}

nav a.active i {
    color: #ffe0a8;
}

main {
    padding: 42px 0 60px;
}

.section-tag {
    margin-bottom: 14px;
    color: var(--accent-warm);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 58px 28px;
    background:
        radial-gradient(circle at 50% 42%, rgba(140, 124, 255, 0.08), transparent 24%),
        radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.08), transparent 18%),
        linear-gradient(180deg, rgba(12, 16, 28, 0.3), rgba(12, 16, 28, 0.46));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 44px rgba(0, 0, 0, 0.16);
}

.hero h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 18px;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.hero p {
    max-width: 780px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.08rem;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(28px);
}

.hero::before {
    width: 220px;
    height: 220px;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255, 197, 72, 0.22), transparent 68%);
}

.hero::after {
    width: 280px;
    height: 180px;
    right: 10%;
    top: 18%;
    background: radial-gradient(circle, rgba(62, 168, 255, 0.12), transparent 72%);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.masthead-grid {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(540px, 1fr) minmax(220px, 260px);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 28px;
}

.side-panel {
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        linear-gradient(180deg, rgba(14, 20, 34, 0.7), rgba(11, 16, 28, 0.42));
}

.side-tag {
    margin-bottom: 12px;
    color: var(--accent-warm);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.side-panel h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
    color: #fff;
}

.side-panel p {
    color: var(--muted);
    margin-bottom: 12px;
    line-height: 1.6;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 184, 107, 0.24);
    background: rgba(255, 184, 107, 0.1);
    color: #ffd8a6;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.panel-status-blue {
    border-color: rgba(62, 168, 255, 0.22);
    background: rgba(62, 168, 255, 0.1);
    color: #b9ddff;
}

.signal-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    align-items: end;
    height: 36px;
    margin-bottom: 18px;
}

.signal-bars span {
    display: block;
    border-radius: 8px 8px 2px 2px;
    background: linear-gradient(180deg, rgba(255, 184, 107, 0.85), rgba(255, 184, 107, 0.18));
    box-shadow: 0 0 16px rgba(255, 184, 107, 0.12);
}

.signal-bars span:nth-child(1) { height: 38%; }
.signal-bars span:nth-child(2) { height: 62%; }
.signal-bars span:nth-child(3) { height: 100%; }
.signal-bars span:nth-child(4) { height: 76%; }

.signal-bars-cool span {
    background: linear-gradient(180deg, rgba(62, 168, 255, 0.85), rgba(62, 168, 255, 0.18));
    box-shadow: 0 0 16px rgba(62, 168, 255, 0.12);
}

.panel-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 14px;
}

.metric-box {
    padding: 12px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
        rgba(255, 255, 255, 0.02);
}

.metric-box strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
}

.metric-box span {
    color: var(--soft);
    font-size: 0.84rem;
}

.btn,
.btn-outline,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn {
    padding: 13px 30px;
    border-radius: 10px;
    color: white;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    font-weight: 700;
}

.btn:hover,
.btn-outline:hover,
.text-link:hover {
    transform: translateY(-3px);
}

.btn:hover {
    box-shadow: 0 14px 30px rgba(62, 168, 255, 0.25);
}

.btn-outline {
    padding: 11px 28px;
    border: 1px solid rgba(140, 124, 255, 0.6);
    border-radius: 10px;
    color: #d9d2ff;
    font-weight: 700;
    background: rgba(140, 124, 255, 0.06);
}

.btn-outline:hover {
    background: rgba(140, 124, 255, 0.18);
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 34px;
}

.stat-card {
    padding: 18px 18px 16px;
    text-align: left;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        linear-gradient(180deg, rgba(16, 21, 36, 0.64), rgba(12, 16, 28, 0.52));
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 16px 34px rgba(0, 0, 0, 0.18);
}

.stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.stat-id {
    color: #a7b2d3;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.stat-state {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 184, 107, 0.24);
    background: rgba(255, 184, 107, 0.1);
    color: #ffd8a6;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.stat-state-cool {
    border-color: rgba(62, 168, 255, 0.22);
    background: rgba(62, 168, 255, 0.1);
    color: #b9ddff;
}

.stat-card strong {
    display: block;
    font-size: 1.9rem;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 6px;
    text-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.stat-card span {
    color: var(--soft);
}

.stat-meter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 14px;
    align-items: end;
    height: 26px;
}

.stat-meter i {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(255, 184, 107, 0.85), rgba(255, 184, 107, 0.16));
    box-shadow: 0 0 12px rgba(255, 184, 107, 0.12);
}

.stat-meter i:nth-child(1) { height: 38%; }
.stat-meter i:nth-child(2) { height: 64%; }
.stat-meter i:nth-child(3) { height: 94%; }
.stat-meter i:nth-child(4) { height: 72%; }

.stat-meter-cool i {
    background: linear-gradient(180deg, rgba(62, 168, 255, 0.85), rgba(62, 168, 255, 0.16));
    box-shadow: 0 0 12px rgba(62, 168, 255, 0.12);
}

.features,
.project-grid,
.card-grid,
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.features {
    margin-bottom: 34px;
}

.feature-card,
.project-card,
.info-card,
.contact-card,
.archive-card {
    padding: 28px;
}

.feature-card {
    text-align: center;
}

.feature-card:hover,
.project-card:hover,
.info-card:hover,
.contact-card:hover,
.archive-card:hover,
.quick-link:hover {
    transform: translateY(-6px);
    background: rgba(28, 36, 58, 0.45);
}

.feature-card,
.project-card,
.info-card,
.contact-card,
.archive-card,
.quick-link {
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.feature-card i,
.section-heading i,
.panel-block h2 i,
.recent-posts h2 i,
.page-intro h1 i {
    color: var(--accent-warm);
}

.feature-card h3,
.project-card h3,
.post h3,
.timeline-item h3,
.contact-card h3,
.info-card h3,
.archive-card h3 {
    margin: 12px 0 10px;
    color: #fff;
}

.feature-card p,
.project-card p,
.panel-block p,
.post p,
.contact-card p,
.info-card p,
.archive-card p,
.page-intro p,
.list-card p {
    color: var(--muted);
}

.grid-two {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-bottom: 34px;
}

.panel-block {
    padding: 30px;
}

.panel-block h2,
.recent-posts h2,
.section-heading h2 {
    margin-bottom: 22px;
    color: #fff;
    font-size: 1.55rem;
}

.timeline-list {
    display: grid;
    gap: 18px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 16px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-label,
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 184, 107, 0.12);
    color: var(--accent-warm);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.quick-links {
    display: grid;
    gap: 14px;
}

.quick-link {
    display: block;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
}

.quick-link strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
}

.quick-link span {
    color: var(--muted);
}

.recent-posts {
    padding: 34px;
    margin-bottom: 34px;
}

.stats-strip {
    margin-top: -4px;
}

.video-picks {
    margin-bottom: 34px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.video-card {
    display: block;
    padding: 26px;
    text-decoration: none;
    min-height: 100%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        rgba(16, 21, 36, 0.22);
}

.video-card h3 {
    margin: 12px 0 10px;
    color: #fff;
}

.video-card p {
    color: var(--muted);
}

.video-card:hover {
    transform: translateY(-6px);
    background:
        linear-gradient(180deg, rgba(140, 124, 255, 0.16), rgba(255, 255, 255, 0.02)),
        rgba(18, 25, 42, 0.34);
}

.post {
    padding: 20px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.post:last-child {
    border-bottom: none;
}

.post h3 a {
    text-decoration: none;
}

.post h3 a:hover {
    color: #fff0b6;
}

.meta {
    margin: 10px 0 12px;
    color: var(--soft);
    font-size: 0.92rem;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.text-link {
    color: #d8d1ff;
    font-weight: 700;
}

.archive-strip {
    margin-top: 34px;
}

.archive-card {
    min-height: 100%;
}

.project-stack,
.stack-list {
    color: #cfd6f4;
    font-size: 0.95rem;
}

.page-intro {
    padding: 42px 30px;
    margin-bottom: 30px;
}

.page-intro h1 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.split-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.posts-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    gap: 24px;
}

.sidebar-stack {
    display: grid;
    gap: 20px;
    align-content: start;
}

.list-card {
    padding: 28px;
}

.list-card h2 {
    margin-bottom: 18px;
}

.tag-list,
.mini-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-list span,
.mini-list span {
    padding: 8px 12px;
    background: rgba(140, 124, 255, 0.12);
    border: 1px solid rgba(140, 124, 255, 0.2);
    border-radius: 999px;
    color: #ddd6ff;
    font-size: 0.92rem;
}

.archive-list {
    display: grid;
    gap: 12px;
}

.archive-list a {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    color: #e8ebff;
}

.archive-list a:hover {
    background: rgba(140, 124, 255, 0.12);
}

.article-card {
    padding: 26px;
    margin-bottom: 20px;
    scroll-margin-top: 120px;
}

.article-card:last-child {
    margin-bottom: 0;
}

.article-card h2 {
    margin-bottom: 12px;
}

.article-card .meta {
    margin-bottom: 16px;
}

.article-card p + p {
    margin-top: 12px;
}

.contact-actions,
.link-list {
    display: grid;
    gap: 14px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.contact-link:hover {
    background: rgba(140, 124, 255, 0.12);
}

footer {
    padding: 0 0 24px;
}

footer .glass-panel {
    padding: 34px 34px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 24px;
}

.footer-section h3 {
    margin-bottom: 16px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li + li {
    margin-top: 10px;
}

.footer-section a {
    text-decoration: none;
    color: var(--muted);
}

.footer-section a:hover {
    color: #fff;
}

.social-links {
    display: grid;
    gap: 10px;
}

hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 26px 0 16px;
}

.copyright {
    text-align: center;
    color: var(--soft);
    font-size: 0.92rem;
}

.copyright i {
    color: #ff7a92;
}

.pixel-grid {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 8px 8px;
}

.solar-system {
    position: fixed;
    top: 18%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64vw;
    height: 64vw;
    min-width: 540px;
    min-height: 540px;
    max-width: 860px;
    max-height: 860px;
    z-index: 0;
    opacity: 0.9;
    filter: drop-shadow(0 0 34px rgba(98, 145, 255, 0.12));
}

.sun {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: #ffcc00;
    box-shadow:
        -8px 0 0 #ff9900, 8px 0 0 #ff9900,
        0 -8px 0 #ff9900, 0 8px 0 #ff9900,
        -8px -8px 0 #ffcc00, 8px 8px 0 #ffcc00,
        -8px 8px 0 #ffcc00, 8px -8px 0 #ffcc00;
    z-index: 2;
    filter: drop-shadow(0 0 18px rgba(255, 196, 66, 0.45));
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px dotted rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.planet {
    position: absolute;
    transform: translate(-50%, -50%);
}

.mercury-orbit {
    width: 95px;
    height: 95px;
    animation: orbit 5s linear infinite;
}

.mercury {
    width: 8px;
    height: 8px;
    background: #aaa;
    top: 0;
    left: 50%;
}

.venus-orbit {
    width: 150px;
    height: 150px;
    animation: orbit 10s linear infinite;
}

.venus {
    width: 12px;
    height: 12px;
    background: #ffcc99;
    top: 0;
    left: 50%;
}

.earth-orbit {
    width: 220px;
    height: 220px;
    animation: orbit 15s linear infinite;
}

.earth {
    width: 16px;
    height: 16px;
    background: #4a8cff;
    box-shadow: 4px 0 0 #2266cc, -4px 0 0 #88ccff, 0 4px 0 #2266cc, 0 -4px 0 #88ccff;
    top: 0;
    left: 50%;
}

.mars-orbit {
    width: 300px;
    height: 300px;
    animation: orbit 20s linear infinite;
}

.mars {
    width: 14px;
    height: 14px;
    background: #ff6633;
    top: 0;
    left: 50%;
}

.jupiter-orbit {
    width: 430px;
    height: 430px;
    animation: orbit 35s linear infinite;
}

.jupiter {
    width: 32px;
    height: 32px;
    background: #ffaa66;
    box-shadow: inset 0 8px 0 #e68a40, inset 0 -8px 0 #ffc28a;
    top: 0;
    left: 50%;
}

.saturn-orbit {
    width: 580px;
    height: 580px;
    animation: orbit 45s linear infinite;
}

.saturn {
    width: 24px;
    height: 24px;
    background: #ffcc88;
    top: 0;
    left: 50%;
    box-shadow: -16px 8px 0 rgba(255, 204, 136, 0.5), 16px -8px 0 rgba(255, 204, 136, 0.5);
}

@keyframes orbit {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.anime-decorations {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.anime-icon {
    position: absolute;
    font-size: 24px;
    color: rgba(168, 117, 255, 0.4);
    animation: float 6s ease-in-out infinite;
}

.anime-icon:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.anime-icon:nth-child(2) { top: 65%; left: 8%; animation-delay: 1s; color: rgba(255, 71, 87, 0.4); }
.anime-icon:nth-child(3) { top: 25%; left: 85%; animation-delay: 2s; color: rgba(37, 117, 252, 0.4); }
.anime-icon:nth-child(4) { top: 75%; left: 88%; animation-delay: 3s; color: rgba(102, 204, 153, 0.4); }
.anime-icon:nth-child(5) { top: 45%; left: 92%; animation-delay: 4s; color: rgba(255, 204, 0, 0.4); }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.waifu-container {
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 100;
    pointer-events: none;
    animation: floatWaifu 5s ease-in-out infinite;
    transform-origin: bottom right;
}

.waifu-img {
    height: 225px;
    width: auto;
    display: block;
    filter: drop-shadow(-5px 5px 15px rgba(0, 0, 0, 0.6));
    opacity: 0.95;
}

.waifu-container.is-hidden {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

.waifu-toggle {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 110;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 10px 16px 10px 12px;
    background:
        linear-gradient(135deg, rgba(140, 124, 255, 0.22), rgba(62, 168, 255, 0.12)),
        rgba(12, 16, 28, 0.82);
    color: #eef1ff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.01em;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    line-height: 1.2;
    white-space: nowrap;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.waifu-toggle::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 999px;
    flex: 0 0 12px;
    background: linear-gradient(135deg, #ffb86b, #8c7cff);
    box-shadow: 0 0 0 4px rgba(255, 184, 107, 0.12);
}

.waifu-toggle:hover {
    transform: translateY(-2px);
    background:
        linear-gradient(135deg, rgba(140, 124, 255, 0.3), rgba(62, 168, 255, 0.18)),
        rgba(12, 16, 28, 0.9);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.waifu-toggle[aria-expanded="false"] {
    color: #d8defb;
    background:
        linear-gradient(135deg, rgba(255, 184, 107, 0.18), rgba(140, 124, 255, 0.1)),
        rgba(12, 16, 28, 0.82);
}

.waifu-toggle[aria-expanded="false"]::before {
    background: linear-gradient(135deg, #9aa6cc, #6c7596);
    box-shadow: 0 0 0 4px rgba(154, 166, 204, 0.12);
}

@keyframes floatWaifu {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

    .masthead-grid .hero {
        grid-column: 1 / -1;
    }
}

@media (max-width: 960px) {
    .masthead-grid,
    .grid-two,
    .split-layout,
    .posts-layout {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .stats-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        padding-top: 52px;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    nav a {
        justify-content: center;
        padding: 12px 16px;
    }

    nav .container::before {
        left: 12px;
        right: 12px;
    }

    .hero,
    .side-panel,
    .page-intro,
    .recent-posts,
    .panel-block,
    .feature-card,
    .project-card,
    .info-card,
    .contact-card,
    .video-card,
    .article-card,
    .list-card {
        padding: 22px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

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

    .solar-system {
        top: 16%;
        width: 88vw;
        height: 88vw;
        min-width: 420px;
        min-height: 420px;
    }

    .mercury-orbit { width: 72px; height: 72px; }
    .venus-orbit { width: 110px; height: 110px; }
    .earth-orbit { width: 160px; height: 160px; }
    .mars-orbit { width: 220px; height: 220px; }
    .jupiter-orbit { width: 320px; height: 320px; }
    .saturn-orbit { width: 430px; height: 430px; }

    .waifu-img {
        height: 140px;
        opacity: 0.76;
    }

    .waifu-toggle {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        padding: 9px 12px;
        font-size: 0.92rem;
        max-width: calc(100vw - 24px);
    }
}

@media (max-width: 560px) {
    .waifu-container {
        display: none;
    }

    .waifu-toggle {
        right: auto;
        left: max(10px, env(safe-area-inset-left));
        bottom: max(10px, env(safe-area-inset-bottom));
        max-width: calc(100vw - 20px);
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn,
    .btn-outline {
        width: 100%;
    }
}
