/* ==========================================
   CSS Variables & Reset
   ========================================== */
:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: #0a0e27;
    --darker-bg: #050816;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* Spacing */
    --section-padding: 120px;
    --container-max-width: 1280px;
    
    /* Animation */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--darker-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 32px;
}

/* ==========================================
   Background Animation
   ========================================== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    top: 50%;
    right: -200px;
    animation-delay: 7s;
}

.orb-3 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    bottom: -300px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 0;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.logo-badge {
    display: inline-block;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    margin-bottom: 32px;
    animation: fadeInDown 1s ease-out;
}

.badge-text {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(64px, 10vw, 120px);
    font-weight: 900;
    margin-bottom: 24px;
    line-height: 1;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientFlow 5s ease infinite;
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.hero-description {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 60px;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 14px;
    animation: fadeInUp 1s ease-out 0.8s backwards;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    40% {
        transform: rotate(45deg) translateY(10px);
    }
    60% {
        transform: rotate(45deg) translateY(5px);
    }
}

/* ==========================================
   Projects Section
   ========================================== */
.projects {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--text-secondary);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

/* Project Card */
.project-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    transition: var(--transition-smooth);
    cursor: pointer;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 0;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.project-card:hover::before {
    opacity: 1;
}

/* Card Glow Effect */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.project-card:hover .card-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 1;
}

/* ==========================================
   Card Preview Image
   ========================================== */
.card-preview-image {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    transition: var(--transition-smooth);
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.preview-icon {
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition-bounce);
}

.preview-text {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
}

/* Preview Image */
.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.project-card:hover .preview-img {
    transform: scale(1.05);
    filter: brightness(0.8);
}


.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.project-card:hover .preview-overlay {
    opacity: 1;
}

.project-card:hover .preview-placeholder {
    transform: scale(1.05);
}

.project-card:hover .preview-icon {
    transform: scale(1.15) rotate(-5deg);
    color: rgba(255, 255, 255, 0.9);
}

.project-card:hover .preview-text {
    color: rgba(255, 255, 255, 1);
}

/* Unique gradients for each project preview */
.project-card[data-project="eduroom"] .card-preview-image {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
}

.project-card[data-project="eduroom"] .preview-placeholder {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
}

.project-card[data-project="eduroom"] .preview-overlay {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
}

.project-card[data-project="jokkaki"] .card-preview-image {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.3) 0%, rgba(245, 87, 108, 0.3) 100%);
}

.project-card[data-project="jokkaki"] .preview-placeholder {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2) 0%, rgba(245, 87, 108, 0.2) 100%);
}

.project-card[data-project="jokkaki"] .preview-overlay {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.95) 0%, rgba(245, 87, 108, 0.95) 100%);
}

.project-card[data-project="pustakaia"] .card-preview-image {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.3) 0%, rgba(0, 242, 254, 0.3) 100%);
}

.project-card[data-project="pustakaia"] .preview-placeholder {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
}

.project-card[data-project="pustakaia"] .preview-overlay {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.95) 0%, rgba(0, 242, 254, 0.95) 100%);
}

.project-card[data-project="tokokita"] .card-preview-image {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3) 0%, rgba(56, 249, 215, 0.3) 100%);
}

.project-card[data-project="tokokita"] .preview-placeholder {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2) 0%, rgba(56, 249, 215, 0.2) 100%);
}

.project-card[data-project="tokokita"] .preview-overlay {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.95) 0%, rgba(56, 249, 215, 0.95) 100%);
}

.project-card[data-project="washpro"] .card-preview-image {
    background: linear-gradient(135deg, rgba(250, 112, 154, 0.3) 0%, rgba(254, 225, 64, 0.3) 100%);
}

.project-card[data-project="washpro"] .preview-placeholder {
    background: linear-gradient(135deg, rgba(250, 112, 154, 0.2) 0%, rgba(254, 225, 64, 0.2) 100%);
}

.project-card[data-project="washpro"] .preview-overlay {
    background: linear-gradient(135deg, rgba(250, 112, 154, 0.95) 0%, rgba(254, 225, 64, 0.95) 100%);
}

/* Card Icon */
.card-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition-bounce);
}

.card-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.project-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Card Text */
.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    min-height: 70px;
}

/* Tags */
.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.tag {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.project-card:hover .tag {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Card Button */
.card-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.card-button:hover::before {
    left: 100%;
}

.card-button:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.arrow-icon {
    width: 20px;
    height: 20px;
    transition: var(--transition-smooth);
}

.card-button:hover .arrow-icon {
    transform: translateX(4px);
}

/* Unique gradients for each card */
.project-card[data-project="eduroom"] .card-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-card[data-project="jokkaki"] .card-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.project-card[data-project="pustakaia"] .card-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.project-card[data-project="tokokita"] .card-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.project-card[data-project="washpro"] .card-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    padding: 60px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
}

.footer-brand h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-info {
    text-align: right;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 4px;
}

.footer-credits {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }
    
    .container {
        padding: 0 24px;
    }
    
    .hero {
        min-height: 90vh;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        padding: 32px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-info {
        text-align: center;
    }
    
    .section-header {
        margin-bottom: 48px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .project-card {
        padding: 28px;
    }
    
    .card-description {
        min-height: auto;
    }
}

/* ==========================================
   Smooth Scroll & Performance
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
