/* ==========================================================================
   TORITOSYSTEM — Portfolio Detail Pages (dark theme overrides)
   Scoped to body.portfolio-page so only portfolio pages get flipped to dark.
   Works on top of portfolio-detail.css + landing.css.
   ========================================================================== */

/* ---------- Base ---------- */
body.portfolio-page {
    background: #070B17;
    color: #fff;
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Header / Nav (match main landing) ---------- */
body.portfolio-page .portfolio-header {
    background:
        radial-gradient(ellipse 80% 60% at 18% 12%, rgba(225, 29, 72, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 85%, rgba(255, 215, 106, 0.08) 0%, transparent 55%),
        linear-gradient(160deg, #0E1A3E 0%, #0A0F2A 55%, #050914 100%) !important;
    padding-bottom: 0 !important;
}

body.portfolio-page nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.portfolio-page .logo a { color: #fff; }
body.portfolio-page .nav-menu a { color: rgba(255, 255, 255, 0.72); }
body.portfolio-page .nav-menu a:hover { color: #fff; }
body.portfolio-page .nav-menu .btn-contact {
    background: #fff;
    color: #0F1B3C;
}
body.portfolio-page .nav-menu .btn-contact:hover {
    background: #E11D48;
    color: #fff;
}
body.portfolio-page .menu-toggle { color: #fff; }

/* ---------- Hero (portfolio-hero, portfolio-hero2) ---------- */
body.portfolio-page .portfolio-hero,
body.portfolio-page .portfolio-hero2 {
    background:
        radial-gradient(ellipse 60% 45% at 85% 15%, rgba(103, 232, 249, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 50% 45% at 10% 90%, rgba(167, 139, 250, 0.10) 0%, transparent 55%),
        linear-gradient(180deg, #0F1829 0%, #070B17 100%) !important;
    color: #fff !important;
}

body.portfolio-page .hero-left h1,
body.portfolio-page .portfolio-hero2 .hero-left h1,
body.portfolio-page .portfolio-title h1 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.035em;
}

body.portfolio-page .hero-subtitle,
body.portfolio-page .portfolio-hero2 .hero-subtitle {
    color: rgba(255, 255, 255, 0.75);
}

body.portfolio-page .tech-stack h3,
body.portfolio-page .tech-stack-title,
body.portfolio-page .portfolio-hero2 .tech-stack h3 {
    color: rgba(255, 255, 255, 0.55) !important;
    font-family: 'SF Mono', ui-monospace, 'Menlo', monospace;
    letter-spacing: 0.2em !important;
}

/* ---------- Content section base ---------- */
body.portfolio-page .portfolio-content {
    background: transparent;
    color: #fff;
}

body.portfolio-page .portfolio-overview-full,
body.portfolio-page .portfolio-overview,
body.portfolio-page .portfolio-features,
body.portfolio-page .portfolio-showcase,
body.portfolio-page .portfolio-story,
body.portfolio-page .portfolio-growth,
body.portfolio-page .portfolio-testimonial {
    color: rgba(255, 255, 255, 0.85);
}

/* Section headings */
body.portfolio-page .portfolio-info h2,
body.portfolio-page .portfolio-challenge h2,
body.portfolio-page .portfolio-features h2,
body.portfolio-page .portfolio-showcase h2,
body.portfolio-page .portfolio-story h2,
body.portfolio-page .portfolio-growth h2,
body.portfolio-page .portfolio-overview-full h2 {
    color: #fff !important;
    font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
    font-weight: 800 !important;
    letter-spacing: -0.025em !important;
    font-size: 1.9rem !important;
}

body.portfolio-page .portfolio-info h2::after,
body.portfolio-page .portfolio-challenge h2::after,
body.portfolio-page .portfolio-features h2::after,
body.portfolio-page .portfolio-showcase h2::after,
body.portfolio-page .portfolio-story h2::after,
body.portfolio-page .portfolio-growth h2::after,
body.portfolio-page .portfolio-overview-full h2::after {
    background: linear-gradient(90deg, #E11D48 0%, #FFD76A 100%) !important;
    height: 3px;
    border-radius: 2px;
}

body.portfolio-page .portfolio-info p,
body.portfolio-page .portfolio-challenge p,
body.portfolio-page .portfolio-overview-full p {
    color: rgba(255, 255, 255, 0.75);
}

body.portfolio-page .portfolio-overview-full > a,
body.portfolio-page .portfolio-overview a {
    color: #67E8F9;
    text-decoration: underline;
    text-underline-offset: 4px;
}

body.portfolio-page .project-details {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 24px 28px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.portfolio-page .detail-item h4 {
    color: #FFD76A !important;
    font-family: 'SF Mono', ui-monospace, 'Menlo', monospace;
    font-size: 0.78rem !important;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

body.portfolio-page .detail-item p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1rem;
    margin-top: 6px;
}

/* ---------- Feature grid ---------- */
body.portfolio-page .feature-item {
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    border-radius: 16px !important;
}

body.portfolio-page .feature-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(103, 232, 249, 0.3);
    box-shadow: 0 24px 48px -16px rgba(103, 232, 249, 0.25) !important;
}

body.portfolio-page .feature-item h3 {
    color: #fff !important;
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.portfolio-page .feature-item p {
    color: rgba(255, 255, 255, 0.72);
}

body.portfolio-page .feature-icon {
    background: linear-gradient(135deg, #67E8F9 0%, #A78BFA 100%) !important;
    box-shadow: 0 10px 22px -6px rgba(103, 232, 249, 0.5);
}

/* ---------- Screenshots ---------- */
body.portfolio-page .screenshot {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px !important;
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: zoom-in;
}

body.portfolio-page .screenshot:hover {
    border-color: rgba(103, 232, 249, 0.4);
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.6);
    transform: translateY(-4px) !important;
}

body.portfolio-page .screenshot img {
    transition: transform 0.4s ease;
}

body.portfolio-page .screenshot:hover img {
    transform: scale(1.04);
}

body.portfolio-page .screenshot p {
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
}

/* ---------- Portfolio story ---------- */
body.portfolio-page .portfolio-story h3 {
    color: #67E8F9 !important;
    font-weight: 700;
    margin-top: 32px;
    letter-spacing: -0.02em;
}

body.portfolio-page .portfolio-story p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.75;
}

body.portfolio-page .portfolio-story strong { color: #fff; }

body.portfolio-page .portfolio-story ul {
    color: rgba(255, 255, 255, 0.75);
}

body.portfolio-page .portfolio-story ul li {
    margin-bottom: 6px;
}

/* ---------- Growth stats ---------- */
body.portfolio-page .stat-item {
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid rgba(103, 232, 249, 0.2);
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(10px);
    border-radius: 16px !important;
}

body.portfolio-page .stat-item .stat-number {
    color: transparent !important;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, #67E8F9 0%, #A78BFA 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 16px rgba(103, 232, 249, 0.3));
}

body.portfolio-page .stat-item p {
    color: rgba(255, 255, 255, 0.68);
}

/* ---------- Client quote ---------- */
body.portfolio-page .client-quote {
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid #E11D48;
    box-shadow: none !important;
    border-radius: 0 14px 14px 0 !important;
}

body.portfolio-page .quote-icon {
    color: #E11D48;
    opacity: 0.4;
}

body.portfolio-page blockquote {
    color: #fff;
    font-style: italic;
}

body.portfolio-page .client-info h4 {
    color: #fff;
    font-weight: 700;
}

body.portfolio-page .client-info > p {
    color: rgba(255, 255, 255, 0.55);
    font-family: 'SF Mono', ui-monospace, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ---------- Portfolio CTA (final block) ---------- */
body.portfolio-page .portfolio-cta {
    background:
        radial-gradient(ellipse 50% 45% at 50% 0%, rgba(225, 29, 72, 0.15) 0%, transparent 55%),
        linear-gradient(180deg, #0F1B3C 0%, #050914 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px -40px rgba(225, 29, 72, 0.35) !important;
    border-radius: 20px !important;
    padding: 48px 40px !important;
}

body.portfolio-page .portfolio-cta h2 {
    color: #fff !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
}

body.portfolio-page .portfolio-cta p {
    color: rgba(255, 255, 255, 0.72);
}

body.portfolio-page .portfolio-cta .btn-primary {
    background: #fff !important;
    color: #0F1B3C !important;
    font-weight: 700;
    border-radius: 8px !important;
    padding: 16px 36px !important;
    box-shadow: 0 14px 28px -8px rgba(255, 255, 255, 0.25) !important;
}

body.portfolio-page .portfolio-cta .btn-primary:hover {
    background: #E11D48 !important;
    color: #fff !important;
    box-shadow: 0 18px 34px -8px rgba(225, 29, 72, 0.5) !important;
}

/* ---------- Back button ---------- */
body.portfolio-page .portfolio-navigation {
    margin-top: 40px;
}

body.portfolio-page .btn-back {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 24px !important;
    border-radius: 999px !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

body.portfolio-page .btn-back:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff !important;
    transform: translateX(-4px);
}

/* ---------- Platform tag chips (hero tech stack already has custom colors) ---------- */
body.portfolio-page .platform {
    box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.4);
}

/* ---------- Footer ---------- */
body.portfolio-page footer {
    background: #0B1224 !important;
    color: rgba(255, 255, 255, 0.7);
}

body.portfolio-page footer .footer-logo a { color: #fff; }
body.portfolio-page footer .footer-nav-grid a { color: rgba(255, 255, 255, 0.7); }
body.portfolio-page footer .footer-nav-grid a:hover { color: #fff; }
body.portfolio-page footer .business-info { color: rgba(255, 255, 255, 0.55); }

/* ---------- Screenshot lightbox (hover zoom + click modal) ---------- */
body.portfolio-page .lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 11, 23, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.25s ease;
}

body.portfolio-page .lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

body.portfolio-page .lightbox-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
}

body.portfolio-page .lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

body.portfolio-page .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    body.portfolio-page .portfolio-cta {
        padding: 36px 24px !important;
    }

    body.portfolio-page .portfolio-info h2,
    body.portfolio-page .portfolio-challenge h2,
    body.portfolio-page .portfolio-features h2,
    body.portfolio-page .portfolio-showcase h2,
    body.portfolio-page .portfolio-story h2,
    body.portfolio-page .portfolio-growth h2,
    body.portfolio-page .portfolio-overview-full h2 {
        font-size: 1.5rem !important;
    }
}
