/* ============================
   PERSONAL SKILL SECTIONS — Vertical scroll with entry animations
   Replaces the old horizontal cinema layout.
   Keeps v4-skill card design + v4-quote highlight effect.
   ============================ */

/* ── Section Container ── */
.personal-dept {
    padding: var(--section-pad) 24px;
    position: relative;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.personal-dept__inner {
    max-width: 80vw !important;
    width: 80vw !important;
    margin: 0 auto;
}


/* ── Section Header (centered) ── */
.personal-dept__header {
    text-align: center;
    margin-bottom: 56px;
}

/* ── Scene Icon ── */
.v4-scene__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto -6px;
    position: relative;
    background: transparent;
    /* Animation initial */
    opacity: 0;
    transform: scale(0.6) rotate(-10deg);
}

/* Canvas orbit — injected by icon-orbit.js */
.v4-scene__icon .icon-orbit-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 5px));
    pointer-events: none;
}

.v4-scene__icon svg {
    width: 32px;
    height: 32px;
    color: #4F6EF7;
    stroke-width: 1.5;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(79, 110, 247, 0.4));
    position: relative;
    z-index: 1;
}

.v4-scene__icon.is-active {
    opacity: 1;
    transform: scale(1) rotate(0);
    transition: all 0.7s var(--ease-bounce);
}

/* ── Scene Title ── */
.v4-scene__title {
    font-family: var(--ff-serif);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 14px;
    overflow: hidden;
}

.s-dark .v4-scene__title {
    color: #ffffff;
}

.s-light .v4-scene__title {
    color: var(--text);
}

/* Character animation wrapper */
.v4-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%) rotate(8deg);
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}

.v4-char.is-visible {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

.v4-char--space {
    width: 0.3em;
}

/* ── Scene Subtitle ── */
.v4-scene__sub {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
    /* Animation */
    opacity: 0;
    transform: translateY(20px);
}

.s-dark .v4-scene__sub {
    color: rgba(255, 255, 255, 0.85);
}

.s-light .v4-scene__sub {
    color: rgba(10, 12, 25, 0.8);
}

.v4-scene__sub.is-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s var(--ease) 0.3s;
}

/* ── Skills Grid — 4 columns, wide ── */
.v4-skills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
}

/* ── Skill Card — wider, shorter ── */
.v4-skill {
    padding: 18px 20px 16px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    will-change: transform;
    /* Animation initial — fade up */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s var(--ease),
        transform 0.6s var(--ease),
        border-color 0.3s var(--ease),
        box-shadow 0.3s var(--ease);
}

/* Dark section card */
.s-dark .v4-skill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
}

/* Light section card */
.s-light .v4-skill {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(79, 110, 247, 0.08);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.v4-skill.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 3D perspective on parent grid */
.v4-skills {
    perspective: 800px;
}



/* ── Card Icon — styled container ── */
.v4-skill__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    margin-bottom: 12px;
    transition: transform 0.4s var(--ease-bounce);
}

.v4-skill__icon svg {
    width: 20px;
    height: 20px;
    color: #4F6EF7;
    stroke-width: 1.5;
    flex-shrink: 0;
}

.s-dark .v4-skill__icon {
    background: rgba(79, 110, 247, 0.1);
    border: 1px solid rgba(79, 110, 247, 0.15);
}

.s-light .v4-skill__icon {
    background: rgba(79, 110, 247, 0.08);
    border: 1px solid rgba(79, 110, 247, 0.12);
}

.v4-skill:hover .v4-skill__icon {
    transform: scale(1.1);
}

.v4-skill__name {
    font-family: var(--ff-serif);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.s-dark .v4-skill__name {
    color: #ffffff;
}

.s-light .v4-skill__name {
    color: var(--text);
}

.v4-skill__desc {
    font-size: 0.8rem;
    line-height: 1.65;
    position: relative;
    z-index: 2;
}

.s-dark .v4-skill__desc {
    color: rgba(255, 255, 255, 0.92);
}

.s-light .v4-skill__desc {
    color: rgba(10, 12, 25, 0.75);
}

/* ── V4 Quote Highlighting — Organic SVG Underline ── */
.v4-quote {
    position: relative;
    font-style: italic;
}

.s-dark .v4-quote {
    color: #ffffff;
}

.s-light .v4-quote {
    color: var(--text);
}

/* Old pseudo ::after — hidden, replaced by SVG */
.v4-quote::after {
    display: none;
}

/* SVG highlighter container — positioned per-line by JS */
.v4-quote__highlight {
    position: absolute;
    height: 12px;
    pointer-events: none;
    overflow: visible;
    z-index: 1;
}

.v4-quote__highlight svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.v4-quote__highlight path {
    fill: none;
    stroke: rgba(79, 110, 247, 0.3);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: var(--path-length, 1000);
    stroke-dashoffset: var(--path-length, 1000);
}

.s-dark .v4-quote__highlight path {
    stroke: rgba(123, 149, 255, 0.35);
}

/* Animate when highlighted — class added to highlight container directly */
.v4-quote__highlight.is-highlighted path {
    animation: v4SmoothDraw 0.35s ease forwards;
}

@keyframes v4SmoothDraw {
    0% {
        stroke-dashoffset: var(--path-length, 1000);
    }

    100% {
        stroke-dashoffset: 0;
    }
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1200px) {
    .personal-dept__inner {
        max-width: 85vw;
    }

    .v4-skills {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .personal-dept__inner {
        max-width: 92vw;
    }

    .v4-skills {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .v4-scene__title {
        font-size: clamp(1.6rem, 7vw, 2.4rem);
    }

    .v4-scene__icon {
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
    }

    .v4-scene__icon svg {
        width: 26px;
        height: 26px;
    }

    .v4-skill {
        transform: translateY(30px);
    }

    .v4-skill.is-visible {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .personal-dept {
        padding: 60px 16px;
    }

    .v4-skill {
        padding: 20px 16px;
    }
}