/* WIREFRAME THEME - Blueprint/schematic aesthetic with technical diagrams */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Consolas', 'Monaco', monospace;
    line-height: 1.6;
    color: #0af;
    background: #001122;
    position: relative;
    overflow-x: hidden;
}

/* Blueprint grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 170, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 170, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

/* Technical corner markers */
body::after {
    content: '';
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px solid rgba(0, 170, 255, 0.3);
    pointer-events: none;
    z-index: 0;
}

a {
    color: #0af;
    text-decoration: none;
    border-bottom: 1px dashed #0af;
    transition: all 0.3s ease;
}

a:hover {
    color: #fff;
    border-bottom: 1px solid #fff;
    text-shadow: 0 0 5px #0af;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 10;
}

.hidden {
    display: none !important;
}

/* Header - Technical Schematic Layout */
header {
    background: rgba(0, 17, 34, 0.95);
    border: 2px solid #0af;
    border-left: none;
    border-right: none;
    padding: 40px 0;
    margin: 40px 0 60px;
    position: relative;
    clip-path: polygon(0 0,
            100% 0,
            100% calc(100% - 20px),
            calc(100% - 20px) 100%,
            0 100%);
}

/* Technical annotation boxes */
header::before {
    content: 'INIT_0x001A';
    position: absolute;
    top: -12px;
    left: 40px;
    background: #001122;
    padding: 5px 15px;
    font-size: 0.8em;
    color: #0af;
    border: 1px solid #0af;
    font-family: 'Courier New', monospace;
}

header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 40px;
    width: 40px;
    height: 40px;
    border: 2px solid #0af;
    border-left: none;
    border-top: none;
}

.header-content {
    text-align: left;
    margin-bottom: 35px;
    position: relative;
}

/* Technical measurement lines */
.header-content::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -30px;
    width: 20px;
    height: 1px;
    background: #0af;
}

.header-content::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -30px;
    width: 1px;
    height: 60px;
    background: #0af;
    transform: translateY(-50%);
}

.site-title {
    font-size: 4em;
    font-weight: 300;
    margin-bottom: 10px;
    letter-spacing: 8px;
    position: relative;
    display: inline-block;
}

.site-title::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    width: 20px;
    height: 2px;
    background: #0af;
}

.site-title a {
    color: #0af;
    border: none;
    text-shadow: 0 0 20px rgba(0, 170, 255, 0.5);
    font-weight: 700;
}

.site-title a:hover {
    text-decoration: none;
    color: #fff;
    text-shadow: 0 0 30px rgba(0, 170, 255, 0.8);
}

.site-subtitle {
    font-size: 1.2em;
    color: #0af;
    opacity: 0.7;
    letter-spacing: 4px;
    font-weight: 300;
    text-transform: uppercase;
}

/* Theme Selector */
.theme-selector {
    position: relative;
    margin-top: 20px;
}

.theme-toggle {
    background: rgba(0, 170, 255, 0.1);
    border: 2px solid #0af;
    color: #0af;
    padding: 10px 20px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.3s;
    clip-path: polygon(0 0,
            calc(100% - 8px) 0,
            100% 8px,
            100% 100%,
            0 100%);
}

.theme-toggle:hover {
    background: rgba(0, 170, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.3);
    transform: translateY(-2px);
}

.theme-toggle:active {
    transform: translateY(0);
}

.main-nav {
    border-top: 1px solid #0af;
    padding-top: 25px;
    position: relative;
}

.main-nav::before {
    content: 'NAV_MODULE';
    position: absolute;
    top: -10px;
    left: 0;
    background: #001122;
    padding: 2px 10px;
    font-size: 0.7em;
    color: #0af;
    border: 1px solid #0af;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

.main-nav a {
    color: #0af;
    font-weight: 400;
    padding: 12px 25px;
    transition: all 0.3s;
    border: 1px solid #0af;
    position: relative;
    background: rgba(0, 170, 255, 0.03);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9em;
    clip-path: polygon(0 0,
            calc(100% - 10px) 0,
            100% 10px,
            100% 100%,
            0 100%);
}

.main-nav a::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid #0af;
    opacity: 0;
    transition: opacity 0.3s;
}

.main-nav a:hover::before,
.main-nav a.active::before {
    opacity: 0.5;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(0, 170, 255, 0.15);
    box-shadow:
        0 0 20px rgba(0, 170, 255, 0.3),
        inset 0 0 20px rgba(0, 170, 255, 0.1);
    color: #fff;
}

/* About Section - Schematic Diagram Layout */
.about-section {
    background: rgba(0, 17, 34, 0.95);
    padding: 50px;
    margin-bottom: 60px;
    border: 2px solid #0af;
    box-shadow: 0 0 40px rgba(0, 170, 255, 0.2);
    position: relative;
    clip-path: polygon(0 0,
            100% 0,
            100% calc(100% - 30px),
            calc(100% - 30px) 100%,
            0 100%);
}

.about-section::before {
    content: 'USER_DATA_0x7F3A';
    position: absolute;
    top: -12px;
    left: 50px;
    background: #001122;
    padding: 5px 20px;
    font-size: 0.85em;
    color: #0af;
    border: 1px solid #0af;
}

.about-section::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50px;
    width: 50px;
    height: 50px;
    border: 2px solid #0af;
    border-left: none;
    border-top: none;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.about-header {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.about-photo {
    position: relative;
    flex-shrink: 0;
}

/* Technical frame around photo */
.about-photo::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid #0af;
    pointer-events: none;
}

.about-photo::after {
    content: 'IMG_ID:001';
    position: absolute;
    bottom: -25px;
    left: 0;
    background: #001122;
    padding: 3px 10px;
    font-size: 0.7em;
    color: #0af;
    border: 1px solid #0af;
}

.about-photo img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border: 3px solid #0af;
    filter: grayscale(100%) contrast(130%) brightness(120%);
    box-shadow: 0 0 30px rgba(0, 170, 255, 0.3);
    clip-path: polygon(0 0,
            calc(100% - 20px) 0,
            100% 20px,
            100% 100%,
            0 100%);
}

.about-intro {
    flex: 1;
    min-width: 300px;
}

.about-intro h1 {
    font-size: 3em;
    margin-bottom: 15px;
    color: #0af;
    text-shadow: 0 0 15px rgba(0, 170, 255, 0.5);
    font-weight: 300;
    letter-spacing: 4px;
}

.about-intro p {
    font-size: 1.3em;
    color: #0af;
    opacity: 0.8;
    line-height: 1.7;
    letter-spacing: 1px;
}

.about-header-image {
    margin: 30px 0 40px;
    text-align: center;
}

.about-header-image a {
    display: inline-block;
    transition: all 0.3s;
}

.about-header-image a:hover {
    transform: scale(1.02);
}

.about-header-image img {
    max-width: 100%;
    height: auto;
    border: 3px solid #0af;
    box-shadow: 0 0 30px rgba(0, 170, 255, 0.3);
    clip-path: polygon(0 0,
            calc(100% - 20px) 0,
            100% 20px,
            100% 100%,
            0 100%);
    transition: all 0.3s;
}

.about-header-image a:hover img {
    box-shadow: 0 0 50px rgba(0, 170, 255, 0.6);
    border-color: #fff;
}

.about-body p {
    margin-bottom: 20px;
    line-height: 1.9;
    color: #0af;
    font-size: 1.1em;
    opacity: 0.9;
}

.about-body a {
    color: #fff;
    font-weight: 600;
}

/* Posts Grid - Technical Blueprint Cards */
#posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.loading {
    text-align: center;
    padding: 80px 20px;
    color: #0af;
    font-size: 1.5em;
    text-shadow: 0 0 10px #0af;
}

.post-card {
    background: rgba(0, 17, 34, 0.95);
    border: 2px solid #0af;
    overflow: hidden;
    transition: all 0.4s;
    cursor: pointer;
    position: relative;
    clip-path: polygon(0 0,
            100% 0,
            100% calc(100% - 25px),
            calc(100% - 25px) 100%,
            0 100%);
}

/* Technical corner marker */
.post-card::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    border: 1px solid #0af;
    border-right: none;
    border-bottom: none;
    z-index: 10;
    transition: all 0.4s;
}

.post-card::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: 2px solid #0af;
    border-left: none;
    border-top: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.4s;
}

.post-card:hover::after {
    opacity: 1;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 15px 50px rgba(0, 170, 255, 0.4),
        0 0 30px rgba(0, 170, 255, 0.3);
    border-color: #fff;
}

.post-card:hover::before {
    width: 50px;
    height: 50px;
    border-width: 2px;
}

.post-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #000;
    position: relative;
    border-bottom: 2px solid #0af;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(120%) brightness(115%);
    transition: all 0.5s;
    mix-blend-mode: screen;
    opacity: 0.9;
}

.post-card:hover .post-image img {
    filter: grayscale(0%) contrast(110%);
    transform: scale(1.05);
    opacity: 1;
}

.post-video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%) contrast(120%);
    mix-blend-mode: screen;
    opacity: 0.9;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: transparent;
    border: 3px solid #0af;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0af;
    font-size: 35px;
    padding-left: 6px;
    pointer-events: none;
    transition: all 0.4s;
    clip-path: polygon(0 0,
            calc(100% - 15px) 0,
            100% 15px,
            100% 100%,
            0 100%);
}

.post-card:hover .video-play-icon {
    background: rgba(0, 170, 255, 0.2);
    border-width: 4px;
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow:
        0 0 30px rgba(0, 170, 255, 0.6),
        inset 0 0 20px rgba(0, 170, 255, 0.2);
}

.post-content {
    padding: 30px;
    position: relative;
}

.post-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: #0af;
    text-shadow: 0 0 8px rgba(0, 170, 255, 0.3);
    letter-spacing: 1px;
}

.post-excerpt {
    color: #0af;
    margin-bottom: 20px;
    line-height: 1.8;
    opacity: 0.8;
    font-size: 1.05em;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9em;
    border-top: 1px solid #0af;
    padding-top: 15px;
}

.post-date {
    color: #0af;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: transparent;
    color: #0af;
    padding: 4px 12px;
    border: 1px solid #0af;
    font-size: 0.9em;
    letter-spacing: 1px;
}

/* Single Post */
#single-post {
    max-width: 1200px;
    margin: 0 auto 80px;
}

.back-button {
    display: inline-block;
    margin-bottom: 40px;
    color: #0af;
    font-size: 1.2em;
    padding: 12px 30px;
    border: 2px solid #0af;
    transition: all 0.3s;
    background: rgba(0, 170, 255, 0.05);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.back-button:hover {
    background: rgba(0, 170, 255, 0.15);
    box-shadow: 0 0 25px rgba(0, 170, 255, 0.4);
    transform: translateX(-5px);
    color: #fff;
}

#single-post article {
    background: rgba(0, 17, 34, 0.95);
    padding: 60px;
    border: 2px solid #0af;
    box-shadow: 0 0 50px rgba(0, 170, 255, 0.3);
    position: relative;
    clip-path: polygon(0 0,
            100% 0,
            100% calc(100% - 40px),
            calc(100% - 40px) 100%,
            0 100%);
}

#single-post h1 {
    font-size: 2.8em;
    margin-bottom: 25px;
    color: #0af;
    text-shadow: 0 0 15px rgba(0, 170, 255, 0.5);
    line-height: 1.3;
    font-weight: 300;
    letter-spacing: 3px;
}

.single-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 45px;
    padding-bottom: 25px;
    border-bottom: 2px solid #0af;
    flex-wrap: wrap;
    gap: 15px;
}

.single-post-body {
    font-size: 1.15em;
    line-height: 1.9;
    margin-bottom: 45px;
    color: #0af;
}

.single-post-body p {
    margin-bottom: 22px;
    opacity: 0.9;
}

.single-post-body h2 {
    color: #0af;
    margin: 40px 0 20px;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
    font-size: 2em;
    font-weight: 300;
    letter-spacing: 2px;
}

.single-post-body ul,
.single-post-body ol {
    margin: 25px 0 25px 40px;
}

.single-post-body li {
    margin-bottom: 12px;
}

.single-post-body a {
    color: #fff;
    font-weight: 600;
}

.single-post-videos {
    margin: 45px 0;
}

.single-post-videos video {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-bottom: 30px;
    background-color: #000;
    border: 3px solid #0af;
    box-shadow: 0 0 40px rgba(0, 170, 255, 0.4);
}

.single-post-embed {
    margin: 45px 0;
}

.embed-wrapper {
    position: relative;
    padding-bottom: 75%;
    /* 4:3 aspect ratio for calculator/app */
    height: 0;
    overflow: hidden;
    background: #000;
    border: 3px solid #0af;
    box-shadow: 0 0 40px rgba(0, 170, 255, 0.4);
    clip-path: polygon(0 0,
            calc(100% - 20px) 0,
            100% 20px,
            100% 100%,
            0 100%);
}

.embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.single-post-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin: 45px 0;
}

.single-post-images img {
    width: 100%;
    border: 2px solid #0af;
    filter: contrast(110%) saturate(120%);
    transition: all 0.4s;
    clip-path: polygon(0 0,
            calc(100% - 15px) 0,
            100% 15px,
            100% 100%,
            0 100%);
}

.single-post-images img:hover {
    filter: contrast(120%) saturate(150%);
    box-shadow: 0 0 40px rgba(0, 170, 255, 0.5);
    transform: scale(1.03);
}

/* Footer */
footer {
    text-align: center;
    padding: 50px 20px;
    color: #0af;
    border-top: 2px solid #0af;
    font-size: 1.1em;
    background: rgba(0, 17, 34, 0.95);
    box-shadow: 0 -10px 30px rgba(0, 170, 255, 0.2);
    letter-spacing: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .site-title {
        font-size: 2.5em;
        letter-spacing: 4px;
    }

    .main-nav ul {
        gap: 8px;
    }

    .main-nav a {
        padding: 10px 15px;
        font-size: 0.85em;
    }

    #posts {
        grid-template-columns: 1fr;
    }

    .about-section {
        padding: 35px 25px;
    }

    .about-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-photo img {
        width: 220px;
        height: 220px;
    }

    #single-post article {
        padding: 35px 25px;
    }

    #single-post h1 {
        font-size: 2em;
    }

    .embed-wrapper {
        padding-bottom: 100vh;
        /* Full viewport height on mobile for better usability */
        min-height: 600px;
        /* Minimum height to ensure usability */
    }
}