/*
Theme Name: AI-Portfolio
Author: Antigravity
Version: 1.1.0
Description: A custom WordPress theme based on a neon-styled AI creator portfolio design.
*/

/* =========================================
   1. Variables & Config
   ========================================= */
:root {
    /* Colors */
    --primary: #8a2ce2;
    --primary-rgb: 138, 44, 226;
    --bg-light: #f3f4f6;
    --bg-dark: #13111C;
    --card-bg-light: #ffffff;
    --card-bg-dark: #1f2937;

    /* Text Colors */
    --text-main-light: #111827;
    --text-main-dark: #ffffff;
    --text-muted-light: #4b5563;
    --text-muted-dark: #9ca3af;

    /* Shadows */
    --shadow-neon: 0 0 10px rgba(138, 44, 226, 0.4), 0 0 20px rgba(138, 44, 226, 0.2);
    --shadow-neon-hover: 0 0 15px rgba(138, 44, 226, 0.6), 0 0 30px rgba(138, 44, 226, 0.4), 0 0 45px rgba(138, 44, 226, 0.2);
    --shadow-neon-button: 0 0 12px rgba(138, 44, 226, 0.5), 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);

    /* Fonts */
    --font-main: 'Inter', sans-serif;
}

/* =========================================
   2. Base & Reset
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-main-light);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Dark Mode Base */
.dark body {
    background-color: var(--bg-dark);
    color: var(--text-main-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary);
}

/* =========================================
   3. Utilities (Concise & Robust)
   ========================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Text */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary);
}

.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 900;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

/* Flex & Grid */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

/* Sizing & Spacing */
.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.max-w-4xl {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

/* Display & Position */
.block {
    display: block;
}

.hidden {
    display: none;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-10 {
    z-index: 10;
}

.overflow-hidden {
    overflow: hidden;
}

/* Media Queries for Utilities */
@media (min-width: 768px) {
    .md\:block {
        display: block;
    }

    .md\:hidden {
        display: none;
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:text-left {
        text-align: left;
    }

    .md\:p-12 {
        padding: 3rem;
    }
}

/* =========================================
   4. Components
   ========================================= */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    line-height: 1;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-neon-button);
}

.btn-primary:hover {
    box-shadow: var(--shadow-neon-hover);
    transform: translateY(-2px);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid rgba(138, 44, 226, 0.3);
    color: var(--text-main-light);
}

.dark .btn-outline {
    color: var(--text-main-dark);
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline:hover {
    border-color: var(--primary);
    background-color: rgba(138, 44, 226, 0.05);
    color: var(--primary);
}

/* Cards (Generic) */
.card {
    background-color: var(--card-bg-light);
    border: 1px solid rgba(138, 44, 226, 0.2);
    border-radius: 1rem;
}

.dark .card {
    background-color: var(--card-bg-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Post Cards (Archive) */
.post-card {
    background-color: var(--card-bg-light);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(138, 44, 226, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.dark .post-card {
    background-color: var(--card-bg-dark);
}

.post-card:hover {
    box-shadow: var(--shadow-neon-hover);
    transform: translateY(-4px);
}

.post-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    text-indent: -9999px;
}

.post-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #e5e7eb;
    position: relative;
    overflow: hidden;
}

.post-thumb-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}

.post-card:hover .post-thumb-img {
    transform: scale(1.1);
}

.post-content {
    padding: 1.25rem;
}

/* Nav Cards (Previous/Next) */
.nav-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background-color: var(--card-bg-light);
    border: 1px solid rgba(138, 44, 226, 0.2);
    border-radius: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.dark .nav-card {
    background-color: var(--card-bg-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-card:hover {
    border-color: rgba(138, 44, 226, 0.5);
    box-shadow: var(--shadow-neon);
}

.nav-card-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    transition: background 0.3s;
}

.nav-card-prev .nav-card-bar {
    left: 0;
    background-color: rgba(138, 44, 226, 0.2);
}

.nav-card-next .nav-card-bar {
    right: 0;
    background-color: rgba(138, 44, 226, 0.2);
}

.nav-card:hover .nav-card-bar {
    background-color: var(--primary);
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted-light);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dark .nav-label {
    color: var(--text-muted-dark);
}

.nav-card:hover .nav-label {
    color: var(--primary);
}

.nav-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main-light);
    line-height: 1.4;
}

.dark .nav-title {
    color: var(--text-main-dark);
}

.nav-card:hover .nav-title {
    color: var(--primary);
}


/* Badges */
.badge {
    background-color: rgba(138, 44, 226, 0.1);
    color: var(--primary);
    border: 1px solid rgba(138, 44, 226, 0.2);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
}

/* =========================================
   5. Sections & Layouts
   ========================================= */

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(138, 44, 226, 0.2);
}

.dark .site-header {
    background-color: rgba(19, 17, 28, 0.7);
}

.header-inner {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-box {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background-color: rgba(138, 44, 226, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid rgba(138, 44, 226, 0.3);
    box-shadow: 0 0 10px rgba(138, 44, 226, 0.3);
    transition: all 0.3s;
}

.logo-box:hover {
    box-shadow: var(--shadow-neon);
}

/* Navigation Menu */
.main-nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.main-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 2px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s;
}

.main-nav a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-light);
        padding: 1rem;
        border-bottom: 1px solid var(--primary);
    }

    .dark .main-nav.active {
        background: var(--bg-dark);
    }

    .main-nav.active ul {
        flex-direction: column;
    }
}

/* Hero Section (Robust Grid) */
.hero-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (min-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr 1fr;
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(to right, var(--text-main-light), var(--primary), var(--text-main-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: gradient 5s linear infinite;
    margin-bottom: 1.5rem;
}

.dark .hero-title {
    background: linear-gradient(to right, #fff, var(--primary), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Nav Grid */
.nav-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Post Grid */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Single Post Content */
.post-thumb-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #e5e7eb;
    /* Light Gray */
    border-radius: 1rem 1rem 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .post-thumb-container {
    background-color: #111827;
    /* Very Dark Gray */
}

.post-thumb-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.entry-content {
    line-height: 2;
    color: var(--text-muted-light);
}

.dark .entry-content {
    color: var(--text-muted-dark);
}

.entry-content p {
    margin-bottom: 2rem;
}

.entry-content h2 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--primary);
    margin: 4rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(138, 44, 226, 0.3);
}

.entry-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main-light);
    margin: 3rem 0 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary);
}

.dark .entry-content h3 {
    color: var(--text-main-dark);
}

/* Unified Hover Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-neon-hover);
}

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    background: rgba(138, 44, 226, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 1rem 1rem 0;
    font-style: italic;
}

/* Contact Form 7 */
.wpcf7-form {
    background: var(--card-bg-light);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(138, 44, 226, 0.2);
    box-shadow: var(--shadow-sm);
}

.dark .wpcf7-form {
    background: var(--card-bg-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

.wpcf7 label {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.wpcf7-text,
.wpcf7-textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background: #fff;
    margin-bottom: 1rem;
}

.dark .wpcf7-text,
.dark .wpcf7-textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.wpcf7-submit {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.wpcf7-submit:hover {
    box-shadow: var(--shadow-neon-hover);
    transform: translateY(-2px);
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(138, 44, 226, 0.2);
    padding: 4rem 0;
    background-color: var(--card-bg-light);
    margin-top: auto;
}

.dark .site-footer {
    background-color: var(--bg-dark);
}

/* Note CTA */
.note-cta {
    background-color: var(--primary);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    border-radius: 1rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-neon-button);
}