/* =========================
   BASE
========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: clamp(16px, 4vw, 48px);
    font-family: "VT323", monospace;
    font-size: 20px;
    letter-spacing: 0.5px;
    color: #d7f3ff;
    background: linear-gradient(180deg, #05070d 0%, #070b14 100%);
}

/* === LAYOUT === */
.layout {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 32px;
    min-height: 100vh;
}

/* LEFT PANEL */
.left-panel {
    padding-right: 20px;
    align-self: start;
}

@media (min-width: 901px) {
    .left-panel {
        position: sticky;
        top: clamp(16px, 4vw, 48px);
    }
}

/* RIGHT PANEL */
.right-panel {
    padding-left: 20px;
    opacity: 0.9;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .right-panel {
        margin-top: 40px;
    }
}

/* HEADINGS */
h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin-bottom: 10px;
    color: #e6f7ff;
    text-shadow: -1px 0 rgba(0, 220, 255, 0.3), 1px 0 rgba(255, 90, 200, 0.25);
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: #7fd4ff;
}

h5 {
    font-size: 1rem;
    margin-bottom: 1px;
    color: #7fd4ff;
}

.status-line {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #8fbad9;
    opacity: 0.75;
}

/* SECTIONS */
.section {
    margin-top: 28px;
    padding: 14px 18px;
    background: rgba(8, 12, 22, 0.85);
    border-left: 3px solid #6fd2ff;
    box-shadow: 0 0 0 1px rgba(111,210,255,0.15), 0 0 18px rgba(111,210,255,0.06);
}

/* LINKS */
a {
    color: #ff6ad5;
    text-decoration: none;
}

a:hover {
    text-shadow: -1px 0 #00eaff, 1px 0 #ff6ad5;
}

/* =========================
   GUESTBOOK / TERMINAL
========================= */
.guestbook {
    font-size: 1rem;
}

.terminal-log {
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(111,210,255,0.25);
    padding: 12px;
    height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
    position: relative;
}

.terminal-log::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.02) 0px,
        rgba(255,255,255,0.02) 1px,
        transparent 2px,
        transparent 4px
    );
    z-index: 10;
}

.terminal-log::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 11;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    animation: noiseMove 0.3s steps(2) infinite;
}

@keyframes noiseMove {
    0%   { transform: translate(0,0); }
    25%  { transform: translate(-1px,1px); }
    50%  { transform: translate(1px,-1px); }
    75%  { transform: translate(-1px,-1px); }
}

.terminal-log div {
    display: block;
    width: 100%;
    padding-left: 10px;
    text-indent: -10px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* INPUTS */
.guestbook input {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(111,210,255,0.35);
    padding: 6px;
    margin: 6px 0;
    color: #d7f3ff;
    font-family: "VT323", monospace;
    font-size: 1.1rem;
}

.guestbook input::placeholder {
    color: rgba(140, 200, 230, 0.4);
}

.guestbook input:focus {
    outline: none;
}

/* =========================
   BLOG POSTS / RIGHT PANEL
========================= */
#blog-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blog-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blog-post {
    position: relative;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(111,210,255,0.25);
    padding: 16px;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "VT323", monospace;
    font-size: 1.3rem;
    color: #d7f3ff;
}

/* CRT overlay for blog posts */
.blog-post::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.02) 0px,
        rgba(255,255,255,0.02) 1px,
        transparent 2px,
        transparent 4px
    );
    z-index: 10;
}

.blog-post::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 11;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    animation: noiseMove 0.3s steps(2) infinite;
}

/* Markdown inside posts */
.blog-post h1,
.blog-post h2,
.blog-post h3,
.blog-post h4,
.blog-post h5,
.blog-post h6,
.blog-post p,
.blog-post ul,
.blog-post ol,
.blog-post li,
.blog-post a {
    margin: 0.6em 0;
    color: #d7f3ff;
}

.blog-post a {
    color: #ff6ad5;
    text-decoration: none;
}

.blog-post a:hover {
    text-shadow: -1px 0 #00eaff, 1px 0 #ff6ad5;
}

/* Code blocks in Markdown */
.blog-post pre,
.blog-post code {
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: "VT323", monospace;
    color: #d7f3ff;
    overflow-x: auto;
}

/* Responsive images inside posts */
.blog-post img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
    border-radius: 4px;
}

/* Responsive tables inside posts */
.blog-post table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    overflow-x: auto;
}

.blog-post th,.blog-post td {
    border: 1px solid rgba(111,210,255,0.3);
    padding: 6px;
    text-align: left;
}

.blog-post h2 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #6fd2ff;
    font-size: 1.2rem;
}
