/* Container adjustment */
.metric-header {
    position: relative; /* Anchor for the tooltip */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* The Icon itself */
.info-icon {
    cursor: help;
    color: #b5a478; /* Matching your gold/tan theme color */
    font-size: 0.8rem;
    border: 1px solid #b5a478;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    /* Ensure it can be tapped on mobile */
    -webkit-tap-highlight-color: transparent;
}

/* THE TOOLTIP - Fixed the "Black Box" issue */
.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 40px; /* Moves it above the number */
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    padding: 8px 12px;
    background-color: #1a1a1a; /* Clean charcoal black */
    color: #ffffff;
    font-size: 0.75rem;
    border-radius: 4px;
    text-align: center;
    
    /* Strict Hidden State */
    display: none; 
    opacity: 0;
    pointer-events: none; 
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); /* Added shadow for depth */
}

/* THE ARROW */
.info-icon::before {
    content: "";
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a1a;
    display: none;
    z-index: 99;
}

/* SHOW ON HOVER (Desktop) OR ACTIVE/FOCUS (Mobile Tap) */
.info-icon:hover::after,
.info-icon:hover::before,
.info-icon:active::after,
.info-icon:active::before,
.info-icon:focus::after,
.info-icon:focus::before {
    display: block;
    opacity: 1;
}

.project-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 3rem 6rem;
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.05) 0%, transparent 50%);
    position: relative;
}

.project-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(201, 169, 97, 0.08) 100%);
    border-radius: 50%;
}

.project-hero-content {
    max-width: 1000px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-block;
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--accent);
    transform: translateX(-5px);
}

.project-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.project-meta {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

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

.project-tags-hero .tag {
    padding: 0.6rem 1.5rem;
    background: white;
    color: var(--text);
    font-size: 1rem;
    letter-spacing: 0.05em;
    border: 1px solid var(--border);
}

/* Project Content Section */
.project-content-section {
    padding: 6rem 3rem;
    background: var(--secondary);
}

.project-container {
    max-width: 900px;
    margin: 0 auto;
}

.content-block {
    margin-bottom: 5rem;
    animation: fadeInUp 0.8s ease-out;
}

.content-block h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.content-block h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50%;
    height: 2px;
    background: var(--accent);
}

.content-block h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.content-block h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.8rem;
}

.content-block p {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.content-block ul {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

.content-block ul li {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text);
    padding-left: 2rem;
    margin-bottom: 1rem;
    position: relative;
}

.content-block ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.2rem;
}

/* Highlight Block */
.highlight-block {
    background: white;
    padding: 3rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.result-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--secondary);
    border: 1px solid var(--border);
}

.result-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 0.5rem 0;
}

.result-item h3::after {
    display: none;
}

.result-item p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}

/* Technology Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tech-item {
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.tech-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.tech-item h4 {
    margin-top: 0;
}

.tech-item p {
    font-size: 1.1rem;
    margin: 0;
}

/* Project Navigation */
.project-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
}

.nav-btn,
.nav-btn-center {
    padding: 1rem 2rem;
    background: white;
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-align: center;
}

.nav-btn:hover,
.nav-btn-center:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav-btn-center {
    flex: 0 0 auto;
}

/* Quote Block */
.quote-block {
    border-left: 4px solid var(--accent);
    padding-left: 2rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-light);
    font-size: 1.3rem;
}
/* =========================================
   PROJECT PAGE MOBILE OPTIMIZATION
   Paste this at the very bottom of project-page.css
   ========================================= */

@media (max-width: 768px) {
    /* 1. Fix Huge Hero Spacing */
    /* Reduces the massive top padding so content starts visible on phone screens */
    .project-hero {
        padding: 7rem 1.5rem 3rem;
        min-height: auto; /* Allow height to shrink on small screens */
    }

    .project-hero h1 {
        font-size: 2.5rem; /* Smaller title to prevent wrapping issues */
    }

    /* 2. Fix Content Width & Padding */
    /* Prevents text from hitting the very edge of the phone screen */
    .project-content-section {
        padding: 3rem 1.5rem;
    }

    /* 3. Stack the Project Navigation Buttons */
    /* Forces "Previous/Next" buttons to stack vertically instead of squishing */
    .project-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-btn, 
    .nav-btn-center {
        width: 100%;
        text-align: center;
    }

    /* 4. Fix Results Grid (The % stats) */
    /* Forces stats to show 2 per row or 1 per row depending on width */
    .results-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }

    /* 5. Fix Highlight Block Overflow */
    .highlight-block {
        padding: 1.5rem;
        margin: 2rem 0;
    }
}
