/* ===================================
   CSS Variables & Base Styles
   =================================== */
:root {
    --color-bg: #0a0a0f;
    --color-bg-elevated: #12121a;
    --color-bg-card: #1a1a24;
    --color-text: #f5f5f7;
    --color-text-muted: #8e8e93;
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-accent: #f472b6;
    --color-accent-warm: #fb923c;
    --color-success: #34d399;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-warm: linear-gradient(135deg, #f472b6 0%, #fb923c 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.3);
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text);
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-text);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-trigger::after {
    display: none !important;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding-top: 16px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-content {
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 8px;
    min-width: 280px;
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--color-text);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item::after {
    display: none !important;
}

.dropdown-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.dropdown-icon svg {
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
}

.dropdown-icon.featured {
    background: var(--gradient-primary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.dropdown-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.dropdown-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.dropdown-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.dropdown-badge {
    padding: 4px 8px;
    background: rgba(52, 211, 153, 0.1);
    color: var(--color-success);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    align-self: center;
    margin-left: auto;
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 120px 24px 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--color-primary);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--color-accent);
    bottom: -100px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--color-accent-warm);
    top: 40%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary-light);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), 0 0 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--color-text-muted);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--color-text-muted);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.3; transform: translateX(-50%) translateY(12px); }
}

/* ===================================
   Sections Common Styles
   =================================== */
section {
    padding: 120px 0;
}

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

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary-light);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
}

/* ===================================
   About Section
   =================================== */
.about {
    background: var(--color-bg-elevated);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.about-card {
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 32px;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-glow);
}

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 12px;
    margin-bottom: 20px;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.about-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.about-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ===================================
   Projects Section
   =================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

/* Home Page Carousel */
.section-header-with-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.section-header-with-nav .section-header {
    margin-bottom: 0;
}

.section-header-with-nav .carousel-nav {
    margin-bottom: 8px;
}

.home-carousel-container {
    overflow: hidden;
    margin: 0 -12px;
    padding: 0 12px;
}

.home-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.home-carousel-slide {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 0 12px;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .home-carousel-slide {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-glow);
}

.project-card.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    min-height: 400px;
}

.project-status {
    grid-column: 1 / -1;
    padding: 20px 24px 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.planned {
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.status-badge.in-development {
    background: rgba(52, 211, 153, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.status-badge.released {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.maintenance {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.archived {
    background: rgba(107, 114, 128, 0.1);
    color: var(--color-text-muted);
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.status-badge .pulse {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-title {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 12px;
}

.project-description {
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-size: 0.75rem;
}

/* Voting Controls */
.vote-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-grid-card .vote-controls {
    padding: 12px 16px 16px;
}

.vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.vote-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-text-muted);
    transition: var(--transition);
}

.vote-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.vote-btn.up:hover svg,
.vote-btn.up.voted svg {
    stroke: var(--color-success);
}

.vote-btn.down:hover svg,
.vote-btn.down.voted svg {
    stroke: var(--color-danger);
}

.vote-btn.voted {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.vote-score {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    min-width: 40px;
    text-align: center;
}

.vote-score.positive {
    color: var(--color-success);
}

.vote-score.negative {
    color: var(--color-danger);
    color: var(--color-text-muted);
}

.project-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(217, 70, 239, 0.1) 100%);
}

.phone-mockup {
    width: 160px;
    height: 320px;
    background: #1a1a24;
    border-radius: 32px;
    padding: 8px;
    box-shadow: var(--shadow-lg);
    border: 3px solid #2a2a34;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1f1f2e 0%, #15151f 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-placeholder {
    text-align: center;
}

.app-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 16px;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 12px;
}

.app-name {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-text-muted);
}

.project-card.upcoming {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg-elevated) 100%);
    border-style: dashed;
}

.upcoming-content {
    text-align: center;
    padding: 40px;
}

.upcoming-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    margin: 0 auto 20px;
}

.upcoming-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-text-muted);
}

.upcoming-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.upcoming-content p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    background: var(--color-bg-elevated);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.contact-info .section-tag {
    margin-bottom: 16px;
}

.contact-info .section-title {
    text-align: left;
    margin-bottom: 16px;
}

.contact-info p {
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--color-primary-light);
}

.contact-link svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

/* Contact Form */
.contact-form-container {
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 32px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-form label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    padding: 12px 16px;
    background: var(--color-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

.contact-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

.contact-form select option {
    background: var(--color-bg-card);
    color: var(--color-text);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .form-error {
    color: #ef4444;
    font-size: 0.875rem;
    min-height: 20px;
}

.contact-form .form-success {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: var(--border-radius-sm);
    color: var(--color-success);
    font-size: 0.9rem;
}

.contact-form .form-success svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.contact-form .btn {
    align-self: flex-start;
    position: relative;
}

.contact-form .btn.loading .btn-text {
    opacity: 0;
}

.contact-form .btn .btn-loader {
    display: none;
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.contact-form .btn.loading .btn-loader {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .contact-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form .btn {
        width: 100%;
        justify-content: center;
    }
}

.code-window {
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.window-header {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.window-dot.red { background: #ff5f56; }
.window-dot.yellow { background: #ffbd2e; }
.window-dot.green { background: #27ca40; }

.window-content {
    padding: 24px;
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.window-content pre {
    margin: 0;
}

.window-content code {
    font-family: inherit;
}

.keyword { color: #c792ea; }
.variable { color: #82aaff; }
.property { color: #f07178; }
.string { color: #c3e88d; }
.function { color: #82aaff; }

/* ===================================
   Projects Page
   =================================== */
.projects-hero {
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}

.projects-hero .hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.projects-hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.projects-hero .hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.projects-hero .hero-subtitle {
    max-width: 600px;
    margin: 0 auto;
}

/* Carousel */
.carousel-section {
    padding: 60px 0 100px;
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.carousel-nav {
    display: flex;
    gap: 12px;
}

.carousel-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
    color: var(--color-text);
}

.carousel-container {
    overflow: hidden;
    margin: 0 -12px;
}

.carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px;
}

.carousel-slide {
    flex: 0 0 calc(100% - 48px);
    max-width: 800px;
}

@media (min-width: 768px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 36px);
    }
}

@media (min-width: 1024px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 12px);
    }
}

.carousel-card {
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.carousel-card-link {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-decoration: none;
    color: inherit;
}

.carousel-card-link:hover {
    text-decoration: none;
}

.carousel-card-visual {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(217, 70, 239, 0.1) 100%);
}

.carousel-card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.carousel-card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--color-text);
}

.carousel-card-description {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
    flex-grow: 1;
}

.carousel-card .project-tags {
    margin-top: auto;
}

.carousel-card .tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--color-primary);
    width: 24px;
    border-radius: 4px;
}

.carousel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    width: 100%;
    color: var(--color-text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.projects-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    grid-column: 1 / -1;
}

/* All Projects Grid */
.all-projects {
    background: var(--color-bg-elevated);
    padding: 100px 0;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: var(--color-text-muted);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.all-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.project-grid-card {
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-grid-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-glow);
}

.project-grid-card.hidden {
    display: none;
}

.project-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
}

.project-card-link:hover {
    text-decoration: none;
}

/* Coming Soon / Countdown */
.project-grid-card.coming-soon {
    opacity: 0.85;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.project-grid-visual {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(217, 70, 239, 0.1) 100%);
}

.project-grid-content {
    padding: 20px;
}

.project-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.project-grid-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.project-grid-description {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Project Detail Section */
.project-detail {
    padding: 100px 0;
    scroll-margin-top: 80px;
    position: relative;
}

.project-detail:nth-child(even) {
    background: var(--color-bg-elevated);
}

.project-detail.scheduled {
    overflow: hidden;
}

.project-detail-reveal-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 15, 35, 0.85);
    backdrop-filter: blur(4px);
}

.project-detail-reveal-overlay .project-grid-card {
    background: transparent;
    box-shadow: none;
    border: none;
    width: 350px;
    min-height: 300px;
}

.project-detail-reveal-overlay .project-grid-card.coming-soon {
    width: 350px;
    height: auto;
}

.project-detail-reveal-overlay .reveal-card-inner {
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.9) 0%, rgba(15, 15, 35, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    padding: 24px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.project-detail-reveal-overlay .reveal-classic .reveal-card-inner {
    padding: 0;
}

.project-detail-reveal-overlay .reveal-classic .project-grid-visual {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.project-detail-reveal-overlay .reveal-classic .project-grid-content {
    padding: 20px;
}

.project-detail.scheduled .project-detail-content,
.project-detail.scheduled .project-detail-visual {
    filter: blur(6px);
    opacity: 0.5;
}

.project-detail.scheduled .container {
    position: relative;
    z-index: 1;
}

.status-badge.coming-soon {
    background: rgba(217, 70, 239, 0.15);
    color: #d946ef;
}

.project-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.project-detail-content .status-badge {
    margin-bottom: 16px;
}

.project-detail-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
}

.project-detail-description {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.project-detail-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-size: 0.9rem;
}

.feature svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

.project-detail-visual {
    display: flex;
    justify-content: center;
}

.phone-mockup.large {
    width: 240px;
    height: 480px;
}

.app-icon.large {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
}

.app-tagline {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

@media (max-width: 968px) {
    .project-detail-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .project-detail-visual {
        order: -1;
    }
}

@media (max-width: 768px) {
    .carousel-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .all-projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Footer
   =================================== */
.footer {
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--color-text-muted);
    margin-top: 12px;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* ===================================
   Mobile Responsive
   =================================== */
@media (max-width: 968px) {
    .project-card.featured {
        grid-template-columns: 1fr;
    }
    
    .project-visual {
        order: -1;
        padding: 40px;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .contact-info .section-title {
        text-align: center;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-details {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .dropdown-menu {
        position: static;
        transform: none;
        padding-top: 12px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        display: none;
    }
    
    .nav-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-content {
        background: rgba(255, 255, 255, 0.03);
        border: none;
        box-shadow: none;
        min-width: 100%;
        width: 100%;
        padding: 8px 0;
    }
    
    .dropdown-item {
        padding: 12px 16px;
        margin: 0;
        border-radius: 0;
    }
    
    .dropdown-text {
        flex: 1;
        min-width: 0;
    }
    
    .dropdown-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .dropdown-desc {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero {
        padding: 100px 24px 60px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }
    
    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .window-content {
        font-size: 0.75rem;
        padding: 16px;
    }
}
