/* ============================================================
   CODEZILLER — Design System
   Dark & Bold · Laravel / Livewire · Innsbruck
   ============================================================ */

/* ============================================================
   LAYER 1 — DESIGN TOKENS
   ============================================================ */
:root {
    /* Colors */
    --cz-bg:           #0a0a0f;
    --cz-bg-2:         #111118;
    --cz-bg-3:         #1a1a26;
    --cz-border:       rgba(255, 255, 255, 0.08);
    --cz-border-hover: rgba(255, 255, 255, 0.16);
    --cz-text:         #e8e8f0;
    --cz-text-muted:   #8888aa;
    --cz-text-faint:   #55556a;
    --cz-accent:       #00d46a;
    --cz-accent-dim:   rgba(0, 212, 106, 0.12);
    --cz-accent-glow:  rgba(0, 212, 106, 0.2);
    --cz-white:        #ffffff;

    /* Typography */
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --container:   min(1200px, 92vw);
    --section-gap: clamp(5rem, 10vw, 9rem);

    /* Radii */
    --radius:    6px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Motion */
    --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
    --duration:  260ms;
}

/* ============================================================
   LAYER 2 — RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--cz-bg);
    color: var(--cz-text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.1;
    font-weight: 700;
}

/* ============================================================
   LAYER 3 — UTILITIES
   ============================================================ */
.cz-container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.cz-accent {
    color: var(--cz-accent);
}

/* Monospace pill badge */
.cz-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--cz-accent);
    border: 1px solid rgba(0, 212, 106, 0.35);
    border-radius: 2em;
    padding: 0.25em 0.85em;
    letter-spacing: 0.02em;
    background: var(--cz-accent-dim);
}

/* Section label — small all-caps mono above titles */
.cz-section-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cz-accent);
    margin-bottom: 0.75rem;
}

.cz-section-title {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--cz-white);
}

.cz-section-intro {
    font-size: 1.05rem;
    color: var(--cz-text-muted);
    max-width: 58ch;
    line-height: 1.7;
    margin-bottom: 3rem;
}

/* ============================================================
   LAYER 4 — BUTTONS
   ============================================================ */
.cz-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: var(--radius);
    padding: 0.7rem 1.5rem;
    transition: transform var(--duration) var(--ease-out),
                box-shadow var(--duration) var(--ease-out),
                background var(--duration),
                border-color var(--duration),
                color var(--duration);
    white-space: nowrap;
}

.cz-btn--primary {
    background: var(--cz-accent);
    color: #000;
    border: 1px solid var(--cz-accent);
}
.cz-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--cz-accent-glow);
}
.cz-btn--primary:active {
    transform: translateY(0);
}

.cz-btn--ghost {
    background: transparent;
    color: var(--cz-text);
    border: 1px solid var(--cz-border-hover);
}
.cz-btn--ghost:hover {
    border-color: var(--cz-accent);
    color: var(--cz-accent);
}

.cz-btn--sm {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

.cz-btn--full {
    width: 100%;
    justify-content: center;
}

/* ============================================================
   LAYER 5 — NAVIGATION
   ============================================================ */
.cz-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(10, 10, 15, 0.82);
    border-bottom: 1px solid var(--cz-border);
    transition: box-shadow var(--duration), background var(--duration);
}

.cz-nav--scrolled {
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
    background: rgba(10, 10, 15, 0.96);
}

.cz-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.cz-nav__logo {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: opacity var(--duration);
}
.cz-nav__logo:hover {
    opacity: 0.8;
}

.cz-logo-word   { color: var(--cz-text); }
.cz-logo-accent { color: var(--cz-accent); }

.cz-nav__links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cz-nav__link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--cz-text-muted);
    transition: color var(--duration);
    position: relative;
}
.cz-nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--cz-accent);
    transform: scaleX(0);
    transition: transform var(--duration) var(--ease-out);
}
.cz-nav__link:hover,
.cz-nav__link--active {
    color: var(--cz-white);
}
.cz-nav__link--active::after {
    transform: scaleX(1);
}

/* Burger button */
.cz-nav__burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    padding: 0;
}
.cz-nav__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--cz-text);
    border-radius: 2px;
    transition: transform var(--duration) var(--ease-out),
                opacity var(--duration);
}

/* Burger open state */
.cz-nav--open .cz-nav__burger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.cz-nav--open .cz-nav__burger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.cz-nav--open .cz-nav__burger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ============================================================
   LAYER 6 — HERO
   ============================================================ */
.cz-hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Subtle dot grid background */
.cz-hero__bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 40%, transparent 100%);
    pointer-events: none;
}

.cz-hero__content {
    position: relative;
    padding-top: 80px;
    padding-bottom: 4rem;
}

.cz-hero__eyebrow {
    margin-bottom: 1.5rem;
}

.cz-hero__headline {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--cz-white);
    margin-bottom: 1.5rem;
    max-width: 14em;
}

.cz-hero__sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--cz-text-muted);
    max-width: 52ch;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.cz-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Scroll indicator */
.cz-hero__scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cz-hero__scroll-line {
    display: block;
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--cz-accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0; transform: scaleY(0.4); transform-origin: top; }
    50%       { opacity: 1; transform: scaleY(1); }
}

/* ============================================================
   LAYER 7 — SERVICES
   ============================================================ */
.cz-services {
    padding-block: var(--section-gap);
    border-top: 1px solid var(--cz-border);
}

.cz-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.cz-card {
    background: var(--cz-bg-2);
    border: 1px solid var(--cz-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: border-color var(--duration),
                transform var(--duration) var(--ease-out),
                box-shadow var(--duration);
}
.cz-card:hover {
    border-color: rgba(0, 212, 106, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.cz-card__icon {
    font-size: 2rem;
    margin-bottom: 1.25rem;
    line-height: 1;
}

.cz-card__title {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--cz-white);
    margin-bottom: 0.75rem;
}

.cz-card__text {
    font-size: 0.92rem;
    color: var(--cz-text-muted);
    line-height: 1.65;
}

/* ============================================================
   LAYER 8 — TECH STACK
   ============================================================ */
.cz-stack {
    padding-block: var(--section-gap);
    background: var(--cz-bg-2);
    border-top: 1px solid var(--cz-border);
    border-bottom: 1px solid var(--cz-border);
}

.cz-stack__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.cz-stack-item {
    background: var(--cz-bg);
    border: 1px solid var(--cz-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    transition: border-color var(--duration), background var(--duration);
}
.cz-stack-item:hover {
    border-color: var(--cz-border-hover);
}

.cz-stack-item--primary {
    border-color: rgba(0, 212, 106, 0.3);
    background: var(--cz-accent-dim);
}
.cz-stack-item--primary:hover {
    border-color: rgba(0, 212, 106, 0.6);
    box-shadow: 0 0 20px var(--cz-accent-dim);
}

.cz-stack-item__name {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--cz-white);
    margin-bottom: 0.3rem;
}

.cz-stack-item__desc {
    font-size: 0.78rem;
    color: var(--cz-text-muted);
    line-height: 1.4;
}

/* ============================================================
   LAYER 9 — PORTFOLIO
   ============================================================ */
.cz-portfolio {
    padding-block: var(--section-gap);
}

.cz-portfolio__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cz-project {
    background: var(--cz-bg-2);
    border: 1px solid var(--cz-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color var(--duration),
                transform var(--duration) var(--ease-out),
                box-shadow var(--duration);
}
.cz-project:hover {
    border-color: rgba(0, 212, 106, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.cz-project__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cz-project__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cz-white);
    letter-spacing: -0.01em;
}

.cz-project__desc {
    font-size: 0.92rem;
    color: var(--cz-text-muted);
    line-height: 1.65;
    flex: 1;
}

.cz-project__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--cz-border);
}
.cz-project__tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--cz-text-faint);
    background: var(--cz-bg-3);
    padding: 0.25em 0.65em;
    border-radius: 3px;
}

/* ============================================================
   LAYER 10 — ABOUT + CONTACT
   ============================================================ */
.cz-about {
    padding-block: var(--section-gap);
    background: var(--cz-bg-2);
    border-top: 1px solid var(--cz-border);
}

.cz-about__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0 4rem;
    align-items: start;
}

.cz-about__divider {
    width: 1px;
    background: var(--cz-border);
    align-self: stretch;
    min-height: 300px;
}

/* Bio */
.cz-bio__role {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--cz-accent);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.cz-bio__text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    color: var(--cz-text-muted);
    font-size: 0.97rem;
    line-height: 1.72;
}

.cz-bio__links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cz-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--cz-border-hover);
    border-radius: var(--radius);
    padding: 0.45rem 1rem;
    color: var(--cz-text-muted);
    transition: border-color var(--duration), color var(--duration);
}
.cz-link-badge:hover {
    border-color: var(--cz-accent);
    color: var(--cz-accent);
}

/* Contact */
.cz-contact .cz-section-intro {
    margin-bottom: 2rem;
}

/* ============================================================
   LAYER 11 — CONTACT FORM
   ============================================================ */
.cz-form__group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.cz-form__label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cz-text-muted);
}

.cz-form__input,
.cz-form__textarea {
    width: 100%;
    background: var(--cz-bg);
    border: 1px solid var(--cz-border);
    border-radius: var(--radius);
    color: var(--cz-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    transition: border-color var(--duration), box-shadow var(--duration);
    outline: none;
}
.cz-form__input::placeholder,
.cz-form__textarea::placeholder {
    color: var(--cz-text-faint);
}
.cz-form__input:focus,
.cz-form__textarea:focus {
    border-color: var(--cz-accent);
    box-shadow: 0 0 0 3px var(--cz-accent-glow);
}

.cz-form__textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}

/* ============================================================
   LAYER 12 — FOOTER
   ============================================================ */
.cz-footer {
    background: var(--cz-bg);
    border-top: 1px solid var(--cz-border);
    padding-block: 2rem;
}

.cz-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.cz-footer__logo {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
}

.cz-footer__copy {
    font-size: 0.82rem;
    color: var(--cz-text-faint);
    font-family: var(--font-mono);
}

.cz-footer__links {
    display: flex;
    gap: 1.5rem;
}
.cz-footer__links a {
    font-size: 0.85rem;
    color: var(--cz-text-muted);
    transition: color var(--duration);
}
.cz-footer__links a:hover {
    color: var(--cz-accent);
}

/* ============================================================
   LAYER 13 — SCROLL REVEAL ANIMATIONS
   ============================================================ */
.cz-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.cz-reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay classes */
.cz-reveal--d1 { transition-delay: 0.05s; }
.cz-reveal--d2 { transition-delay: 0.12s; }
.cz-reveal--d3 { transition-delay: 0.19s; }
.cz-reveal--d4 { transition-delay: 0.26s; }

/* ============================================================
   LAYER 14 — RESPONSIVE / MOBILE
   ============================================================ */
@media (max-width: 900px) {
    .cz-about__inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .cz-about__divider {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Mobile nav overlay */
    .cz-nav__burger {
        display: flex;
    }

    .cz-nav__links {
        position: fixed;
        inset: 64px 0 0 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        transform: translateX(100%);
        transition: transform 0.35s var(--ease-out);
        pointer-events: none;
    }
    .cz-nav--open .cz-nav__links {
        transform: translateX(0);
        pointer-events: auto;
    }
    .cz-nav__link {
        font-size: 1.25rem;
        color: var(--cz-text);
    }

    .cz-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .cz-hero__ctas {
        flex-direction: column;
    }
    .cz-hero__ctas .cz-btn {
        text-align: center;
        justify-content: center;
    }
    .cz-stack__grid {
        grid-template-columns: 1fr 1fr;
    }
}
