@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@500;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* Dynamic Theme Variables (Premium Legal Aesthetic) */
:root {
    --primary: #c29b57; /* Gold/Amber */
    --primary-hover: #a17d3d;
    --primary-light: rgba(194, 155, 87, 0.1);
    
    /* Light Theme (Classic Light) */
    --bg-main: #fcfcfc; /* Off-white extremely clean */
    --bg-card: #ffffff;
    --text-main: #1a202c; /* Near Black */
    --text-muted: #4a5568; /* Slate-600 */
    --border-color: #e2e8f0; 
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(226, 232, 240, 0.5);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);

    --radius-soft: 8px;
    --radius-round: 99px;
}

[data-theme="dark"] {
    /* Dark Theme (Navy/Slate) */
    --bg-main: #0B1120; /* Deep Navy Blue */
    --bg-card: #111827; /* Darker Slate */
    --text-main: #f8fafc; /* Crisp White */
    --text-muted: #94a3b8; /* Slate-400 */
    --border-color: #1e293b; 
    
    /* Glassmorphism Dark */
    --glass-bg: rgba(11, 17, 32, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Glassmorphism Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: 'Raleway', sans-serif;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.02em;
}
.logo small { display:block; font-size:.68rem; font-weight:600; color:var(--text-muted); letter-spacing:.08em; }
.logo-strong { font-weight: 800; letter-spacing: 0.01em; }
.logo-soft { font-weight: 500; opacity: .78; margin-left: .12rem; }

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}
.nav-links a:hover::after {
    width: 100%;
}

/* User Actions */
.user-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.btn-theme {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-theme:hover {
    color: var(--primary);
}

.btn-login {
    background: transparent;
    color: var(--text-main);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-soft);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
}
.btn-login:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Premium Hero Section */
.hero {
    padding: 12rem 0 8rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

/* Subtle background pattern/gradient instead of messy circles */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top center, var(--primary-light) 0%, transparent 60%);
    opacity: 0.7;
    z-index: -1;
    pointer-events: none;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* Fixed High-Contrast Buttons */
.btn-primary {
    background: var(--primary);
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-soft);
    font-weight: 600;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    box-shadow: 0 4px 14px rgba(194, 155, 87, 0.25);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(194, 155, 87, 0.4);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 1rem 2.5rem;
    border-radius: var(--radius-soft);
    font-weight: 600;
    border: 1px solid var(--border-color);
    display: inline-block;
    font-size: 1.05rem;
}
.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-main);
}

/* Grid & Elegantly spaced Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 3rem;
    margin: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-soft);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--glass-shadow);
    border-color: var(--primary-light);
}

.card-img-placeholder {
    height: 220px;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    font-size: 2.5rem;
    font-family: 'Playfair Display', serif;
    opacity: 0.5;
}

.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
}

/* Article Reader Page */
.article-header {
    padding: 10rem 0 4rem;
    text-align: center;
}

.article-header h1 {
    font-size: 3.5rem;
    margin: 1.5rem auto;
    max-width: 900px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: var(--text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-main);
}

.article-body h2 {
    margin: 3.5rem 0 1.5rem;
    font-size: 2rem;
}

.article-body p {
    margin-bottom: 1.75rem;
}

/* Forms */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-soft);
    background: var(--bg-card);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Professional 3-Column Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 6rem 0 2rem;
    margin-top: 6rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}
.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 400px;
}

.footer-col h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 1rem;
}
.footer-col ul a {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.footer-col ul a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 3rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .article-header h1 { font-size: 2.25rem; }
}
