/* ========================
   PROJECT DETAIL — asset/css/project-detail.css
   Fixed images · Proper font sizes · nutsdev challenge/solution
   + You May Also Like
   ======================== */

/* ---- Active Nav Indicator ---- */
.nav-link, .mobile-link {
    position: relative;
    color: var(--text-muted); 
    transition: color 0.3s ease;
}
.nav-link:hover, .mobile-link:hover { color: var(--text-color); }
.nav-link.active, .mobile-link.active { color: var(--text-color); }

/* Desktop Dot */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #FF61D2; 
    box-shadow: 0 0 8px rgba(255, 97, 210, 0.8);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link.active::after { transform: translateX(-50%) scale(1); }

/* Mobile Dot */
.mobile-link { display: inline-block; }
.mobile-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -24px;
    transform: translateY(-50%) scale(0);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #FF61D2;
    box-shadow: 0 0 12px rgba(255, 97, 210, 0.8);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-link.active::before { transform: translateY(-50%) scale(1); }

.nav-contact-btn {
    font-size: 11px; text-transform: uppercase; letter-spacing: .15em;
    padding: 8px 20px; border: 1px solid currentColor; border-radius: 999px;
    transition: background-color .3s ease, color .3s ease; display: inline-block;
}
.nav-contact-btn:hover { background-color: var(--text-color); color: var(--bg-color); }

.mt_1{
    margin-top:1rem;
}

/* ---- Read progress ---- */
#read-progress {
    position: fixed; top: 0; left: 0; width: 100%; height: 2px;
    z-index: 9999; background: var(--line-color); pointer-events: none;
}
#read-progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #FF61D2, #6F4CFF);
    transition: width .06s linear;
    box-shadow: 0 0 8px rgba(255, 97, 210, .45);
}

/* ---- Shared ---- */
.pd-inner { max-width: 1280px; margin: 0 auto; padding: 0 6vw; }
.pd-section { padding: 5rem 0; background: var(--bg-color); position: relative; z-index: 10; }
.pd-section--tint {
    background: var(--surface-color);
    border-top: 1px solid var(--line-color);
    border-bottom: 1px solid var(--line-color);
}

.pd-eyebrow-label {
    display: block; font-size: 10px; text-transform: uppercase;
    letter-spacing: .3em; font-weight: 700; opacity: .38; margin-bottom: 1rem;
}
.pd-body {
    font-size: .875rem; line-height: 1.8;
    color: var(--text-color); opacity: .72; margin-bottom: 1.1rem;
}
.pd-body:last-child { margin-bottom: 0; }
.pd-body--max { max-width: 620px; }

/* ========================
   HERO
   ======================== */
#pd-hero { padding-top: 8rem; background: var(--bg-color); position: relative; z-index: 10; }
.pd-hero-text { max-width: 1280px; margin: 0 auto; padding: 0 6vw 3rem; }

/* Back link */
.pd-back {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .15em; color: var(--text-muted); text-decoration: none;
    opacity: .45; margin-bottom: 2.5rem;
    transition: opacity .25s ease, gap .25s ease;
}
.pd-back:hover { opacity: 1; gap: .65rem; }
.pd-back-icon { width: 16px; height: 16px; transition: transform .25s ease; }
.pd-back:hover .pd-back-icon { transform: translateX(-3px); }

/* Pills */
.pd-pills { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem; }
.pd-pill {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .4rem .9rem; border: 1px solid var(--line-color);
    border-radius: 999px; font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .12em;
    color: var(--text-muted); background: var(--card-bg);
}
.pd-pill--accent { border-color: rgba(111, 76, 255, .28); color: var(--text-color); }
.pd-pill--index { opacity: .3; }
.pd-pill-icon { width: 14px; height: 14px; flex-shrink: 0; overflow: visible; }
.pd-scan { stroke-dasharray: 10; stroke-dashoffset: 10; animation: pdScan 2s ease-in-out infinite; }
.pd-pulse { animation: pdPulse 2s ease-in-out infinite; }

/* Title */
.pd-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 700; letter-spacing: -.035em; line-height: 1.05;
    color: var(--text-color); margin-bottom: 2rem;
}

/* Tagline + visit row */
.pd-hero-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.pd-tagline {
    font-size: clamp(.875rem, 1.2vw, .95rem);
    font-weight: 500; line-height: 1.7; color: var(--text-color); opacity: .68;
    max-width: 480px; padding-left: 1rem; border-left: 2px solid;
    border-image: linear-gradient(180deg, #FF61D2, #6F4CFF) 1;
}
.pd-visit { display: inline-flex; text-decoration: none; flex-shrink: 0; }
.pd-visit-inner {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .14em; padding: 10px 20px;
    border: 1px solid var(--text-color); border-radius: 999px;
    color: var(--text-color); transition: background .3s ease, color .3s ease;
}
.pd-visit:hover .pd-visit-inner { background: var(--text-color); color: var(--bg-color); }
.pd-visit-ico { width: 14px; height: 14px; }

/* Hero image */
.pd-hero-img-wrap { max-width: 1280px; margin: 0 auto; padding: 0 6vw 0; }
.pd-hero-img {
    display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover;
    border-radius: 1.5rem; filter: contrast(1.02); transition: filter .5s ease;
}
html[data-theme='dark'] .pd-hero-img { filter: saturate(.82) brightness(.88) contrast(1.05); }
@media(max-width:768px){
    .pd-hero-img { aspect-ratio: 4/3; border-radius: 1rem; }
    .pd-hero-img-wrap { padding: 0 4vw; }
}

/* ========================
   STATS
   ======================== */
.pd-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line-color); border-radius: 1.25rem;
    overflow: hidden; margin-bottom: 5rem; background: var(--card-bg);
}
@media(max-width:768px){ .pd-stats { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:420px){ .pd-stats { grid-template-columns: 1fr; } }

.pd-stat {
    display: flex; flex-direction: column; gap: .5rem; padding: 1.6rem 1.5rem;
    border-right: 1px solid var(--line-color); transition: background .3s ease;
}
.pd-stat:last-child { border-right: none; }
.pd-stat:hover { background: var(--surface-color); }
@media(max-width:768px){
    .pd-stat:nth-child(2){ border-right: none; }
    .pd-stat:nth-child(1), .pd-stat:nth-child(2){ border-bottom: 1px solid var(--line-color); }
}
.pd-stat-ico { width: 24px; height: 24px; flex-shrink: 0; }
.pd-stat-ico svg { width: 100%; height: 100%; overflow: visible; }
.pd-stat-val {
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    font-weight: 700; letter-spacing: -.025em; color: var(--text-color); line-height: 1;
}
.pd-stat-lbl {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .2em; opacity: .38;
}

/* icon animations */
.pd-spin { transform-origin: center; animation: pdSpinAnim 12s linear infinite; }
.pd-orbit { transform-origin: 12px 12px; animation: pdSpinAnim 8s linear infinite; }
.pd-draw { stroke-dasharray: 80; stroke-dashoffset: 80; animation: pdDrawAnim 2s ease-out forwards .4s; }
.pd-check { stroke-dasharray: 40; stroke-dashoffset: 40; animation: pdDrawAnim 1s ease-out forwards .3s; }
.pd-blink { animation: pdBlink 2s ease-in-out infinite; }

/* ========================
   TWO-COL OVERVIEW
   ======================== */
.pd-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
@media(max-width:768px){ .pd-two-col { grid-template-columns: 1fr; gap: 3rem; } }

.pd-role-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .85rem; }
.pd-role-list li {
    display: flex; align-items: flex-start; gap: .75rem;
    font-size: .875rem; font-weight: 500; color: var(--text-color); opacity: .72; line-height: 1.55;
}
.pd-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: linear-gradient(135deg, #FF61D2, #6F4CFF); flex-shrink: 0; margin-top: .38em;
}

/* ========================
   IMAGES 
   ======================== */
.pd-img-block { 
    max-width: 1280px; 
    margin: 4rem auto; 
    padding: 0 6vw; 
}

/* Base Wrapper for Hardware Acceleration */
.pd-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3; /* Default shape for half-width */
    border-radius: 1.25rem;
    overflow: hidden;
    background: var(--surface-color);
    /* Forces the parent to handle the GPU layer, protecting the image */
    transform: translateZ(0);
}

/* Full Width Wrapper */
.pd-img-wrap--full {
    aspect-ratio: 16 / 9;
    border-radius: 1.5rem;
}

/* The Image Itself */
.pd-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Lock the starting scale so the browser renders native resolution */
    transform: scale(1);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
    filter: contrast(1.02);
}

html[data-theme='dark'] .pd-img { 
    filter: saturate(.82) brightness(.88); 
}

/* Only apply zoom if we are NOT on mobile to save performance */
@media(min-width: 768px) {
    .pd-img-wrap:hover .pd-img { 
        transform: scale(1.05); 
    }
}

/* Half-block layout structure */
.pd-img-block--half { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1.5rem; 
}

/* Mobile Responsive */
@media(max-width:640px){ 
    .pd-img-block--half { grid-template-columns: 1fr; } 
}

@media(max-width:768px){
    /* On mobile, stack them and make everything standard widescreen */
    .pd-img-wrap, .pd-img-wrap--full { 
        aspect-ratio: 16 / 9; 
        border-radius: 1rem; 
    }
    .pd-img-block { padding: 0 4vw; }
}

/* ========================
   CHALLENGE / SOLUTION
   ======================== */
.pd-case { display: flex; flex-direction: column; max-width: 720px; }
.pd-case-ico { width: 40px; height: 40px; margin-bottom: 1.75rem; flex-shrink: 0; }
.pd-case-ico svg { width: 100%; height: 100%; overflow: visible; }
.pd-case-eyebrow {
    font-size: 10px; text-transform: uppercase; letter-spacing: .32em;
    font-weight: 700; opacity: .38; margin-bottom: 1rem;
}
.pd-case-h {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 700; letter-spacing: -.03em; line-height: 1.2;
    color: var(--text-color); margin-bottom: 1.5rem;
}

/* ========================
   TECH STACK
   ======================== */
.pd-section-h {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 700; letter-spacing: -.025em;
    color: var(--text-color); margin-bottom: 2.5rem; line-height: 1.2;
}
.pd-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media(max-width:768px){ .pd-stack { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:420px){ .pd-stack { grid-template-columns: 1fr; } }

.pd-tech {
    display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem 1.4rem;
    border: 1px solid var(--line-color); border-radius: 1.1rem;
    background: var(--card-bg); cursor: default;
    transition: border-color .3s ease, transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease;
}
.pd-tech:hover {
    border-color: rgba(111, 76, 255, .35); transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(111, 76, 255, .07);
}
html[data-theme='dark'] .pd-tech:hover { box-shadow: 0 14px 36px rgba(111, 76, 255, .12); }
.pd-tech-ico { width: 28px; height: 28px; transition: filter .3s ease; }
.pd-tech-ico svg { width: 100%; height: 100%; overflow: visible; }
.pd-tech:hover .pd-tech-ico { filter: drop-shadow(0 0 5px rgba(255, 97, 210, .45)); }
.pd-tech-name { font-size: .875rem; font-weight: 700; letter-spacing: -.01em; color: var(--text-color); line-height: 1; }
.pd-tech-role { font-size: 10px; text-transform: uppercase; letter-spacing: .18em; font-weight: 600; opacity: .32; }

/* ========================
   OUTCOME
   ======================== */
.pd-outcome { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
@media(max-width:768px){ .pd-outcome { grid-template-columns: 1fr; gap: 3rem; } }
.pd-outcome-h {
    font-size: clamp(1.4rem, 2.8vw, 2.1rem);
    font-weight: 700; letter-spacing: -.03em; line-height: 1.2;
    color: var(--text-color); margin-top: .5rem;
}

/* ========================
   YOU MAY ALSO LIKE
   ======================== */
.pd-also { padding: 5rem 0; background: var(--bg-color); position: relative; z-index: 10; }
.pd-also-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }
.pd-also-h { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 700; letter-spacing: -.02em; color: var(--text-color); }
.pd-viewall {
    display: inline-flex; text-decoration: none; font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .15em; color: var(--text-muted); opacity: .4; transition: opacity .25s ease;
}
.pd-viewall:hover { opacity: 1; }
.pd-also-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media(max-width:900px){ .pd-also-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:540px){ .pd-also-grid { grid-template-columns: 1fr; } }
.pd-also-card { display: block; text-decoration: none; color: var(--text-color); }
.pd-also-img-wrap {
    position: relative; width: 100%; aspect-ratio: 16/10;
    border-radius: 1.25rem; overflow: hidden; background: var(--surface-color); margin-bottom: .9rem;
}
.pd-also-img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transform: scale(1); transition: transform .7s cubic-bezier(.22, 1, .36, 1), filter .4s ease; filter: contrast(1.02);
}
html[data-theme='dark'] .pd-also-img { filter: saturate(.82) brightness(.88); }
.pd-also-card:hover .pd-also-img { transform: scale(1.05); }
.pd-also-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .42) 0%, transparent 55%);
    opacity: 0; transition: opacity .35s ease; border-radius: 1.25rem;
}
html[data-theme='dark'] .pd-also-scrim {
    background: linear-gradient(to top, rgba(0, 0, 0, .62) 0%, rgba(111, 76, 255, .06) 100%);
}
.pd-also-card:hover .pd-also-scrim { opacity: 1; }
.pd-also-btn {
    position: absolute; bottom: .9rem; right: .9rem;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
    color: #fff; padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px;
    background: rgba(255, 255, 255, .08); backdrop-filter: blur(8px);
    transform: translateY(6px); opacity: 0;
    transition: opacity .3s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
}
.pd-also-card:hover .pd-also-btn { opacity: 1; transform: translateY(0); }
.pd-also-title {
    font-size: .9rem; font-weight: 600; letter-spacing: -.015em;
    color: var(--text-color); line-height: 1.3; margin-bottom: .25rem;
    transition: color .3s ease;
}
.pd-also-card:hover .pd-also-title { color: #6F4CFF; }
.pd-also-type {
    display: block; font-size: 10px; text-transform: uppercase;
    letter-spacing: .18em; font-weight: 600; color: var(--text-muted); opacity: .42;
}

/* ========================
   FOOTER
   ======================== */
#pd-footer { background: var(--bg-color); padding: 2rem 0; position: relative; z-index: 10; }
.pd-footer-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 6vw;
    display: flex; justify-content: space-between; align-items: center;
}

/* ========================
   KEYFRAMES
   ======================== */
@keyframes pdSpinAnim { to { transform: rotate(360deg); } }
@keyframes pdPulse { 0%, 100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes pdDrawAnim { to { stroke-dashoffset: 0; } }
@keyframes pdScan { 0%, 100% { stroke-dashoffset: 10; opacity: .3; } 50% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes pdBlink { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* Removed basic CSS transition for .reveal-item to let GSAP handle it fully */
.reveal-item { opacity: 0; }