/*
Theme Name: Automated Hacks Theme
Theme URI: https://geovannenavalta.com/automated-hacks-theme
Author: Geovanne Navalta
Author URI: https://geovannenavalta.com/
Description: A modern, responsive WordPress theme with a mobile-first approach.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: automated-hacks-theme
*/

/* =========================================================
 * Design tokens (colors, typography, radii, shadows)
 * ======================================================= */

:root {
    --ah-font-sans: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --ah-color-bg-shell: #020617;
    --ah-color-bg-card: #ffffff;
    --ah-color-bg-muted: #f9fafb;

    --ah-color-text-main: #0f172a;
    --ah-color-text-muted: #6b7280;

    --ah-color-border-subtle: rgba(148, 163, 184, 0.45);
    --ah-color-border-strong: rgba(148, 163, 184, 0.85);

    --ah-color-primary: #3b82f6;
    --ah-color-primary-strong: #1d4ed8;
    --ah-color-primary-soft: #dbeafe;

    --ah-color-accent-success: #22c55e;

    --ah-radius-lg: 18px;
    --ah-radius-md: 12px;
    --ah-radius-sm: 8px;

    --ah-shadow-soft: 0 18px 38px rgba(15, 23, 42, 0.18);
    --ah-shadow-strong: 0 24px 55px rgba(15, 23, 42, 0.40);
    --ah-shadow-outline: 0 0 0 1px rgba(59, 130, 246, 0.5);

    --ah-container-width: 1120px;
    --ah-transition-fast: 150ms ease-out;
}

/* =========================================================
 * Global reset & base typography
 * ======================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--ah-font-sans);
    line-height: 1.8;
    color: var(--ah-color-text-main);
    background: radial-gradient(circle at top left, #0f172a 0, #020617 40%, #020617 100%);
    overflow-x: hidden;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    word-wrap: break-word;
    color: var(--ah-color-text-main);
    margin-bottom: 0.75rem;
}

h1 {
    font-size: clamp(2rem, 3vw, 2.75rem);
}

h2 {
    font-size: clamp(1.75rem, 2.6vw, 2.25rem);
}

h3 {
    font-size: clamp(1.4rem, 2.1vw, 1.75rem);
}

p {
    margin-bottom: 0.85rem;
    word-wrap: break-word;
    color: var(--ah-color-text-main);
}

/* Lists */
ul,
ol {
    margin: 0 0 1rem 1.25rem;
    padding-left: 1rem;
}

li {
    margin-bottom: 0.4rem;
}

/* Links */
a {
    color: var(--ah-color-primary);
    text-decoration: none;
    transition: color var(--ah-transition-fast);
}

a:hover {
    color: var(--ah-color-primary-strong);
}

/* =========================================================
 * Layout container
 * ======================================================= */

main {
    max-width: var(--ah-container-width);
    margin: 2.5rem auto;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    background-color: var(--ah-color-bg-card);
    border-radius: var(--ah-radius-lg);
    box-shadow:
        var(--ah-shadow-strong),
        0 0 0 1px rgba(15, 23, 42, 0.30);
}

/* Narrower container variant (used on contact/404) */
main.container {
    max-width: 960px;
}

/* =========================================================
 * Buttons & interactive elements
 * ======================================================= */

button,
input[type="submit"],
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem 1.4rem;
    background: linear-gradient(135deg, var(--ah-color-primary), var(--ah-color-primary-strong));
    color: #f9fafb;
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.55);
    transition:
        filter var(--ah-transition-fast),
        transform var(--ah-transition-fast),
        box-shadow var(--ah-transition-fast);
}

button:hover,
input[type="submit"]:hover,
.btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

button:active,
input[type="submit"]:active,
.btn:active {
    transform: translateY(0);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.48);
}

/* =========================================================
 * Forms & inputs
 * ======================================================= */

input,
textarea {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--ah-color-border-subtle);
    border-radius: var(--ah-radius-sm);
    font-size: 0.95rem;
    color: var(--ah-color-text-main);
    background-color: var(--ah-color-bg-muted);
    outline: none;
    transition:
        border-color var(--ah-transition-fast),
        box-shadow var(--ah-transition-fast),
        background-color var(--ah-transition-fast);
}

input:focus,
textarea:focus {
    border-color: var(--ah-color-primary);
    background-color: #ffffff;
    box-shadow:
        var(--ah-shadow-outline),
        0 16px 35px rgba(15, 23, 42, 0.25);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 0.75rem;
}

/* =========================================================
 * Header / nav / footer (generic base)
 * Actual visual design is handled in header.css & navigation.css
 * ======================================================= */

header {
    text-align: center;
}

header .site-logo img {
    max-height: 42px;
    width: auto;
    display: block;
    margin: 0 auto;
}

header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Basic list reset for nav; detailed nav styling lives in navigation.css */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Footer: light, minimal base (footer.css will enhance) */
footer {
    margin-top: 2.5rem;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--ah-color-text-muted);
}

footer a {
    color: var(--ah-color-primary);
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* =========================================================
 * Entry styles used by content.php (posts & pages)
 * ======================================================= */

.entry-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.entry-title {
    font-weight: 700;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    letter-spacing: -0.02em;
    color: var(--ah-color-text-main);
    margin-bottom: 0.25rem;
}

.entry-header .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--ah-color-text-muted);
}

.entry-header .entry-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Post body */
.entry-content {
    font-size: 1rem;
    line-height: 1.9;
    color: #111827;
}

.entry-content p + p {
    margin-top: 0.85rem;
}

/* Image styling inside posts */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
    margin: 1.75rem auto;
}

/* Lists inside posts */
.entry-content ul,
.entry-content ol {
    margin: 1rem 0 1rem 1.25rem;
}

.entry-content li {
    margin-bottom: 0.35rem;
}

/* Footer under each post card */
.entry-footer {
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--ah-color-text-muted);
}

/* =========================================================
 * Card layout for lists: index, archive, search, category, tag
 * ======================================================= */

body.blog article,
body.archive article,
body.search article,
body.category article,
body.tag article {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: radial-gradient(circle at top left, #ffffff 0, #f9fafb 38%, #ffffff 100%);
    box-shadow: var(--ah-shadow-soft);
    transition:
        transform var(--ah-transition-fast),
        box-shadow var(--ah-transition-fast),
        border-color var(--ah-transition-fast);
}

body.blog article:hover,
body.archive article:hover,
body.search article:hover,
body.category article:hover,
body.tag article:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 26px 55px rgba(15, 23, 42, 0.30);
}

/* "No posts" placeholder */
.no-posts {
    padding: 2rem 1.5rem;
    border-radius: 14px;
    border: 1px dashed rgba(148, 163, 184, 0.8);
    background-color: rgba(15, 23, 42, 0.02);
    font-size: 1rem;
    text-align: center;
    color: var(--ah-color-text-muted);
}

/* =========================================================
 * Post navigation (prev / next)
 * ======================================================= */

.post-navigation {
    margin: 2.5rem 0 0;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background-color: #f9fafb;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    font-size: 0.95rem;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    text-align: center;
}

.post-navigation a {
    color: var(--ah-color-primary-strong);
    text-decoration: none;
    font-weight: 600;
}

.post-navigation a:hover {
    text-decoration: underline;
}

.post-navigation .nav-arrow {
    font-size: 1.1rem;
    color: var(--ah-color-text-muted);
    margin: 0 5px;
}

/* =========================================================
 * Comments section
 * ======================================================= */

#comments {
    margin: 2.25rem auto 0;
    padding: 1.25rem 1.5rem;
    background-color: #ffffff;
    border: 1px solid var(--ah-color-border-subtle);
    border-radius: var(--ah-radius-md);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

#comments h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ah-color-primary-strong);
    text-align: left;
    margin-bottom: 1rem;
    padding-bottom: 0.45rem;
    border-bottom: 2px solid var(--ah-color-primary-soft);
}

#comments ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#comments ul li {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--ah-radius-sm);
}

#comments ul li .comment-author {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

#comments ul li .comment-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.6rem;
}

#comments ul li .comment-text {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.6;
}

#comments ul li .reply {
    margin-top: 0.6rem;
}

#comments ul li .reply a {
    font-size: 0.85rem;
    color: var(--ah-color-primary-strong);
    font-weight: 600;
}

#comments ul li .reply a:hover {
    text-decoration: underline;
}

/* Comment form */
#comments form {
    margin-top: 1.25rem;
    padding: 1.25rem 1rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--ah-radius-sm);
}

#comments form label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    display: block;
    margin-bottom: 0.35rem;
}

#comments form input,
#comments form textarea {
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.9rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

#comments form input:focus,
#comments form textarea:focus {
    box-shadow:
        var(--ah-shadow-outline),
        0 4px 16px rgba(37, 99, 235, 0.35);
}

#comments form button {
    font-size: 0.95rem;
    padding: 0.6rem 1.4rem;
}

/* Comment form submit inside .comment-form */
.comment-form .form-submit input {
    background: linear-gradient(135deg, var(--ah-color-primary), var(--ah-color-primary-strong));
    color: #fff;
    border: none;
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition:
        background-color var(--ah-transition-fast),
        transform var(--ah-transition-fast),
        box-shadow var(--ah-transition-fast);
}

.comment-form .form-submit input:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.5);
}

.comment-form .form-submit input:active {
    transform: translateY(0);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.45);
}

/* =========================================================
 * Category page
 * ======================================================= */

.category-page {
    margin: 0 auto;
    padding: 2rem 1.75rem;
    background-color: #ffffff;
    border-radius: var(--ah-radius-lg);
    box-shadow: var(--ah-shadow-soft);
}

.category-header {
    text-align: center;
    margin-bottom: 2rem;
}

.category-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--ah-color-primary-strong);
    margin-bottom: 0.5rem;
}

.category-description {
    font-size: 1.05rem;
    color: var(--ah-color-text-muted);
}

.category-posts {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-top: 1rem;
}

.category-post {
    padding: 1.35rem 1.5rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--ah-radius-md);
    transition:
        transform var(--ah-transition-fast),
        box-shadow var(--ah-transition-fast),
        border-color var(--ah-transition-fast);
}

.category-post:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.post-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.post-title a {
    color: var(--ah-color-primary-strong);
}

.post-title a:hover {
    text-decoration: underline;
}

.post-meta {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

.post-excerpt {
    font-size: 0.98rem;
    color: #374151;
}

/* Reuse .no-posts from earlier, no duplication needed */

/* User IP display */
.user-ip {
    text-align: center;
    font-size: 1.1rem;
    color: var(--ah-color-text-main);
    margin-top: 2rem;
}

/* =========================================================
 * Contact page (page-contact.php)
 * ======================================================= */

.page-contact {
    padding: 1.5rem 0 0;
    color: var(--ah-color-text-main);
}

.page-contact h1 {
    text-align: center;
    font-size: clamp(1.9rem, 3vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    color: var(--ah-color-primary-strong);
}

.page-contact p {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--ah-color-text-muted);
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 1.5rem 1.75rem 1.75rem;
    border-radius: var(--ah-radius-lg);
    box-shadow: var(--ah-shadow-soft);
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #111827;
}

.contact-form input,
.contact-form textarea {
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.9rem;
    font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--ah-color-primary);
    box-shadow:
        var(--ah-shadow-outline),
        0 8px 24px rgba(26, 115, 232, 0.4);
}

.contact-form button {
    margin-top: 0.25rem;
}

/* Contact info section under form */
.contact-info {
    margin-top: 2.25rem;
    text-align: center;
}

.contact-info h2 {
    font-size: 1.6rem;
    color: var(--ah-color-primary-strong);
    margin-bottom: 0.75rem;
}

.contact-info p {
    font-size: 1rem;
    color: var(--ah-color-text-muted);
    margin-bottom: 0.35rem;
}

.contact-info a {
    color: var(--ah-color-primary-strong);
    font-weight: 600;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* =========================================================
 * 404 page
 * ======================================================= */

.error-404 {
    text-align: center;
    padding: 1.25rem 0 0.5rem;
}

.error-404 h1 {
    font-size: clamp(2rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.6rem;
    color: var(--ah-color-text-main);
}

.error-404 p {
    font-size: 0.95rem;
    color: var(--ah-color-text-muted);
    margin-bottom: 0.45rem;
}

.error-404 ul {
    list-style: none;
    padding: 0;
    margin: 0.9rem 0 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.error-404 li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--ah-color-border-strong);
    font-size: 0.88rem;
    color: var(--ah-color-text-main);
    background-color: #f9fafb;
    transition:
        background-color var(--ah-transition-fast),
        border-color var(--ah-transition-fast),
        color var(--ah-transition-fast),
        transform var(--ah-transition-fast);
}

.error-404 li a:hover {
    background-color: var(--ah-color-primary-strong);
    color: #f9fafb;
    border-color: var(--ah-color-primary-strong);
    transform: translateY(-1px);
}

/* =========================================================
 * Responsive tweaks
 * ======================================================= */

@media (max-width: 768px) {
    main {
        margin: 1.8rem auto;
        padding: 1.4rem 1.1rem;
        border-radius: 16px;
    }

    h1 {
        font-size: 2rem;
    }

    #comments {
        margin-top: 2rem;
        padding: 1.1rem 1rem;
    }

    .category-page {
        padding: 1.6rem 1.25rem;
    }

    .contact-form {
        padding: 1.25rem 1.2rem 1.4rem;
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    p {
        font-size: 1.02rem;
    }
}
