/* ============================================
   PROJECT 1 - SPLIT FLAP CLOCK STYLES
   ============================================ */

/* ============================================
   PROJECT HERO SECTION
   ============================================ */

.project-hero {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.project-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInDown 0.8s ease;
}

.project-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    animation: slideInUp 0.8s ease 0.2s both;
}

/* ============================================
   PROJECT SECTIONS
   ============================================ */

.project-section {
    padding: 5rem 0;
    position: relative;
    border-bottom: 1px solid rgba(51, 51, 51, 0.5);
}

.project-section:last-of-type {
    border-bottom: none;
}

.section-content {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.text-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
}

.text-content p {
    margin-bottom: 1.5rem;
}

/* ============================================
   FLIP CLOCK DISPLAY
   ============================================ */

.display-animation-container {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.flip-clock-display {
    display: flex;
    gap: 1rem;
    perspective: 1000px;
}

.flip-dial {
    width: 80px;
    height: 120px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--accent);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.flip-dial::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(99, 102, 241, 0.3);
    z-index: 10;
}

.dial-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Flip animation */
.flip-dial.flipping .dial-content {
    animation: flipCard 0.6s ease-in-out forwards;
}

@keyframes flipCard {
    0% {
        transform: rotateX(0deg);
    }
    50% {
        transform: rotateX(90deg) scaleY(0.8);
    }
    100% {
        transform: rotateX(0deg);
    }
}

/* Staggered flip animations */
.flip-dial:nth-child(1).flipping .dial-content {
    animation-delay: 0s;
}

.flip-dial:nth-child(2).flipping .dial-content {
    animation-delay: 0.1s;
}

.flip-dial:nth-child(3).flipping .dial-content {
    animation-delay: 0.2s;
}

.flip-dial:nth-child(4).flipping .dial-content {
    animation-delay: 0.3s;
}

.flip-dial:nth-child(5).flipping .dial-content {
    animation-delay: 0.4s;
}

.flip-dial:nth-child(6).flipping .dial-content {
    animation-delay: 0.5s;
}

/* ============================================
   FEATURES GRID
   ============================================ */

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

.feature-card {
    background: rgba(37, 37, 37, 0.6);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-card:nth-child(4) {
    animation-delay: 0.4s;
}

.feature-card:hover {
    background: rgba(37, 37, 37, 0.9);
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.15);
}

.feature-card h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   DESCRIPTION SECTION
   ============================================ */

.description-section {
    background: rgba(26, 26, 26, 0.5);
}

.description-content {
    max-width: 900px;
    margin: 0 auto;
}

.description-text {
    animation: fadeInUp 0.6s ease;
}

.description-text h3 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.description-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   INTERNALS REVEAL SECTION
   ============================================ */

.internals-section {
    background: rgba(26, 26, 26, 0.3);
}

.internals-container {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.clock-frame {
    height: 400px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 15px;
    border: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.6s ease;
}

.front-face {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.clock-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Front face display simulation */
.front-face::before {
    content: '';
    position: absolute;
    width: 90%;
    height: 60%;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        transparent 30%,
        transparent 70%,
        rgba(0, 0, 0, 0.2) 100%);
    border-radius: 8px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    box-shadow: inset 0 2px 10px rgba(99, 102, 241, 0.2);
}

/* Flip out animation for front face */
.front-face.flip-out {
    animation: flipOutFront 0.8s ease forwards;
}

@keyframes flipOutFront {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
        opacity: 1;
    }
    100% {
        transform: rotateX(45deg) rotateY(-60deg) translateZ(50px);
        opacity: 0.3;
    }
}

.internals-reveal {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.internals-description h3 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 2rem;
}

.internals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.internal-component {
    background: rgba(37, 37, 37, 0.6);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.internal-component:hover {
    background: rgba(37, 37, 37, 0.9);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.internal-component h4 {
    color: var(--accent-light);
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.internal-component p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   SPECIFICATIONS SECTION
   ============================================ */

.specs-section {
    background: rgba(26, 26, 26, 0.5);
}

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

.spec-card {
    background: rgba(37, 37, 37, 0.6);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.spec-card:nth-child(1) {
    animation-delay: 0.1s;
}

.spec-card:nth-child(2) {
    animation-delay: 0.2s;
}

.spec-card:nth-child(3) {
    animation-delay: 0.3s;
}

.spec-card:nth-child(4) {
    animation-delay: 0.4s;
}

.spec-card:hover {
    background: rgba(37, 37, 37, 0.9);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.spec-card h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.spec-card ul {
    list-style: none;
    color: var(--text-secondary);
}

.spec-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 0.95rem;
}

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

/* ============================================
   BACK LINK
   ============================================ */

.back-link-section {
    text-align: center;
    padding: 3rem 0;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.back-link:hover {
    color: var(--accent-light);
    transform: translateX(-5px);
}

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

@media (max-width: 768px) {
    .project-title {
        font-size: 2.5rem;
    }
    
    .project-subtitle {
        font-size: 1.1rem;
    }
    
    .flip-clock-display {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .flip-dial {
        width: 70px;
        height: 100px;
    }
    
    .dial-content {
        font-size: 2rem;
    }
    
    .internals-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .internals-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .specs-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .project-title {
        font-size: 2rem;
    }
    
    .project-subtitle {
        font-size: 1rem;
    }
    
    .flip-dial {
        width: 60px;
        height: 90px;
    }
    
    .dial-content {
        font-size: 1.8rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .internals-grid {
        grid-template-columns: 1fr;
    }
}
