/* kmadiar.dev — shared stylesheet.
   Single stylesheet for all pages. No build step; edit directly. */

:root {
    --bg-color: #0d1117;
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --card-bg: #161b22;
    --border: #30363d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 40px;
}

.logo {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
}

h1, h2, h3 {
    color: #f0f6fc;
}

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

.bio {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.meta-links {
    display: flex;
    gap: 15px;
    font-family: monospace;
}

.meta-links a {
    color: var(--accent);
    text-decoration: none;
}

.meta-links a:hover {
    text-decoration: underline;
}

section {
    margin-bottom: 40px;
}

.section-title {
    font-family: monospace;
    font-size: 1.2rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
    margin-bottom: 20px;
}

/* ---------- Cards (index listing) ---------- */

.post-card, .project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    transition: border-color 0.2s;
}

.post-card:hover, .project-card:hover {
    border-color: var(--accent);
}

.post-date, .project-tech {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-title, .project-title {
    font-size: 1.3rem;
    margin: 5px 0 10px 0;
}

.post-title a {
    color: var(--accent);
    text-decoration: none;
}

.post-title a:hover {
    text-decoration: underline;
}

.tags {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tag {
    background: #21262d;
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-family: monospace;
}

.empty-state {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.95rem;
}

/* ---------- Post pages ---------- */

article {
    margin-bottom: 40px;
}

.post-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

article h1 {
    font-size: 1.9rem;
    line-height: 1.3;
    margin: 10px 0 10px 0;
}

article h2 {
    font-size: 1.3rem;
    margin-top: 40px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.92rem;
}

th, td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}

th {
    background: var(--card-bg);
    font-family: monospace;
    color: #f0f6fc;
    font-weight: normal;
}

tbody tr:nth-child(odd) {
    background: rgba(22, 27, 34, 0.5);
}

.highlight-row td {
    color: #f0f6fc;
    font-weight: bold;
}

blockquote {
    border-left: 3px solid var(--accent);
    background: var(--card-bg);
    margin: 25px 0;
    padding: 12px 20px;
    color: var(--text-muted);
}

blockquote p {
    margin: 0;
}

code {
    font-family: monospace;
    background: #21262d;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.88rem;
}

pre {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    font-size: 0.88rem;
}

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

.callout {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px;
    margin: 30px 0;
}

.callout p:last-child {
    margin-bottom: 0;
}

.back-link {
    font-family: monospace;
    font-size: 0.9rem;
}

/* ---------- Contact ---------- */

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 24px;
    margin-top: 20px;
}

.contact-method {
    font-family: monospace;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.contact-method:last-child {
    margin-bottom: 0;
}

.contact-method span {
    color: var(--text-muted);
}

.contact-method a {
    color: var(--accent);
    text-decoration: none;
}

.contact-method a:hover {
    text-decoration: underline;
}

footer {
    margin-top: 60px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    font-family: monospace;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-muted);
}
