/* ==========================================
   NEONWAVE - Cyberpunk Hugo Theme
   ========================================== */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    position: relative;
    overflow-x: hidden;
}

/* === GRID BACKGROUND === */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.03;
    background-image:
        linear-gradient(var(--neon-cyan) 1px, transparent 1px),
        linear-gradient(90deg, var(--neon-cyan) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: -1px -1px;
    pointer-events: none;
}

/* === LAYOUT === */
.site-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* === HEADER === */
.site-header {
    padding: 3rem 0 2rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 3rem;
    position: relative;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), var(--neon-purple));
    box-shadow: 0 0 10px var(--neon-cyan);
}

.header-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    flex: 1;
    min-width: 200px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--heading-color);
}

.brand-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
    transition: all 0.3s ease;
}

.brand-image:hover {
    box-shadow: 0 0 25px var(--neon-cyan);
    transform: scale(1.05);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brand-description {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--neon-cyan);
}

.nav-link:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.social-link:hover {
    color: var(--neon-magenta);
    filter: drop-shadow(0 0 8px var(--neon-magenta));
}

/* === MAIN CONTENT === */
.main-content {
    min-height: 60vh;
    padding-bottom: 4rem;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
}
h3 { font-size: 1.5rem; margin-top: 2rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-shadow: 0 0 10px var(--link-color);
}

p {
    margin-bottom: 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

code {
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
    font-size: 0.875em;
    background: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    border: 1px solid var(--border-color);
}

pre {
    background: var(--code-bg);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--neon-cyan);
}

pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: 0.875rem;
}

blockquote {
    border-left: 3px solid var(--neon-purple);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* === HOME PAGE === */
.home-page {
    margin-top: 2rem;
}

.section-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--neon-magenta);
    box-shadow: 0 0 10px var(--neon-magenta);
}

.recent-posts,
.recent-projects {
    margin-bottom: 4rem;
}

.post-list,
.project-list {
    margin-bottom: 1.5rem;
}

.post-item,
.project-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-item:last-child,
.project-item:last-child {
    border-bottom: none;
}

.post-item-title,
.project-item-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.post-item-title a,
.project-item-title a {
    color: var(--heading-color);
}

.post-item-title a:hover,
.project-item-title a:hover {
    color: var(--neon-cyan);
}

.post-item-date {
    display: block;
    font-size: 0.875rem;
    color: var(--date-color);
    margin-bottom: 0.75rem;
}

.post-item-summary,
.project-item-summary {
    color: var(--text-secondary);
    line-height: 1.6;
}

.view-all-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    background: var(--neon-cyan);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--neon-cyan);
    text-shadow: none;
}

/* === SINGLE PAGE === */
.single-page,
.about-page {
    max-width: 100%;
}

.post-info {
    margin-bottom: 2.5rem;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.post-date {
    color: var(--date-color);
}

.meta-label {
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.post-series a {
    color: var(--neon-purple);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tag:hover {
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

.featured-image {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.content {
    margin-top: 2rem;
}

.post-navigation {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.nav-prev,
.nav-next {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-next {
    text-align: right;
    align-items: flex-end;
}

.nav-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link {
    color: var(--link-color);
    font-weight: 600;
}

/* === LIST PAGE === */
.list-page {
    margin-top: 2rem;
}

.list-header {
    margin-bottom: 3rem;
}

.list-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.year-group {
    margin-bottom: 3rem;
}

.year-heading {
    font-size: 1.5rem;
    color: var(--neon-cyan);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.list-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--neon-cyan);
    padding-left: calc(1rem - 3px);
}

.list-item-date {
    color: var(--date-color);
    font-size: 0.875rem;
}

.list-item-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.list-item-title a {
    color: var(--heading-color);
}

.list-item-title a:hover {
    color: var(--neon-cyan);
}

.list-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.list-item-tags .tag {
    font-size: 0.75rem;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.pagination .active {
    background: var(--neon-cyan);
    color: var(--bg-primary);
    border-color: var(--neon-cyan);
}

/* === ERROR PAGE === */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-code {
    font-size: 6rem;
    color: var(--neon-magenta);
    text-shadow: 0 0 30px var(--neon-magenta);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.home-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.home-link:hover {
    background: var(--neon-cyan);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--neon-cyan);
}

/* === FOOTER === */
.site-footer {
    margin-top: 6rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .site-wrapper {
        padding: 0 1.5rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .post-title {
        font-size: 2rem;
    }

    .list-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .list-item-date {
        font-size: 0.8rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    .error-code {
        font-size: 4rem;
    }

    .grid-bg {
        background-size: 30px 30px;
    }
}

@media (max-width: 480px) {
    .site-wrapper {
        padding: 0 1rem;
    }

    .site-header {
        padding: 2rem 0 1.5rem;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
