/* Root Variables */
:root {
    --color-bg: #f3f4f6;  /* Equivalent to bg-gray-100 */
    --color-text: #1f2937;  /* Equivalent to text-gray-800 */
    --color-footer-text: var(--color-bg);
    --color-footer-bg: var(--color-text);
    --color-content-bg: #ffffff;  /* Equivalent to bg-white */
    --color-header-shadow: rgb(0 0 0 / 0.1);
    --color-link: #2563eb;  /* Equivalent to text-blue-600 */
    --color-link-hover: #1d4ed8;  /* Equivalent to hover:text-blue-500 */
    --color-nav-link: #4b5563;  /* Equivalent to text-gray-600 */
    --color-nav-link-hover: #3b82f6;  /* Equivalent to text-blue-500 */
    --color-box-shadow: rgb(0 0 0 / 0.1);
    --shadow: 0 4px 6px -1px var(--color-box-shadow),
              0 2px 4px -2px var(--color-box-shadow);
}

/* General Resets and Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;  /* Include padding and border in width, height */
}

body {
    font-family: 'Helvetica Neue', sans-serif;
    background-color: var(--color-bg); 
    color: var(--color-text); 
    
    /* Core Sticky Footer Logic */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Utility class for centering content */
.container {
    width: 100%;
    max-width: 1280px; /* Standard container width */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Header Styling */
header {
    background-color: var(--color-content-bg);
    padding: 1rem;
    box-shadow: var(--shadow);
}

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

header h1 {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
}

header a {
    text-decoration: none;  /* Remove underline. */
}

/* Navigation Styling */
nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem; /* space-x-6 */
}

nav a {
    color: var(--color-nav-link);
    text-decoration: none;  /* Remove underline */
    transition: color 0.2s ease-in-out;
}

nav a:hover {
    color: var(--color-nav-link-hover);
}

/* Main Content Styling */
main {
    /* This makes the main content area grow to fill available space, pushing
     * the footer down */
    flex-grow: 1;
    display: flex;
    flex-direction: column; /* Stacking on mobile by default */
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Aside (Left Column) Styling */
aside {
    background-color: var(--color-content-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    height: fit-content; /* Only take up as much height as needed */
}

aside h2 {
    font-size: 1.25rem; /* 20px */
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

aside ul {
    font-family: 'Georgia', serif;
    list-style: none;
    padding: 0;
}

aside a {
    font-family: 'Helvetica Neue', sans-serif;
    display: inline-block;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    color: var(--color-link);
}

aside a:hover {
    color: var(--color-nav-link-hover);
}

/* Article (Right Column) Styling */
article {
    background-color: var(--color-content-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

article h1 {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

article h2 {
    font-size: 1.5rem; /* 24px */
    font-weight: 700;
    margin-bottom: 1rem;
}

article p {
    font-family: 'Georgia', serif;
    margin-bottom: 1rem;
    line-height: 1.5;
}

article ul {
    font-family: 'Georgia', serif;
    margin-bottom: 1rem;
    padding-left: 1.5rem; /* Indent list */
}

/* Footer Styling */
footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 1rem;
    margin-top: 2rem; /* mt-8 */
    text-align: center;
}

/* Responsive Layout for larger screens (e.g., tablets and desktops) */
/* This media query corresponds to Tailwind's 'lg' breakpoint */
@media (min-width: 1024px) {
    main {
        flex-direction: row; /* Side-by-side columns on large screens */
    }
    aside {
        /* This width is ~30% of the article's width (23% / 77% ≈ 0.3) */
        width: 23%; 
        flex-shrink: 0; /* Prevent the aside from shrinking */
    }
    article {
        flex-grow: 1; /* Allow the article to take up remaining space */
    }
}
