/* --- CSS Variables --- */
:root {
    --bg-dark: #2E3440; /* Nord theme dark */
    --bg-light: #F5F5F5;
    --accent-green: #A3BE8C; /* Nord theme green */
    --accent-blue: #81A1C1; /* Nord theme blue */
    --text-color: #333333;
    --text-light: #ECEFF4; /* Nord theme light */
    --border-color: #D8DEE9;
    --font-body: 'Roboto', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --font-logo: 'Courier New', monospace;
}

/* --- Base & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; margin-top: 2rem; margin-bottom: 1rem;}
h3 { font-size: 1.4rem; color: var(--text-color); margin-top: 1.5rem; margin-bottom: 0.5rem;}
p { margin-bottom: 1rem; }
a { color: var(--accent-blue); text-decoration: none; font-weight: 500;}
a:hover { text-decoration: underline; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Header & Navigation --- */
.site-header {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-logo);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}
.logo::after {
    content: '_';
    animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.search-bar { display: none; } /* Hidden on mobile by default */

/* Mobile Nav */
.nav-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}
.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    transition: all 0.3s ease;
}
.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-color);
    transition: all 0.3s ease;
}
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-links {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--bg-light);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}
.nav-links a { font-size: 1.5rem; margin: 1rem 0; }
body.nav-open .nav-links { transform: translateX(0); }
body.nav-open .hamburger { background: transparent; }
body.nav-open .hamburger::before { top: 0; transform: rotate(45deg); }
body.nav-open .hamburger::after { top: 0; transform: rotate(-45deg); }


/* --- Hero Section --- */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: #e5e5e5 url('https://placehold.co/1920x400/333333/F5F5F5?text=.') no-repeat center center/cover;
    background-blend-mode: overlay;
    border-bottom: 1px solid var(--border-color);
}
.hero .subheadline {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto 2rem;
    color: #555;
}
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-primary {
    background-color: var(--accent-blue);
    color: var(--bg-light);
}
.btn-primary:hover {
    background-color: #3A6A8A;
    transform: translateY(-2px);
}
.btn-secondary {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}
.btn-secondary:hover {
    background-color: rgba(70, 130, 180, 0.1);
}

/* --- Main Content Layout --- */
.main-content-area {
    padding: 2rem 0;
}
.content-section:not(:first-child) { margin-top: 2rem; }

/* --- Terminal-style Code Blocks --- */
.code-container { position: relative; }
pre {
    background-color: var(--bg-dark);
    color: var(--text-light);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-size: 0.9rem;
}
code {
    font-family: var(--font-mono);
}
pre code::before {
    content: '$ ';
    color: var(--accent-green);
}
.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #4C566A;
    border: 1px solid #5E697E;
    color: var(--text-light);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
}
.code-container:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background-color: #5E697E; }

/* --- Other Content Styles --- */
.danger-zone {
    border: 2px solid #BF616A; /* Nord red */
    border-radius: 6px;
    padding: 1rem;
    background-color: #fbe9e7;
}
.danger-zone h2 {
    color: #BF616A;
    border-bottom: none;
}
.contact-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin-top: 1rem;
}
.contact-card {
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 6px;
}
.contact-card h3 { margin-top: 0; }
.contact-card a { display: block; margin-top: 0.5rem; }

/* --- Sidebar --- */
.sidebar { margin-top: 2rem; }
.sidebar-widget {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sidebar-widget h3 { margin-top: 0; font-size: 1.2rem; }
.sidebar-widget ul li a { display: block; padding: 0.25rem 0; font-weight: 400; }
textarea {
    width: 100%; min-height: 80px; border: 1px solid var(--border-color);
    border-radius: 6px; padding: 0.75rem; font-family: var(--font-body);
    margin-bottom: 0.5rem;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 3rem 0 1rem;
    margin-top: 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
.footer-column h4 { color: white; }
.footer-column a, .footer-column p { font-size: 0.9rem; color: #D8DEE9; }
.social-links a {
    display: inline-block;
    width: 30px; height: 30px; line-height: 30px;
    text-align: center; border-radius: 50%;
    background-color: #4C566A; margin-right: 0.5rem;
    font-family: var(--font-logo); font-weight: bold;
}
.newsletter-signup input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #4C566A;
    background: #3B4252;
    border-radius: 6px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}
.newsletter-signup button {
    width: 100%;
    padding: 0.75rem;
    background: var(--accent-blue);
    color: #2E3440;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}
.footer-bottom {
    border-top: 1px solid #4C566A;
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #D8DEE9;
}

/* --- Desktop Styles --- */
@media (min-width: 992px) {
    h1 { font-size: 2.8rem; }
    .nav-toggle { display: none; }
    .nav-links {
        position: static; flex-direction: row; height: auto;
        transform: none; background: none; gap: 1.5rem;
    }
    .nav-links a { font-size: 1rem; }
    .search-bar { display: block; }
    .search-bar input {
        border: 1px solid var(--border-color);
        border-radius: 20px;
        padding: 0.5rem 1rem;
        min-width: 250px;
        background-color: white;
    }
    .main-content-area {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 2.5rem;
        padding-top: 3rem;
    }
    .sidebar { margin-top: 2rem; }
    .contact-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}