/* ═══════════════════════════════════════════
PROJECT-STYLE.CSS
Companion to style.css — import both.
Layout: hero header + content sections
with alternating text/image blocks.
═══════════════════════════════════════════ */

/* ── Project Hero Header ───────────────────
Canvas animation fills the header.
3D model viewer sits right-side inside.
─────────────────────────────────────────── */
.proj-hero {
position: relative;
height: 62vh;
min-height: 340px;
max-height: 55vh;
margin-top: var(--nav-height);
display: flex;
align-items: stretch;
overflow: hidden;
border-bottom: 1px solid var(--border);
}

/* Canvas sits behind everything in the header */
#proj-canvas {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}

/* Gradient vignette so text stays readable */
.proj-hero::before {
content: '';
position: absolute;
inset: 0;
background:
    linear-gradient(to right,  var(--bg) 32%, transparent 68%),
    linear-gradient(to bottom, transparent 50%, var(--bg) 100%);
z-index: 1;
pointer-events: none;
}

/* Left: title block */
.proj-hero-text {
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 0 64px 48px;
flex: 0 0 55%;
max-width: 50vw;
}

.proj-breadcrumb {
display: flex;
align-items: center;
gap: 8px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--text-muted);
margin-bottom: 16px;
}
.proj-breadcrumb a {
color: var(--accent);
transition: opacity 0.2s;
}
.proj-breadcrumb a:hover { opacity: 0.7; }
.proj-breadcrumb span { color: var(--text-muted); }

.proj-client-badge {
display: inline-flex;
align-items: center;
gap: 7px;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent);
background: var(--accent-dim);
border: 1px solid rgba(78, 205, 196, 0.25);
padding: 4px 12px;
border-radius: 20px;
margin-bottom: 14px;
width: fit-content;
}
.proj-client-badge::before {
content: '';
width: 6px; height: 6px;
background: var(--accent);
border-radius: 50%;
animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
0%, 100% { opacity: 1; transform: scale(1); }
50%       { opacity: 0.4; transform: scale(0.7); }
}

.proj-title {
font-family: var(--font-display);
font-size: clamp(28px, 4.5vw, 54px);
font-weight: 800;
letter-spacing: -0.04em;
line-height: 1.05;
color: var(--text-primary);
margin-bottom: 14px;
}

.proj-tagline {
font-size: 15px;
color: var(--text-secondary);
line-height: 1.6;
max-width: 420px;
}

.proj-meta-row {
display: flex;
gap: 24px;
margin-top: 22px;
flex-wrap: wrap;
}
.proj-meta-item {
display: flex;
flex-direction: column;
gap: 2px;
}
.proj-meta-label {
font-size: 10px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--text-muted);
}
.proj-meta-value {
font-family: var(--font-display);
font-size: 13px;
font-weight: 600;
color: var(--text-primary);
}

/* Right: 3-D model viewer */
.proj-hero-model {
position: relative;
z-index: 2;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 20px 36px 20px 0;
}

.model-frame {
width: 100%;
max-width: 470px;
aspect-ratio: 1 / 1;
border-radius: var(--radius-md);
border: 1px solid var(--border);
background: var(--bg-card);
overflow: hidden;
position: relative;
box-shadow: var(--shadow);
}

/* model-viewer element styles */
.model-frame model-viewer {
width: 100%;
height: 100%;
--progress-bar-color: var(--accent);
--progress-mask: none;
}

/* Fallback when no model-viewer / GLB available */
.model-placeholder {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
color: var(--text-muted);
}
.model-placeholder svg {
width: 48px; height: 48px;
opacity: 0.4;
}
.model-placeholder p {
font-size: 12px;
letter-spacing: 0.06em;
text-transform: uppercase;
font-weight: 600;
}

/* Model corner badge */
.model-badge {
position: absolute;
bottom: 10px; right: 10px;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--accent);
background: var(--accent-dim);
padding: 3px 8px;
border-radius: 4px;
z-index: 3;
pointer-events: none;
}

/* ── Scroll indicator ──────────────────── */
.proj-scroll-hint {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 3;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
color: var(--text-muted);
font-size: 10px;
letter-spacing: 0.1em;
text-transform: uppercase;
animation: fade-bounce 2.5s ease-in-out infinite;
pointer-events: none;
}
.proj-scroll-hint svg {
    width: 16px; height: 16px;
    stroke: var(--text-muted);
}
@keyframes fade-bounce {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
    50%       { opacity: 0.8; transform: translateX(-50%) translateY(4px); }
}

/* ── Content area ──────────────────────── */
.proj-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 48px 120px;
}

/* Section block: text + image side-by-side */
.proj-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    margin-bottom: 96px;
}

/* Alternate: image left, text right */
.proj-section.flip {
    direction: rtl;
}
.proj-section.flip > * {
    direction: ltr;
}

/* Full-width section (no image) */
.proj-section.full {
    grid-template-columns: 1fr;
    max-width: 680px;
}

.proj-section-text {
    text-align: left;
}

.proj-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.proj-section-eyebrow::before {
    content: '';
    width: 18px; height: 1.5px;
    background: var(--accent);
}

.proj-section-title {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 16px;
}

.proj-section-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.proj-section-body p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.proj-section-video-wrap {
    display: flex;
    flex-direction: column;
    margin: 28px 0;
    width: 100%;
    align-items: center;
}

/* Inline highlight pill inside paragraph */
.proj-highlight {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 1px 7px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

/* Bullet list inside section */
.proj-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 4px;
}
.proj-list li {
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
}
.proj-list li::before {
    content: '→';
    color: var(--accent);
    flex-shrink: 0;
    font-size: 13px;
    margin-top: 1px;
}

/* Image side */
.proj-section-image {
    position: relative; 
}

.proj-img-wrap {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    /* aspect-ratio: 4 / 3; */
}
.proj-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.proj-img-wrap:hover img {
    transform: scale(1.03);
}

/* Accent corner on image */
.proj-img-wrap::after {
    content: '';
    position: absolute;
    top: -1px; right: -1px;
    width: 40px; height: 40px;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    border-radius: 0 var(--radius-md) 0 0;
    pointer-events: none;
}

.proj-img-caption {
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

/* ── Stat strip ────────────────────────── */
.proj-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 96px;
}
.proj-stat {
    background: var(--bg-card);
    padding: 28px 24px;
    text-align: center;
    transition: background var(--transition);
}
.proj-stat:hover { background: var(--bg-dropdown); }
.proj-stat-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 6px;
}
.proj-stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Tags / tech stack ─────────────────── */
.proj-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}
.proj-stack-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: -15px;
    margin-top: 20px;
}

.proj-tech-pill {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 5px 13px;
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), color var(--transition);
}
.proj-tech-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Nav arrows (prev / next project) ──── */
.proj-nav-bar {
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    }
.proj-nav-link {
    background: var(--bg);
    padding: 28px 40px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background var(--transition);
    cursor: pointer;
}
.proj-nav-link:hover { background: var(--bg-card); }
.proj-nav-link.next { text-align: right; align-items: flex-end; }
.proj-nav-link-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.proj-nav-link-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    transition: color var(--transition);
}
.proj-nav-link:hover .proj-nav-link-title { color: var(--accent); }

.thesis-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.thesis-callout {
    position: absolute;
    top: -35px;
    right: -20px;

    background: var(--accent);
    color: #000;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 20px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

/* Arrow pointing to the card */
.thesis-callout::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 25px;

    width: 0;
    height: 0;

    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--accent);
}


/* ── Responsive ────────────────────────── */
@media (max-width: 860px) {
    .proj-hero { height: auto; min-height: 0; flex-direction: column; max-height: none; }
    .proj-hero::before { background: linear-gradient(to bottom, transparent 60%, var(--bg) 100%); }
    .proj-hero-text { flex: none; padding: 100px 24px 32px; max-width: 100%; }
    .proj-hero-model { padding: 0 24px 40px; justify-content: flex-start; }
    .model-frame { max-width: 100%; }

    .proj-content { padding: 48px 24px 80px; }
    .proj-section, .proj-section.flip { grid-template-columns: 1fr; direction: ltr; gap: 32px; margin-bottom: 64px; }
    .proj-stats { grid-template-columns: 1fr; }
    .proj-nav-bar { grid-template-columns: 1fr; }
    .proj-nav-link.next { text-align: left; align-items: flex-start; }
}