/*
 * ODDSHIP.NET
 * Nautical Hacker Aesthetic
 * "We rebuild ourselves at sea"
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500;700&display=swap');

:root {
    /* Deep ocean palette */
    --bg-deep: #0a0e12;
    --bg-surface: #0d1117;
    --bg-elevated: #161b22;

    /* Text hierarchy */
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #484f58;

    /* Accent - maritime cyan */
    --accent: #22d3ee;
    --accent-dim: #0e7490;

    /* Terminal green - secondary accent */
    --terminal: #39d353;
    --terminal-dim: #238636;

    /* Borders and lines */
    --border: #21262d;
    --border-strong: #30363d;

    /* Typography */
    --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Consolas', monospace;
    --font-size-base: 16px;
    --line-height: 1.7;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-deep);
    font-family: var(--font-mono);
    color: var(--text-primary);
    line-height: var(--line-height);

    /* Subtle scan lines - hacker aesthetic */
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px
        );
}

/* ASCII-style header decoration */
body::before {
    content: '═══════════════════════════════════════════════════════════════════════════════';
    display: block;
    color: var(--border-strong);
    font-size: 10px;
    overflow: hidden;
    white-space: nowrap;
    padding: 4px 0;
    text-align: center;
    letter-spacing: -1px;
}

/* ══════════════════════════════════════════
   NAVIGATION - Terminal Prompt Style
   ══════════════════════════════════════════ */

nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

nav::before {
    content: '>';
    color: var(--terminal);
    font-weight: 700;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

nav a:hover {
    color: var(--accent);
    border-color: var(--accent-dim);
}

nav a[aria-current="page"],
nav a:focus {
    color: var(--accent);
    border-color: var(--accent);
    outline: none;
}

nav a::before {
    content: '[';
    color: var(--text-muted);
}

nav a::after {
    content: ']';
    color: var(--text-muted);
}

/* ══════════════════════════════════════════
   MAIN CONTENT AREA
   ══════════════════════════════════════════ */

.content {
    max-width: 680px;
    margin: 0 auto;
    padding: 60px 24px 100px;
}

/* ══════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════ */

h1, h2, h3, h4 {
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-top: 2.5em;
    margin-bottom: 0.8em;
}

h1 {
    font-size: 1.75rem;
    color: var(--accent);
    border-bottom: 1px dashed var(--border-strong);
    padding-bottom: 0.5em;
    margin-top: 0;
}

h1::before {
    content: '# ';
    color: var(--text-muted);
}

h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

h2::before {
    content: '## ';
    color: var(--text-muted);
}

h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

h3::before {
    content: '### ';
    color: var(--text-muted);
}

p {
    margin: 0 0 1.5em;
    color: var(--text-primary);
}

/* Emphasis and highlights */
strong, b {
    color: var(--accent);
    font-weight: 500;
}

em, i {
    color: var(--text-secondary);
    font-style: normal;
    border-bottom: 1px dotted var(--text-muted);
}

a {
    color: var(--terminal);
    text-decoration: none;
    border-bottom: 1px solid var(--terminal-dim);
    transition: all 0.15s ease;
}

a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Horizontal rules - ASCII style */
hr {
    border: none;
    margin: 3em 0;
    text-align: center;
    color: var(--border-strong);
    font-size: 12px;
    overflow: hidden;
}

hr::before {
    content: '────────────────────────────────────────────';
    letter-spacing: -2px;
}

/* Blockquotes */
blockquote {
    margin: 2em 0;
    padding: 1em 1.5em;
    border-left: 3px solid var(--accent-dim);
    background: var(--bg-surface);
    color: var(--text-secondary);
}

blockquote::before {
    content: '> ';
    color: var(--accent-dim);
}

/* Code blocks */
code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: 2px;
    color: var(--terminal);
}

pre {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 1em;
    overflow-x: auto;
    font-size: 0.875rem;
}

pre code {
    background: none;
    padding: 0;
}

/* Lists */
ul, ol {
    margin: 1.5em 0;
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.5em;
}

li::marker {
    color: var(--accent-dim);
}

/* ══════════════════════════════════════════
   HOMEPAGE SPECIFIC
   ══════════════════════════════════════════ */

.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 24px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--accent);
    margin: 0 0 0.5em;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.hero-title::before {
    content: none;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0 0 2em;
    max-width: 500px;
}

.hero-ascii {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.2;
    white-space: pre;
    font-family: var(--font-mono);
    margin-bottom: 2em;
    min-height: 160px;
    width: 100%;
    display: block;
    overflow: hidden;
}

/* ASCII animation colors */
.ascii-stars {
    color: var(--text-primary);
}

.ascii-ship {
    color: var(--accent);
}

.ascii-waves {
    color: var(--text-muted);
}

.ascii-lighthouse {
    color: var(--text-secondary);
}

.ascii-light {
    color: #fbbf24;
    text-shadow: 0 0 8px #fbbf24;
}

.hero-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-links a {
    padding: 10px 20px;
    border: 1px solid var(--border-strong);
    background: var(--bg-surface);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.hero-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-elevated);
}

.hero-links a::before {
    content: '→ ';
    color: var(--accent-dim);
}

/* ══════════════════════════════════════════
   GAME OF LIFE - FOOTER ELEMENT
   ══════════════════════════════════════════ */

.game-section {
    margin-top: auto;
    padding: 40px 20px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

canvas {
    border: 1px solid var(--border);
    margin-bottom: 12px;
    max-width: 100%;
    height: auto;
}

.controls {
    display: flex;
    gap: 8px;
}

button {
    font-family: var(--font-mono);
    font-size: 12px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: lowercase;
}

button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

button:active {
    background: var(--accent-dim);
    color: var(--bg-deep);
}

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */

footer {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
}

footer::before {
    content: '/* ';
}

footer::after {
    content: ' */';
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */

@media (max-width: 600px) {
    :root {
        --font-size-base: 15px;
    }

    nav {
        flex-wrap: wrap;
        gap: 4px;
    }

    nav a {
        padding: 4px 8px;
        font-size: 13px;
    }

    .content {
        padding: 40px 16px 80px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.15rem;
    }

    .hero {
        min-height: 50vh;
        padding: 30px 16px;
    }

    .hero-ascii {
        font-size: 9px;
        min-height: 130px;
    }

    canvas {
        width: 100%;
    }
}

/* ══════════════════════════════════════════
   SELECTION
   ══════════════════════════════════════════ */

::selection {
    background: var(--accent);
    color: var(--bg-deep);
}

/* ══════════════════════════════════════════
   SCROLLBAR - Minimal hacker style
   ══════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dim);
}
