/* ============================================================
   Level Destroyer Media — Main Stylesheet
   Dark tech theme, mobile-first, no JavaScript required
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary:    #0a0c0f;
    --bg-secondary:  #111418;
    --bg-card:       #161a1f;
    --bg-card-hover: #1c2128;
    --border:        #252a31;
    --border-accent: #3a4050;

    --text-primary:   #e4e8ee;
    --text-secondary: #8b95a5;
    --text-muted:     #555d6b;

    --accent:         #4da6ff;
    --accent-glow:    #4da6ff66;
    --accent-alt:     #7c5ce0;

    --font-mono:      'Consolas', 'Monaco', 'Courier New', monospace;
    --font-sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --max-width:      1000px;
    --radius:         6px;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}
a:hover, a:focus {
    color: #80c1ff;
    text-decoration: underline;
}

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

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.2rem;
}

main {
    flex: 1;
    padding: 2rem 0 4rem;
}

/* --- Header & Navigation --- */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1.2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Logo placeholder — replace .logo img with your actual logo file */
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.02em;
}
.logo:hover { color: var(--accent); text-decoration: none; }

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 900;
    color: #000;
    flex-shrink: 0;
}

/* --- Nav --- */
.site-nav { display: flex; gap: 0.3rem; flex-wrap: wrap; }

.site-nav a {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.site-nav a:hover,
.site-nav a:focus { background: var(--bg-card); color: var(--text-primary); text-decoration: none; }

/* Active nav state set by PHP */
.site-nav a.active {
    background: var(--bg-card);
    color: var(--accent);
}

/* --- Hero Section (Home) --- */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
}

.hero h1 {
    font-size: 2.8rem;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}
.hero h1 .highlight { color: var(--accent); }

.hero .tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero .desc {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
    background: var(--accent);
    color: #000;
}
.btn-primary:hover { background: #5db8ff; box-shadow: 0 0 18px var(--accent-glow); color: #000; }

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #000; }

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.2s, background 0.2s;
}
.card:hover { border-color: var(--border-accent); background: var(--bg-card-hover); }

.card h3 { margin-bottom: 0.5rem; }
.card .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 0.75rem;
}

/* --- Featured Project Card --- */
.featured-project {
    border: 1px solid var(--border-accent);
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}
.featured-project h2 { font-family: var(--font-mono); margin-bottom: 0.5rem; }
.featured-project .tag {
    display: inline-block;
    background: var(--accent);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.featured-project p { color: var(--text-secondary); margin-bottom: 1.25rem; }
.featured-project .btn { margin-right: 0.75rem; }

/* --- Page Sections --- */
.page-section {
    padding: 2rem 0;
}
.page-section + .page-section {
    border-top: 1px solid var(--border);
}

/* --- Projects Grid --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.project-grid .card .links { margin-top: 1rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* --- Bio Cards (About) --- */
.bio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.bio-card { padding: 1.5rem; }
.bio-card .bio-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-card-hover);
    border: 2px solid var(--border-accent);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
}
.bio-card h3 { margin-bottom: 0.15rem; }
.bio-card .role { color: var(--accent); font-size: 0.85rem; font-family: var(--font-mono); margin-bottom: 0.75rem; }
.bio-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* --- Devlog --- */
.post-list { margin-top: 1.5rem; }

.post-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}
.post-item:first-child { padding-top: 0; }
.post-item .post-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.post-item h3 { margin-bottom: 0.35rem; }
.post-item h3 a { color: var(--text-primary); }
.post-item h3 a:hover { color: var(--accent); text-decoration: none; }
.post-item p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 0; }

/* --- Contact --- */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.contact-card { text-align: center; padding: 1.5rem; }
.contact-card .contact-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* --- Footer --- */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
}
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--accent); }

/* --- Client Cards --- */
.client-card {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    align-items: flex-start;
    transition: border-color 0.2s, background 0.2s;
}
.client-card:hover { border-color: var(--border-accent); background: var(--bg-card-hover); }

.client-card-image {
    flex-shrink: 0;
    width: 280px;
    border-radius: 4px;
    overflow: hidden;
}
.client-card-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.client-card-body { flex: 1; min-width: 0; }

.client-card-body h3 { margin-bottom: 0.15rem; }

.client-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 0.75rem;
}

.client-card-body p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

/* --- Utility: Placeholder for future sections --- */
.placeholder-section {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.placeholder-section h2 { color: var(--text-secondary); margin-bottom: 0.5rem; }
.placeholder-section p { max-width: 500px; margin: 0 auto; }

/* --- Responsive --- */
@media (max-width: 640px) {
    html { font-size: 15px; }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .site-nav { width: 100%; justify-content: flex-start; }

    .hero h1 { font-size: 2rem; }
    .featured-project { padding: 1.25rem; }
    .featured-project .btn { display: block; margin: 0 0 0.5rem; text-align: center; }

    .client-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .client-card-image { width: 100%; max-width: 280px; }
}
