/* styles.css */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&family=Courier+Prime:wght@400;700&family=VT323&family=Major+Mono+Display&family=Orbitron:wght@400;900&display=swap');

:root {
    --bg: #000000;
    --fg: #00ff00;
    --accent: #00ff00;
    --dim: #008800;
    --glow: rgba(0, 255, 0, 0.5);
    --font-main: 'IBM Plex Mono', monospace;
    --font-display: 'IBM Plex Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-main);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

/* CRT Effects */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 9999;
    opacity: 0.4;
}

.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.05;
    z-index: 9998;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' /%3E%3C/svg%3E");
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    border-bottom: 2px solid var(--fg);
}

.logo-container {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    text-shadow: 0 0 10px var(--glow), 0 0 20px var(--glow);
    animation: flicker 3s infinite alternate;
}

.tagline {
    font-size: 0.9rem;
    color: var(--dim);
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    41% { opacity: 0.95; }
    42% { opacity: 1; }
    43% { opacity: 0.9; }
    45% { opacity: 1; }
}

.theme-dropdown {
    background: var(--bg);
    color: var(--fg);
    border: 2px solid var(--fg);
    padding: 0.5rem 1rem;
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 10px var(--glow);
    transition: all 0.3s ease;
}

.theme-dropdown:hover {
    box-shadow: 0 0 20px var(--glow);
}

.theme-dropdown option {
    background: var(--bg);
    color: var(--fg);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px var(--glow);
    position: relative;
}

.glitch {
    animation: glitch 5s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
}

.blink {
    font-size: 2rem;
    animation: blink 1s infinite;
    display: inline-block;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

section {
    margin: 6rem 0;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.4s; }
section:nth-child(4) { animation-delay: 0.6s; }

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--accent);
    text-shadow: 0 0 10px var(--glow);
}

p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-item {
    padding: 2rem;
    border: 2px solid var(--fg);
    background: rgba(0, 255, 0, 0.05);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.service-item:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 20px var(--glow);
    transform: translateY(-5px);
}

.prompt {
    color: var(--accent);
    margin-right: 0.5rem;
}

.cta {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2rem;
    border: 2px solid var(--fg);
    color: var(--fg);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px var(--glow);
}

.cta:hover {
    background: var(--fg);
    color: var(--bg);
    box-shadow: 0 0 30px var(--glow);
    text-shadow: none;
}

/* PROJECTS SECTION */
.projects {
    margin: 6rem 0;
}

.project-category {
    margin: 3rem 0;
}

.category-label {
    font-size: 1.2rem;
    color: var(--dim);
    margin-bottom: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.project-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.project-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--fg);
    color: var(--fg);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(0, 255, 0, 0.02);
    position: relative;
}

.project-link:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 15px var(--glow);
    transform: translateY(-2px);
}

.project-link .bracket {
    color: var(--accent);
    font-weight: 700;
}

.project-link.coming-soon {
    opacity: 0.6;
}

.project-link .tag {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--dim);
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-category {
    margin: 4rem 0;
}

.category-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-item {
    padding: 1.5rem;
    border: 2px solid var(--fg);
    background: rgba(0, 255, 0, 0.03);
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
    color: var(--fg);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: visible;
}

.project-item:hover {
    background: rgba(0, 255, 0, 0.08);
    box-shadow: 0 0 15px var(--glow);
    transform: translateY(-3px);
}

.project-icon {
    font-size: 1.5rem;
    display: block;
}

.project-name {
    font-weight: 600;
    word-break: break-word;
}

/* Folded corner ribbon - SO 63128872 (Temani Afif), CC BY-SA 4.0 */
.badge {
    --d: 6px;
    --w: 150px;
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(29.29%, -100%) rotate(45deg);
    transform-origin: bottom left;
    width: var(--w);
    padding: 0.35rem 0 calc(var(--d) + 0.35rem);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    white-space: nowrap;
    background:
        linear-gradient(
            rgba(0, 0, 0, 0.4) 0 0
        )
        bottom / 100% var(--d) no-repeat
        var(--c);
    clip-path: polygon(
        0 100%,
        0 calc(100% - var(--d)),
        50% calc(100% - var(--d) - var(--w) / 2),
        100% calc(100% - var(--d)),
        100% 100%,
        calc(100% - var(--d)) calc(100% - var(--d)),
        var(--d) calc(100% - var(--d))
    );
}

.badge--next-up {
    --c: rgba(100, 149, 237, 0.95);
    color: rgb(176, 225, 255);
}

.badge--coming-soon {
    --c: rgba(255, 193, 7, 0.95);
    color: rgba(30, 25, 0, 0.95);
}

.badge--exploring {
    --c: rgba(186, 104, 200, 0.95);
    color: rgba(255, 250, 255, 0.98);
}

.badge--brand-new {
    --c: rgba(76, 175, 80, 1);
    color: rgba(200, 230, 201, 1);
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 2px solid var(--fg);
    color: var(--dim);
}

/* STAMP THEME */
body.theme-stamp {
    --bg: #f5f0e8;
    --fg: #000000;
    --accent: #000000;
    --dim: #666666;
    --glow: rgba(0, 0, 0, 0.3);
    --font-main: 'Courier Prime', monospace;
}

body.theme-stamp .scanlines,
body.theme-stamp .grain {
    display: none;
}

body.theme-stamp {
    border: 20px dashed #000;
}

body.theme-stamp header {
    border-bottom: 3px solid #000;
}

body.theme-stamp .logo {
    font-family: 'Major Mono Display', monospace;
    text-shadow: none;
    animation: none;
}

body.theme-stamp .service-item {
    background: transparent;
    border: 3px solid #000;
}

body.theme-stamp .cta {
    border: 3px solid #000;
}

body.theme-stamp h3 {
    text-shadow: none;
}

body.theme-stamp .project-link {
    background: transparent;
    border: 3px solid #000;
}

/* VAPORWAVE THEME */
body.theme-vapor {
    --bg: linear-gradient(180deg, #ff00ff 0%, #00ffff 100%);
    --fg: #ffffff;
    --accent: #ff00ff;
    --dim: #ffccff;
    --glow: rgba(255, 0, 255, 0.6);
    --font-main: 'Orbitron', sans-serif;
}

body.theme-vapor {
    background: linear-gradient(180deg, #ff00ff 0%, #8b5cf6 50%, #00ffff 100%);
}

body.theme-vapor .scanlines {
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.05) 2px,
        transparent 2px,
        transparent 4px
    );
}

body.theme-vapor .logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-style: italic;
}

body.theme-vapor .service-item {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    backdrop-filter: blur(10px);
}

body.theme-vapor .project-link {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    backdrop-filter: blur(10px);
}

/* BLUEPRINT THEME */
body.theme-blueprint {
    --bg: #1e3a5f;
    --fg: #ffffff;
    --accent: #4fc3f7;
    --dim: #90caf9;
    --glow: rgba(79, 195, 247, 0.5);
    --font-main: 'IBM Plex Mono', monospace;
}

body.theme-blueprint {
    background:
        repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(255,255,255,0.03) 20px, rgba(255,255,255,0.03) 21px),
        repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(255,255,255,0.03) 20px, rgba(255,255,255,0.03) 21px),
        #1e3a5f;
}

body.theme-blueprint .scanlines {
    display: none;
}

body.theme-blueprint .logo {
    border: 3px solid #ffffff;
    padding: 0.5rem 1rem;
}

body.theme-blueprint .service-item {
    background: rgba(79, 195, 247, 0.1);
    border-color: #4fc3f7;
}

body.theme-blueprint .project-link {
    background: rgba(79, 195, 247, 0.05);
    border-color: #4fc3f7;
}

/* CONCRETE THEME */
body.theme-concrete {
    --bg: #8a8a8a;
    --fg: #2c2c2c;
    --accent: #4a4a4a;
    --dim: #5a5a5a;
    --glow: rgba(74, 74, 74, 0.3);
    --font-main: 'IBM Plex Mono', monospace;
}

body.theme-concrete .scanlines,
body.theme-concrete .grain {
    display: none;
}

body.theme-concrete {
    background: #8a8a8a;
}

body.theme-concrete .logo {
    text-shadow: 3px 3px 0 #5a5a5a;
    animation: none;
}

body.theme-concrete .service-item {
    background: rgba(0, 0, 0, 0.1);
}

body.theme-concrete h3 {
    text-shadow: 2px 2px 0 #5a5a5a;
}

/* MINIMAL THEME */
body.theme-minimal {
    --bg: #f5f5f0;
    --fg: #1a1a1a;
    --accent: #1a1a1a;
    --dim: #666666;
    --glow: rgba(0, 0, 0, 0);
    --font-main: 'IBM Plex Mono', monospace;
}

body.theme-minimal .scanlines,
body.theme-minimal .grain {
    display: none;
}

body.theme-minimal header {
    border-bottom: 1px solid #1a1a1a;
}

body.theme-minimal .logo {
    text-shadow: none;
    animation: none;
}

body.theme-minimal .service-item {
    background: transparent;
    border: 1px solid #1a1a1a;
}

body.theme-minimal .cta {
    border: 1px solid #1a1a1a;
}

body.theme-minimal h3 {
    text-shadow: none;
}

body.theme-minimal .theme-dropdown {
    box-shadow: none;
}

body.theme-minimal .theme-dropdown:hover {
    box-shadow: none;
}

body.theme-minimal .project-link {
    background: transparent;
    border: 1px solid #1a1a1a;
}

/* ZINE THEME */
body.theme-zine {
    --bg: #fff5f5;
    --fg: #000000;
    --accent: #ff0066;
    --dim: #666666;
    --glow: rgba(255, 0, 102, 0.3);
    --font-main: 'Courier Prime', monospace;
}

body.theme-zine .scanlines,
body.theme-zine .grain {
    display: none;
}

body.theme-zine {
    background: #fff5f5;
    border: 15px dashed #000;
}

body.theme-zine .logo {
    font-family: 'Major Mono Display', monospace;
    transform: rotate(-2deg);
    text-shadow: 3px 3px 0 #ff0066;
    animation: none;
}

body.theme-zine header {
    border-bottom: 3px solid #000;
}

body.theme-zine .service-item {
    background: #ffe0e0;
    border: 3px solid #000;
    transform: rotate(0.5deg);
}

body.theme-zine .service-item:nth-child(even) {
    transform: rotate(-0.5deg);
}

body.theme-zine h3 {
    text-shadow: 2px 2px 0 #ff0066;
}

body.theme-zine .project-link {
    background: #ffe0e0;
    border: 3px solid #000;
    transform: rotate(0deg);
}

body.theme-zine .project-link:nth-child(odd) {
    transform: rotate(1deg);
}

body.theme-zine .project-link:nth-child(even) {
    transform: rotate(-1deg);
}

body.theme-zine .project-link:hover {
    transform: rotate(0deg) translateY(-2px);
}

/* ISOMETRIC THEME */
body.theme-isometric {
    --bg: #1a1a2e;
    --fg: #b8a0ff;
    --accent: #00ffcc;
    --dim: #8b7ab8;
    --glow: rgba(0, 255, 204, 0.5);
    --font-main: 'Orbitron', sans-serif;
}

body.theme-isometric {
    background: #1a1a2e;
}

body.theme-isometric .logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    transform: skewY(-5deg);
    text-shadow:
        2px 2px 0 #00ffcc,
        4px 4px 0 rgba(0, 255, 204, 0.5);
}

body.theme-isometric .service-item {
    background: rgba(184, 160, 255, 0.1);
    border-color: #b8a0ff;
    transform: perspective(500px) rotateX(5deg);
    transition: all 0.3s ease;
}

body.theme-isometric .service-item:hover {
    transform: perspective(500px) rotateX(0deg) translateY(-10px);
}

body.theme-isometric .project-link {
    background: rgba(184, 160, 255, 0.1);
    border-color: #b8a0ff;
}

body.theme-isometric .project-link:hover {
    background: rgba(184, 160, 255, 0.2);
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .logo {
        font-size: 2rem !important;
    }

    .hero h2 {
        font-size: 2rem !important;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    body.theme-stamp,
    body.theme-zine {
        border-width: 10px;
    }
}

/* Theme-specific project styles */
body.theme-stamp .project-item {
    background: transparent;
    border: 3px solid #000;
}

body.theme-vapor .project-item {
    background: rgba(255, 255, 255, 0.08);
    border-color: #ffffff;
    backdrop-filter: blur(5px);
}

body.theme-blueprint .project-item {
    background: rgba(79, 195, 247, 0.08);
    border-color: #4fc3f7;
}

body.theme-concrete .project-item {
    background: rgba(0, 0, 0, 0.08);
}

body.theme-minimal .project-item {
    background: transparent;
    border: 1px solid #1a1a1a;
}

body.theme-zine .project-item {
    background: #ffe0e0;
    border: 3px solid #000;
}

body.theme-isometric .project-item {
    background: rgba(184, 160, 255, 0.08);
    border-color: #b8a0ff;
    transform: perspective(500px) rotateX(3deg);
}

body.theme-isometric .project-item:hover {
    transform: perspective(500px) rotateX(0deg) translateY(-5px);
}
