/* ============================================
   Modern Dark Portfolio - Khaled Ben Abderrahmen
   ============================================ */

/* --- Variables --- */
:root {
    --bg: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --bg-subtle: #1e1e1e;
    --bg-input: #1a1a1a;

    --text: #fafafa;
    --text-secondary: #a0a0a0;
    --text-muted: #666;

    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-glow-strong: rgba(99, 102, 241, 0.3);
    --green: #22c55e;
    --green-glow: rgba(34, 197, 94, 0.15);

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-ar: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);

    --transition: 200ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* --- Accessibility --- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-subtle);
}

.nav-link.active {
    color: var(--text);
    background: var(--bg-subtle);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switch {
    display: flex;
    gap: 2px;
    background: var(--bg-subtle);
    padding: 3px;
    border-radius: var(--radius-full);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.lang-btn:hover {
    color: var(--text-secondary);
}

.lang-btn.active {
    background: var(--accent);
    color: white;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

.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); }

/* Mobile Menu Overlay */
.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 24px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu-link {
    color: var(--text);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    width: 100%;
    text-align: center;
}

.mobile-menu-link:hover {
    background: var(--bg-subtle);
    color: var(--accent);
}

/* ============================================
   HERO
   ============================================ */
.main-content {
    padding-top: 64px;
}

.hero {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, var(--accent-glow) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green-glow);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--green);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 32px;
    animation: fadeInDown 0.6s ease;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-greeting {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0;
}

.hero-name {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-role {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 500;
    color: var(--accent);
    letter-spacing: -0.01em;
}

.hero-bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease 0.2s both;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow-strong);
}

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    background: var(--bg-subtle);
    border-color: var(--border-hover);
}

/* ============================================
   BENTO GRID
   ============================================ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 0 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: all var(--transition-slow);
}

.bento-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

/* Card Title */
.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--accent);
    font-size: 1rem;
}

.card-title-center {
    justify-content: center;
}

/* --- Grid Areas --- */
.stats-card { grid-column: span 4; display: flex; justify-content: center; align-items: center; gap: 48px; padding: 32px; }
.skills-card { grid-column: span 2; }
.exp-card { grid-column: span 2; }
.edu-card { grid-column: span 2; }
.featured-card { grid-column: span 4; }
.projects-section { grid-column: span 4; }
.contact-section { grid-column: span 4; text-align: center; }

/* ============================================
   STATS
   ============================================ */
.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: var(--border);
}

/* ============================================
   SKILLS
   ============================================ */
.skill-group {
    margin-bottom: 24px;
}

.skill-group:last-child {
    margin-bottom: 0;
}

.skill-group h3 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skill-bar-wrap {
    margin-bottom: 14px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-bar {
    height: 6px;
    background: var(--bg-subtle);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: var(--radius-full);
    width: 0;
    transition: width 1.2s ease-in-out;
}

/* Language Tags */
.lang-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lang-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-subtle);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.lang-tag i {
    color: var(--accent);
    font-size: 0.75rem;
}

/* ============================================
   TIMELINE (Experience)
   ============================================ */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -28px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--accent);
}

.timeline-item:first-child .timeline-marker {
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow-strong);
}

.timeline-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.timeline-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   EDUCATION
   ============================================ */
.edu-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.edu-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.edu-icon i {
    color: var(--accent);
    font-size: 1.2rem;
}

.edu-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.edu-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================
   FEATURED PROJECTS
   ============================================ */
.featured-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.featured-header .card-title {
    margin-bottom: 0;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green-glow);
    color: var(--green);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.pulse {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.featured-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition);
}

.featured-item:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.04);
}

.featured-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.featured-item-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.featured-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition);
    text-decoration: none;
}

.featured-link:hover {
    color: var(--accent);
    background: var(--accent-glow);
}

.featured-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* --- Tag List (shared) --- */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-list span {
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

/* ============================================
   PROJECTS GRID
   ============================================ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.project-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.project-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.project-icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.project-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.project-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 32px;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.contact-item:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
}

.contact-item i {
    font-size: 1rem;
}

/* Footer */
.footer {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

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

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: all var(--transition);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}

.scroll-top-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.scroll-top-btn.visible {
    display: flex;
}

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

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animate cards on scroll */
.bento-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.bento-card:nth-child(1) { animation-delay: 0.1s; }
.bento-card:nth-child(2) { animation-delay: 0.15s; }
.bento-card:nth-child(3) { animation-delay: 0.2s; }
.bento-card:nth-child(4) { animation-delay: 0.25s; }
.bento-card:nth-child(5) { animation-delay: 0.3s; }
.bento-card:nth-child(6) { animation-delay: 0.35s; }
.bento-card:nth-child(7) { animation-delay: 0.4s; }

/* ============================================
   RESPONSIVE - TABLET (<=1024px)
   ============================================ */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-card,
    .featured-card,
    .projects-section,
    .contact-section {
        grid-column: span 2;
    }

    .skills-card,
    .exp-card,
    .edu-card {
        grid-column: span 1;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (<=768px)
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .lang-switch {
        padding: 2px;
    }

    .lang-btn {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .hero {
        min-height: auto;
        padding: 60px 20px 40px;
    }

    .hero-name {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }

    .hero-bio {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        padding: 0 16px 60px;
        gap: 12px;
    }

    .stats-card,
    .skills-card,
    .exp-card,
    .edu-card,
    .featured-card,
    .projects-section,
    .contact-section {
        grid-column: span 1;
    }

    .stats-card {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 24px;
        justify-content: space-around;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-divider {
        display: none;
    }

    .bento-card {
        padding: 24px;
    }

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

    .featured-header {
        flex-wrap: wrap;
        gap: 12px;
    }

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

    .contact-grid {
        flex-direction: column;
        align-items: center;
    }

    .contact-item {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-marker {
        left: -24px;
        width: 10px;
        height: 10px;
    }

    .timeline::before {
        left: 4px;
    }
}

/* ============================================
   RESPONSIVE - SMALL (<=480px)
   ============================================ */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 16px;
    }

    .bento-grid {
        padding: 0 12px 48px;
        gap: 10px;
    }

    .bento-card {
        padding: 20px;
        border-radius: var(--radius-lg);
    }

    .hero {
        padding: 48px 16px 32px;
    }

    .hero-badge {
        margin-bottom: 24px;
        font-size: 0.8rem;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.78rem;
    }

    .scroll-top-btn {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   RTL SUPPORT
   ============================================ */
[dir="rtl"] {
    direction: rtl;
    font-family: var(--font-ar);
}

[dir="rtl"] .timeline {
    padding-left: 0;
    padding-right: 28px;
}

[dir="rtl"] .timeline::before {
    left: auto;
    right: 6px;
}

[dir="rtl"] .timeline-marker {
    left: auto;
    right: -28px;
}

[dir="rtl"] .edu-item {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    [dir="rtl"] .timeline {
        padding-right: 24px;
    }

    [dir="rtl"] .timeline-marker {
        right: -24px;
    }

    [dir="rtl"] .timeline::before {
        right: 4px;
    }
}

/* ============================================
   PAGES: Projects, Services, Contact
   ============================================ */

/* Page Header */
.page-header {
    text-align: center;
    padding: 80px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    color: var(--text);
}

.page-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Pages Container */
.projects-page,
.services-page,
.contact-page {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Section Headers --- */
.featured-projects h2,
.all-projects h2,
.process-section h2,
.pricing-section h2,
.faq-section h2 {
    font-family: var(--font);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.featured-projects h2 i,
.all-projects h2 i,
.process-section h2 i,
.pricing-section h2 i,
.faq-section h2 i {
    color: var(--accent);
}

/* Featured Project Card */
.featured-projects,
.all-projects {
    margin-bottom: 80px;
}

.project-card.featured {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 40px;
    margin-bottom: 40px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
}

.project-card.featured h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 700;
}

.project-card.featured .project-desc {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.tech-stack,
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tech-stack span,
.tech-tags span {
    background: var(--bg-subtle);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

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

.projects-grid .project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: var(--radius-2xl);
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

.projects-grid .project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.project-icon-page {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.projects-grid .project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text);
    font-weight: 600;
}

.projects-grid .project-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* --- Services Page --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 36px;
    border-radius: var(--radius-2xl);
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text);
    font-weight: 600;
}

.service-card > p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.service-features {
    list-style: none;
    margin-bottom: 24px;
    padding: 0;
}

.service-features li {
    padding: 8px 0;
    color: var(--text);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-features li::before {
    content: '\2713';
    color: var(--green);
    font-weight: bold;
}

/* Process Steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}

.process-step {
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow);
}

.step-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 12px;
    line-height: 1;
}

.process-step h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
}

.process-step p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Pricing */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: var(--radius-2xl);
    text-align: center;
    position: relative;
    box-shadow: var(--shadow);
}

.pricing-card.featured {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.featured-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.pricing-card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 600;
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.pricing-card > p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.pricing-card ul li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.pricing-card ul li::before {
    content: '\2713';
    color: var(--accent);
    margin-right: 12px;
    font-weight: bold;
}

/* --- Contact Page --- */
.contact-content {
    margin-bottom: 80px;
}

.contact-grid-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.contact-form-section h2,
.contact-info-section h2 {
    font-family: var(--font);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 36px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-full);
    transition: background var(--transition);
    font-family: var(--font);
}

.submit-btn:hover {
    background: var(--accent-hover);
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.contact-card-page {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.contact-card-page h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.contact-card-page a,
.contact-card-page p {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.contact-card-page a:hover {
    color: var(--accent);
}

.availability-status {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 28px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow);
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

.availability-status p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* FAQ */
.faq-grid {
    display: grid;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.faq-item summary {
    padding: 20px 24px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--accent);
    font-weight: 300;
}

.faq-item[open] summary::after {
    content: '\2212';
}

.faq-item p {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA */
.cta-section {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    margin-top: 80px;
    box-shadow: var(--shadow);
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.cta-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* --- OLD nav compatibility for subpages --- */
.ios-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
}

.ios-nav .nav-left {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.ios-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ios-nav .nav-right a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.ios-nav .nav-right a:hover {
    color: var(--text);
    background: var(--bg-subtle);
}

/* ios-btn for subpages */
.ios-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text);
}

.ios-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.ios-btn.primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.ios-btn.primary:hover {
    background: var(--accent-hover);
}

/* ios-footer for subpages */
.ios-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

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

/* Responsive for subpages */
@media (max-width: 900px) {
    .contact-grid-page {
        grid-template-columns: 1fr;
    }
    .contact-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .page-header {
        padding: 60px 20px 40px;
    }
    .page-header h1 {
        font-size: 2.2rem;
    }
    .projects-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-cards {
        grid-template-columns: 1fr;
    }
    .pricing-card.featured {
        transform: none;
    }
    .ios-nav {
        padding: 0 16px;
    }
    .ios-nav .nav-right a {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}
