/* ============================================================
   PORTFOLIO — Modern Dark Design System
   ============================================================ */

/* Force transparent background on all Lottie web components */
dotlottie-wc {
    background: transparent !important;
}

/* --- Cross-document View Transitions (Chrome 126+, Edge 126+) --- */
@view-transition {
    navigation: auto;
}

/* --- Turbo Drive Progress Bar ---
   Shown automatically for navigations taking >500ms. Styled to
   match the site accent gradient. */
.turbo-progress-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--accent, #007bff), var(--accent-cyan, #00d4ff));
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

/* --- CSS Variables --- */
:root {
    --bg-primary: #070b18;
    --bg-secondary: #0d1224;
    --bg-card: rgba(13, 18, 36, 0.7);
    --bg-card-hover: rgba(20, 27, 50, 0.85);
    --text-primary: #f0f0f5;
    --text-secondary: #8892b0;
    --text-muted: #5a6380;
    --accent: #007bff;
    --accent-hover: #0069d9;
    --accent-cyan: #00d4ff;
    --accent-purple: #7c3aed;
    --accent-green: #10b981;
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --container: 1200px;
    --overlay-bg: rgba(7, 11, 24, 0.6);
    --input-bg: rgba(255, 255, 255, 0.04);
    --scrolled-bg: rgba(7, 11, 24, 0.85);
}

/* --- Light Theme --- */
[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ebeef3;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --accent: #0066e6;
    --accent-hover: #0052cc;
    --accent-cyan: #0891b2;
    --accent-purple: #6d28d9;
    --accent-green: #059669;
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    --overlay-bg: rgba(245, 247, 250, 0.7);
    --input-bg: rgba(0, 0, 0, 0.03);
    --scrolled-bg: rgba(245, 247, 250, 0.9);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-cyan); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Three.js Canvas --- */
#three-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* All content above canvas — opacity set to 0 in inline <style> to prevent
   FOUC; once this stylesheet loads the content appears instantly. */
.page-wrapper {
    position: relative;
    z-index: 1;
    opacity: 1;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 20px 0;
    transition: all var(--transition);
    background: transparent;
}

.navbar.scrolled {
    padding: 12px 0;
    background: var(--scrolled-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary) !important;
    letter-spacing: -0.5px;
}

.navbar-brand .brand-icon {
    width: 36px; height: 36px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--accent);
    font-weight: 600;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active::after {
    width: 100%;
    background: var(--accent);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff !important;
}

.nav-links a.btn-primary,
.nav-links .nav-cta {
    color: #fff !important;
}

.nav-links a.btn-primary:hover,
.nav-links .nav-cta:hover {
    color: #fff !important;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    width: 24px; height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff !important;
    border-color: var(--accent);
}

.btn-primary,
.btn-primary i {
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 123, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
}

.hero-badge::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

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

.hero-title .gradient-text,
.hero-title span {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 480px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-trusted {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hero-trusted span {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.hero-trusted-icons {
    display: flex;
    gap: 18px;
}

.hero-trusted-icons i {
    font-size: 1.4rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.hero-trusted-icons i:hover {
    color: var(--accent);
}

.hero-trusted-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-trusted-tags .tech-tag {
    font-size: 0.75rem;
    padding: 4px 12px;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-lottie {
    width: 100%;
    max-width: 480px;
    height: 480px;
    aspect-ratio: 1 / 1;
    display: block;
    border-radius: 24px;
    overflow: hidden;
    background: transparent;
    color-scheme: normal;
}

/* Legacy code-mockup styles (kept for reference) */
.code-mockup {
    background: linear-gradient(135deg, #0f2027, #0a2e38, #0f4c5c);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0, 212, 255, 0.08), 0 0 0 1px rgba(0, 212, 255, 0.1);
    position: relative;
}

.code-mockup-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
}

.code-mockup-bar .dot {
    width: 12px; height: 12px;
    border-radius: 50%;
}

.code-mockup-bar .dot:nth-child(1) { background: #ff5f57; }
.code-mockup-bar .dot:nth-child(2) { background: #ffbd2e; }
.code-mockup-bar .dot:nth-child(3) { background: #28c840; }

.code-mockup-body {
    padding: 40px;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.code-ring {
    width: 200px; height: 200px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: ring-rotate 8s linear infinite;
}

.code-ring::before {
    content: '';
    position: absolute;
    width: 220px; height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.3);
    animation: ring-rotate 12s linear infinite reverse;
}

.code-ring-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-mono);
    animation: ring-rotate 8s linear infinite reverse;
}

@keyframes ring-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.code-mockup-orb {
    position: absolute;
    bottom: 30px; right: 40px;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.3), transparent);
    border: 1px solid rgba(0, 212, 255, 0.2);
    animation: float-orb 4s ease-in-out infinite;
}

@keyframes float-orb {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ============================================================
   SECTION STYLING
   ============================================================ */
.section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 16px;
    display: block;
}

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

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* ============================================================
   SERVICES
   ============================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
    opacity: 0;
    transition: opacity var(--transition);
}

.service-card-with-bg {
    position: relative;
    overflow: hidden;
}

.service-card-bg {
    position: absolute;
    top: 0; right: 0;
    width: 120px; height: 120px;
    background-image: var(--service-bg);
    background-size: cover;
    background-position: center;
    border-radius: 0 0 0 80px;
    opacity: 0.15;
    transition: opacity var(--transition);
}

.service-card-with-bg:hover .service-card-bg {
    opacity: 0.25;
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.service-card:hover::before { opacity: 1; }

.service-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
    background: rgba(0, 123, 255, 0.1);
    color: var(--accent);
}

.service-card h3,
.service-card .service-icon,
.service-card p,
.service-card .card-link-arrow {
    position: relative;
    z-index: 1;
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.service-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================================
   PROJECTS / PORTFOLIO
   ============================================================ */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 22px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--accent);
    color: #fff !important;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 28px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}

.project-card:hover {
    border-color: var(--border-light);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 220px;
    background: var(--bg-secondary);
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-image .project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(7, 11, 24, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: opacity var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-body {
    padding: 24px;
}

.project-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 8px;
    display: block;
}

.project-body h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.project-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-techs .tech-tag {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(0, 123, 255, 0.1);
    color: var(--accent);
    border: 1px solid rgba(0, 123, 255, 0.15);
}

/* ============================================================
   THEME TOGGLE
   ============================================================ */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: rotate(30deg);
}

.theme-toggle .fa-sun { display: none; }
.theme-toggle .fa-moon { display: inline; }

[data-theme="light"] .theme-toggle .fa-sun { display: inline; }
[data-theme="light"] .theme-toggle .fa-moon { display: none; }

/* Light theme specific overrides */
[data-theme="light"] .code-mockup {
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .project-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 8px 30px rgba(0, 102, 230, 0.25);
}

[data-theme="light"] .hero-title .gradient-text {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .btn-outline {
    color: var(--text-primary);
    border-color: var(--border-light);
}

[data-theme="light"] .btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

[data-theme="light"] #three-canvas {
    opacity: 0.4;
}

[data-theme="light"] .project-overlay {
    background: linear-gradient(180deg, transparent 0%, rgba(245, 247, 250, 0.95) 100%);
}

[data-theme="light"] .meta-item {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] a.service-card-link:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* --- Theme transition (only after first paint to prevent FOUC) --- */
html.theme-ready,
html.theme-ready body {
    transition: background 0.35s ease, color 0.35s ease;
}
html.theme-ready .page-wrapper,
html.theme-ready .navbar,
html.theme-ready .service-card,
html.theme-ready .project-card,
html.theme-ready .skill-item,
html.theme-ready .cert-card,
html.theme-ready .contact-form,
html.theme-ready .footer,
html.theme-ready .social-link,
html.theme-ready #three-canvas {
    transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease,
                box-shadow 0.35s ease, opacity 0.35s ease;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.skill-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-header span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.skill-header .skill-pct {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.skill-bar {
    height: 6px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

/* ============================================================
   STATS / COUNTERS
   ============================================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform var(--transition), border-color var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-number .stat-plus {
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.about-lottie-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
}

.about-lottie {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    display: block;
    background: transparent;
}

.about-content h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.about-info {
    margin-top: 24px;
}

.about-info li {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.about-info li span:first-child {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 2px; height: 100%;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -37px; top: 4px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-primary);
}

.timeline-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--font-mono);
    margin-bottom: 6px;
}

.timeline-item h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.timeline-item .timeline-place {
    font-size: 0.88rem;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.timeline-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Certificates */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}

.cert-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
}

.cert-card-image {
    height: 160px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.cert-card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.cert-card-body {
    padding: 20px;
}

.cert-card-body h4 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.cert-card-body .cert-issuer {
    font-size: 0.82rem;
    color: var(--accent);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

/* ---- Contact page Lottie visual ---- */
.contact-visual {
    position: relative;
    background: linear-gradient(145deg, rgba(0, 123, 255, 0.06), rgba(0, 212, 255, 0.04));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-visual-glow {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.15) 0%, rgba(0, 123, 255, 0.06) 50%, transparent 70%);
    pointer-events: none;
    animation: contact-glow 4s ease-in-out infinite;
}

@keyframes contact-glow {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

.contact-lottie {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    display: block;
    position: relative;
    background: transparent;
    z-index: 1;
}

.contact-visual-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 20px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--accent-cyan, #00d4ff);
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 100px;
    position: relative;
    z-index: 1;
    animation: badge-pulse 3s ease-in-out infinite;
}

.contact-visual-badge i {
    font-size: 0.9rem;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.15); }
    50%      { box-shadow: 0 0 0 8px rgba(0, 212, 255, 0); }
}

/* Light theme adjustments */
[data-theme="light"] .contact-visual {
    background: linear-gradient(145deg, rgba(0, 123, 255, 0.04), rgba(124, 58, 237, 0.03));
}

[data-theme="light"] .contact-visual-badge {
    color: var(--accent, #007bff);
    background: rgba(0, 123, 255, 0.06);
    border-color: rgba(0, 123, 255, 0.15);
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-info-item .ci-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(0, 123, 255, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-info-item h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.contact-info-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.social-link {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition);
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.92rem;
    transition: border-color var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.form-success {
    display: none;
    text-align: center;
    padding: 24px;
    color: var(--accent-green);
    font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 300px;
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 5px 0;
    transition: color var(--transition);
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-header {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ---- Page header with side visual (Lottie) ---- */
.page-header--with-visual {
    text-align: left;
    padding-bottom: 40px;
}

.page-header-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.page-header--with-visual .page-header p {
    margin: 0;
}

.page-header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-header-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header-lottie-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.12) 0%, rgba(0, 123, 255, 0.06) 40%, transparent 70%);
    pointer-events: none;
    animation: ph-glow 5s ease-in-out infinite;
}

@keyframes ph-glow {
    0%, 100% { opacity: 0.5; transform: scale(0.95); }
    50%      { opacity: 1;   transform: scale(1.05); }
}

.page-header-lottie {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    display: block;
    position: relative;
    background: transparent;
    z-index: 1;
    filter: drop-shadow(0 8px 32px rgba(0, 123, 255, 0.12));
}

@media (max-width: 1024px) {
    .page-header-split { grid-template-columns: 1fr; text-align: center; }
    .page-header-text { align-items: center; }
    .page-header--with-visual .page-header p { margin: 0 auto; }
    .page-header-visual { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 768px) {
    .page-header-visual { max-width: 280px; }
    .page-header--with-visual { padding-bottom: 20px; }
}

@media (max-width: 480px) {
    .page-header-visual { max-width: 220px; }
    .page-header--with-visual { padding-bottom: 16px; }
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
    padding: 100px 0;
}

.cta-box {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(124, 58, 237, 0.08));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 40px 60px;
    padding-top: 100px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
}

.cta-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 123, 255, 0.12);
}

/* ---- Lottie floating above the card ---- */
.cta-lottie-wrap {
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 160px;
    animation: cta-float 3.5s ease-in-out infinite;
}

.cta-lottie {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    display: block;
    overflow: hidden;
    background: transparent;
}

/* Pulsing glow behind the circle */
.cta-lottie-glow {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.25) 0%, rgba(0, 123, 255, 0.08) 50%, transparent 70%);
    z-index: 0;
    animation: cta-glow-pulse 3s ease-in-out infinite;
}

/* Thin spinning ring */
.cta-lottie-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(0, 212, 255, 0.5);
    border-right-color: rgba(0, 123, 255, 0.3);
    z-index: 1;
    animation: cta-ring-spin 6s linear infinite;
}

@keyframes cta-float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(-10px); }
}

@keyframes cta-glow-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.08); }
}

@keyframes cta-ring-spin {
    to { transform: rotate(360deg); }
}

.cta-box h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.cta-box p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--accent);
    transition: color var(--transition);
}

.breadcrumbs a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

.breadcrumbs i {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.breadcrumbs span {
    color: var(--text-muted);
}

/* ============================================================
   PAGE HEADER ICON (service/project detail)
   ============================================================ */
.page-header-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 24px;
    background: rgba(0, 123, 255, 0.1);
    color: var(--accent);
}

/* ============================================================
   DETAIL INTRO (service about block)
   ============================================================ */
.detail-intro {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 48px;
}

.detail-intro-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(0, 123, 255, 0.1);
    color: var(--accent);
}

.detail-intro h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.detail-intro p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================================
   SERVICE CARD AS LINK
   ============================================================ */
a.service-card-link {
    text-decoration: none;
    color: inherit;
    position: relative;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

a.service-card-link:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-link-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff !important;
    position: absolute;
    bottom: 20px;
    right: 20px;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity var(--transition), transform var(--transition);
    font-size: 0.85rem;
}

a.service-card-link:hover .card-link-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.empty-state i {
    font-size: 3.5rem;
    color: var(--accent);
    opacity: 0.4;
    margin-bottom: 20px;
    display: block;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 24px;
}

.empty-state .btn {
    margin-top: 8px;
}

/* ============================================================
   PROJECT IMAGE PLACEHOLDER
   ============================================================ */
.project-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d1224, #1a1a3e);
}

.project-image-placeholder i {
    font-size: 2.5rem;
    color: var(--accent);
    opacity: 0.3;
}

.project-placeholder-img,
.about-placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[data-theme="light"] .project-image-placeholder {
    background: linear-gradient(135deg, #e8ecf2, #d0d5dd);
}

/* ============================================================
   PROJECT MEDIA SHOWCASE (detail page)
   ============================================================ */
.project-media-showcase {
    margin-bottom: 48px;
}

/* ── Main display area ── */
.pms-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    margin-bottom: 12px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pms-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #0a0a0a;
}
.pms-main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}
.pms-placeholder {
    flex-direction: column;
    gap: 12px;
    color: var(--text-secondary);
}
.pms-placeholder i { font-size: 3rem; opacity: .4; }
.pms-placeholder p { margin: 0; font-size: .95rem; }

/* ── Expand / fullscreen button ── */
.pms-expand-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    transition: opacity .25s, background .25s;
    backdrop-filter: blur(6px);
}
.pms-main:hover .pms-expand-btn { opacity: 1; }
.pms-expand-btn:hover { background: var(--accent); }

/* ── Navigation arrows ── */
.pms-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    transition: opacity .25s, background .25s;
    backdrop-filter: blur(6px);
}
.pms-main:hover .pms-arrow { opacity: 1; }
.pms-arrow:hover { background: var(--accent); }
.pms-arrow-left  { left: 14px; }
.pms-arrow-right { right: 14px; }

/* ── Counter badge ── */
.pms-counter {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(6px);
    z-index: 5;
}

/* ── Thumbnail strip ── */
.pms-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 6px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.pms-thumbs::-webkit-scrollbar { height: 4px; }
.pms-thumbs::-webkit-scrollbar-track { background: transparent; }
.pms-thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.pms-thumb {
    flex-shrink: 0;
    width: 110px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: .5;
    transition: opacity .25s, border-color .25s, transform .25s;
    position: relative;
    background: var(--bg-secondary);
    padding: 0;
}
.pms-thumb:hover {
    opacity: .85;
    transform: translateY(-2px);
}
.pms-thumb.active {
    opacity: 1;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 99,102,241), .25);
}
.pms-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pms-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.4);
    color: #fff;
    font-size: .75rem;
    z-index: 2;
}
.pms-thumb-video-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-secondary);
    font-size: 1.4rem;
    background: var(--bg-tertiary, var(--bg-secondary));
}

/* ── Dedicated video section ── */
.project-videos-section {
    margin-bottom: 48px;
}
.pvs-title {
    font-size: 1.15rem;
    margin-bottom: 18px;
    color: var(--text-primary);
}
.pvs-title i { margin-right: 8px; color: var(--accent); }
.pvs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.pvs-card {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
}
.pvs-card video {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    object-fit: contain;
}
.pvs-label {
    padding: 8px 14px;
    font-size: .8rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Lightbox ── */
.pms-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
    backdrop-filter: blur(8px);
}
.pms-lightbox.open {
    opacity: 1;
    visibility: visible;
}
.pms-lb-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background .25s;
}
.pms-lb-close:hover { background: rgba(255,255,255,.25); }
.pms-lb-content {
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pms-lb-img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
}
.pms-lb-video {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 8px;
}
.pms-lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background .25s;
}
.pms-lb-arrow:hover { background: rgba(255,255,255,.25); }
.pms-lb-arrow-left  { left: 20px; }
.pms-lb-arrow-right { right: 20px; }
.pms-lb-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 24px;
    z-index: 10;
}

/* Keep old class names for backwards compatibility */
.project-gallery { margin-bottom: 48px; }
.project-gallery-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-secondary); margin-bottom: 16px; }
.project-gallery-main img { width: 100%; max-height: 560px; object-fit: cover; display: block; }
.project-gallery-thumbs { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb { flex-shrink: 0; width: 100px; height: 70px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; cursor: pointer; opacity: 0.6; transition: opacity var(--transition), border-color var(--transition); }
.gallery-thumb.active, .gallery-thumb:hover { opacity: 1; border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   PROJECT DETAIL GRID (content + sidebar)
   ============================================================ */
.project-detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
}

.project-detail-content h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.85;
    font-size: 1rem;
}

.project-detail-section {
    margin-top: 36px;
    padding-top: 36px;
    border-top: 1px solid var(--border);
}

.project-detail-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-detail-section h3 i {
    color: var(--accent);
    font-size: 0.95rem;
}

/* Tech tags in detail */
.project-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Service tags in project detail */
.project-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-service-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    transition: background var(--transition), transform var(--transition);
    text-decoration: none;
    color: var(--text-secondary);
}

.project-service-tag:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.project-service-tag i {
    font-size: 0.85rem;
}

/* ============================================================
   PROJECT META SIDEBAR CARD
   ============================================================ */
.project-meta-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    position: sticky;
    top: 100px;
}

.project-meta-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.meta-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-published {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-draft {
    background: rgba(255, 189, 57, 0.15);
    color: #ffbd39;
}

.status-archived {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.meta-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Project card as link */
a.project-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.project-card:hover {
    transform: translateY(-4px);
}

a.project-card:hover .project-overlay {
    opacity: 1;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Tablet (≤1024px) ---- */
@media (max-width: 1024px) {
    .hero .container { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { max-width: 480px; margin: 0 auto; }
    .hero-lottie { max-width: 360px; height: 360px; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-lottie { max-width: 280px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .project-detail-grid { grid-template-columns: 1fr; }
    .project-detail-sidebar { order: -1; }
    .project-meta-card { position: static; }
    .page-header { padding: 140px 0 60px; }
    .cta-box { padding: 32px 28px 48px; padding-top: 90px; }
    .cta-box h2 { font-size: 1.7rem; }
}

/* ---- Mobile nav overlay ---- */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    opacity: 0;
    transition: opacity var(--transition);
}
.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ---- Mobile (≤768px) ---- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 280px; height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 24px;
        transition: right var(--transition);
        border-left: 1px solid var(--border);
        z-index: 200;
    }

    .nav-links.open { right: 0; }

    .menu-toggle { display: flex; z-index: 201; }

    /* Hero */
    .hero { min-height: auto; padding-top: 100px; padding-bottom: 40px; }
    .hero-title { font-size: 2.2rem; letter-spacing: -0.5px; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { text-align: center; justify-content: center; }
    .hero-visual { max-width: 320px; }
    .hero-lottie { max-width: 300px; height: 300px; }

    /* Sections */
    .section { padding: 80px 0; }
    .section-header { margin-bottom: 40px; }
    .section-title { font-size: 1.75rem; }

    /* Page header */
    .page-header { padding: 120px 0 48px; }
    .page-header h1 { font-size: 1.8rem; }
    .page-header p { font-size: 0.95rem; }

    /* Grids */
    .projects-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .certificates-grid { grid-template-columns: 1fr; }

    /* Stats */
    .stats-row { grid-template-columns: 1fr 1fr; gap: 16px; }
    .stat-card { padding: 24px 16px; }
    .stat-number { font-size: 2rem; }

    /* CTA */
    .cta-section { padding: 80px 0; }
    .cta-lottie-wrap { width: 130px; height: 130px; top: -55px; }
    .cta-lottie { width: 130px; height: 130px; }
    .cta-box { padding: 24px 20px 40px; padding-top: 80px; max-width: 100%; }
    .cta-box h2 { font-size: 1.5rem; }
    .cta-box p { font-size: 0.92rem; margin-bottom: 24px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-wrap: wrap; gap: 8px; justify-content: center; text-align: center; }

    /* Contact form */
    .contact-form { padding: 24px 20px; }
    .contact-visual { padding: 16px; }
    .contact-lottie { max-width: 240px; }

    /* Detail intro */
    .detail-intro { flex-direction: column; padding: 24px; gap: 16px; }
    .detail-intro h2 { font-size: 1.15rem; }

    /* Gallery */
    .project-gallery-main img { max-height: 300px; }
    .gallery-thumb { width: 80px; height: 56px; }

    /* Media Showcase */
    .pms-thumb { width: 90px; height: 60px; }
    .pms-arrow { width: 38px; height: 38px; font-size: .9rem; }
    .pvs-grid { grid-template-columns: 1fr; }
    .pms-lb-arrow { width: 44px; height: 44px; }
    .pms-lb-arrow-left { left: 10px; }
    .pms-lb-arrow-right { right: 10px; }

    /* Empty state */
    .empty-state { padding: 48px 24px; }
    .empty-state i { font-size: 2.5rem; }

    /* Breadcrumbs */
    .breadcrumbs { font-size: 0.82rem; }

    /* About info */
    .about-info li { flex-direction: column; gap: 4px; }
    .about-info li span:first-child { min-width: auto; }
}

/* ---- Small mobile (≤480px) ---- */
@media (max-width: 480px) {
    .container { padding: 0 16px; }

    /* Hero */
    .hero { padding-top: 80px; }
    .hero-title { font-size: 1.85rem; }
    .hero-subtitle { font-size: 0.9rem; margin-bottom: 24px; }
    .hero-buttons .btn { padding: 12px 24px; font-size: 0.88rem; }
    .hero-visual { max-width: 260px; }
    .hero-lottie { max-width: 260px; height: 260px; }
    .hero-trusted { flex-direction: column; align-items: flex-start; }
    .hero-badge { font-size: 0.68rem; padding: 5px 12px; }

    /* Page header */
    .page-header { padding: 100px 0 36px; }
    .page-header h1 { font-size: 1.55rem; }
    .page-header-icon { width: 60px; height: 60px; font-size: 1.5rem; }

    /* Stats */
    .stats-row { grid-template-columns: 1fr; }
    .stat-number { font-size: 1.8rem; }

    /* Sections */
    .section { padding: 60px 0; }
    .section-header { margin-bottom: 32px; }
    .section-title { font-size: 1.5rem; }

    /* CTA */
    .cta-section { padding: 60px 0; }
    .cta-lottie-wrap { width: 110px; height: 110px; top: -45px; }
    .cta-lottie { width: 110px; height: 110px; }
    .cta-box { padding: 20px 16px 32px; padding-top: 70px; }
    .cta-box h2 { font-size: 1.3rem; }
    .cta-box p { font-size: 0.85rem; }

    /* Footer */
    .footer { padding: 40px 0 20px; }
    .footer-grid { gap: 32px; margin-bottom: 32px; }
    .footer-brand p { font-size: 0.82rem; }

    /* Buttons global */
    .btn-lg { padding: 12px 28px; font-size: 0.9rem; }

    /* Contact */
    .contact-form { padding: 20px 16px; }
    .contact-info-item .ci-icon { width: 40px; height: 40px; font-size: 0.95rem; }

    /* Service card */
    .service-card { padding: 24px; }
    .service-card h3 { font-size: 1.1rem; }

    /* Project card */
    .project-image { height: 180px; }
    .project-body { padding: 16px; }
    .project-body h3 { font-size: 1.05rem; }

    /* Project detail */
    .project-detail-content h2 { font-size: 1.3rem; }
    .project-meta-card { padding: 20px; }
    .meta-actions .btn { font-size: 0.82rem; padding: 10px 16px; }

    /* Gallery */
    .project-gallery-main img { max-height: 220px; }
    .gallery-thumb { width: 64px; height: 44px; }

    /* Media Showcase */
    .pms-thumb { width: 72px; height: 48px; }
    .pms-thumbs { gap: 6px; }
    .pms-arrow { width: 34px; height: 34px; font-size: .8rem; opacity: 1; }
    .pms-expand-btn { opacity: 1; width: 34px; height: 34px; top: 8px; right: 8px; font-size: .85rem; }
    .pms-counter { bottom: 8px; right: 8px; font-size: .7rem; padding: 3px 10px; }
    .pvs-grid { grid-template-columns: 1fr; }
    .pms-lb-close { top: 10px; right: 10px; width: 40px; height: 40px; }
    .pms-lb-arrow { width: 38px; height: 38px; }
    .pms-lb-arrow-left { left: 6px; }
    .pms-lb-arrow-right { right: 6px; }

    /* Certificates */
    .cert-card-image { height: 120px; }

    /* Timeline */
    .timeline { padding-left: 24px; }
    .timeline-item::before { left: -29px; }

    /* Misc */
    .filter-tabs { gap: 8px; }
    .filter-tab { padding: 6px 16px; font-size: 0.8rem; }
    .social-links { flex-wrap: wrap; }
}
