/* ===== Variables ===== */
:root {
    --black: #0a0a0a;
    --white: #ffffff;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-400: #999999;
    --gray-600: #666666;
    --gray-800: #333333;
    --green: #4ade80;
    --green-dark: #22c55e;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--white);
    color: var(--black);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

::selection { background: rgba(74, 222, 128, 0.3); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 3px; }

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 2.5rem;
    transition: all 0.3s;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.visitor-counter {
    display: flex;
    align-items: center;
    list-style: none;
}

.visitor-counter img {
    height: 18px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.visitor-counter:hover img {
    opacity: 1;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    font-size: 0.88rem;
}

.nav-links a {
    color: var(--gray-600);
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--black);
}

.nav-cta {
    background: var(--green);
    color: var(--black) !important;
    padding: 0.45rem 1.2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--green-dark);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--black);
    transition: all 0.3s;
    display: block;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    z-index: 99;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.mobile-menu.show { display: block; }

.mobile-menu a {
    display: block;
    padding: 0.75rem 2.5rem;
    color: var(--gray-600);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.mobile-menu a:hover { color: var(--black); }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav { padding: 1rem 1.5rem; }
}

/* ===== Hero Section (Light) ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 7rem 2.5rem 4rem;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}

.hero-title .green { color: var(--green-dark); }
.hero-title .hero-name { font-size: 0.7em; }

.hero-techs {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.hero-techs strong { color: var(--black); }

.hero-desc {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--green);
    color: var(--black);
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.hero-btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.3);
}

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-image {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.hero-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: 35% center;
    border-radius: 1rem;
}

.hero-education {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    gap: 0.75rem;
}

.edu-card {
    flex: 1;
    background: var(--gray-100);
    border-radius: 0.75rem;
    padding: 1rem 1.15rem;
    border-left: 3px solid var(--green-dark);
}

.edu-pin {
    display: inline-block;
    background: var(--green-dark);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 1rem;
    margin-bottom: 0.4rem;
    letter-spacing: 0.5px;
}

.edu-card .edu-degree {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.25rem;
}

.edu-card .edu-school {
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.edu-card .edu-year {
    font-size: 0.7rem;
    color: var(--green-dark);
    font-weight: 600;
    margin-top: 0.35rem;
}

@media (max-width: 768px) {
    .hero { padding: 6rem 1.5rem 3rem; }
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .hero-inner > .fade-in:first-child {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-inner > .fade-in:first-child .hero-btn { order: 10; }
    .hero-right { order: -1; }
    .hero-desc { max-width: 100%; margin-left: auto; margin-right: auto; font-size: 0.85rem; }
    .hero-image { max-width: 280px; }
    .hero-education { display: none !important; }
}

/* ===== Dark Sections (Projects, Experience) ===== */
.dark-section {
    background: var(--black);
    color: var(--white);
    padding: 6rem 2.5rem;
}

.dark-section .section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.dark-section .section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .dark-section { padding: 4rem 1.5rem; }
}

/* ===== Project Cards (Index Page) ===== */
.project-cards {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.project-card {
    background: #111;
    border: 1px solid #1a1a1a;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    display: block;
}

.project-card:hover {
    border-color: rgba(74, 222, 128, 0.3);
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.project-card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.project-card:hover .project-card-img img {
    transform: scale(1.05);
}

.project-card-img .project-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.project-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.project-card-body h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.project-card-body h3 span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-400);
}

.project-card-techs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.project-card-techs span {
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(74, 222, 128, 0.1);
    color: var(--green);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

@media (max-width: 900px) {
    .project-cards {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

/* ===== Project Block (Detail Pages) ===== */
.project {
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 6rem;
    border-bottom: 1px solid #222;
    margin-bottom: 6rem;
}

.project:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.project-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--green);
    margin-bottom: 0.75rem;
    font-family: monospace;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.project-header-tags {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.project-period {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

.team-blocks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.team-block {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

.team-block i {
    font-size: 0.7rem;
    opacity: 0.5;
}

.team-block strong {
    color: rgba(255,255,255,0.9);
    font-weight: 700;
}

.team-block.me {
    background: rgba(34,197,94,0.1);
    border-color: rgba(34,197,94,0.3);
    color: var(--green);
}

.team-block.me strong {
    color: var(--green);
}

.project-name {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.project-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gray-400);
    letter-spacing: 0;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-award {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-team {
    background: rgba(74, 222, 128, 0.1);
    color: var(--green);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.badge-course {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

/* Project screenshot (full width, auto height) */
.project-screenshot {
    width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #111;
    margin-bottom: 2.5rem;
}

.project-screenshot img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Meta row: Role / Period / Team side by side */
.project-meta-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.project-meta-block {
    margin-bottom: 0;
}

.project-meta-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-600);
    margin-bottom: 0.35rem;
}

.project-meta-value {
    font-size: 1rem;
    color: var(--white);
    font-weight: 700;
}

.project-meta-value.green { color: var(--green); }

/* Team visual */
.team-visual {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.team-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 2rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255,255,255,0.05);
    color: var(--gray-400);
    border: 1px solid #222;
}

.team-chip.me {
    background: rgba(74, 222, 128, 0.1);
    color: var(--green);
    border-color: rgba(74, 222, 128, 0.25);
}

.team-chip i { font-size: 0.7rem; }

/* Description */
.project-desc {
    color: var(--gray-400);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 900px;
}

/* Tech Stack */
.project-tech-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-400);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.project-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.project-techs span {
    padding: 0.45rem 1rem;
    border-radius: 2rem;
    font-size: 0.88rem;
    font-weight: 600;
    background: rgba(255,255,255,0.05);
    color: var(--gray-200);
    border: 1px solid rgba(255,255,255,0.1);
}

.project-techs span.mine {
    background: rgba(74, 222, 128, 0.12);
    color: var(--green);
    border-color: rgba(74, 222, 128, 0.3);
}

/* Contributions - card style */
.project-contributions {
    margin-bottom: 2.5rem;
}

.project-contributions h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-400);
    margin-bottom: 1rem;
    font-weight: 600;
}

.contribution-list {
    display: grid;
    gap: 0.75rem;
}

.contribution-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid #1a1a1a;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}

.contribution-item:hover {
    border-color: rgba(74, 222, 128, 0.2);
}

.contribution-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.contribution-text {
    flex: 1;
}

.contribution-text strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.2rem;
}

.contribution-text p {
    font-size: 0.85rem;
    color: var(--gray-400);
    line-height: 1.5;
}

/* Challenges / Problem-Solution */
.project-challenges {
    margin-bottom: 2.5rem;
}

.project-challenges h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-400);
    margin-bottom: 1rem;
    font-weight: 600;
}

.challenge-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid #1a1a1a;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
}

.challenge-item .problem {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.challenge-item .problem .tag {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    margin-top: 0.1rem;
}

.challenge-item .solution {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.challenge-item .solution .tag {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    background: rgba(74, 222, 128, 0.12);
    color: var(--green);
    margin-top: 0.1rem;
}

.challenge-item .text {
    font-size: 0.9rem;
    color: var(--gray-400);
    line-height: 1.6;
}

/* Links */
.project-links {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #333;
    color: var(--gray-200);
    transition: all 0.2s;
    background: none;
    cursor: pointer;
}

.project-link:hover {
    border-color: var(--green);
    color: var(--green);
}

/* Architecture section - full width */
.project-arch {
    margin-top: 1rem;
}

.project-arch h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-400);
    margin-bottom: 1rem;
    font-weight: 600;
}

.arch-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.arch-tab {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #333;
    color: var(--gray-400);
    cursor: pointer;
    background: none;
    transition: all 0.2s;
}

.arch-tab.active {
    background: var(--green);
    color: var(--black);
    border-color: var(--green);
}

.arch-content { display: none; }
.arch-content.active { display: block; }

.arch-img {
    border-radius: 0.75rem;
    overflow: hidden;
    background: #0d0d0d;
    border: 1px solid #1a1a1a;
}

.arch-img img {
    width: 100%;
    height: auto;
    cursor: zoom-in;
}

.arch-label {
    font-size: 0.78rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
    text-align: center;
}

@media (max-width: 768px) {
    .project-meta-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .project-name { font-size: 1.6rem; }
}

/* ===== Experience Section ===== */
.exp-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 2rem;
}

.exp-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--green), #333);
}

.exp-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.exp-item:last-child { padding-bottom: 0; }

.exp-dot {
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green);
    transform: translateX(-5px);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.5);
}

.exp-card {
    background: #111;
    border: 1px solid #1a1a1a;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: border-color 0.3s;
}

.exp-card:hover { border-color: rgba(74, 222, 128, 0.2); }

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.exp-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green);
}

.exp-header .location {
    color: var(--gray-600);
    font-size: 0.8rem;
}

.exp-date {
    font-size: 0.75rem;
    color: var(--gray-600);
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.15);
    padding: 0.2rem 0.75rem;
    border-radius: 2rem;
    white-space: nowrap;
}

.exp-role {
    color: var(--gray-400);
    font-weight: 500;
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
}

.exp-list {
    list-style: none;
}

.exp-list li {
    color: var(--gray-400);
    font-size: 0.83rem;
    line-height: 1.6;
    padding-left: 1.1rem;
    position: relative;
    margin-bottom: 0.4rem;
}

.exp-list li:not(.award)::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
}

.exp-list .award {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-left: 0;
}

.exp-list .award i { color: #fbbf24; font-size: 0.8rem; }

.exp-list a {
    color: var(--green);
    transition: opacity 0.2s;
}

.exp-list a:hover { opacity: 0.8; }

/* ===== Contact Section (Light) ===== */
.contact-section {
    padding: 5rem 2.5rem;
    background: var(--white);
}

.contact-section .section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -1px;
    text-align: center;
    margin-bottom: 3rem;
}

.contact-grid {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.contact-card {
    padding: 1.5rem 1rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.contact-card:hover {
    border-color: var(--green);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.contact-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.contact-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.contact-card p {
    font-size: 0.72rem;
    color: var(--gray-600);
}

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-section { padding: 4rem 1.5rem; }
}

@media (max-width: 480px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--gray-200);
    padding: 2rem;
    text-align: center;
}

.footer p {
    color: var(--gray-600);
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

.footer-links a {
    color: var(--gray-600);
    font-size: 1rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--green-dark); }

/* ===== Detail Page Header ===== */
.detail-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2.5rem;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #1a1a1a;
}

.detail-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--green);
    font-size: 0.88rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.detail-back:hover {
    opacity: 0.7;
}

.detail-logo {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
}

.detail-hero {
    padding: 6rem 2.5rem 1.5rem;
    background: var(--black);
    color: var(--white);
}

.detail-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .detail-nav { padding: 1rem 1.5rem; }
    .detail-hero { padding: 5rem 1.5rem 2rem; }
}

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Focus */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

/* ===== Incident Case Study ===== */
.incident-case {
    margin-top: 3rem;
    margin-bottom: 2.5rem;
}

.incident-case h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.incident-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.incident-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #ef4444;
}

.incident-banner .incident-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    margin-bottom: 1rem;
}

.incident-banner .incident-badge i {
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.incident-banner .incident-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.incident-banner .incident-date {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.incident-banner .incident-desc {
    font-size: 0.95rem;
    color: var(--gray-400);
    line-height: 1.7;
}

/* Incident timeline */
.incident-timeline {
    display: grid;
    gap: 1.5rem;
}

.incident-step {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.incident-step-num {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.incident-step-num.detect {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.incident-step-num.analyze {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 2px solid rgba(251, 191, 36, 0.3);
}

.incident-step-num.resolve {
    background: rgba(74, 222, 128, 0.12);
    color: var(--green);
    border: 2px solid rgba(74, 222, 128, 0.3);
}

.incident-step-num.result {
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
    border: 2px solid rgba(96, 165, 250, 0.3);
}

.incident-step-content {
    background: rgba(255,255,255,0.02);
    border: 1px solid #1a1a1a;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
}

.incident-step-content h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.incident-step-content p {
    font-size: 0.88rem;
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.incident-step-content p:last-child {
    margin-bottom: 0;
}

.incident-evidence {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.incident-evidence img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #222;
    cursor: zoom-in;
    transition: border-color 0.2s;
}

.incident-evidence img:hover {
    border-color: rgba(239, 68, 68, 0.4);
}

.evidence-caption {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-align: center;
    margin-top: 0.35rem;
}

/* Solution architecture comparison */
.solution-arch {
    margin-top: 1rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(74, 222, 128, 0.2);
    background: #0d0d0d;
}

.solution-arch img {
    width: 100%;
    height: auto;
}

/* Feature gallery */
.feature-gallery {
    margin-bottom: 2.5rem;
}

.feature-gallery h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-400);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.feature-card {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #1a1a1a;
    background: #111;
    transition: border-color 0.2s;
}

.feature-card:hover {
    border-color: rgba(74, 222, 128, 0.2);
}

.feature-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.feature-card .feature-label {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-200);
}

@media (max-width: 768px) {
    .incident-step {
        grid-template-columns: 1fr;
    }
    .incident-step-num {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    .incident-evidence {
        grid-template-columns: 1fr;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Video Popup ===== */
.video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.video-overlay .close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.video-overlay video {
    width: 100%;
    max-width: 900px;
    max-height: 80vh;
    border-radius: 0.75rem;
}
