/**
 * johlem.net - Minimal Design System
 * Low-profile monospace aesthetic
 */

:root {
    /* Colors */
    --color-primary: #0a0a0a;
    --color-bg: #0a0a0a;
    --color-bg-secondary: #111;
    --color-bg-card: #0d0d0d;
    --color-border: #222;
    --color-text: #e0e0e0;
    --color-text-muted: #666;
    --color-accent: #7d7;
    --color-accent-hover: #9f9;
    --color-error: #a55;
    --color-success: #7d7;
    --color-warning: #aa7;

    /* Typography */
    --font-mono: 'Courier New', Courier, monospace;
    --font-size-sm: 0.85em;
    --font-size-base: 1em;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Layout */
    --border-radius: 0;
    --transition: all 0.2s;
}

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

body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Links */
a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #fff;
}

/* Header */
.header {
    border-bottom: 1px solid #222;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 1.4em;
    font-weight: normal;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.header h1 a {
    color: #e0e0e0;
}

.header h1 a:hover {
    color: #7d7;
}

.subtitle {
    color: #666;
    font-size: 0.9em;
}

.nav {
    margin-top: 15px;
}

.nav a {
    margin-right: 20px;
    font-size: 0.9em;
}

.nav a:hover,
.nav a.active {
    color: #7d7;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: normal;
    color: #e0e0e0;
    margin-bottom: 15px;
}

h2 {
    font-size: 1.2em;
    color: #7d7;
    margin-top: 30px;
}

h3 {
    font-size: 1em;
    color: #888;
}

p {
    color: #999;
    margin-bottom: 15px;
}

/* Lists */
.list {
    columns: 2;
    column-gap: 40px;
}

.list-item {
    break-inside: avoid;
    padding: 4px 0;
    border-bottom: 1px solid #151515;
}

.list-item a {
    display: block;
    padding: 2px 0;
}

.list-item a:hover {
    color: #7d7;
}

ul {
    color: #888;
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 5px;
}

/* Search Box */
.search-box {
    margin: 20px 0;
}

.search-box input {
    background: #111;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.9em;
    width: 100%;
    max-width: 300px;
}

.search-box input:focus {
    outline: none;
    border-color: #555;
}

.search-box input::placeholder {
    color: #555;
}

.search-hint {
    color: #444;
    font-size: 0.75em;
    margin-top: 5px;
}

/* Cards / Boxes */
.card {
    background: #111;
    border: 1px solid #222;
    padding: 20px;
    margin-bottom: 20px;
}

.card h3 {
    color: #7d7;
    margin-bottom: 10px;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.grid-item {
    padding: 15px;
    border: 1px solid #222;
    background: #0d0d0d;
}

.grid-item:hover {
    border-color: #333;
}

.grid-item h3 {
    color: #7d7;
    font-size: 0.95em;
    margin-bottom: 8px;
}

.grid-item p {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.tool-card {
    display: block;
    padding: 15px;
    border: 1px solid #222;
    background: #0d0d0d;
    transition: border-color 0.2s;
}

.tool-card:hover {
    border-color: #444;
    color: inherit;
}

.tool-card h3 {
    color: #7d7;
    font-size: 0.95em;
    margin-bottom: 8px;
}

.tool-card p {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0;
}

.tool-icon {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background: transparent;
    color: #888;
    border: 1px solid #333;
    font-family: inherit;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover {
    color: #fff;
    border-color: #555;
}

.btn-primary {
    color: #7d7;
    border-color: #7d7;
}

.btn-primary:hover {
    background: #7d7;
    color: #0a0a0a;
}

/* Forms */
label {
    display: block;
    color: #888;
    font-size: 0.9em;
    margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.9em;
    margin-bottom: 15px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #555;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #222;
    font-size: 0.85em;
    color: #555;
}

.footer a {
    color: #666;
}

.footer a:hover {
    color: #888;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    margin-right: 15px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: #666;
}

.text-accent {
    color: #7d7;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.back-link:hover {
    color: #7d7;
}

/* Content display */
.content-box {
    background: #111;
    border: 1px solid #222;
    padding: 20px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9em;
    line-height: 1.5;
    overflow-x: auto;
}

/* Section */
.section {
    padding: 30px 0;
    border-bottom: 1px solid #151515;
}

.section:last-child {
    border-bottom: none;
}

/* Inline elements */
code {
    background: #111;
    padding: 2px 6px;
    font-size: 0.9em;
    color: #7d7;
}

/* Messages */
.error {
    color: #a55;
}

.success {
    color: #7d7;
}

.warning {
    color: #aa7;
}

.no-results {
    color: #666;
    padding: 20px 0;
    display: none;
}

.placeholder {
    color: #666;
    padding: 40px 0;
    text-align: center;
}

/* Home Links */
.home-links {
    margin-top: 30px;
}

.home-links a {
    display: inline-block;
    margin-right: 25px;
    color: #7d7;
}

.home-links a:hover {
    color: #fff;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #7d7;
    color: #0a0a0a;
    padding: 8px 16px;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .list {
        columns: 1;
    }

    .container {
        padding: 20px 15px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .nav a {
        display: block;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    a {
        color: black;
    }

    .header,
    .footer,
    .nav {
        display: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
