/* ============================================================
   DETAIL PAGE — Skill Blog Post Styles
   Extends style.css for individual skill pages
   ============================================================ */

/* ==================== DETAIL HERO ==================== */
.detail-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    padding: clamp(100px, 15vh, 160px) 0 clamp(40px, 6vh, 80px);
    overflow: hidden;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 40px 40px;
}

.detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-primary) 100%);
    z-index: 1;
}

.detail-hero::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse at center, var(--page-accent, rgba(0,240,255,0.08)), transparent 60%);
    z-index: 0;
}

/* Hero image — shown as-is, above gradients */
.detail-hero-illustration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    max-width: 900px;
    pointer-events: none;
    z-index: 2;
}

.detail-hero-illustration img {
    width: 100%;
    height: auto;
}

.detail-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--container-max, 1800px);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 60px);
}

/* Topline: back link + bereich label on same row */
.detail-hero-topline {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s;
}

.detail-back:hover {
    color: var(--text-primary);
}

.detail-back svg {
    transition: transform 0.3s var(--ease-out-expo);
}

.detail-back:hover svg {
    transform: translateX(-4px);
}

.detail-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--page-accent-solid, var(--accent-1));
    padding: 6px 16px;
    border: 1px solid currentColor;
    border-radius: 40px;
}

.detail-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.detail-subtitle {
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 700px;
}

/* ==================== DETAIL SKILLS BAR ==================== */
.detail-skills-bar {
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 0;
}

.detail-skills-bar .container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-skill-pill {
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-out-expo);
}

.detail-skill-pill:hover {
    border-color: var(--page-accent-solid, var(--accent-1));
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ==================== CONTENT BODY WRAPPER ==================== */
.detail-body {
    max-width: var(--container-max, 1800px);
    margin: 0 auto;
    padding: clamp(40px, 6vh, 80px) clamp(20px, 4vw, 60px) clamp(60px, 10vh, 120px);
}

/* ==================== ARTICLE BODY ==================== */
.detail-article {
    column-count: 2;
    column-gap: clamp(32px, 4vw, 64px);
}

.detail-article > h2:first-child {
    margin-top: 0;
}

.detail-article h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    margin: 48px 0 16px;
    line-height: 1.2;
    break-after: avoid;
}

.detail-article h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.15rem, 1.8vw, 1.4rem);
    font-weight: 700;
    margin: 36px 0 12px;
    line-height: 1.3;
    break-after: avoid;
}

.detail-article p {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.detail-article ul, .detail-article ol {
    margin: 16px 0 24px 24px;
    color: var(--text-secondary);
    break-inside: avoid;
}

.detail-article li {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.8;
    margin-bottom: 8px;
}

.detail-article strong {
    color: var(--text-primary);
    font-weight: 600;
}

.detail-article blockquote {
    margin: 32px 0;
    padding: 20px 28px;
    border-left: 3px solid var(--page-accent-solid, var(--accent-1));
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 12px 12px 0;
    break-inside: avoid;
}

.detail-article blockquote p {
    font-size: clamp(1.05rem, 1.3vw, 1.15rem);
    font-style: italic;
    margin-bottom: 0;
}

/* ==================== LINKS SECTION ==================== */
.detail-links {
    column-span: all;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.detail-links h2 {
    grid-column: 1 / -1;
    margin-top: 0;
    margin-bottom: 8px;
}

.detail-link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    transition: all 0.4s var(--ease-out-expo);
    text-decoration: none;
}

.detail-link-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.03);
}

.detail-link-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    color: var(--page-accent-solid, var(--accent-1));
}

.detail-link-card-text h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.detail-link-card-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* ==================== PREV/NEXT ARROW NAV ==================== */
/* Mobile-first: below the article with text */
.detail-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 48px;
}

.detail-nav:empty {
    display: none;
}

.detail-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    transition: all 0.4s var(--ease-out-expo);
    text-decoration: none;
    color: var(--text-secondary);
}

.detail-nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.detail-nav-arrow {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-out-expo);
}

.detail-nav-link.prev:hover .detail-nav-arrow {
    transform: translateX(-4px);
}

.detail-nav-link.next:hover .detail-nav-arrow {
    transform: translateX(4px);
}

.detail-nav-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.detail-nav-text small {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1.3;
}

.detail-nav-text span {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
}

.detail-nav-link.next {
    flex-direction: row-reverse;
    text-align: right;
    justify-self: end;
}

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

/* ==================== RESPONSIVE ==================== */

/* Mobile: single column, nav stacked */
@media (max-width: 768px) {
    .detail-hero {
        min-height: auto;
        flex-direction: column;
        align-items: stretch;
        padding-top: clamp(90px, 14vh, 140px);
        padding-bottom: clamp(32px, 5vh, 60px);
    }

    .detail-hero-illustration {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: none;
        padding: 0 clamp(20px, 4vw, 40px);
        margin: 0 0 28px;
        opacity: 0.85;
        z-index: 2;
    }

    .detail-hero-illustration img {
        max-width: 400px;
        margin: 0 auto;
    }

    .detail-hero-content {
        position: relative;
        z-index: 3;
    }

    .detail-hero-topline {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .detail-title {
        font-size: clamp(2rem, 7vw, 3rem);
    }

    .detail-subtitle {
        font-size: clamp(0.95rem, 3.5vw, 1.1rem);
    }

    .detail-article {
        column-count: 1;
    }

    .detail-article h2 {
        font-size: clamp(1.3rem, 5vw, 1.7rem);
        margin: 36px 0 12px;
    }

    .detail-article h3 {
        font-size: clamp(1.05rem, 4vw, 1.25rem);
        margin: 28px 0 10px;
    }

    .detail-skill-pill {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .detail-nav {
        grid-template-columns: 1fr;
    }

    .detail-nav-link.next {
        flex-direction: row-reverse;
        text-align: right;
        justify-self: stretch;
    }

    .detail-links {
        grid-template-columns: 1fr;
    }

    .detail-link-card {
        padding: 16px 18px;
    }

    .detail-body {
        padding: clamp(28px, 4vh, 48px) clamp(16px, 4vw, 40px) clamp(40px, 6vh, 80px);
    }
}

/* Desktop: fixed arrows on viewport edges, no text */
@media (min-width: 1024px) {
    .detail-nav {
        position: fixed;
        inset: 0;
        display: block;
        pointer-events: none;
        z-index: 50;
        margin: 0;
        padding: 0;
        background: none;
    }

    .detail-nav-link {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: auto;
        padding: 24px 16px;
        border-radius: 0;
        opacity: 0.35;
        background: none;
    }

    .detail-nav-link:hover {
        opacity: 1;
        background: rgba(255, 255, 255, 0.03);
    }

    /* Hide text on desktop — arrows only */
    .detail-nav-text {
        display: none;
    }

    .detail-nav-arrow {
        width: 48px;
        height: 48px;
    }

    .detail-nav-link.prev {
        left: 0;
        border-radius: 0 12px 12px 0;
    }

    .detail-nav-link.next {
        right: 0;
        border-radius: 12px 0 0 12px;
        flex-direction: row;
        justify-self: auto;
    }

    .detail-nav-link.prev:hover .detail-nav-arrow {
        transform: translateX(-4px);
    }

    .detail-nav-link.next:hover .detail-nav-arrow {
        transform: translateX(4px);
    }
}
