/* 
   Premium Headless Frontend 
   Style: Grid (Skeleton/Simple Grid) + Sugar.css Typography
*/

:root {
    /* Sugar.css inspired variables */
    --s-line-height: 1.6;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-title: 'Outfit', 'Inter', sans-serif;
    
    /* Colors (Dark Mode Default) */
    --bg-color: #1a1a1a;
    --fg-color: #ffffff;
    --primary-color: #60f000; /* Sugar.css default primary */
    --primary-contrast: #000000;
    --secondary-color: #a0a0ab;
    --border-color: #333333;
    --glass-bg: rgba(255, 255, 255, 0.03);
    
    --container-width: 960px;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --fg-color: #007c85;
    --primary-color: #398f00;
    --primary-contrast: #ffffff;
    --secondary-color: #6c757d;
    --border-color: #e5e7eb;
    --glass-bg: rgba(0, 0, 0, 0.02);
}

/* Base Styles */
* { box-sizing: border-box; }
body {
    margin: 0;
    background-color: var(--bg-color);
    color: var(--fg-color);
    font-family: var(--font-family);
    line-height: var(--s-line-height);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
p { margin-bottom: 1.5rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s;
}
a:hover { opacity: 0.8; }

/* Grid System (Skeleton/Simple Grid style) */
.container {
    position: relative;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

.column, .columns {
    flex: 1;
    padding: 0 10px;
}

/* Helper Grid Classes */
.one-half       { flex: 0 0 50%; }
.one-third      { flex: 0 0 33.3333%; }
.two-thirds     { flex: 0 0 66.6666%; }
.one-fourth     { flex: 0 0 25%; }

@media (max-width: 750px) {
    .row { flex-direction: column; }
    .column, .columns, .one-half, .one-third, .two-thirds, .one-fourth {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }
}

/* Components */
.navbar {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4rem;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--fg-color);
}

.card {
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--glass-bg);
    height: 100%;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--primary-contrast) !important;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

#theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--fg-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Post Content Typography (Sugar.css inspired) */
.content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: 0;
    font-style: italic;
    color: var(--secondary-color);
}

.content code {
    background: var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.footer {
    margin-top: 6rem;
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
}
