/* Reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root variables for color scheme */
:root {
    --primary-color: #8B5E3C; /* Warm Brown */
    --secondary-color: #F5F5DC; /* Soft Beige */
    --accent-color: #FFA500; /* Orange */
    --text-color: #333333; /* Dark Gray */
    --light-text: #FFFFFF; /* White */
    --background-gradient: linear-gradient(to bottom, #A3C6FF, #8B5E3C);
    --font-family: 'Noto Serif SC', serif;
}

/* Body styling */
body {
    font-family: var(--font-family);
    background: var(--background-gradient);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    animation: fadeIn 2s ease-in-out;
}

/* Fade-in animation for body */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Container for main content */
.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex-direction: row;
}

/* Navigation styling */
nav {
    flex: 1;
    max-width: 300px;
    margin-right: 20px;
    position: sticky;
    top: 20px;
    background-color: var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav h3 {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 20px;
}

nav ul {
    list-style: none;
}

nav ul li {
    margin-bottom: 10px;
}

nav ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    position: relative;
}

nav ul li a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: var(--accent-color);
}

/* Main article styling */
.article-content {
    flex: 3;
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.article-content section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    background: radial-gradient(circle, rgba(255,245,238,0.1), rgba(255,245,238,0));
    transition: background 0.3s ease;
}

.article-content section:hover {
    background: radial-gradient(circle, rgba(255,165,0,0.1), rgba(255,165,0,0));
}

.article-content h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    padding-left: 10px;
    transition: font-weight 0.3s ease;
}

.article-content h2::before {
    content: '';
    width: 5px;
    height: 100%;
    background: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 2px;
}

.article-content h3 {
    font-size: 20px;
    color: var(--text-color);
    margin-top: 20px;
    margin-bottom: 10px;
    transition: font-weight 0.3s ease;
}

.article-content p {
    margin-bottom: 15px;
    position: relative;
    padding-left: 10px;
}

.article-content p::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 50%;
}

.article-content img {
    display: block;
    max-width: 900px;
    min-width: 500px;
    width: 100%;
    height: auto;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-content img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Responsive layout */
@media (max-width: 1200px) {
    .container {
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    nav {
        max-width: none;
        margin-bottom: 20px;
        position: relative;
    }
    .container {
        flex-direction: column;
    }
    .article-content img {
        max-width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    nav h3 {
        font-size: 18px;
    }
    nav ul li a {
        font-size: 14px;
    }
    .article-content h2 {
        font-size: 20px;
    }
    .article-content h3 {
        font-size: 18px;
    }
}

/* Link styles within content */
.article-content a {
    color: var(--accent-color);
    text-decoration: none;
    position: relative;
}

.article-content a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
    position: absolute;
    bottom: -2px;
    left: 0;
}

.article-content a:hover::after {
    width: 100%;
}

.article-content a:hover {
    color: var(--primary-color);
}

/* Footer styling */
footer {
    text-align: center;
    padding: 20px;
    background-color: var(--primary-color);
    color: var(--light-text);
    margin-top: 40px;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--light-text);
}

/* Button styling */
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: var(--light-text);
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Highlighted text */
.highlight {
    background: linear-gradient(90deg, rgba(255,165,0,0.3), rgba(255,165,0,0));
    padding: 2px 4px;
    border-radius: 3px;
}

/* Custom scrollbar for webkit browsers */
body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

body::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 6px;
    border: 3px solid var(--secondary-color);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}
