/* ------------------------------
   GLOBAL RESET + BASE STYLES
--------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
                 Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background: #fafafa;
    color: #222;
    line-height: 1.6;
    padding-top: 70px; /* space for navbar */
}

/* ------------------------------
   NAVIGATION BAR
--------------------------------*/
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

nav .logo {
    font-size: 1.4rem;
    font-weight: 700;
}

nav .nav-links a {
    margin-left: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

nav .nav-links a:hover {
    color: #0077ff;
}

/* ------------------------------
   HEADER (center title + subtitle)
--------------------------------*/
.header {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header .subtitle {
    font-size: 1.2rem;
    color: #555;
}

/* ------------------------------
   PAGE CONTAINER
--------------------------------*/
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ------------------------------
   HEADINGS + TEXT
--------------------------------*/
h1, h2, h3, h4 {
    font-weight: 700;
    margin-bottom: 15px;
}

p {
    margin-bottom: 18px;
    font-size: 1.05rem;
}

/* ------------------------------
   ARTICLE STYLING
--------------------------------*/
.article-header {
    margin-bottom: 25px;
}

.article-header h1 {
    font-size: 2.2rem;
}

.article-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

/* ------------------------------
   CODE BLOCKS
--------------------------------*/
pre {
    background: #1e1e1e;
    color: #eaeaea;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

code {
    font-family: "Fira Code", monospace;
}

/* ------------------------------
   COMMENT SECTION CONTAINER
--------------------------------*/
#comments {
    margin-top: 50px;
    padding: 25px;
    background: #f5f5f5;
    border-radius: 10px;
    border: 1px solid #ddd;
}

#comments h3 {
    margin-bottom: 15px;
}

/* ------------------------------
   EMAIL SIGNUP BOX
--------------------------------*/
.email-signup {
    margin-top: 50px;
    margin-bottom: 50px; /* add this */
    padding: 25px;
    background: #f5f5f5;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.signup-form {
    display: flex;
    gap: 10px;
}

.signup-form input[type="email"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.signup-form button {
    padding: 10px 18px;
    background: #0077ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.signup-form button:hover {
    background: #005fcc;
}

/* ------------------------------
   FOOTER
--------------------------------*/
footer {
    margin-top: 60px;
    padding: 20px;
    text-align: center;
    color: #777;
    font-size: 0.9rem;
}

/* ------------------------------
    MOBILE SUPPORT
-------------------------------*/
@media (max-width: 500px) {

    /* NAVIGATION */
    nav {
        padding: 12px 15px;
    }

    nav .logo {
        font-size: 1.2rem;
    }

    nav .nav-links a {
        margin-left: 12px;
        font-size: 0.95rem;
    }

    /* HEADER */
    .header h1 {
        font-size: 2rem;
    }

    .header .subtitle {
        font-size: 1rem;
    }

    /* EMAIL SIGNUP */
    .signup-form {
        flex-direction: column;
    }

    .signup-form button {
        width: 100%;
    }

    /* CONTAINER SPACING */
    .container {
        padding: 20px 15px;
    }
}
