/* ====================================
   PROJECT PAGES SHARED STYLESHEET
   Light/Dark Mode — matches home page
   ==================================== */

:root {
    /* Dark Theme (Default) */
    --primary: #ffffff;
    --secondary: #f1f5f9;
    --accent: #0ea5e9;
    --accent-light: #38bdf8;
    --accent-secondary: #059669;
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-light: #94a3b8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 25px 50px rgba(15, 23, 42, 0.5);
    --shadow-lg: 0 25px 50px rgba(14, 165, 233, 0.2);
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme */
[data-theme="light"] {
    --primary: #1e293b;
    --secondary: #334155;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-light: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-card: rgba(15, 23, 42, 0.05);
    --border: rgba(15, 23, 42, 0.1);
    --shadow: 0 25px 50px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 25px 50px rgba(14, 165, 233, 0.1);
}

/* ====================================
   BASE STYLES
   ==================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    font-size: 16px;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

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

/* ====================================
   NAVIGATION
   ==================================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.9);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

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

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--accent-light), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    transition: width 0.3s ease;
}

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

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle i {
    position: absolute;
    transition: var(--transition);
}

.theme-toggle .fa-sun {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
    color: #f97316;
}

.theme-toggle .fa-moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    color: #f59e0b;
}

[data-theme="light"] .theme-toggle .fa-sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

[data-theme="light"] .theme-toggle .fa-moon {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 2px 0;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ====================================
   PROJECT HEADER
   ==================================== */

.project-header {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    text-align: center;
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.project-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(5, 150, 105, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(236, 72, 153, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.project-header .container {
    position: relative;
    z-index: 2;
}

.project-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.project-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
}

/* ====================================
   DOWNLOAD CARD
   ==================================== */

.download-card-header {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    max-width: 600px;
    margin: 0 auto;
}

.download-card-header:hover {
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.download-card-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.download-card-header p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.btn-download {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    font-size: 1rem;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
    color: white;
    text-decoration: none;
}

/* ====================================
   PROJECT CONTENT
   ==================================== */

.project-content {
    background: var(--bg-primary);
    padding: 0;
}

.project-content.with-description {
    padding: 4rem 0;
}

.dashboard-section {
    background: var(--bg-primary);
    padding: 0;
}

.dashboard-section.with-description {
    padding: 0 0 4rem 0;
}

.iframe-container {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin: 2rem auto;
    max-width: 1200px;
}

.iframe-container.fixed-height {
    height: fit-content;
    margin: 0 auto 4rem auto;
}

.iframe-container iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 12px;
    background: white;
}

.iframe-container.fixed-height iframe {
    height: 650px;
}

/* ====================================
   CONTENT SECTION (project description)
   ==================================== */

.content-section {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 3rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: var(--transition);
    max-width: 1200px;
    margin: 0 auto;
}

.content-section:hover {
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: var(--shadow-lg);
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-section h3 {
    color: var(--accent-light);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.content-section ul {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.content-section a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition);
}

.content-section a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ====================================
   PROJECT TAGS
   ==================================== */

.tag {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ====================================
   FOOTER
   ==================================== */

.footer {
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

/* ====================================
   MOBILE RESPONSIVENESS
   ==================================== */

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-controls {
        order: -1;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.97);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        backdrop-filter: blur(20px);
    }

    [data-theme="light"] .nav-links {
        background: rgba(255, 255, 255, 0.97);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-container {
        padding: 1rem;
    }

    .project-header {
        padding: 6rem 0 3rem;
    }

    .project-header h1 {
        font-size: 2rem;
    }

    .project-subtitle {
        font-size: 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .iframe-container iframe {
        height: 60vh;
    }

    .iframe-container.fixed-height iframe {
        height: 500px;
    }

    .download-card-header {
        padding: 1.5rem;
    }

    .content-section {
        padding: 2rem;
    }

    .project-content.with-description {
        padding: 2rem 0;
    }

    .dashboard-section.with-description {
        padding: 0 0 2rem 0;
    }
}
