/* ===== style.css ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-tertiary: #6b7280;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --hero-overlay: linear-gradient(to top, rgba(12, 20, 28, 0.72) 0%, rgba(12, 20, 28, 0.38) 45%, rgba(12, 20, 28, 0.22) 100%);
    --footer-bg: linear-gradient(180deg, #f9fafb 0%, #eef2f6 100%);
    --footer-border-top: rgba(15, 118, 110, 0.2);
    --footer-heading-color: var(--text-primary);
    --footer-text-color: var(--text-secondary);
    --footer-link-color: var(--text-tertiary);
    --footer-link-hover: #0f766e;
    --footer-divider: var(--border-color);
    --footer-muted: var(--text-tertiary);
    --footer-input-bg: #ffffff;
    --footer-input-border: var(--border-color);
    --footer-input-text: var(--text-primary);
    --footer-social-bg: #f3f4f6;
    --footer-social-color: var(--text-tertiary);
    --portfolio-card-bg: #ffffff;
    --portfolio-image-bg: #f3f4f6;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #e2e8f0;
    --text-tertiary: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
    --shadow: rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(15, 23, 42, 0.95);
    --hero-overlay: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0.3) 100%);
    --footer-bg: linear-gradient(180deg, #0f172a 0%, #020617 100%);
    --footer-border-top: rgba(15, 118, 110, 0.35);
    --footer-heading-color: #e5e7eb;
    --footer-text-color: #9ca3af;
    --footer-link-color: #9ca3af;
    --footer-link-hover: #99f6e4;
    --footer-divider: rgba(148, 163, 184, 0.2);
    --footer-muted: #94a3b8;
    --footer-input-bg: #020617;
    --footer-input-border: #1f2937;
    --footer-input-text: #e5e7eb;
    --footer-social-bg: #1e293b;
    --footer-social-color: #94a3b8;
    --portfolio-card-bg: #1e293b;
    --portfolio-image-bg: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

section {
    scroll-margin-top: 80px;
    padding: 100px 0;
}

/* ===== Splash Intro ===== */
.splash-intro {
    position: fixed;
    inset: 0;
    background: #0c141c;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}
.splash-intro.splash-hide {
    animation: fadeSplash 0.4s ease-in-out forwards;
}

.splash-logo {
    animation: glowPulse 1.8s ease-in-out;
    margin-bottom: 48px;
}

.splash-logo img {
    height: 220px;
    width: auto;
    max-width: 90vw;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(32, 196, 180, 0.7));
}

.splash-tagline {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    text-align: center;
    max-width: 600px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.splash-loading-wrap {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    height: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    overflow: hidden;
}
.splash-loading-bar {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 0%;
    margin-left: -50%;
    background: linear-gradient(90deg, transparent 0%, #20c4b4 50%, transparent 100%);
    border-radius: 3px;
    transition: width 0.05s linear;
}
.splash-loading-pct {
    position: absolute;
    left: 50%;
    top: 18px;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    letter-spacing: 1px;
}

@keyframes fadeSplash {
    0% { opacity: 1; visibility: visible; }
    70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes glowPulse {
    0% { text-shadow: 0 0 10px #20c4b4; }
    50% { text-shadow: 0 0 40px #20c4b4, 0 0 70px #0f9b8f; }
    100% { text-shadow: 0 0 10px #20c4b4; }
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 8px 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s ease;
    height: 64px;
}

/* Left controls (theme + social) placed between menu and hamburger on desktop */
.navbar-left-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
    order: 4; /* desktop default position */
    margin-left: auto; /* push icons to the right side on desktop */
}

/* Mobile Socials Dropdown */
.mobile-socials-dropdown {
    display: none;
    position: relative;
}

.mobile-socials-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.mobile-socials-toggle:hover {
    background: var(--bg-tertiary);
    transform: rotate(15deg);
}

[data-theme="dark"] .mobile-socials-toggle {
    color: #ffffff;
}

.mobile-socials-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    gap: 8px;
    box-shadow: 0 10px 30px var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
    min-width: 200px;
    justify-content: center;
}

.mobile-socials-dropdown.open .mobile-socials-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-socials-menu a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    font-size: 14px;
}

.mobile-socials-menu a.instagram {
    color: #E4405F;
    border-color: rgba(228, 64, 95, 0.2);
}

.mobile-socials-menu a.facebook {
    color: #1877F2;
    border-color: rgba(24, 119, 242, 0.2);
}

.mobile-socials-menu a.tiktok {
    color: #000000;
    border-color: rgba(0, 0, 0, 0.2);
}

.mobile-socials-menu a.youtube {
    color: #FF0000;
    border-color: rgba(255, 0, 0, 0.2);
}

.mobile-socials-menu a.whatsapp {
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.2);
}

.mobile-socials-menu a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.mobile-socials-menu a.instagram:hover {
    background: #E4405F;
    color: white;
}

.mobile-socials-menu a.facebook:hover {
    background: #1877F2;
    color: white;
}

.mobile-socials-menu a.tiktok:hover {
    background: #000000;
    color: white;
}

.mobile-socials-menu a.youtube:hover {
    background: #FF0000;
    color: white;
}

.mobile-socials-menu a.whatsapp:hover {
    background: #25D366;
    color: white;
}

.navbar-left-controls .theme-toggle {
    color: var(--text-primary);
    border-color: rgba(0,0,0,0.08);
    background: transparent;
}

.navbar-left-controls .navbar-social-icons a {
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.06);
    background: transparent;
}

/* Dark theme override: icons stay light on dark backgrounds */
[data-theme="dark"] .navbar-left-controls .theme-toggle,
[data-theme="dark"] .navbar-left-controls .navbar-social-icons a {
    color: #ffffff;
    border-color: rgba(255,255,255,0.12);
}

/* Ensure social icons remain visible and white on both themes */
.navbar .navbar-social-icons a,
.navbar .navbar-social-left a {
    color: #ffffff !important;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: rotate(15deg);
}

.theme-toggle:active {
    transform: rotate(180deg);
}

.navbar .logo {
    display: flex;
    align-items: center;
    order: 1;
    height: 100%;
    margin-right: 16px;
}

.navbar .logo-img {
    height: 48px;
    width: auto;
    transition: transform 0.3s ease;
    max-height: 48px;
}

.navbar .logo:hover .logo-img {
    transform: scale(1.05);
}

.navbar .nav-ticker {
    white-space: nowrap;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.8;
    order: 2;
    flex: 1;
    min-width: 200px;
    overflow: hidden;
    position: relative;
}

.navbar .nav-ticker span {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 15s linear infinite;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    order: 3; /* desktop: place menu before icons */
    margin-left: 0;
}

.navbar .nav-links li {
    position: relative;
}

.navbar .nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

.navbar .nav-links a:hover {
    color: #0f766e;
    transform: translateY(-1px);
}

.navbar .nav-links a.active {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
}

.navbar-social-icons {
    display: flex;
    align-items: center;
    gap: 16px;
    order: 4;
}

.navbar-social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 50% !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.navbar-social-icons a.instagram {
    color: #E4405F;
}

.navbar-social-icons a.facebook {
    color: #1877F2;
}

.navbar-social-icons a.tiktok {
    color: #000000;
}

.navbar-social-icons a.youtube {
    color: #FF0000;
}

.navbar-social-icons a.whatsapp {
    color: #25D366;
}

.navbar-social-icons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.navbar-social-icons a.instagram:hover {
    background: #E4405F;
    color: white;
}

.navbar-social-icons a.facebook:hover {
    background: #1877F2;
    color: white;
}

.navbar-social-icons a.tiktok:hover {
    background: #000000;
    color: white;
}

.navbar-social-icons a.youtube:hover {
    background: #FF0000;
    color: white;
}

.navbar-social-icons a.whatsapp:hover {
    background: #25D366;
    color: white;
}

.nav-auth-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-profile-trigger {
    font-size: 1.6rem;
    color: #0f766e;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
}

.nav-profile-trigger:hover { color: #0d5c55; }

.nav-profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 160px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px var(--shadow);
    padding: 8px 0;
    z-index: 1000;
}

.nav-profile-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: none;
}

.nav-profile-dropdown a:hover {
    background: rgba(15, 118, 110, 0.08);
    color: var(--text-primary);
}

.nav-profile-dropdown a i { margin-right: 8px; }

.hiring-btn {
    background: rgba(15, 118, 110, 0.06);
    padding: 8px 16px !important;
    border-radius: 4px;
    border: 1px solid #0f766e;
}

.hiring-btn:hover {
    background: #0f766e;
    color: white !important;
    border-bottom-color: transparent !important;
}

/* Show longer label on desktop, shorter label on mobile */
.hiring-desktop { display: inline; }
.hiring-mobile { display: none; }

@media (max-width: 768px) {
    .hiring-desktop { display: none; }
    .hiring-mobile { display: inline; }
    .hiring-btn { padding: 8px 12px !important; }
}

/* Nav Toggle Button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 12px;
    z-index: 1001;
    position: relative;
}
.nav-toggle { order: 5; }

/* ===== Navbar Dropdowns ===== */
.nav-links li {
    position: relative;
}

.has-dropdown > a .fa-chevron-down {
    font-size: 0.65rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.has-dropdown:hover > a .fa-chevron-down {
    transform: rotate(180deg);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 40px var(--shadow);
    list-style: none;
    padding: 12px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 50;
}

.has-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown li {
    margin: 0;
}

.nav-dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--text-primary) !important;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0.3px;
    border-bottom: none !important;
    white-space: nowrap;
}

.nav-dropdown a:hover {
    background: rgba(15, 118, 110, 0.08);
    color: #0f766e !important;
}

/* ===== Hero (SOM-style: fixed layer + spacer — video fades & lifts on scroll) ===== */
.hero-fixed-wrap {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100dvh - 72px);
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
    will-change: transform, opacity;
    transform-origin: center top;
}

.hero-fixed-wrap .hero-inner,
.hero-fixed-wrap .hero-content,
.hero-fixed-wrap .hero-content a {
    pointer-events: auto;
}

.hero-scroll-spacer {
    height: calc(100dvh - 72px);
    width: 100%;
    pointer-events: none;
}

.hero-scroll-spacer ~ section,
.hero-scroll-spacer ~ footer {
    position: relative;
    z-index: 4;
}

.hero {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 72px);
    margin-top: 0;
    padding: 0;
    display: block;
    text-align: center;
    color: #0b1120;
    overflow: hidden;
    background: #0c141c;
}

.hero-media-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: #0c141c;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-play-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-btn i {
    font-size: 24px;
    color: #0f766e;
    margin-left: 4px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(12, 20, 28, 0.78) 0%, rgba(12, 20, 28, 0.35) 38%, rgba(12, 20, 28, 0.08) 100%);
    z-index: 1;
    opacity: 0.55;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 72px);
    height: 100%;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 20px clamp(48px, 9vh, 96px);
    box-sizing: border-box;
}

.hero-content {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 20px;
    animation: fadeInUp 1.2s ease;
    color: white;
    text-align: center;
}

.hero .btn-primary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.95);
    background: rgba(15, 118, 110, 0.35);
    backdrop-filter: blur(6px);
}

.hero .btn-primary:hover {
    background: #0f766e;
    color: #fff;
    border-color: #0f766e;
}

.hero .typewriter-title,
.hero .typewriter-title.typed {
    border-right-color: transparent;
    text-align: center;
    display: block;
    width: 100%;
}

.hero .typewriter-text {
    border-right-color: transparent;
    text-align: center;
    display: block;
    width: 100%;
}

.hero .typewriter-text.typed {
    border-right-color: transparent;
}

/* ===== Hero Stats ===== */
.hero-stats {
    margin: 20px 0 28px;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    text-align: center;
    max-width: 360px;
    margin: 0 auto;
}

.hero-stat-item {
    aspect-ratio: 1 / 1;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-stat-number {
    font-size: 1.35rem;
    font-weight: 300;
    color: #20c4b4;
    letter-spacing: -0.02em;
    display: block;
    line-height: 1.1;
}

.hero-stat-suffix {
    font-size: 0.95rem;
    color: #20c4b4;
    font-weight: 300;
}

.hero-stat-label {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.2;
}

.nav-ticker {
    flex: 1;
    min-width: 200px;
    color: #6b7280;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    height: 24px;
    z-index: 1;
    order: 2;
}
.navbar .nav-links {
    position: relative;
    z-index: 11;
}
.nav-ticker span {
    display: inline-block;
    padding-left: 100%;
    will-change: transform;
    animation: tickerSlide 35s linear infinite;
}

@keyframes tickerSlide {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-120%);
    }
}

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

.hero-title {
    font-size: clamp(1.25rem, 3.6vw, 2.75rem);
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.03em;
    text-align: center;
    width: 100%;
    display: block;
    white-space: nowrap;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    font-weight: 300;
    margin-bottom: 28px;
    opacity: 0.9;
    text-align: center;
    width: 100%;
    display: block;
    white-space: nowrap;
}

.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: transparent;
    border: 2px solid #0f766e;
    color: #0f172a;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    background: #0f766e;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(15, 118, 110, 0.25);
}

/* ===== Section Titles ===== */
.section-title {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    color: var(--text-primary);
    position: relative;
    display: block;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background: #0f766e;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-tertiary);
    margin-bottom: 60px;
    font-weight: 300;
    text-align: center;
}

/* ===== Portfolio Grid ===== */
.portfolio {
    position: relative;
    z-index: 2;
    background: var(--bg-secondary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Projects page grid - same as homepage */
#projectsPageGrid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 400px));
    gap: 30px;
    max-width: 2550px;
    margin: 0 auto;
    width: 100%;
    justify-content: center;
}

#projectsPageGrid .portfolio-card-inner {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

#projectsPageGrid .portfolio-front {
    position: absolute;
    inset: 0;
}

#projectsPageGrid .portfolio-image {
    position: absolute;
    inset: 0;
    height: 100%;
    background: var(--portfolio-image-bg);
}

#projectsPageGrid .portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#projectsPageGrid .portfolio-back {
    position: absolute;
    inset: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
    color: white;
}

#projectsPageGrid .portfolio-back h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: white;
}

#projectsPageGrid .portfolio-back .portfolio-category {
    font-size: 0.75rem;
    margin-bottom: 8px;
    color: #99f6e4;
}

#projectsPageGrid .portfolio-back .portfolio-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: 3em;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

#projectsPageGrid .portfolio-back .btn-primary {
    padding: 8px 16px;
    font-size: 0.8rem;
    align-self: flex-start;
}

#projectsPageGrid .portfolio-front {
    position: absolute;
    inset: 0;
}

#projectsPageGrid .portfolio-image {
    position: absolute;
    inset: 0;
    height: 100%;
    background: var(--portfolio-image-bg);
}

#projectsPageGrid .portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#projectsPageGrid .portfolio-back {
    position: absolute;
    inset: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
    color: white;
}

#projectsPageGrid .portfolio-back h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: white;
}

#projectsPageGrid .portfolio-back .portfolio-category {
    font-size: 0.75rem;
    margin-bottom: 8px;
    color: #99f6e4;
}

#projectsPageGrid .portfolio-back .portfolio-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: 3em;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

#projectsPageGrid .portfolio-back .btn-primary {
    padding: 8px 16px;
    font-size: 0.8rem;
    align-self: flex-start;
}

/* Homepage featured row: 6 projects in one line on desktop, 2 per row on mobile */
.portfolio-grid--home,
#homePortfolioGrid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 400px));
    gap: 30px;
    max-width: 2550px;
    margin: 0 auto;
    width: 100%;
    justify-content: center;
}

/* Projects page grid - same as homepage */
#projectsPageGrid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 400px));
    gap: 30px;
    max-width: 2550px;
    margin: 0 auto;
    width: 100%;
    justify-content: center;
}

/* Override container for portfolio section to accommodate larger project cards */
.portfolio > .container,
.projects-page-main > .container {
    max-width: 2550px !important;
    padding: 0 40px;
}

#homePortfolioGrid .portfolio-card-inner {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

#homePortfolioGrid .portfolio-front {
    position: absolute;
    inset: 0;
}

#homePortfolioGrid .portfolio-image {
    position: absolute;
    inset: 0;
    height: 100%;
    background: var(--portfolio-image-bg);
}

#homePortfolioGrid .portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#homePortfolioGrid .portfolio-back {
    position: absolute;
    inset: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
    color: white;
}

#homePortfolioGrid .portfolio-back h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: white;
}

#homePortfolioGrid .portfolio-back .portfolio-category {
    font-size: 0.75rem;
    margin-bottom: 8px;
    color: #99f6e4;
}

#homePortfolioGrid .portfolio-back .portfolio-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: 3em;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

#homePortfolioGrid .portfolio-back .btn-primary {
    padding: 8px 16px;
    font-size: 0.8rem;
    align-self: flex-start;
}

.portfolio-grid:only-child,
.portfolio-grid > *:only-child {
    max-width: 500px;
    margin: 0 auto;
}

.portfolio-item {
    background: transparent;
    border: none;
}

.portfolio-card-inner {
    position: relative;
    width: 100%;
    background: var(--portfolio-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-front {
    position: relative;
    background: var(--portfolio-card-bg);
}

.portfolio-back {
    padding: 24px;
    display: flex;
    flex-direction: column;
    background: var(--portfolio-card-bg);
}

.portfolio-back h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.portfolio-back .portfolio-category {
    color: #0f766e;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 500;
}

.portfolio-back .portfolio-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.5em;
}

.portfolio-back .btn-primary {
    align-self: flex-start;
    padding: 12px 24px;
    font-size: 0.9rem;
}

.portfolio-item:hover .portfolio-card-inner {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow);
}

.portfolio-image {
    height: 280px;
    overflow: hidden;
    background: var(--portfolio-image-bg);
}

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

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 30px;
}

.portfolio-content h3 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.portfolio-category {
    color: #0f766e;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.portfolio-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 28px;
}

.filter-btn {
    padding: 10px 20px;
    border: 1px solid rgba(15, 118, 110, 0.4);
    background: var(--card-bg);
    color: #0f766e;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #0f766e;
    color: #fff;
    border-color: #0f766e;
}

.portfolio-empty-message {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-tertiary);
}

.portfolio-empty-message p {
    margin: 8px 0;
}

.see-more-btn {
    margin-top: 16px;
    display: inline-block;
    text-decoration: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    background: #0f766e;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.see-more-btn:hover {
    background: #0d5c55;
    color: #fff;
}

/* ===== Services Grid ===== */
.services {
    background: var(--bg-primary);
}

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

.service-card {
    background: transparent;
    border: none;
    perspective: 1000px;
    text-align: left;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-front,
.service-back {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    backface-visibility: hidden;
    box-shadow: 0 10px 30px var(--shadow);
}

.service-front {
    transform: rotateY(0deg);
}

.service-back {
    position: absolute;
    inset: 0;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: rotateY(180deg);
}

.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 20px;
}

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

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

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: #0b1120;
}

.service-card p {
    color: #4b5563;
}

/* ===== Blog Cards ===== */
.blog-card {
    background: transparent;
    border: none;
    margin-bottom: 40px;
}

.blog-card-inner {
    position: relative;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    min-height: 300px;
}

.blog-card:hover .blog-card-inner {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow);
}

.blog-card-reverse .blog-card-inner {
    flex-direction: row-reverse;
}

.blog-image {
    width: 45%;
    height: auto;
    overflow: hidden;
    min-height: 300px;
}

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

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

.blog-content {
    width: 55%;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-content h3 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.blog-date {
    color: #0f766e;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 500;
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 6.4em;
    margin-bottom: 16px;
    flex-grow: 1;
}

.blog-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
}

.blog-author {
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
}

.blog-see-more {
    align-self: flex-start;
    padding: 10px 20px;
    background: #0f766e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.blog-see-more:hover {
    background: #0d5c55;
}

/* ===== Careers Section ===== */
.careers {
    background: #f3f4f6;
}

.careers-content {
    background: #ffffff;
    padding: 50px;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.careers-intro {
    text-align: center;
    margin-bottom: 40px;
}

.careers-intro h3 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: #0b1120;
}

.careers-intro p {
    color: #4b5563;
    max-width: 700px;
    margin: 0 auto;
}

.job-listings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.job-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: #f9fafb;
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition: all 0.3s ease;
}

.job-item:hover {
    border-color: #0f766e;
    transform: translateX(10px);
}

.job-info h4 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: #111827;
}

.job-location {
    color: #0f766e;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.job-location i {
    margin-right: 8px;
}

.job-type {
    color: #6b7280;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-apply {
    padding: 10px 25px;
    background: transparent;
    border: 2px solid #0f766e;
    color: #0f172a;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-apply:hover {
    background: #0f766e;
    color: #ffffff;
}

/* ===== Modal (Login System) ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #ffffff;
    margin: 5% auto;
    padding: 40px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.auth-modal-content {
    overflow: hidden;
}
.auth-modal-watermark {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: url(images/logo.png) center/55% no-repeat;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}
.auth-modal-content .close-modal,
.auth-modal-content h2,
.auth-modal-content .modal-subtitle,
.auth-modal-content .portal-tabs,
.auth-modal-content form,
.auth-modal-content .demo-credentials,
.auth-modal-content .auth-switch {
    position: relative;
    z-index: 1;
}
.auth-form .form-group {
    margin-bottom: 18px;
}

/* Ensure the public Careers modal is scrollable on desktop so submit is reachable */
#careerApplicationModal .modal-content {
    max-width: 900px;
    width: 90%;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 28px;
}

/* Improve select visibility for year range */
#careerApplicationModal .year-range select {
    min-width: 140px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary) !important;
    display: inline-block !important;
    position: relative !important;
    z-index: 9999 !important;
    appearance: none;
}
.auth-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #111827;
}
.auth-form input,
.auth-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: #0f766e;
}
.auth-form .btn-login {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
}
.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 0.95rem;
    color: #6b7280;
}
.auth-switch a {
    color: #0f766e;
    font-weight: 500;
    text-decoration: none;
}
.auth-switch a:hover {
    text-decoration: underline;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #0f766e;
}

.modal h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 10px;
    color: #0b1120;
}

.modal-subtitle {
    color: #6b7280;
    margin-bottom: 30px;
}

.portal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.portal-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portal-tab.active,
.portal-tab:hover {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-weight: 300;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 15px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    color: #111827;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: #0f766e;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: #0f766e;
    border: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    background: #115e59;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(15, 118, 110, 0.25);
}

.demo-credentials {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
}

/* ===== Footer ===== */
.footer {
    background: var(--footer-bg);
    padding: 40px 0 20px;
    border-top: 1px solid var(--footer-border-top);
    color: var(--footer-text-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer-col h4 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--footer-heading-color);
}

.footer-logo {
    font-size: 1.9rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: var(--footer-heading-color);
}

.footer-logo span {
    color: #0f766e;
    font-weight: 500;
}

.footer-about {
    color: var(--footer-text-color);
    margin-bottom: 25px;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--footer-social-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-social-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.social-links a:hover {
    background: #0f766e;
    color: #ffffff;
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--footer-link-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--footer-link-hover);
    padding-left: 8px;
}

.footer-col address {
    color: var(--footer-text-color);
    font-style: normal;
    line-height: 1.8;
}

.footer-col address i {
    color: #0f766e;
    width: 25px;
    margin-right: 5px;
}

.newsletter-form {
    display: flex;
    margin-top: 20px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px;
    background: var(--footer-input-bg);
    border: 1px solid var(--footer-input-border);
    color: var(--footer-input-text);
}

.newsletter-form input:focus {
    outline: none;
    border-color: #0f766e;
}

.newsletter-form button {
    padding: 0 20px;
    background: #0f766e;
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: #115e59;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--footer-divider);
    color: var(--footer-muted);
    font-size: 0.9rem;
}

/* ===== Contact Section ===== */
.contact {
    background: #f9fafb;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    color: #111827;
    margin-bottom: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #0b1120;
}

.contact-info > p {
    margin-bottom: 30px;
    color: #6b7280;
    line-height: 1.7;
}

.contact-detail {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-detail i {
    color: #0f766e;
    width: 30px;
    font-size: 1.1rem;
}

.contact-social {
    margin-top: 30px;
}

.contact-social-label {
    display: block;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 0.95rem;
}

.contact-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.contact-social a:hover {
    background: #0f766e;
    color: #fff;
}

.contact-map-wrap {
    margin-top: 40px;
}

.contact-map-wrap h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #0b1120;
}

.contact-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.contact-page .contact-detail a,
.footer-contact-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-page .contact-detail a:hover,
.footer-contact-link:hover {
    color: var(--footer-link-hover);
    text-decoration: underline;
}

.contact-form-wrap .form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    color: #111827;
}

.contact-form-wrap .btn-primary {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: #fff;
    border: none;
    padding: 14px 20px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.contact-form-wrap .btn-primary:disabled {
    opacity: 0.7;
    cursor: wait;
}

[data-theme="dark"] .contact-page,
[data-theme="dark"] .contact-grid,
[data-theme="dark"] .contact-info,
[data-theme="dark"] .contact-form-wrap {
    color: #e2e8f0;
}

[data-theme="dark"] .contact-info h3,
[data-theme="dark"] .contact-map-wrap h3,
[data-theme="dark"] .contact-page .section-title {
    color: #f8fafc;
}

[data-theme="dark"] .contact-info > p,
[data-theme="dark"] .contact-social-label,
[data-theme="dark"] .section-subtitle {
    color: #94a3b8;
}

[data-theme="dark"] .contact-detail {
    color: #e2e8f0;
}

[data-theme="dark"] .contact-detail i {
    color: #2dd4bf;
}

[data-theme="dark"] .contact-detail a {
    color: #5eead4;
}

[data-theme="dark"] .contact-form-wrap .form-control {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}

[data-theme="dark"] .contact-form-wrap .form-control::placeholder {
    color: #94a3b8;
}

[data-theme="dark"] .contact-form-wrap .btn-primary {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: #0f172a;
}

/* ===== Typewriter effect ===== */
.typewriter-title,
.typewriter-sub,
.typewriter-text {
    overflow: hidden;
    border-right: 2px solid #0f766e;
    white-space: nowrap;
    display: inline-block;
}

.typewriter-title.typed,
.typewriter-sub.typed,
.typewriter-text.typed {
    border-right-color: transparent;
    white-space: normal;
}

/* Ensure section headings using the typewriter classes stay block-level
   so the subtitle appears below the main title (prevents inline overlap) */
.section-title.typewriter-title,
.section-subtitle.typewriter-text {
    display: block;
}

/* ===== Navbar Social Links ===== */
.navbar-social {
    background: rgba(15, 118, 110, 0.08);
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 118, 110, 0.15);
}

.social-links-horizontal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.social-links-horizontal a {
    width: 32px;
    height: 32px;
    background: rgba(15, 118, 110, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f766e;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 50%;
    font-size: 14px;
}

.social-links-horizontal a:hover {
    background: #0f766e;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Section CTA Buttons */
.section-cta {
    text-align: center;
    margin-top: 50px;
}

.section-cta .btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #0f766e 0%, #0d5c55 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(15, 118, 110, 0.3);
}

.section-cta .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 118, 110, 0.4);
    background: linear-gradient(135deg, #0d5c55 0%, #0a4a44 100%);
}
.search-modal-content {
    max-width: 600px;
    text-align: center;
}

.search-result-item {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: left;
}

.search-result-item:hover {
    background-color: #f8fafc;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    color: #0f766e;
    margin-bottom: 4px;
    font-size: 1rem;
}

.search-result-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
}

.search-results {
    margin-top: 30px;
    text-align: left;
}

/* ===== Stats section ===== */
.stats-section {
    position: relative;
    z-index: 5;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 70px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 300;
    color: #20c4b4;
    letter-spacing: -0.02em;
}

.stat-suffix {
    font-size: 2rem;
    color: var(--text-tertiary);
    font-weight: 300;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-tertiary);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Careers page (ORAD style) ===== */
.careers-page-main {
    padding-top: 100px;
}

.careers-hero {
    padding: 60px 0 40px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.careers-vacancies {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-tertiary);
    margin-top: 10px;
}

.careers-open-positions {
    padding: 80px 0;
    background: var(--bg-primary);
}

.careers-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.career-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.career-card:hover {
    border-color: #0f766e;
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.1);
}

.career-card-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.career-card-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 25px;
}

.career-apply-btn {
    cursor: pointer;
    border: 2px solid #0f766e;
    background: transparent;
    font-size: 0.95rem;
}

.career-apply-btn:hover {
    background: #0f766e;
    color: #ffffff;
}

/* ===== About page ===== */
.about-page-main {
    padding-top: 100px;
}

.about-hero {
    padding: 60px 0 40px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.about-hero .section-subtitle {
    margin-bottom: 0;
}

.about-content {
    padding: 80px 0;
    background: var(--bg-primary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.about-text h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.about-values {
    margin-bottom: 80px;
}

.about-values h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.value-card {
    padding: 30px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.value-card:hover {
    border-color: #0f766e;
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.08);
}

.value-card i {
    font-size: 2rem;
    color: #0f766e;
    margin-bottom: 15px;
}

.value-card h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.value-card p {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    line-height: 1.6;
    margin: 0;
}

.about-cta {
    text-align: center;
    padding: 50px 0;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.about-cta p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .hero {
        min-height: calc(100dvh - 56px);
    }
    
    .hero-inner {
        min-height: calc(100dvh - 56px);
        padding: 0 16px clamp(32px, 7vh, 64px);
    }
    
    .hero-content {
        padding: 0 12px;
    }
    
    .hero-title {
        font-size: clamp(1rem, 4.2vw, 1.5rem);
        line-height: 1.15;
        margin-bottom: 12px;
        letter-spacing: -0.02em;
        max-width: 100%;
        white-space: nowrap;
    }
    
    .hero .section-subtitle {
        font-size: 0.7rem;
        margin-bottom: 20px;
        line-height: 1.4;
        max-width: 100%;
        white-space: nowrap;
    }
    
    .hero .btn-primary {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .hero-media-wrap img {
        object-position: center center;
    }
    
    .hero-scroll-spacer {
        height: calc(100dvh - 56px);
    }
    
    .hero-fixed-wrap {
        top: 56px;
        height: calc(100dvh - 56px);
    }
    
    .hero-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        max-width: 300px;
        margin: 16px auto 0;
    }
    
    .hero-stat-item {
        padding: 6px 4px;
    }
    
    .hero-stat-number {
        font-size: 1.15rem;
    }
    
    .hero-stat-suffix {
        font-size: 0.85rem;
    }
    
    .hero-stat-label {
        font-size: 0.55rem;
    }
    
    .navbar {
        padding: 12px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .navbar .logo {
        flex-shrink: 0;
    }
    
    .navbar .nav-ticker {
        display: block;
        flex: 1;
        min-width: 150px;
        font-size: 0.75rem;
    }
    
    .navbar-social-icons {
        display: none; /* Hide regular social icons on mobile */
    }
    
    .mobile-socials-dropdown {
        display: block; /* Show dropdown on mobile */
    }
    
    .mobile-socials-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .mobile-socials-menu {
        min-width: 180px;
        padding: 6px;
        gap: 6px;
    }
    
    .mobile-socials-menu a {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .nav-social-item {
        width: 100%;
        padding: 10px 15px;
        border-top: 1px solid rgba(0,0,0,0.05);
    }
    
    .navbar .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        order: 5;
        background: rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(18px);
        flex-direction: column;
        gap: 0;
        padding: 0;
        width: min(100vw - 28px, 280px);
        border-radius: 16px;
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.12);
        z-index: 1000;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-sizing: border-box;
    }

    /* Mobile: place icons between ticker and hamburger */
    .navbar-left-controls {
        order: 3;
        margin-left: 8px;
        flex-shrink: 0;
    }

    .nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        order: 4;
        flex-shrink: 0;
        margin-left: 10px;
        width: 36px;
        height: 36px;
    }
    
    .navbar.open .nav-links {
        max-height: calc(100vh - 90px);
        opacity: 1;
        transform: translateY(0);
        padding: 12px;
        overflow: auto;
    }

    /* Force menu link colors to white on mobile when menu is open */
    .navbar.open .nav-links a,
    .navbar.open .nav-links .nav-dropdown a {
        color: #ffffff !important;
    }
    
    .nav-links li {
        width: 100%;
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .navbar.open .nav-links li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .navbar.open .nav-links li:nth-child(1) { transition-delay: 0.1s; }
    .navbar.open .nav-links li:nth-child(2) { transition-delay: 0.2s; }
    .navbar.open .nav-links li:nth-child(3) { transition-delay: 0.3s; }
    .navbar.open .nav-links li:nth-child(4) { transition-delay: 0.4s; }
    .navbar.open .nav-links li:nth-child(5) { transition-delay: 0.5s; }
    .navbar.open .nav-links li:nth-child(6) { transition-delay: 0.6s; }
    .navbar.open .nav-links li:nth-child(7) { transition-delay: 0.7s; }
    .navbar.open .nav-links li:nth-child(8) { transition-delay: 0.8s; }
    .navbar.open .nav-links li:nth-child(9) { transition-delay: 0.9s; }
    .navbar.open .nav-links li:nth-child(10) { transition-delay: 1.0s; }
    
    .nav-links > li > a {
        display: block;
        font-size: 0.85rem;
        padding: 10px 12px;
        margin: 4px 0;
        width: 100%;
        min-width: 0;
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 14px;
        background: transparent;
        transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
        box-shadow: none;
        box-sizing: border-box;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .navbar.open .nav-links > li > a:hover,
    .navbar.open .nav-links > li > a:active,
    .navbar.open .nav-links > li > a:focus-visible {
        background-color: #0f766e;
        color: #ffffff;
        border-color: #0f766e;
        box-shadow: 0 18px 30px rgba(15, 118, 110, 0.18);
        transform: translateY(-1px);
    }

    .navbar.open .nav-links > li > a:hover i,
    .navbar.open .nav-links > li > a:active i,
    .navbar.open .nav-links > li > a:focus-visible i {
        color: #ffffff;
    }

    .nav-links > li > a .fa-chevron-down {
        margin-left: 4px;
        transition: margin-left 0.3s ease-in-out, color 0.3s ease-in-out;
    }

    .nav-links > li > a:hover .fa-chevron-down,
    .nav-links > li > a:active .fa-chevron-down,
    .nav-links > li > a:focus-visible .fa-chevron-down {
        margin-left: 8px;
    }

    .nav-social-item {
        width: 100%;
        padding: 10px 0 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .nav-social-item .navbar-social-icons {
        width: 100%;
        justify-content: center;
        gap: 10px;
        padding: 6px 0 2px;
    }

    .nav-social-item .navbar-social-icons a {
        width: 38px;
        height: 38px;
        padding: 0;
        margin: 0;
        border: 1px solid rgba(15, 118, 110, 0.22);
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        color: var(--text-primary);
        transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out, border-color 0.3s ease-in-out;
    }

    .nav-social-item .navbar-social-icons a:hover,
    .nav-social-item .navbar-social-icons a:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
    }

    .nav-social-item .navbar-social-icons a:hover i,
    .nav-social-item .navbar-social-icons a:focus-visible i {
        color: #ffffff;
    }

    .nav-social-item .navbar-social-icons a.instagram:hover {
        background-color: #E4405F;
        border-color: #E4405F;
    }

    .nav-social-item .navbar-social-icons a.facebook:hover {
        background-color: #1877F2;
        border-color: #1877F2;
    }

    .nav-social-item .navbar-social-icons a.tiktok:hover {
        background-color: #000000;
        border-color: #000000;
    }

    .nav-social-item .navbar-social-icons a.youtube:hover {
        background-color: #FF0000;
        border-color: #FF0000;
    }

    .nav-social-item .navbar-social-icons a.whatsapp:hover {
        background-color: #25D366;
        border-color: #25D366;
    }
    
    /* Mobile dropdown adjustments */
    .nav-dropdown {
        position: absolute;
        right: 0;
        top: 100%;
        opacity: 0;
        visibility: hidden;
        transform: translateX(10px);
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
        border: 1px solid rgba(0, 0, 0, 0.1);
        background: white;
        margin: 0;
        padding: 8px 0;
        border-radius: 6px;
        height: 0;
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        min-width: 180px;
        z-index: 10;
    }
    
    .has-dropdown {
        position: relative;
    }
    
    .has-dropdown.mobile-open .nav-dropdown {
        height: auto;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
    
    .nav-dropdown li a {
        font-size: 0.85rem;
        padding: 8px 16px;
        color: #64748b;
        white-space: nowrap;
        display: block;
    }
    
    .nav-dropdown li a:hover {
        background-color: rgba(15, 118, 110, 0.1);
        color: #0f766e;
    }
    
    .nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        order: 5;
        font-size: 1.5rem;
        padding: 10px 15px;
        color: var(--text-primary);
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1002;
        position: relative;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .money-overview-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .money-overview-card {
        padding: 20px;
    }
    
    .money-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .money-amount {
        font-size: 1.5rem;
    }
    
    .nav-dropdown a {
        padding: 8px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .stat-number { font-size: 2.5rem; }
    .stat-suffix { font-size: 1.5rem; }

    .careers-cards {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .portfolio-grid:not(.portfolio-grid--home),
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid--home,
    #homePortfolioGrid {
        grid-template-columns: repeat(3, minmax(0, 340px));
        gap: 20px;
        max-width: 2550px;
        width: 100%;
        justify-content: center;
    }
    
    #projectsPageGrid {
        grid-template-columns: repeat(3, minmax(0, 340px));
        gap: 20px;
        max-width: 2550px;
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 30px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .splash-logo {
        margin-bottom: 28px;
    }
    .splash-logo img {
        height: 150px;
        max-height: 22vh;
    }
    .splash-loading-wrap {
        width: 220px;
        height: 5px;
    }
    .splash-loading-pct {
        font-size: 0.75rem;
        top: 14px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .job-item {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .btn-apply {
        width: 100%;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* High-specificity overrides: ensure navbar-left icons are visible in light mode
   and remain white in dark mode. Uses !important to override earlier platform colors. */
.navbar .navbar-left-controls .navbar-social-icons a {
    color: var(--text-primary) !important;
    border-color: rgba(0,0,0,0.06) !important;
}

[data-theme="dark"] .navbar .navbar-left-controls .navbar-social-icons a,
[data-theme="dark"] .navbar .navbar-left-controls .theme-toggle {
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.12) !important;
}

/* ===== Portfolio filter wrap (mobile) ===== */
.portfolio-filters--wrap {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* ===== Partnerships ===== */
.partnerships-section {
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding: 90px 0;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}

.partner-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 28px 22px;
    text-align: center;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.partner-card:hover {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transform: translateY(-4px);
}

.partner-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(15, 118, 110, 0.1);
    color: #0f766e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.partner-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0b1120;
}

.partner-card p {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
}

.partners-fallback {
    text-align: center;
    color: #6b7280;
    max-width: 640px;
    margin: 0 auto;
}

/* ===== Rich testimonials ===== */
.testimonial-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.testimonial-rich .portfolio-back {
    text-align: left;
}

.testimonial-pillars {
    list-style: none;
    margin: 12px 0 16px;
    padding: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #374151;
}

.testimonial-pillars li {
    margin-bottom: 10px;
    padding-left: 0;
}

.testimonial-pillars strong {
    display: block;
    color: #0f766e;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.testimonial-quote {
    margin-top: 12px;
    font-style: italic;
}

.testimonial-video {
    margin-top: 14px;
}

.testimonial-video .btn-primary {
    font-size: 0.75rem;
    padding: 10px 18px;
}

/* ===== Project detail page ===== */
.project-detail-main {
    padding-top: 100px;
    padding-bottom: 80px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 60vh;
}

.project-detail-main .project-detail-section {
    padding: 0;
    scroll-margin-top: 100px;
}

.project-detail-title {
    margin-bottom: 8px !important;
    color: var(--text-primary);
}

.project-detail-category {
    margin-bottom: 24px !important;
    color: var(--text-secondary);
}

.project-detail-description-wrap {
    max-width: 860px;
    margin: 32px auto 0;
    padding: 28px 32px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 24px var(--shadow);
}

.project-detail-about-heading {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.project-detail-description {
    margin: 0;
    line-height: 1.85;
    font-size: 1.05rem;
    color: var(--text-primary);
    white-space: pre-line;
}

.project-detail-back {
    text-align: center;
    margin-top: 40px;
}

[data-theme="dark"] .project-detail-main {
    background: var(--bg-primary);
}

[data-theme="dark"] .project-detail-description-wrap {
    background: #1e293b;
    border-color: #475569;
}

[data-theme="dark"] .project-detail-title,
[data-theme="dark"] .project-detail-about-heading,
[data-theme="dark"] .project-detail-description {
    color: #f8fafc;
}

[data-theme="dark"] .project-detail-category {
    color: #cbd5e1;
}

[data-theme="dark"] .project-detail-section h2 {
    color: #f8fafc;
}

.project-gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.project-gallery-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.project-gallery-tab:hover {
    border-color: #0f766e;
    color: #0f766e;
}

.project-gallery-tab.is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.35);
}

.project-gallery-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    font-size: 0.8rem;
    font-weight: 700;
}

.project-gallery-tab.is-active .project-gallery-tab-count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.project-gallery-panel[hidden] {
    display: none !important;
}

.project-gallery-empty {
    margin: 0;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

[data-theme="dark"] .project-gallery-tab {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}

[data-theme="dark"] .project-gallery-tab:hover {
    border-color: #2dd4bf;
    color: #2dd4bf;
}

[data-theme="dark"] .project-gallery-tab.is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

[data-theme="dark"] .project-gallery-tab-count {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .project-gallery-empty {
    background: #1e293b;
    border-color: #475569;
    color: #94a3b8;
}

.project-gallery-hint {
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.project-gallery-hint i {
    margin-right: 6px;
    color: #0f766e;
}

[data-theme="dark"] .project-gallery-hint {
    color: #94a3b8;
}

[data-theme="dark"] .project-gallery-hint i {
    color: #2dd4bf;
}

.project-hero-img {
    width: 100%;
    max-height: 70vh;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    cursor: zoom-in;
}

.project-detail-section {
    margin-top: 48px;
}

.project-detail-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.gallery-thumb {
    display: block;
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.gallery-thumb:hover,
.gallery-thumb:focus-visible {
    transform: scale(1.02);
    box-shadow: 0 8px 24px var(--shadow);
}

.gallery-thumb:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

.gallery-thumb-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.gallery-thumb:hover .gallery-thumb-zoom,
.gallery-thumb:focus-visible .gallery-thumb-zoom {
    opacity: 1;
}

.project-gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-tertiary);
    display: block;
    pointer-events: none;
    user-select: none;
}

.project-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.metric-card span {
    display: block;
    font-size: 2rem;
    font-weight: 300;
    color: #14b8a6;
}

[data-theme="dark"] .metric-card span {
    color: #2dd4bf;
}

.metric-card label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#projectDetailLoading,
#projectDetailError {
    color: var(--text-secondary);
    text-align: center;
}

#projectDetailError a {
    color: #14b8a6;
}

[data-theme="dark"] #projectDetailError a {
    color: #2dd4bf;
}

/* Project gallery lightbox */
.project-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.94);
    padding: 16px;
}

.project-lightbox.open {
    display: flex !important;
    visibility: visible;
}

body.lightbox-open {
    overflow: hidden;
}

.project-lightbox-backdrop {
    position: absolute;
    inset: 0;
    cursor: zoom-out;
}

.project-lightbox-stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    min-height: 0;
}

.project-lightbox-img {
    max-width: min(92vw, 1200px);
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-drag: none;
}

.project-lightbox-close,
.project-lightbox-nav {
    position: absolute;
    z-index: 2;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.2s ease;
}

.project-lightbox-close:hover,
.project-lightbox-nav:hover,
.project-lightbox-close:focus-visible,
.project-lightbox-nav:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.project-lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
}

.project-lightbox-prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.project-lightbox-next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.project-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    background: rgba(0, 0, 0, 0.45);
    padding: 6px 14px;
    border-radius: 999px;
}

@media (max-width: 640px) {
    .project-lightbox-prev {
        left: 8px;
    }

    .project-lightbox-next {
        right: 8px;
    }

    .project-lightbox-close {
        top: 12px;
        right: 12px;
    }
}

/* ===== About studio extras ===== */
.studio-band {
    background: #fff;
    padding: 80px 0;
}

.studio-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.studio-photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.studio-photo-grid img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    height: 180px;
}

.process-diagram {
    margin-top: 24px;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px dashed rgba(15, 118, 110, 0.35);
}

.process-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-top: 16px;
}

.process-step {
    flex: 1 1 120px;
    text-align: center;
    font-size: 0.85rem;
    color: #374151;
}

.process-step i {
    display: block;
    font-size: 1.5rem;
    color: #0f766e;
    margin-bottom: 8px;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.feature-strip .value-card {
    margin: 0;
}

@media (max-width: 900px) {
    .studio-grid-2 {
        grid-template-columns: 1fr;
    }
    .hero {
        min-height: calc(100dvh - 72px);
    }
    .hero-inner {
        min-height: calc(100dvh - 72px);
        padding: 0 16px clamp(36px, 8vh, 72px);
    }
    .hero-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        max-width: 280px;
    }
    .hero-content {
        padding: 0 12px;
    }
    
    .portfolio-grid--home,
    #homePortfolioGrid {
        grid-template-columns: repeat(3, minmax(0, 340px));
        gap: 20px;
        max-width: 2550px;
        width: 100%;
        justify-content: center;
    }
    
    #projectsPageGrid {
        grid-template-columns: repeat(3, minmax(0, 340px));
        gap: 20px;
        max-width: 2550px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .hero-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        max-width: 260px;
    }
    .hero-stat-item {
        padding: 5px 3px;
    }
    .hero-stat-number {
        font-size: 1rem;
    }
    .hero-stat-suffix {
        font-size: 0.75rem;
    }
    .hero-stat-label {
        font-size: 0.5rem;
    }
    .hero-content {
        padding: 0 10px;
    }
}

/* ===== Blog Cards Mobile ===== */
@media (max-width: 768px) {
    .blog-card-inner {
        flex-direction: column !important;
        min-height: auto;
    }
    
    .blog-card-reverse .blog-card-inner {
        flex-direction: column !important;
    }
    
    .blog-image {
        width: 100%;
        height: 200px;
        min-height: 200px;
    }
    
    .blog-content {
        width: 100%;
        padding: 20px;
    }
    
    .blog-content h3 {
        font-size: 1.3rem;
    }
    
    .blog-excerpt {
        -webkit-line-clamp: 3;
        line-clamp: 3;
        max-height: 4.8em;
    }
    
    .blog-footer {
        margin-top: 12px;
    }
    
    .blog-see-more {
        width: 100%;
        text-align: center;
    }
}

/* ===== Portfolio Cards Mobile ===== */
@media (max-width: 768px) {
    .portfolio-item {
        width: 100%;
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-content {
        padding: 20px;
    }
    
    .portfolio-content h3 {
        font-size: 1.4rem;
    }
    
    .portfolio-back .portfolio-description {
        -webkit-line-clamp: 3;
        line-clamp: 3;
        max-height: 4.5em;
    }
}

/* ===== Services Cards Mobile ===== */
@media (max-width: 768px) {
    .service-card {
        perspective: none;
    }
    
    .service-card-inner {
        transform: none !important;
        height: auto;
    }
    
    .service-card:hover .service-card-inner {
        transform: none !important;
    }
    
    .service-front,
    .service-back {
        position: relative;
        transform: none;
        backface-visibility: visible;
    }
    
    .service-back {
        position: relative;
        inset: auto;
        padding: 20px;
    }
    
    .service-image {
        height: 180px;
        margin-bottom: 15px;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
}

/* ===== Tables Mobile ===== */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== Forms Mobile ===== */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* ===== Dashboard Cards Mobile ===== */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-card h3 {
        font-size: 1.1rem;
    }
    
    .stat-card .value {
        font-size: 1.8rem;
    }
}

/* ===== Portal Sidebar Mobile ===== */
@media (max-width: 768px) {
    .portal-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .portal-sidebar.open {
        left: 0;
    }
    
    .portal-main {
        margin-left: 0 !important;
        padding: 20px 15px;
    }
    
    .portal-header {
        padding: 15px;
    }
    
    .portal-toggle {
        display: block !important;
    }
}

/* ===== Modal Mobile ===== */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 25px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal h2 {
        font-size: 1.5rem;
    }
    
    .auth-modal-content {
        padding: 20px;
    }
}

/* ===== Tabs Mobile ===== */
@media (max-width: 768px) {
    .tabs {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-btn {
        flex: 1 1 auto;
        min-width: 80px;
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* ===== Filter Buttons Mobile ===== */
@media (max-width: 768px) {
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .portfolio-filters,
    .task-filters {
        gap: 8px;
    }
}

/* ===== Cards Grid Mobile ===== */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .card {
        padding: 20px;
    }
}

/* ===== Project Details Mobile ===== */
@media (max-width: 768px) {
    .project-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .project-gallery {
        grid-template-columns: 1fr;
    }
}

/* ===== Contact Form Mobile ===== */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    
    .contact-info-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* ===== About Section Mobile ===== */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .value-card {
        padding: 20px;
    }
}

/* ===== Careers Mobile ===== */
@media (max-width: 768px) {
    .careers-content {
        padding: 30px 20px;
    }
    
    .job-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    
    .btn-apply {
        width: 100%;
    }
}

/* ===== Footer Mobile ===== */
@media (max-width: 768px) {
    .footer {
        padding: 36px 0 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 0;
        text-align: left;
    }

    .footer-col {
        padding: 22px 0;
        border-bottom: 1px solid var(--footer-divider);
    }

    .footer-col:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .footer-col:first-child {
        padding-top: 0;
    }

    .footer-col h4 {
        margin-bottom: 14px;
        font-size: 0.95rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .footer-col address {
        font-size: 0.92rem;
        line-height: 1.75;
    }

    .footer-links li {
        margin-bottom: 10px;
    }

    .footer-links a {
        font-size: 0.92rem;
    }

    .footer-links a:hover {
        padding-left: 4px;
    }

    .footer-map iframe {
        display: block;
        width: 100%;
        min-height: 180px;
        border-radius: 10px;
    }

    .footer-bottom {
        margin-top: 8px;
        padding-top: 22px;
        text-align: center;
        font-size: 0.85rem;
    }

    .footer-social {
        justify-content: flex-start;
    }

    /* Homepage projects: 1 per row on mobile */
    .portfolio-grid--home,
    #homePortfolioGrid {
        grid-template-columns: 1fr;
        gap: 20px;
        justify-content: center;
    }

    /* Override container for portfolio section on mobile */
    .portfolio > .container {
        max-width: 100% !important;
        padding: 0 15px !important;
    }

    /* Contact forms on mobile */
    .contact-form-wrap {
        padding: 20px 15px;
    }

    .contact-form-wrap h3 {
        font-size: 1.25rem;
        margin-bottom: 20px;
    }

    .contact-form-wrap .form-group {
        margin-bottom: 15px;
    }

    .contact-form-wrap .form-control {
        padding: 12px 14px;
        font-size: 14px;
    }

    .contact-form-wrap textarea.form-control {
        min-height: 100px;
    }

    .contact-form-wrap .btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Service detail container on mobile */
    .service-detail-container {
        margin: 0 15px;
    }

    .service-detail-header {
        padding: 30px 20px;
    }

    .service-detail-header h2 {
        font-size: 1.5rem;
    }

    .service-detail-header .service-tagline {
        font-size: 0.9rem;
    }

    .service-detail-body {
        padding: 30px 20px;
    }

    .service-deliverables {
        padding: 20px;
    }

    .service-deliverables h3 {
        font-size: 1rem;
    }

    .deliverables-list {
        grid-template-columns: 1fr;
    }

    /* Project detail page on mobile */
    .project-detail-main {
        padding-top: 80px;
        padding-bottom: 40px;
    }

    .project-detail-main .container {
        padding: 0 15px;
    }

    #homePortfolioGrid .portfolio-card-inner {
        aspect-ratio: 1 / 1;
    }

    #homePortfolioGrid .portfolio-back {
        padding: 12px;
    }

    #homePortfolioGrid .portfolio-back h3 {
        font-size: 0.9rem;
    }

    #homePortfolioGrid .portfolio-back .portfolio-category {
        font-size: 0.65rem;
        margin-bottom: 6px;
    }

    #homePortfolioGrid .portfolio-back .portfolio-description {
        display: none;
    }

    #homePortfolioGrid .portfolio-back .btn-primary {
        width: 100%;
        text-align: center;
        padding: 8px 10px;
        font-size: 0.72rem;
    }
    
    /* Portfolio page projects: 1 per row on mobile */
    #projectsPageGrid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 2550px;
        justify-content: center;
    }

    #projectsPageGrid .portfolio-card-inner {
        aspect-ratio: 1 / 1;
    }

    #projectsPageGrid .portfolio-back {
        padding: 12px;
    }

    #projectsPageGrid .portfolio-back h3 {
        font-size: 0.9rem;
    }

    #projectsPageGrid .portfolio-back .portfolio-category {
        font-size: 0.65rem;
        margin-bottom: 6px;
    }

    #projectsPageGrid .portfolio-back .portfolio-description {
        display: none;
    }

    #projectsPageGrid .portfolio-back .btn-primary {
        width: 100%;
        text-align: center;
        padding: 8px 10px;
        font-size: 0.72rem;
    }
}

/* ===== Small Mobile (480px) ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: clamp(0.95rem, 4.5vw, 1.4rem);
        line-height: 1.2;
        max-width: 100%;
        white-space: nowrap;
    }
    
    .hero .section-subtitle {
        font-size: 0.65rem;
        line-height: 1.4;
        max-width: 100%;
        white-space: nowrap;
    }
    
    .navbar-social-icons {
        gap: 6px;
    }
    
    .navbar-social-icons a {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }
    
    .mobile-socials-toggle {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    
    .mobile-socials-menu {
        min-width: 160px;
        padding: 5px;
        gap: 5px;
    }
    
    .mobile-socials-menu a {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
    
    .navbar-left-controls {
        margin-left: 6px;
    }
    
    .nav-toggle {
        margin-left: 8px;
        width: 34px;
        height: 34px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .blog-content h3 {
        font-size: 1.2rem;
    }
    
    .portfolio-content h3 {
        font-size: 1.2rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        max-width: 240px;
    }
}

/* ===== Extra Small Mobile (390px) ===== */
@media (max-width: 390px) {
    .hero-title {
        font-size: clamp(0.9rem, 5vw, 1.3rem);
        line-height: 1.25;
        max-width: 100%;
        white-space: nowrap;
    }
    
    .hero .section-subtitle {
        font-size: 0.6rem;
        line-height: 1.5;
        max-width: 100%;
        white-space: nowrap;
    }
    
    .navbar-social-icons {
        gap: 5px;
    }
    
    .navbar-social-icons a {
        width: 24px;
        height: 24px;
        font-size: 9px;
    }
    
    .mobile-socials-toggle {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .mobile-socials-menu {
        min-width: 150px;
        padding: 4px;
        gap: 4px;
    }
    
    .mobile-socials-menu a {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .navbar-left-controls {
        margin-left: 4px;
    }
    
    .nav-toggle {
        margin-left: 6px;
        width: 32px;
        height: 32px;
    }
}

/* ===== Ultra Small Mobile (320px) ===== */
@media (max-width: 320px) {
    .hero-title {
        font-size: clamp(0.85rem, 5.5vw, 1.2rem);
        line-height: 1.3;
        max-width: 100%;
        white-space: nowrap;
    }
    
    .hero .section-subtitle {
        font-size: 0.55rem;
        line-height: 1.5;
        max-width: 100%;
        white-space: nowrap;
    }
    
    .navbar-social-icons {
        gap: 4px;
    }
    
    .navbar-social-icons a {
        width: 22px;
        height: 22px;
        font-size: 8px;
    }
    
    .mobile-socials-toggle {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
    
    .mobile-socials-menu {
        min-width: 140px;
        padding: 4px;
        gap: 4px;
    }
    
    .mobile-socials-menu a {
        width: 26px;
        height: 26px;
        font-size: 9px;
    }
    
    .navbar-left-controls {
        margin-left: 3px;
    }
    
    .nav-toggle {
        margin-left: 5px;
        width: 30px;
        height: 30px;
    }
    
    .navbar .nav-ticker {
        min-width: 120px;
        font-size: 0.7rem;
    }
}

/* ===== Blog Rotator Styles ===== */
.blog-rotator-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
}

.blog-rotator {
    position: relative;
    min-height: 500px;
    width: 100%;
}

.blog-slide {
    width: 100%;
    height: 100%;
    min-height: 500px;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-slide-content {
    display: flex;
    align-items: center;
    min-height: 500px;
    padding: 60px;
}

.blog-details {
    flex: 1;
    padding-right: 60px;
    max-width: 600px;
}

.blog-image {
    flex: 1;
    max-width: 600px;
}

.blog-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 32px var(--shadow);
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.blog-date {
    font-weight: 500;
}

.blog-author {
    font-weight: 400;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.blog-excerpt {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.blog-read-more {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #20c4ac, #14b8a6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.blog-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(32, 196, 180, 0.3);
}

/* Rotator Controls */
.rotator-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    margin-left: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 20px var(--shadow);
}

.rotator-dots {
    display: flex;
    gap: 12px;
}

.rotator-dot {
    width: 12px;
    height: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.rotator-dot.active {
    background: white;
    transform: scale(1.2);
}

.rotator-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Progress Bar */
.rotator-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #20c4ac, #14b8a6);
    border-radius: 0 2px 2px 0;
    transition: width 1s linear;
    z-index: 5;
}

/* Loading and Error States */
.rotator-loading,
.no-blogs {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    font-size: 1.2rem;
    color: var(--text-tertiary);
    text-align: center;
    padding: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-slide-content {
        flex-direction: column;
        padding: 40px;
        text-align: center;
    }
    
    .blog-details {
        padding-right: 0;
        padding-bottom: 40px;
        max-width: 100%;
    }
    
    .blog-image {
        max-width: 100%;
        width: 100%;
    }
    
    .blog-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-rotator-container {
        margin: 0 20px;
    }
    
    .blog-slide-content {
        padding: 30px 20px;
    }
    
    .blog-details {
        padding-bottom: 30px;
    }
    
    .blog-title {
        font-size: 1.8rem;
    }
    
    .blog-excerpt {
        font-size: 1rem;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .rotator-controls {
        bottom: 20px;
    }
    
    .rotator-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-slide-content {
        padding: 20px 15px;
    }
    
    .blog-title {
        font-size: 1.5rem;
    }
    
    .blog-image img {
        height: 250px;
    }
    
    .rotator-controls {
        gap: 15px;
    }
    
    .rotator-dots {
        gap: 8px;
    }
    
    .rotator-dot {
        width: 10px;
        height: 10px;
    }
}

/* Dark Theme Support */
[data-theme="dark"] .rotator-btn {
    background: rgba(30, 41, 59, 0.9);
}

[data-theme="dark"] .rotator-btn:hover {
    background: var(--bg-secondary);
}

[data-theme="dark"] .rotator-dot {
    background: rgba(148, 163, 184, 0.4);
}

[data-theme="dark"] .rotator-dot.active {
    background: var(--text-primary);
}

[data-theme="dark"] .rotator-dot:hover {
    background: rgba(148, 163, 184, 0.7);
}

/* Accessibility */
.rotator-btn:focus,
.rotator-dot:focus {
    outline: 2px solid #20c4ac;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .blog-slide,
    .blog-read-more,
    .rotator-btn,
    .rotator-dot,
    .rotator-progress {
        transition: none;
    }
}

/* ===== Blog Detail Page Styles ===== */
.breadcrumb-section {
    background: var(--bg-secondary);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.breadcrumb-separator {
    margin: 0 12px;
    color: var(--text-tertiary);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.blog-detail-section {
    padding: 80px 0;
}

.blog-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.blog-loading,
.blog-error {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.blog-error {
    color: var(--text-tertiary);
}

.blog-error i {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 20px;
}

.blog-error h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.blog-detail-article {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
}

.blog-detail-header {
    padding: 40px;
}

.blog-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.blog-detail-date {
    font-weight: 500;
}

.blog-detail-author {
    font-weight: 400;
}

.blog-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.blog-detail-image {
    margin: -40px -40px 40px;
    overflow: hidden;
}

.blog-detail-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 0;
}

.blog-detail-body {
    padding: 0 40px 40px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-detail-body h2,
.blog-detail-body h3,
.blog-detail-body h4 {
    color: var(--text-primary);
    margin-top: 2em;
    margin-bottom: 1em;
}

.blog-detail-body h2 {
    font-size: 1.8rem;
}

.blog-detail-body h3 {
    font-size: 1.5rem;
}

.blog-detail-body h4 {
    font-size: 1.3rem;
}

.blog-detail-body p {
    margin-bottom: 1.5em;
}

.blog-detail-body ul,
.blog-detail-body ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.blog-detail-body li {
    margin-bottom: 0.5em;
}

.blog-detail-body blockquote {
    border-left: 4px solid #20c4ac;
    padding-left: 1.5em;
    margin: 2em 0;
    font-style: italic;
    color: var(--text-tertiary);
}

.blog-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2em 0;
}

.blog-detail-footer {
    padding: 30px 40px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.blog-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.blog-detail-actions {
    display: flex;
    gap: 15px;
}

/* Related Posts */
.related-posts-section {
    margin-top: 80px;
}

.related-posts-section h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--text-primary);
    text-align: center;
}

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

.related-post-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow);
}

.related-post-image {
    height: 200px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.related-post-content {
    padding: 20px;
}

.related-post-content h4 {
    margin-bottom: 10px;
}

.related-post-content h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-content h4 a:hover {
    color: #20c4ac;
}

.related-post-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.related-post-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive Design for Blog Detail */
@media (max-width: 768px) {
    .blog-detail-section {
        padding: 60px 20px;
    }
    
    .blog-detail-header {
        padding: 30px 20px;
    }
    
    .blog-detail-title {
        font-size: 2rem;
    }
    
    .blog-detail-image {
        margin: -30px -20px 30px;
    }
    
    .blog-detail-body {
        padding: 0 20px 30px;
        font-size: 1rem;
    }
    
    .blog-detail-footer {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .blog-detail-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .blog-detail-actions .btn-secondary,
    .blog-detail-actions .btn-primary {
        flex: 1;
        text-align: center;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .blog-detail-title {
        font-size: 1.8rem;
    }
    
    .blog-detail-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .blog-detail-image img {
        height: 250px;
    }
    
    .blog-detail-actions {
        flex-direction: column;
    }
    
    .blog-detail-actions .btn-secondary,
    .blog-detail-actions .btn-primary {
        width: 100%;
    }
}

/* ===== Login Options Modal ===== */
.login-options-content {
    max-width: 800px;
    padding: 40px;
}

.login-options-content h2 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.login-subtitle {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.login-option-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.login-option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
    border-color: var(--text-primary);
}

.login-option-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.login-option-card h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.login-option-card p {
    margin-bottom: 25px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.login-option-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-options-content {
        padding: 30px 20px;
    }
    
    .login-options-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .login-option-card {
        padding: 25px;
    }
}

/* ===== Authentication Pages ===== */
.auth-page {
    min-height: 100vh;
    padding: 100px 16px 40px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrap {
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
}

.auth-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 20px 50px var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.auth-card-watermark {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.06;
    background: url('/images/logo.png') center center / min(280px, 70%) no-repeat;
}

.auth-card h1 {
    position: relative;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auth-card .sub {
    position: relative;
    color: var(--text-tertiary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.auth-form-group {
    margin-bottom: 14px;
    text-align: left;
    position: relative;
}

.auth-form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.auth-pw-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-pw-input-wrap input {
    flex: 1;
    padding: 12px 44px 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.auth-pw-toggle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-tertiary);
}

.auth-form-group input:not(.auth-pw-input-wrap input) {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.3s ease;
}

.btn-auth:hover {
    background: #1e293b;
}

.auth-links {
    margin-top: 18px;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    text-align: center;
    position: relative;
}

.auth-links a {
    color: #0f766e;
    font-weight: 500;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.back-home {
    display: inline-block;
    margin-bottom: 20px;
    color: #0f766e;
    text-decoration: none;
    font-size: 0.95rem;
}

.back-home:hover {
    text-decoration: underline;
}

/* Mobile responsiveness for auth pages */
@media (max-width: 768px) {
    .auth-page {
        padding: 60px 12px 20px;
    }
    
    .auth-wrap {
        max-width: none;
    }
    
    .auth-card {
        padding: 24px 20px;
        border-radius: 12px;
    }
    
    .auth-card h1 {
        font-size: 1.25rem;
    }
    
    .auth-card .sub {
        font-size: 0.875rem;
        margin-bottom: 16px;
    }
}

/* Dark Theme Support */
[data-theme="dark"] .blog-tag {
    background: var(--bg-secondary);
    color: var(--text-tertiary);
}

[data-theme="dark"] .blog-detail-body blockquote {
    border-left-color: #14b8a6;
}