:root {
    /* "Midnight Speakeasy" Palette */
    --bg-deep: #0f172a;       /* Deep Slate */
    --bg-card: #1e293b;       /* Lighter Slate */
    --text-main: #e2e8f0;     /* Off-white */
    --text-muted: #94a3b8;    /* Muted Blue-Grey */

    --accent-gold: #fbbf24;   /* Amber 400 - The "Cocktail" */
    --accent-copper: #d97706; /* Amber 600 - The "Aged Bourbon" */
    --accent-code: #38bdf8;   /* Sky 400 - The "PHP" */
    --accent-glow: rgba(56, 189, 248, 0.15);

    --font-body: 'Inter', sans-serif;
    --font-heading: 'Lora', serif;
    --font-mono: 'JetBrains Mono', monospace;

    --container-width: 800px;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.8;
    font-size: 1.125rem;
    /* Subtle noise texture overlay could go here, but let's use a gradient mesh */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(251, 191, 36, 0.05), transparent 25%);
    background-attachment: fixed;
}

/* --- Typography --- */

h1, h2, h3, h4 {
    color: var(--text-main);
    line-height: 1.2;
}

h1 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    letter-spacing: -0.02em; /* Restoring slight tightness for improved heading appearance */
}

/* The "Misbehavior" underline */
h1::after {
    content: '';
    display: block;
    width: 120px;
    height: 6px;
    background: var(--accent-copper);
    margin-top: 0.5rem;
    border-radius: 3px;
}

h2 {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-code);
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bg-card);
    margin-left: 1rem;
    border-bottom: 1px dashed var(--text-muted);
    opacity: 0.3;
}

p {
    margin-bottom: 1.75rem;
    color: var(--text-muted);
    font-weight: 300;
    font-size: 1.2rem;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

a:hover {
    color: #fff;
    border-bottom-color: var(--accent-gold);
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

/* --- Layout --- */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.site-header {
    padding: 2rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    flex-direction: column;
    border: none;
}

.brand:hover {
    border: none;
    text-shadow: none;
}

.brand-name {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.05em;
}

.brand-name::before {
    content: '<?php ';
    color: var(--accent-code);
    opacity: 0.6;
}
.brand-name::after {
    content: ' ?>';
    color: var(--accent-code);
    opacity: 0.6;
}

.brand-tagline {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--accent-copper);
}

/* Nav */
.site-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.site-nav a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.site-nav a:hover {
    color: var(--accent-code);
    border-bottom: none;
}

/* --- Components --- */

/* Hero Section Wrapper */
.hero-section {
    padding-top: 4rem;
    padding-bottom: 6rem;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--accent-code);
    background: rgba(30, 41, 59, 0.5); /* Semi-transparent card */
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 0 12px 12px 0;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--text-main);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Lists */
ul {
    list-style: none;
    margin-bottom: 2rem;
}

li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    color: var(--text-muted);
}

li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-family: var(--font-mono);
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 4rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.footer-content p {
    font-size: 0.75rem;
    margin: 0.2rem 0;
    line-height: 1.3;
}

.footer-nav ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    margin-bottom: 1rem;
    padding: 0;
}

.footer-nav li {
    margin: 0;
    padding: 0;
}

.footer-nav li::before {
    content: none; /* Remove the arrow from main list styles */
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

/* --- Forms --- */

.sf-form-wrapper {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-top: 2rem;
}

.sf-form-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.sf-form-group {
    margin-bottom: 1.5rem;
}

.sf-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sf-input {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.sf-input:focus {
    outline: none;
    border-color: var(--accent-code);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.sf-input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

.sf-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-copper) 100%);
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1rem;
}

.sf-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.sf-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.sf-form-message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.sf-form-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.sf-form-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Utility */
.heading-permalink {
    display: none; /* Hide permalinks for cleaner look */
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }
    .site-header .container {
        flex-direction: column;
        gap: 1.5rem;
    }
}
