@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* =============================================
   MARIA PAU — PORTFOLIO STYLESHEET
   Aesthetic: Refined dark science / editorial
   Fonts: Syne (display) + DM Sans (body)
============================================= */

/* 1. Variables & Reset */
:root {
    --bg: #080c10;
    --sidebar-bg: #060a0d;
    --card-bg: #0f1419;
    --card-border: rgba(255,255,255,0.06);
    --accent: #7c6af7;
    --accent-2: #4fc4cf;
    --accent-glow: rgba(124, 106, 247, 0.25);
    --accent-glow-2: rgba(79, 196, 207, 0.15);
    --text: #e8eaf0;
    --text-dim: #7a8494;
    --text-dimmer: #3d4654;
    --sidebar-w: 270px;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-theme {
    --bg: #f2f4f8;
    --sidebar-bg: #e8eaf0;
    --card-bg: #ffffff;
    --card-border: rgba(0,0,0,0.07);
    --text: #111418;
    --text-dim: #555e6e;
    --text-dimmer: #b0b8c6;
    --accent-glow: rgba(124, 106, 247, 0.12);
}


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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    line-height: 1.75;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s, color 0.4s;
}

/* 2. Ambient Orbs */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    transition: opacity 0.4s;
}
.orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, var(--accent) 0%, transparent 70%); top: -120px; right: 5%; }
.orb-2 { width: 350px; height: 350px; background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%); bottom: 10%; left: 30%; }
.orb-3 { width: 250px; height: 250px; background: radial-gradient(circle, #e040fb 0%, transparent 70%); top: 50%; right: 15%; opacity: 0.15; }
.light-theme .bg-orb { opacity: 0.12; }

/* 3. Sidebar */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0;
    border-right: 1px solid var(--card-border);
    padding: 36px 20px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: background 0.4s;
}

.sidebar-header {
    text-align: center;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--card-border);
}

.avatar-ring {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    margin: 0 auto 16px;
}
.nav-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--card-bg);
}

.sidebar-name {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    color: var(--text);
}

.sidebar-title {
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 4px 0 10px;
}

.sidebar-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-dim);
    font-size: 0.82rem;
    margin-bottom: 16px;
}
.sidebar-location i { color: var(--accent); font-size: 0.75rem; }

.social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.social-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-dim);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}
.social-btn:hover {
    background: var(--accent);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px var(--accent-glow);
}

/* Nav */
.nav-menu { flex: 1; padding-top: 28px; }
.nav-menu ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.nav-link {
    text-decoration: none;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
    position: relative;
}
.nav-link .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 0.85rem;
}
.nav-link:hover, .nav-link.active {
    background: rgba(124, 106, 247, 0.1);
    color: var(--accent);
}
.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.sidebar-footer { padding-top: 20px; border-top: 1px solid var(--card-border); }
#theme-toggle {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-dim);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
#theme-toggle:hover {
    background: rgba(124, 106, 247, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}

/* 4. Content Area */
.content-area {
    margin-left: var(--sidebar-w);
    flex: 1;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

/* 5. Hero */
.hero-full {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: url('Sports2.jpg') no-repeat center center / cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(8, 12, 16, 0.55) 0%,
        rgba(8, 12, 16, 0.75) 60%,
        rgba(8, 12, 16, 1) 100%
    );
}

.hero-text-center {
    position: relative;
    z-index: 2;
    max-width: 700px;
    width: 100%;
    padding: 0 30px;
    animation: heroFadeIn 1.1s ease forwards;
}
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 18px;
    font-weight: 400;
}

.hero-text-center h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(4rem, 10vw, 7.5rem);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 22px;
}
.name-accent {
    -webkit-text-stroke: 2px var(--accent);
    color: transparent;
    display: block;
}

.hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 36px;
    font-weight: 300;
}
.highlight-text {
    color: var(--accent-2);
    font-weight: 500;
}

.hero-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.cta-primary {
    background: var(--accent);
    color: white;
    padding: 13px 28px;
    border-radius: 100px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
    background: #9580ff;
}

.cta-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 13px 28px;
    border-radius: 100px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}
.cta-secondary:hover {
    border-color: white;
    background: rgba(255,255,255,0.08);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 38px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: fadeInUp 1.5s 1s ease both;
}
.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(0.7); opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 6. Content Wrapper */
.content-wrapper {
    padding: 80px 7% 60px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 90px;
}

/* 7. Section Base */
.section-label {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
    font-weight: 500;
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 36px;
    line-height: 1.15;
}

.section-sub {
    color: var(--text-dim);
    font-size: 1rem;
    margin-top: -20px;
    margin-bottom: 36px;
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 8. About Layout */
.about-layout {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.about-text .lead-text {
    font-size: 1.15rem;
    color: var(--text);
    font-weight: 400;
    margin-bottom: 18px;
    line-height: 1.65;
}

.about-text p {
    color: var(--text-dim);
    margin-bottom: 16px;
    font-size: 0.97rem;
}

.about-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 32px;
    padding: 22px 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
}
.stat-item { text-align: center; }
.stat-num {
    display: block;
    font-family: 'Syne', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--accent);
}
.stat-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--card-border);
}

/* Slideshow */
.about-slideshow { }
.slideshow-container {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    position: relative;
}
.slideshow-wrapper {
    display: flex;
    transition: transform 0.9s cubic-bezier(0.45, 0, 0.55, 1);
}
.mySlides {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
}
.mySlides img {
    width: 100%;
    height: 340px;
    object-fit: contain;
    display: block;
    background-color: #080c10;
}

.light-theme .mySlides img {
    background-color: #e8eaf0;
}
.slide-caption {
    padding: 14px 18px;
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: center;
}
.slide-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 0 18px 14px;
}
.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-dimmer);
    cursor: pointer;
    transition: var(--transition);
}
.dot.active {
    background: var(--accent);
    width: 18px;
    border-radius: 3px;
}

/* 9. Skills */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.skill-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, var(--accent), var(--accent-2));
    opacity: 0;
    transition: var(--transition);
}
.skill-card:hover { transform: translateY(-4px); border-color: rgba(124,106,247,0.3); }
.skill-card:hover::before { opacity: 1; }

.skill-card-icon {
    width: 38px;
    height: 38px;
    background: rgba(124, 106, 247, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.skill-card h4 {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.tags span {
    background: rgba(124, 106, 247, 0.08);
    color: var(--accent);
    border: 1px solid rgba(124, 106, 247, 0.2);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 400;
    transition: var(--transition);
}
.tags span:hover {
    background: rgba(124, 106, 247, 0.18);
}

/* 10. Resume */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 36px;
}
.section-header-row .section-title { margin-bottom: 0; }

.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 20px;
    border-radius: 100px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}
.download-btn:hover {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.resume-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.resume-category {
    font-family: 'Syne', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--card-border);
}
.resume-category i { color: var(--accent); }

.timeline { position: relative; padding-left: 24px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 6px; top: 8px; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}
.timeline-dot {
    position: absolute;
    left: -21px;
    top: 6px;
    width: 13px;
    height: 13px;
    background: var(--bg);
    border: 2px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
}
.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    transition: var(--transition);
}
.timeline-content:hover {
    border-color: rgba(124,106,247,0.3);
    transform: translateX(3px);
}
.timeline-date {
    font-size: 0.74rem;
    color: var(--accent-2);
    letter-spacing: 0.08em;
    font-weight: 500;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}
.timeline-content h4 {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.timeline-content p {
    font-size: 0.84rem;
    color: var(--text-dim);
}

/* 11. Projects */
.project-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 32px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124,106,247,0.04) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition);
}
.project-card:hover {
    border-color: rgba(124,106,247,0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.project-card:hover::after { opacity: 1; }

.project-number {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dimmer);
    line-height: 1;
    min-width: 48px;
}
.project-card:hover .project-number { color: var(--accent); transition: var(--transition); }

.project-body h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.project-body p {
    font-size: 0.88rem;
    color: var(--text-dim);
    margin-bottom: 14px;
    max-width: 560px;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 10px 18px;
    border-radius: 100px;
    border: 1px solid rgba(124,106,247,0.3);
    transition: var(--transition);
}
.project-link:hover {
    background: var(--accent);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.project-soon {
    color: var(--text-dim);
    border-color: var(--card-border);
    opacity: 0.7;
}

/* 12. Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2), 0 0 20px var(--accent-glow);
}

.contact-icon {
    width: 52px;
    height: 52px;
    background: rgba(124, 106, 247, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 6px;
    transition: var(--transition);
}
.contact-card:hover .contact-icon {
    background: var(--accent);
    color: white;
}

.contact-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}
.contact-card p {
    font-size: 0.83rem;
    color: var(--text-dim);
}

.copy-hint {
    font-size: 0.75rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 13. Location */
.location-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}
.map-box {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--card-border);
}
.map-box iframe { display: block; width: 100%; height: 400px; }

.address-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
}
.address-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.address-item i {
    color: var(--accent);
    font-size: 0.95rem;
    margin-top: 3px;
    width: 16px;
}
.address-item h4 {
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.address-item p {
    font-size: 0.9rem;
    color: var(--text);
    margin: 0;
}

/* 14. Footer */
.footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.82rem;
    padding: 40px 0 20px;
    border-top: 1px solid var(--card-border);
}
.footer strong { color: var(--accent); }

/* 15. Responsive */
@media (max-width: 1024px) {
    .about-layout { grid-template-columns: 1fr; }
    .location-container { grid-template-columns: 1fr; }
    .resume-grid { grid-template-columns: 1fr; }
    .project-card { grid-template-columns: auto 1fr; }
    .project-link { grid-column: 1/-1; justify-self: start; }
}

@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }

    body { flex-direction: column; }

    .bg-orb { display: none; }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        gap: 14px;
        text-align: left;
        padding-bottom: 0;
        border-bottom: none;
    }
    .avatar-ring { width: 52px; height: 52px; margin: 0; }
    .sidebar-title { margin: 2px 0; }
    .sidebar-location { display: none; }
    .social-links { margin-top: 0; }

    .nav-menu { padding-top: 0; flex: unset; }
    .nav-menu ul { flex-direction: row; gap: 4px; flex-wrap: wrap; }
    .nav-link { padding: 8px 12px; font-size: 0.8rem; }
    .nav-link.active::before { display: none; }

    .sidebar-footer { padding-top: 0; border-top: none; }

    .content-area { margin-left: 0; }

    .hero-full { height: 90vh; }

    .content-wrapper { padding: 60px 5% 40px; gap: 60px; }

    .project-card { display: block; }
    .project-number { font-size: 1.5rem; margin-bottom: 8px; }
}

/* =============================================
   PROJECT 03 — Expanded DB Card
============================================= */
.project-card--expanded {
    display: block !important;
    padding: 32px;
}

.project-card-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 24px;
    margin-bottom: 32px;
}

.project-context {
    font-size: 0.75rem !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-2) !important;
    margin-bottom: 10px !important;
    font-weight: 500;
}

.project-requirements {
    list-style: none;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.project-requirements li {
    font-size: 0.87rem;
    color: var(--text-dim);
    padding-left: 18px;
    position: relative;
    line-height: 1.55;
}
.project-requirements li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
}

/* DB Schema section */
.project-db-section {
    background: rgba(124, 106, 247, 0.04);
    border: 1px solid rgba(124, 106, 247, 0.15);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 8px;
}

.db-schema-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.db-schema-title i { color: var(--accent); }

.db-image-wrapper {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--card-border);
    margin-bottom: 28px;
    background: #fff;
}
.db-diagram-img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}
.db-image-wrapper:hover .db-diagram-img {
    transform: scale(1.015);
}

/* Explanation */
.db-explanation h4 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}
.db-explanation > p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 22px;
    line-height: 1.7;
}

.db-relations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.db-relation-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: var(--transition);
}
.db-relation-item:hover {
    border-color: rgba(124,106,247,0.3);
}

.db-relation-badge {
    flex-shrink: 0;
    background: rgba(124, 106, 247, 0.15);
    color: var(--accent);
    border: 1px solid rgba(124, 106, 247, 0.3);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Syne', sans-serif;
    margin-top: 2px;
}

.db-relation-item strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text);
    margin-bottom: 4px;
}
.db-relation-item p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin: 0;
}
.db-relation-item code {
    background: rgba(124,106,247,0.1);
    color: var(--accent-2);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.78rem;
}

@media (max-width: 768px) {
    .project-card-top { grid-template-columns: auto 1fr; }
    .project-card-top .project-link { display: none; }
    .db-relations { grid-template-columns: 1fr; }
}

/* =============================================
   CLICKABLE PROJECT CARDS (index page)
============================================= */
.project-card--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
}
.project-card--link:hover .project-number { color: var(--accent); }

/* =============================================
   PROJECT DETAIL PAGES
============================================= */
.project-page {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.project-hero {
    padding: 80px 8% 60px;
    border-bottom: 1px solid var(--card-border);
    position: relative;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 40px;
    transition: var(--transition);
}
.back-link:hover { color: var(--accent); }
.back-link i { font-size: 0.8rem; }

.project-hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.project-hero-num {
    font-family: 'Syne', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent);
    background: rgba(124,106,247,0.1);
    border: 1px solid rgba(124,106,247,0.25);
    padding: 4px 12px;
    border-radius: 100px;
}
.project-hero-category {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.project-hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 22px;
    color: var(--text);
}

.project-hero-sub {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 620px;
    line-height: 1.7;
    margin-bottom: 30px;
}

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

.project-content {
    padding: 60px 8%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.project-section h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.project-section h2 i { color: var(--accent); font-size: 1rem; }

.project-section p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 14px;
}

.project-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.project-section ul li {
    color: var(--text-dim);
    font-size: 0.92rem;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}
.project-section ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Two column layout for detail pages */
.project-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

/* Info cards on detail pages */
.project-info-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px 28px;
}
.project-info-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}
.project-info-card p, .project-info-card li {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.65;
}

/* Full-width image block */
.project-image-block {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: #fff;
}
.project-image-block img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}
.project-image-block:hover img { transform: scale(1.015); }
.project-image-caption {
    background: var(--card-bg);
    padding: 12px 20px;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
    border-top: 1px solid var(--card-border);
}

/* Relations grid (DB page) */
.relations-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* "Coming soon" hero style */
.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(79,196,207,0.1);
    border: 1px solid rgba(79,196,207,0.3);
    color: var(--accent-2);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.project-footer-nav {
    border-top: 1px solid var(--card-border);
    padding: 40px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.project-footer-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition);
}
.project-footer-nav a:hover { color: var(--accent); }

@media (max-width: 768px) {
    .project-page { margin-left: 0; }
    .project-hero { padding: 40px 5% 40px; }
    .project-content { padding: 40px 5%; gap: 40px; }
    .project-two-col { grid-template-columns: 1fr; }
    .relations-grid { grid-template-columns: 1fr; }
    .project-card--link { grid-template-columns: auto 1fr; }
    .project-card--link .project-link { display: none; }
}

/* =============================================
   CLINICAL DB PROJECT — Schema tables & groups
============================================= */
.db-group-label {
    font-family: 'Syne', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 8px 0 14px;
    border-bottom: 1px solid rgba(124,106,247,0.2);
    margin: 32px 0 16px;
}

.schema-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.8rem;
}
.schema-table tr {
    border-bottom: 1px solid var(--card-border);
    transition: background var(--transition);
}
.schema-table tr:last-child { border-bottom: none; }
.schema-table tr:hover { background: rgba(124,106,247,0.05); }
.schema-table td {
    padding: 6px 8px;
    vertical-align: top;
    color: var(--text-dim);
    line-height: 1.5;
}
.schema-table td:first-child {
    width: 22px;
    text-align: center;
    font-size: 0.75rem;
    padding-right: 2px;
}
.schema-table td:nth-child(2) {
    width: 160px;
    white-space: nowrap;
}
.schema-table td:nth-child(2) code {
    background: rgba(124,106,247,0.1);
    color: var(--accent-2);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.78rem;
}
.schema-table td:nth-child(3) { color: var(--text-dim); }
.col-pk { color: #f5a623; }
.col-fk { color: #e05c5c; }

.gdpr-note {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(79,196,207,0.07);
    border-left: 3px solid var(--accent-2);
    border-radius: 0 8px 8px 0;
    font-size: 0.8rem;
    color: var(--accent-2);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}
.gdpr-note i { margin-top: 2px; flex-shrink: 0; }
.gdpr-note code {
    background: rgba(79,196,207,0.12);
    color: var(--accent-2);
    padding: 1px 5px;
    border-radius: 4px;
}

/* Make relations-grid full-width on clinical page if needed */
.project-info-card[style*="grid-column"] {
    grid-column: 1 / -1;
}


/* =============================================
   PHOTO GALLERY — Portrait & Landscape groups
============================================= */

.photo-gallery {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
}

.gallery-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Divider label */
.gallery-group-label {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: 'Syne', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.gallery-group-line {
    flex: 1;
    height: 1px;
    background: var(--card-border);
}

/* ── Portrait row: 5 tall cards side by side ── */
.gallery-row--portrait {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.gallery-row--portrait .gallery-item {
    height: 320px;
}

.gallery-row--portrait .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* ── Landscape row: 3 wide cards ── */
.gallery-row--landscape {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gallery-row--landscape .gallery-item {
    height: 200px;
}

.gallery-row--landscape .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* ── Shared card styles ── */
.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1),
                box-shadow 0.35s cubic-bezier(0.4,0,0.2,1),
                border-color 0.35s;
}

.gallery-item:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(124,106,247,0.5);
    box-shadow: 0 12px 36px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,106,247,0.2);
    z-index: 2;
}

/* Caption slides up on hover */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 12px 10px;
    background: linear-gradient(to top, rgba(5,8,12,0.92) 0%, transparent 100%);
    color: #fff;
    font-size: 0.76rem;
    transform: translateY(4px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Light theme */
.light-theme .gallery-item { border-color: rgba(0,0,0,0.08); }
.light-theme .gallery-item:hover { border-color: rgba(124,106,247,0.4); }

/* Responsive */
@media (max-width: 900px) {
    .gallery-row--portrait {
        grid-template-columns: repeat(3, 1fr);
    }
    .gallery-row--portrait .gallery-item { height: 260px; }
    .gallery-row--landscape {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-row--landscape .gallery-item { height: 180px; }
}

@media (max-width: 540px) {
    .gallery-row--portrait {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .gallery-row--portrait .gallery-item { height: 200px; }
    .gallery-row--landscape {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .gallery-row--landscape .gallery-item { height: 200px; }
}

/* Hide old slideshow wrapper — replaced by gallery */
.about-slideshow { display: none; }

/* =============================================
   LAUNCH APP BUTTON & LIVE BADGE
============================================= */
.project-hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 100px;
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(124,106,247,0.35);
}
.launch-btn:hover {
    background: #9580ff;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(124,106,247,0.5);
}
.launch-btn i { font-size: 0.85rem; }

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(79,196,207,0.1);
    border: 1px solid rgba(79,196,207,0.35);
    color: var(--accent-2);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: var(--accent-2);
    border-radius: 50%;
    flex-shrink: 0;
    animation: livePulse 1.8s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(79,196,207,0.5); }
    50%       { opacity: 0.7; transform: scale(1.2); box-shadow: 0 0 0 5px rgba(79,196,207,0); }
}
