/* ============================================
   UASK - Project Detail Page Styles
   ============================================ */

/* === Reading Progress === */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 10001;
    width: 0%;
    transition: width 0.05s linear;
}

/* === Read Time Badge === */
.read-time {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.read-time i {
    color: var(--accent-primary);
    font-size: 11px;
}

/* === Keyboard Shortcuts === */
.kbd-hint {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition-base);
    box-shadow: var(--glass-shadow);
}

.kbd-hint:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.kbd-tooltip {
    position: fixed;
    bottom: 132px;
    right: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all var(--transition-base);
    box-shadow: var(--glass-shadow);
    min-width: 260px;
}

.kbd-tooltip.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.kbd-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.kbd-row kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

/* === Project Hero === */
.project-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    padding: 120px 24px 60px;
    overflow: hidden;
}

.project-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.project-hero:hover .project-hero-bg {
    transform: scale(1.03);
}

.project-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, rgba(5, 8, 15, 0.6) 50%, rgba(5, 8, 15, 0.3) 100%);
    z-index: 1;
}

[data-theme="light"] .project-hero-overlay {
    background: linear-gradient(to top, var(--bg-primary) 0%, rgba(245, 247, 251, 0.6) 50%, rgba(245, 247, 251, 0.3) 100%);
}

.project-hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
}

.project-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.project-breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.project-breadcrumb a:hover {
    color: var(--accent-primary);
}

.project-breadcrumb i {
    font-size: 8px;
}

.project-hero-title {
    font-family: var(--font-primary);
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.05;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease 0.2s forwards;
}

.project-hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease 0.4s forwards;
}

.project-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-tech-tag {
    padding: 6px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-primary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.project-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.hero-meta-item i {
    color: var(--accent-primary);
    font-size: 14px;
}

/* Project Nav Arrows */
.project-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    box-shadow: var(--glass-shadow);
}

.project-nav-arrow:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-50%) scale(1.1);
}

.project-nav-arrow.prev {
    left: 24px;
}

.project-nav-arrow.next {
    right: 24px;
}

/* === Project Main === */
.project-main {
    position: relative;
    z-index: 1;
    padding-bottom: 80px;
}

.project-section {
    padding: 80px 0;
}

.project-section .section-header {
    text-align: center;
    margin-bottom: 48px;
}

/* === Description Grid === */
.project-description-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

.project-description-text h3 {
    font-family: var(--font-primary);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 32px;
    color: var(--text-primary);
}

.project-description-text h3:first-child {
    margin-top: 0;
}

.project-description-text p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.project-description-text ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.project-description-text li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.project-description-text li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
}

/* Specs Card */
.project-specs {
    padding: 32px;
    position: sticky;
    top: 100px;
}

.project-specs h3 {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-specs h3 i {
    color: var(--accent-primary);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 14px;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.spec-label i {
    color: var(--accent-primary);
    width: 16px;
    font-size: 13px;
}

.spec-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* === 3D Model Viewer === */
.model-viewer-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.model-viewer {
    padding: 24px;
    position: relative;
}

.model-scene {
    width: 100%;
    height: 400px;
    position: relative;
    perspective: 1000px;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
    background: radial-gradient(ellipse at center, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-scene:active {
    cursor: grabbing;
}

.model-object {
    width: 200px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    animation: modelRotate 12s linear infinite;
}

.model-object.paused {
    animation-play-state: paused;
}

.model-face {
    position: absolute;
    border: 2px solid var(--accent-primary);
    background: rgba(0, 180, 216, 0.06);
    transition: all 0.5s ease;
}

.model-object.wireframe .model-face {
    background: transparent;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

.model-object.exploded .model-face {
    opacity: 0.8;
}

/* Drone body faces */
.drone-body-top {
    width: 180px;
    height: 60px;
    left: 10px;
    top: 70px;
    transform: rotateX(90deg) translateZ(30px);
}

.drone-body-bottom {
    width: 180px;
    height: 60px;
    left: 10px;
    top: 70px;
    transform: rotateX(-90deg) translateZ(30px);
}

.drone-body-front {
    width: 180px;
    height: 60px;
    left: 10px;
    top: 70px;
    transform: translateZ(30px);
}

.drone-body-back {
    width: 180px;
    height: 60px;
    left: 10px;
    top: 70px;
    transform: translateZ(-30px) rotateY(180deg);
}

.drone-body-left {
    width: 60px;
    height: 60px;
    left: 10px;
    top: 70px;
    transform: rotateY(-90deg) translateZ(0px);
}

.drone-body-right {
    width: 60px;
    height: 60px;
    left: 10px;
    top: 70px;
    transform: rotateY(90deg) translateZ(180px);
}

/* Drone arms */
.drone-arm {
    width: 100px;
    height: 8px;
    border: 2px solid var(--accent-primary);
    background: rgba(0, 180, 216, 0.1);
    position: absolute;
    transition: all 0.5s ease;
}

.drone-arm-fl {
    top: 60px;
    left: -40px;
    transform: rotateZ(-45deg) translateZ(15px);
}

.drone-arm-fr {
    top: 60px;
    right: -40px;
    transform: rotateZ(45deg) translateZ(15px);
}

.drone-arm-bl {
    bottom: 60px;
    left: -40px;
    transform: rotateZ(45deg) translateZ(15px);
}

.drone-arm-br {
    bottom: 60px;
    right: -40px;
    transform: rotateZ(-45deg) translateZ(15px);
}

/* Propellers */
.drone-prop {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(0, 180, 216, 0.6);
    border-radius: 50%;
    position: absolute;
    animation: propSpin 0.8s linear infinite;
    transition: all 0.5s ease;
}

.drone-prop-fl { top: 30px; left: -60px; }
.drone-prop-fr { top: 30px; right: -60px; }
.drone-prop-bl { bottom: 30px; left: -60px; }
.drone-prop-br { bottom: 30px; right: -60px; }

.model-object.exploded .drone-arm-fl,
.model-object.exploded .drone-prop-fl { transform: translate(-30px, -30px) rotateZ(-45deg) translateZ(15px); }
.model-object.exploded .drone-arm-fr,
.model-object.exploded .drone-prop-fr { transform: translate(30px, -30px) rotateZ(45deg) translateZ(15px); }
.model-object.exploded .drone-arm-bl,
.model-object.exploded .drone-prop-bl { transform: translate(-30px, 30px) rotateZ(45deg) translateZ(15px); }
.model-object.exploded .drone-arm-br,
.model-object.exploded .drone-prop-br { transform: translate(30px, 30px) rotateZ(-45deg) translateZ(15px); }

.model-object.exploded .drone-body-top { transform: rotateX(90deg) translateZ(50px); }
.model-object.exploded .drone-body-bottom { transform: rotateX(-90deg) translateZ(50px); }

/* Fixed-wing specific */
.wing-main {
    width: 280px;
    height: 30px;
    left: -40px;
    top: 90px;
    transform: translateZ(5px);
}

.wing-tail {
    width: 100px;
    height: 20px;
    left: 50px;
    top: 150px;
    transform: translateZ(5px);
}

.fuselage {
    width: 220px;
    height: 40px;
    left: -10px;
    top: 80px;
    border-radius: 20px;
    transform: translateZ(0px);
}

.tail-v {
    width: 20px;
    height: 50px;
    left: 90px;
    top: 110px;
    transform: rotateY(0deg) translateZ(5px);
}

@keyframes modelRotate {
    from { transform: rotateY(0deg) rotateX(-15deg); }
    to { transform: rotateY(360deg) rotateX(-15deg); }
}

@keyframes propSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.model-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.model-ctrl {
    width: 40px;
    height: 40px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--glass-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all var(--transition-base);
}

.model-ctrl:hover,
.model-ctrl.active {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: var(--card-hover-bg);
}

.model-hint {
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.model-hint i {
    margin-right: 4px;
}

/* === Gallery === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay span {
    color: white;
    font-size: 13px;
    font-weight: 500;
}

.gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* === Lightbox === */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-caption {
    margin-top: 16px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--transition-base);
    z-index: 2;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-close {
    top: 24px;
    right: 24px;
}

.lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

/* === Comparison Drawer === */
.comparison-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 19998;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.comparison-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.comparison-drawer {
    position: fixed;
    right: -500px;
    top: 0;
    bottom: 0;
    width: 480px;
    max-width: 90vw;
    background: var(--bg-secondary);
    border-left: 1px solid var(--glass-border);
    z-index: 19999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.comparison-drawer.active {
    right: 0;
}

.comparison-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.comparison-header h3 {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-header h3 i {
    color: var(--accent-primary);
}

.comparison-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--glass-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all var(--transition-base);
}

.comparison-close:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.comparison-body {
    padding: 24px;
    flex: 1;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    font-size: 13px;
}

.comparison-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.comparison-table td {
    color: var(--text-primary);
    font-weight: 500;
}

.comparison-table td.highlight {
    color: var(--accent-primary);
    font-weight: 700;
}

.comparison-table tr:last-child td,
.comparison-table tr:last-child th {
    border-bottom: none;
}

/* === Project Team === */
.project-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.project-team-member {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    transition: all var(--transition-base);
}

.project-team-member:hover {
    border-color: rgba(0, 180, 216, 0.2);
    transform: translateY(-2px);
}

.ptm-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.ptm-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.ptm-info span {
    font-size: 12px;
    color: var(--text-muted);
}

/* === Other Projects === */
.other-projects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.other-project-card {
    display: block;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.other-project-card:hover {
    border-color: rgba(0, 180, 216, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.other-project-img {
    height: 140px;
    overflow: hidden;
}

.other-project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.other-project-card:hover .other-project-img img {
    transform: scale(1.08);
}

.other-project-info {
    padding: 16px;
}

.other-project-info h4 {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.other-project-info p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .project-description-grid {
        grid-template-columns: 1fr;
    }

    .project-specs {
        position: static;
    }

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

    .gallery-item:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }

    .other-projects {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .project-hero {
        min-height: 60vh;
        padding: 100px 20px 40px;
    }

    .project-hero-title {
        font-size: clamp(32px, 9vw, 48px);
    }

    .project-nav-arrow {
        display: none;
    }

    .model-scene {
        height: 300px;
    }

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

    .gallery-item:first-child {
        grid-column: span 1;
    }

    .other-projects {
        grid-template-columns: 1fr;
    }

    .kbd-hint,
    .kbd-tooltip {
        display: none;
    }

    .comparison-drawer {
        width: 100%;
    }
}
