:root {
    --bg-color: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border-color: #EAEAEA;
    --border-dotted: #CCCCCC;
    --accent: #E05626; /* Orangy, not too light */
    --accent-hover: #C04218;
    --highlight-bg: #333333;
    --highlight-text: #FFFFFF;
    
    --font-logo: 'Literata', serif;
    --font-heading: 'Lora', Georgia, serif;
    --font-body: 'Lora', Georgia, serif;
    --font-mono: 'Lora', Georgia, serif;
    
    --transition: all 0.3s ease;
    
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2.5rem;
    --space-5: 4rem;
    --space-6: 6rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
.text-accent {
    color: var(--accent);
}

/* Header */
.site-header {
    text-align: center;
    padding-top: var(--space-5);
    margin-bottom: var(--space-5);
}

.logo-container {
    margin-bottom: var(--space-3);
}

.logo-text-link {
    display: block;
    margin-bottom: var(--space-2);
    text-decoration: none;
}

.logo-text-dynamic {
    font-family: var(--font-logo);
    font-size: 5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1;
    position: relative;
    cursor: default;
    display: inline-block;
}

.logo-text-dynamic.dna-wave-active {
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--text-primary) 40%, var(--accent) 50%, var(--text-primary) 60%, var(--text-primary) 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: dnaWave 1s ease-in-out forwards;
}

@keyframes dnaWave {
    0% { background-position: 100% 0; }
    45% { background-position: -100% 0; }
    100% { background-position: 50% 0; }
}

.logo-text-dynamic:hover {
    color: var(--accent);
}

.glitching {
    animation: textGlitch 0.1s linear infinite;
    color: var(--accent);
    opacity: 0.9;
    text-shadow: 2px 0px 0px rgba(255, 102, 0, 0.4), -2px 0px 0px rgba(0, 255, 255, 0.2);
}

@keyframes textGlitch {
    0% { transform: translate(0) skew(0deg) }
    20% { transform: translate(-2px, 1px) skew(2deg) }
    40% { transform: translate(2px, -1px) skew(-2deg) }
    60% { transform: translate(-1px, 2px) skew(0deg) }
    80% { transform: translate(1px, -1px) skew(1deg) }
    100% { transform: translate(0) skew(0deg) }
}

/* Vertical Spine Motto */
.vertical-spine {
    position: fixed;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: left center;
    z-index: 100;
    pointer-events: none;
    letter-spacing: 0.1em;
}

.logo-subtitle {
    font-family: "Coustard", Georgia, serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: normal;
}

.main-nav {
    border-top: 1px dotted var(--border-dotted);
    border-bottom: 1px dotted var(--border-dotted);
    padding: var(--space-2) 0;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: var(--space-4);
}

.nav-list a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

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

.nav-list a.active {
    color: var(--accent);
}

/* Hero Section */
.hero {
    position: relative;
    max-width: 100%;
    min-height: 35vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: var(--space-4) var(--space-2);
    text-align: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2; /* Ensures text is above streams */
    padding: var(--space-4) var(--space-6);
    /* Soft white glow behind text to guarantee readability and obscure lit bricks */
    background: radial-gradient(ellipse at center, var(--bg-color) 40%, transparent 80%);
}

/* Brick Matrix Background */
.brick-matrix-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    z-index: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.brick-row {
    display: flex;
    gap: 6px;
    height: 6px;
    width: 100%;
    opacity: 0.6;
}

.brick {
    background-color: var(--border-color);
    border-radius: 1px;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

/* Sizing variations */
.b-sm { flex: 1; }
.b-md { flex: 2; }
.b-lg { flex: 4; }
.b-xl { flex: 8; }
.b-xxl { flex: 12; }

/* Lit up states triggered by JS */
.brick.lit {
    background-color: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.brick.lit-alt {
    background-color: var(--text-primary);
}

.hero-title {
    font-family: var(--font-body);
    font-size: 2.2rem;
    font-style: italic; /* Makes it look like it's leaning forward with speed */
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: var(--space-5);
    color: var(--text-primary);
}

/* Bracket Animation */
.bracket-animator {
    display: inline-flex;
    align-items: center;
    vertical-align: bottom;
    width: 6em; /* Fixed width to prevent text shifting */
    justify-content: flex-start;
}

.bracket {
    font-family: var(--font-mono);
    font-weight: 700;
}

.bracket-word {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    font-family: var(--font-body);
    font-style: italic;
    color: var(--accent);
}

.highlight {
    background-color: var(--highlight-bg);
    color: var(--highlight-text);
    padding: 0 0.5rem;
    font-weight: 600;
    border-radius: 2px;
}

/* Manifesto Section */
.manifesto-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-5) var(--space-2);
    border-bottom: 4px solid var(--text-primary);
    margin-top: var(--space-2);
    margin-bottom: var(--space-6);
}

.manifesto-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.manifesto-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dotted var(--border-dotted);
    padding-bottom: var(--space-2);
}

.manifesto-header h2 {
    font-size: 3rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.manifesto-meta {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.manifesto-content {
    column-count: 2;
    column-gap: var(--space-4);
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.drop-cap {
    float: left;
    font-size: 6rem;
    line-height: 0.8;
    padding-top: 0.1em;
    padding-right: 0.1em;
    font-family: var(--font-logo);
    color: var(--text-primary);
}

/* Newsletter Section */
.newsletter-section {
    padding: var(--space-5) var(--space-2);
    margin-top: var(--space-5);
    background-color: #FAFAFA;
}

.newsletter-box {
    max-width: 900px;
    margin: 0 auto;
    border: 2px solid var(--text-primary);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    background-color: var(--bg-color);
    box-shadow: 6px 6px 0px var(--text-primary); /* Retro brutalist touch */
}

.newsletter-text {
    flex: 1;
}

.newsletter-text h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.newsletter-text p {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.subscribe-form {
    display: flex;
    gap: var(--space-1);
    flex: 1;
}

.subscribe-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
}

.subscribe-input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--accent);
}

/* Footer */
.footer {
    padding: var(--space-5) var(--space-2) var(--space-3);
    border-top: 1px dotted var(--border-dotted);
}

.footer-layout {
    max-width: 1000px;
    margin: 0 auto var(--space-4);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-5);
}

.logo-text-small {
    font-family: var(--font-logo);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: var(--space-1);
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.footer-column h4 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-2);
}

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

.footer-column li {
    margin-bottom: var(--space-1);
}

.footer-column a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.footer-bottom {
    text-align: center;
    border-top: 1px dotted var(--border-dotted);
    padding-top: var(--space-3);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Pages General */
.page-section {
    padding: var(--space-5) var(--space-2);
    max-width: 1000px;
    margin: 0 auto;
}

.page-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.page-header {
    border-bottom: 1px dotted var(--border-dotted);
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-4);
}

.page-header h2 {
    font-size: 3rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

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

/* About Page */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-5);
    align-items: start;
}

.about-avatar-placeholder {
    border: 2px solid var(--text-primary);
    padding: var(--space-3);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 6px 6px 0px var(--text-primary);
    background-color: var(--bg-color);
}

.ascii-face pre {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.2;
    color: var(--accent);
}

.about-bio {
    column-count: 1;
}

/* Articles Page */
.articles-hero {
    min-height: 60vh;
}

.compilation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

.compiling-indicator {
    animation: blink 1.5s infinite;
    color: var(--accent);
}

.terminal-icon {
    width: 48px;
    height: 48px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.compilation-text {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--space-3);
}

.articles-newsletter {
    flex-direction: column;
    max-width: 600px;
}

/* Contact Page */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-subtitle {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-top: var(--space-2);
}

.contact-form-wrapper {
    flex-direction: column;
    align-items: stretch;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.form-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-btn {
    align-self: flex-start;
    margin-top: var(--space-2);
}

/* Responsive */
@media (max-width: 768px) {
    .logo-text {
        font-size: 3.5rem;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .nav-list {
        flex-direction: column;
        gap: var(--space-2);
    }

    .vertical-spine {
        display: none; /* Hide floating text on small screens */
    }

    .manifesto-content {
        column-count: 1;
    }
    
    .manifesto-header {
        flex-direction: column;
        gap: var(--space-1);
    }

    .newsletter-box, .footer-layout, .footer-links {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
    
    .about-layout {
        grid-template-columns: 1fr;
    }
}
