﻿:root {
    --bg-color: #ffffff;
    --text-main: #1a1a1a;
    --text-secondary: #666666;
    --accent-purple: #9b5de5;
    --accent-yellow: #FFD700;
    --accent-orange: #FF8C00;
    --btn-black: #000000;
    --font-family: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* -----------------------------------------------------------
   LOADING SCREEN
----------------------------------------------------------- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000 !important;
    /* Force Black */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.2s ease-out, visibility 0.2s;
    /* SAFETY NET: Force hide after 6s (CSS only) to prevent getting stuck */
    animation: forceHide 0.5s forwards 6s;
}

@keyframes forceHide {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    animation: none;
    /* Override safety net if JS handles it */
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loader-text {
    font-family: 'Mrs Saint Delafield', cursive;
    font-weight: 400;
    font-size: 3.5rem;
    /* Signature size */
    letter-spacing: 1px;
    color: #ffffff !important;
    /* Force White */
    opacity: 0;
    animation: fadeUpText 0.8s ease-out forwards;
}

.loader-bar {
    width: 150px;
    height: 3px;
    background: transparent !important;
    /* Invisible container */
    overflow: hidden;
    border-radius: 2px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    position: relative;
    display: block;
    margin-top: 10px;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: #FFD700;
    /* Yellow progress */
    animation: loaderProgress 1.5s ease-in-out forwards;
}

@keyframes fadeUpText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loaderProgress {
    0% {
        width: 0%;
    }

    50% {
        width: 40%;
    }

    100% {
        width: 100%;
    }
}

/* Floating Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 3px solid transparent;
    background-clip: content-box;
    transition: background-color 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    height: 100vh;
    width: 100%;
}

/* Fix mobile scrolling for main site */
@media (max-width: 1024px) {
    body {
        height: auto;
        overflow-y: auto;
    }
}

.app-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 0 10px 40px;
    /* Removed right padding to move scrollbar to edge */
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Override for Resume Page to allow scrolling */
body.resume-mode {
    height: auto !important;
    overflow-y: auto !important;
}

body.resume-mode .app-container {
    height: auto !important;
    overflow: visible !important;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 0;
    width: calc(100% - 60px);
    /* Adjust for app-container padding to prevent overlap */
    flex-wrap: nowrap;
    gap: 20px;
    flex-shrink: 0;
    position: absolute;
    top: 0;
    left: 0;
    padding: 15px 40px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

/* Scroll Snap Container */
/* Scroll Snap Container */
.snap-container {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    width: 100%;
}

@media (max-width: 1024px) {
    .snap-container {
        height: auto;
        overflow-y: visible;
        scroll-snap-type: none;
    }

    .app-container {
        height: auto;
        overflow: visible;
        padding: 0;
    }

    .navbar {
        padding: 15px 20px;
    }
}

/* Page Sections */
.page-section {
    min-height: 100vh;
    height: auto;
    width: 100%;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    padding-bottom: 40px;
    padding-right: 40px;
    /* Compensation for scrollbar adjustment */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
    min-width: 150px;
    animation: slideInLeft 0.6s ease-out;
}

.logo-icon {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #000 50%, transparent 50%);
    border-radius: 50%;
    transition: background 0.3s ease;
}

body.dark-mode .logo-icon {
    background: linear-gradient(135deg, #fff 50%, transparent 50%);
}

.nav-links {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex: 1;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-main);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--text-main);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
    flex-shrink: 0;
    min-width: 150px;
}

.login-btn {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.9rem;
}

.register-btn {
    text-decoration: none;
    background-color: var(--btn-black);
    color: #fff;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 500;
    transition: transform 0.2s;
    white-space: nowrap;
    font-size: 0.9rem;
}

.register-btn:hover {
    transform: scale(1.05);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 101;
}

.mobile-menu-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 0;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 0.8rem;
    white-space: nowrap;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
    transition: transform 0.3s ease;
}

.trust-badge:hover {
    transform: translateY(-2px);
}

.trust-badge .stars {
    background: #d4a5ff;
    padding: 2px 8px;
    border-radius: 4px;
    color: #000;
    font-weight: 700;
    font-size: 0.75rem;
}

h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    line-height: 1.1;
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: #000;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 450px;
    margin-bottom: 30px;
    line-height: 1.5;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    background-color: var(--btn-black);
    color: #fff;
    padding: 14px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    animation: fadeInUp 0.8s ease-out 0.5s backwards;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateX(5px) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Logos */
.client-logos {
    margin-top: 40px;
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
    opacity: 0.7;
    filter: grayscale(100%);
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.logo-item {
    font-weight: 700;
    font-size: 1.1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.logo-item:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: translateY(-3px);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.circle-bg {
    position: absolute;
    width: 450px;
    height: 450px;
    background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
    border-radius: 50%;
    z-index: -1;
    filter: blur(50px);
    opacity: 0.8;
}

.profile-image-container {
    width: 320px;
    height: 400px;
    position: relative;
    z-index: 1;
    background: #333;
    border-radius: 160px 160px 0 0;
    overflow: hidden;
}

.hero-person {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Floating Cards */
.floating-card {
    position: absolute;
    background: #ffffff;
    border-radius: 14px;
    padding: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    /* Dragging Properties */
    cursor: grab;
    user-select: none;
    touch-action: none;
    will-change: transform;
    /* Spring Back Transition */
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.floating-card.is-dragging {
    cursor: grabbing;
    animation: none !important;
    transition: none !important;
    z-index: 1000;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    transform-origin: center;
}

.floating-card.is-returning {
    animation: none !important;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.card-search {
    top: 15%;
    left: 20px;
    width: 180px;
}

.search-bar {
    background: #f9f9f9;
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
}

.icon-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ccc;
}

.icon-circle.green {
    background: #4caf50;
}

.card-events {
    top: 30%;
    right: 0px;
    width: 180px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.icon-purple {
    width: 24px;
    height: 24px;
    background: #e0c3fc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.card-tabs {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.card-tabs .active {
    color: var(--text-main);
    font-weight: 600;
    border-bottom: 2px solid var(--text-main);
}




.card-achievement {
    bottom: 30%;
    right: -20px;
    top: auto;
    left: auto;
    width: 190px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.achievement-badge {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.badge-icon {
    font-size: 1.2rem;
}

.achievement-content h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}

.achievement-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.achievement-bar {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.achievement-progress {
    width: 85%;
    height: 100%;
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
    border-radius: 10px;
    animation: progressSlide 2s ease-out;
}

@keyframes progressSlide {
    from {
        width: 0%;
    }

    to {
        width: 85%;
    }
}

.card-project {
    bottom: 18%;
    left: -5px;
    width: 180px;
}

.card-header-sm {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.avatar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
}

body.dark-mode .avatar-group,
body.dark-mode .user-row {
    color: #fff !important;
}

.avatar,
.avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ddd;
}

.card-meeting {
    top: 22%;
    right: 0px;
    bottom: auto;
    width: 200px;
    padding: 18px;
}

.card-meeting .label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-meeting h3 {
    font-size: 1rem;
    margin: 10px 0;
    font-family: var(--font-serif);
}

.card-meeting .time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.card-meeting .divider {
    height: 1px;
    background: #eee;
    margin-bottom: 12px;
}

.card-meeting .link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.card-meeting .link:hover {
    color: var(--accent-purple);
}

/* Journey / About Section Styles */
.journey-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeIn 0.6s ease-out;
}

/* Header */
.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.header-left .tag {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
    animation: slideInLeft 0.6s ease-out 0.2s backwards;
}

.header-left h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--text-main);
    font-weight: 400;
    animation: slideInLeft 0.6s ease-out 0.3s backwards;
}

.header-right {
    max-width: 400px;
    text-align: right;
}

.header-right p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
    animation: slideInRight 0.6s ease-out 0.3s backwards;
}

.link-arrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid var(--text-main);
    padding-bottom: 2px;
    transition: color 0.3s;
}

.link-arrow:hover {
    color: var(--accent-purple);
}

/* List */
.journey-list {
    display: flex;
    flex-direction: column;
}

.journey-item {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
    align-items: start;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.journey-item:last-child {
    border-bottom: none;
}

.journey-item:hover {
    background-color: #fafafa;
    padding-left: 10px;
    padding-right: 10px;
}

/* Item columns */
.item-left h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.item-left .date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.item-middle h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.item-middle p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.item-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pill {
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-main);
}

.pill.dark {
    background: #333;
    color: #fff;
}

/* Expandable Details */
.journey-details {
    grid-column: 1 / -1;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
}

.journey-item.active .journey-details {
    max-height: 500px;
    opacity: 1;
    margin-top: 20px;
}

.details-gallery {
    display: none;
    /* Hidden by default now */
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.journey-desc-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    width: 100%;
}

.journey-desc-list li {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    color: #444;
}

.journey-desc-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #000;
    font-weight: bold;
}

body.dark-mode .journey-desc-list li {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .journey-desc-list li::before {
    color: #fff;
}

.gallery-img {
    width: 100%;
    height: 150px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
}

.details-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.details-info p {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.btn-arrow-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.btn-arrow-circle:hover {
    transform: scale(1.1);
}

/* Section Content (for placeholder sections) */
.section-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-content h2 {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin-bottom: 15px;
}

.section-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transform: translateY(-100%);
        transition: transform 0.4s ease;
        z-index: 90;
    }

    .nav-links.active {
        display: flex;
        /* Ensure it is flex */
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 0 20px;
        gap: 30px;
        text-align: center;
    }

    .hero-content {
        align-items: center;
        padding: 0;
    }

    .hero-subtitle {
        margin: 0 auto 30px;
    }

    .client-logos {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
        height: auto;
        margin-bottom: 20px;
        flex-direction: column;
    }

    .profile-image-container {
        width: 280px;
        height: 340px;
    }

    /* Floating cards on mobile */
    .floating-card {
        display: block;
        position: relative;
        transform: none !important;
        animation: none !important;
        margin: 20px auto;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        max-width: 320px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

    /* Hide specific less critical cards to save space if needed */
    .card-search,
    .card-events {
        display: none;
    }

    .journey-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .item-right {
        justify-content: flex-start;
    }

    .header-left h2 {
        font-size: 2.2rem;
    }

    .journey-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right {
        text-align: left;
        max-width: 100%;
        margin-top: 15px;
    }

    .page-section {
        height: auto;
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 60px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-actions {
        display: none;
        /* Hide actions on very small screens, or move to menu */
    }

    .header-left h2 {
        font-size: 1.8rem;
    }

    .details-gallery {
        grid-template-columns: 1fr;
    }

    .appointment-form {
        padding: 0;
    }
}

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: white;
    color: #333;
    /* Force dark text since background is white */
    border-radius: 20px;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Ensure headings and inputs are also visible */
.modal-container h2,
.modal-container label,
.modal-container p,
.modal-container li {
    color: #333 !important;
}

.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
}

/* Dark Mode */
/* Dark Mode - Modal stays white, so scrollbar must be dark */
body.dark-mode .modal-container {
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

body.dark-mode .modal-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
}

body.dark-mode .modal-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
    transform: rotate(90deg);
}

.appointment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000;
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 10px;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        padding: 30px 20px;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }
}

/* Time Slots Styling */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.time-slot {
    padding: 10px 4px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-slot:hover {
    border-color: #333;
    color: #000;
    background: #f9f9f9;
}

.time-slot.selected {
    background: #222;
    color: #fff;
    border-color: #222;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Horizontal Row Layout */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Refined Input Styling */
.form-group input,
.form-group textarea,
.date-input {
    padding: 14px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.form-group input:focus,
.form-group textarea:focus,
.date-input:focus {
    border-color: #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Responsive: Stack on mobile */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .time-slots-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* Projects Section - Editorial Style */
.projects-section {
    background-color: #fff;
    padding-bottom: 0px;
    /* Removed extra padding */
    display: block;
    /* Override flex from page-section to fix sticky context */
}

.projects-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    /* Context for sticky */
}

/* Specific Sticky Header for Projects */
.projects-section .journey-header {
    position: -webkit-sticky;
    position: sticky;
    top: 85px;
    /* Sits below navbar */
    z-index: 900 !important;
    /* Below navbar (1000), above cards (10) */
    background-color: #ffffff !important;
    /* Force solid background */
    width: 100%;
    padding-top: 20px;
    padding-bottom: 20px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 0;
    will-change: top;
}

/* Stacking Cards */
.projects-stack {
    display: flex;
    flex-direction: column;
    gap: 40px;
    /* Space between cards */
    padding-bottom: 20px;
    /* Minimal padding */
    /* Allow scrolling past last card */
    position: relative;
    z-index: 10;
}

.project-card {
    position: sticky;
    top: 260px;
    /* Clears the header (85px + height) */
    width: 100%;
    background: #fff;
    /* Pure White */
    border: 1px solid #e5e5e5;
    border-radius: 24px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
    /* Soft diffused shadow */
    overflow: hidden;
    transition: transform 0.4s ease, opacity 0.4s ease;
    transform-origin: center top;
    margin-bottom: 20px;
}

/* Card Inner Layout */
.card-inner {
    display: flex;
    align-items: stretch;
    height: 400px;
    /* Reduced height */
}

.project-content {
    flex: 1;
    padding: 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #f0f0f0;
}

.project-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: #111;
    margin-bottom: 8px;
    line-height: 1.1;
}

.project-desc {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.project-tags {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: #444;
    font-weight: 500;
}

/* Staggered Text Reveal */
.text-mask {
    display: block;
    overflow: hidden;
}

.text-reveal {
    display: block;
    transform: translateY(100%);
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card.in-view .text-reveal {
    transform: translateY(0);
}

/* Stagger delays */
.project-card.in-view .project-title .text-reveal {
    transition-delay: 0.1s;
}

.project-card.in-view .project-desc .text-reveal {
    transition-delay: 0.2s;
}

.project-card.in-view .project-tags .text-reveal {
    transition-delay: 0.3s;
}

.project-card.in-view .project-link .text-reveal {
    transition-delay: 0.4s;
}



/* Visual / X-Ray Area */
/* Visual Image Area */
.project-visual {
    flex: 1.5;
    position: relative;
    background: #f9f9f9;
    overflow: hidden;
}

.project-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.project-visual:hover img {
    transform: scale(1.05);
}

/* Mobile Responsiveness for Projects */
@media (max-width: 1024px) {
    .card-inner {
        flex-direction: column;
        height: auto;
    }

    .project-card {
        position: relative;
        /* Disable sticky on mobile if space is tight */
        top: 0;
        margin-bottom: 40px;
    }

    .project-visual {
        height: 300px;
    }

    .project-content {
        padding: 40px 20px;
    }
}

.project-number {
    font-size: 4rem;
    font-weight: 700;
    color: #f0f0f0;
    line-height: 1;
    margin-bottom: -10px;
    /* Overlap slightly with title */
    font-family: var(--font-family);
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 0;
}

.project-content {
    position: relative;
    /* Context for number positioning */
    z-index: 1;
}

.project-link {
    display: inline-block;
    margin-top: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    border-bottom: 1px solid #111;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--accent-purple);
    border-color: var(--accent-purple);
}

/* ----------------------------------------------------------- */
/* SERVICES: 2x2 MATRIX */
/* ----------------------------------------------------------- */
.matrix-section {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    background: #fff;
    position: relative;
    overflow: hidden;
}

/* CROSSHAIR */
.central-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    z-index: 10;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ch-line {
    background: #cccccc;
    position: absolute;
}

.ch-h {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.ch-v {
    width: 1px;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Rotate crosshair on any cell hover */
.matrix-section:hover .central-crosshair {
    transform: translate(-50%, -50%) rotate(45deg);
}

/* QUADRANT CELL */
.matrix-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    /* Changed to transparent to show grid lines behind if needed, though lines are on top usually */
    background: #fff;
    transition: background-color 0.4s ease;
    cursor: pointer;
    overflow: hidden;
    padding: 60px;
    border: none;
    /* Removed individual borders */
}

/* BORDERS REPLACED BY ABSOLUTE GRID LINES */
.matrix-section::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: #cccccc;
    transform: translateX(-50%);
    z-index: 1;
}

.matrix-section::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #cccccc;
    transform: translateY(-50%);
    z-index: 1;
}

/* Keep these selectors for potential future utility, but remove borders */
.q1,
.q2,
.q3 {
    border: none;
}



/* INTERACTION: Active Matrix Cell */
.matrix-cell:hover {
    background-color: #FAFAFA;
    border-color: #FFD700;
    z-index: 2;
    outline: 1px solid #FFD700;
}

/* CONTENT LAYOUT */
.cell-content {
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 400px;
}

.cell-index {
    position: absolute;
    top: -60px;
    left: 0;
    font-size: 1rem;
    font-family: monospace;
    color: #999;
    transition: all 0.8s ease;
}

.matrix-cell:hover .cell-index {
    color: #000;
    transform: scale(1.2);
    font-weight: bold;
}

.cell-content h3 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    /* Not bold */
    line-height: 1.1;
    color: #111;
    margin-bottom: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease, filter 0.8s ease;
}

/* Fade title on hover */
.matrix-cell:hover h3 {
    transform: translateY(-40px);
    opacity: 0.05;
    filter: blur(4px);
}

/* HIDDEN BODY content */
.cell-body {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease 0.1s;
    margin-top: -20px;
}

.matrix-cell:hover .cell-body {
    opacity: 1;
    transform: translateY(0);
}

.cell-body p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.click-more {
    display: inline-block;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 10px;
}

.click-more:hover {
    background: #111;
    color: #fff;
    border-color: #111;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.matrix-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.matrix-tags span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 4px;
    color: #333;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .matrix-section {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 25vh);
        height: 100vh;
    }

    .central-crosshair {
        display: none;
    }

    .matrix-cell {
        padding: 20px;
        border: none !important;
        border-bottom: 1px solid #E5E5E5 !important;
    }

    .q4 {
        border-bottom: none !important;
    }

    .cell-content h3 {
        font-size: 2rem;
    }

    .cell-index {
        top: -20px;
        left: 20px;
    }

    .matrix-cell:hover h3 {
        transform: translateY(-10px);
    }
}

/* ----------------------------------------------------------- */
/* SCROLL TO TOP BUTTON */
/* ----------------------------------------------------------- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 60px;
    /* Moved left to avoid scrollbar */
    width: 50px;
    height: 50px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 990;
    /* Lower than navbar usually */
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--accent-yellow);
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.scroll-top-btn svg {
    width: 20px;
    height: 20px;
}

/* ----------------------------------------------------------- */
/* CONTACT SECTION: DARK MODE FINALE */
/* ----------------------------------------------------------- */
.contact-section {
    width: 100%;
    height: 100vh;
    background-color: #0e0e0e;
    color: #fff;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-container {
    width: 100%;
    max-width: 1400px;
    height: 100%;
    display: flex;
    position: relative;
    z-index: 2;
    padding: 0 40px;
}

/* LEFT COLUMN */
.contact-left {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 80px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #00ff00;
    /* Default green, updated via JS */
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff00;
    animation: blink 2s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* Terminal Email Window */
.terminal-email-window {
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    font-family: 'Space Mono', 'Consolas', 'Monaco', monospace;
    width: 100%;
    max-width: 500px;
    border: 1px solid #333;
    animation: terminalFadeIn 0.5s ease-out;
}

@keyframes terminalFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terminal-header {
    background: #252526;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.terminal-dots {
    display: flex;
    align-items: center;
}

.terminal-dots span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.terminal-dots span:nth-child(1) {
    background: #ff5f56;
}

/* Red */
.terminal-dots span:nth-child(2) {
    background: #ffbd2e;
}

/* Yellow */
.terminal-dots span:nth-child(3) {
    background: #27c93f;
}

/* Green */

.terminal-title {
    flex: 1;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-right: 54px;
    /* visually center title */
}

.terminal-body {
    padding: 24px;
    color: #d4d4d4;
    font-size: 1rem;
    line-height: 1.8;
}

.code-line {
    display: flex;
    align-items: center;
}

.cmd-prompt {
    color: #666;
    margin-right: 12px;
    user-select: none;
}

.cmd-cyan {
    color: #569cd6;
}

.cmd-yellow {
    color: #dcdcaa;
}

.cmd-string {
    color: #ce9178;
    font-weight: 500;
}

.cmd-comment {
    color: #6a9955;
    font-style: italic;
}

.terminal-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #2a2a2a;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-top: 20px;
    border: 1px solid #444;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.terminal-link:hover {
    background: #333;
    border-color: var(--accent-yellow);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.terminal-link .link-arrow {
    font-family: sans-serif;
    color: var(--accent-yellow);
}

/* Contact Footer */
.contact-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.social-links {
    display: flex;
    gap: 30px;
}

.mag-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    padding: 10px 0;
    transition: color 0.3s;
}

.mag-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-yellow);
    transition: width 0.3s;
}

.mag-link:hover {
    color: var(--accent-yellow);
}

.mag-link:hover::after {
    width: 100%;
}

/* Time Widget */
.time-widget {
    display: flex;
    gap: 40px;
    text-align: right;
}

.time-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.time-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

.time-flex {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.status-icon-sm {
    font-size: 1rem;
}

.time-value {
    font-size: 1.2rem;
    font-family: monospace;
    color: #fff;
}

/* RIGHT COLUMN */
.contact-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px;
}

.minimal-form {
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.form-group-min {
    position: relative;
}

.form-group-min input,
.form-group-min textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    padding: 15px 0;
    font-size: 1.2rem;
    color: #fff;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.4s;
    border-radius: 0;
}

.form-group-min textarea {
    resize: none;
    min-height: 40px;
}

.form-group-min label {
    position: absolute;
    top: 15px;
    left: 0;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: all 0.4s ease;
    font-size: 1.2rem;
}

.form-group-min input:focus~label,
.form-group-min input:not(:placeholder-shown)~label,
.form-group-min textarea:focus~label,
.form-group-min textarea:not(:placeholder-shown)~label {
    top: -20px;
    font-size: 0.85rem;
    color: var(--accent-yellow);
}

.form-group-min input:focus,
.form-group-min textarea:focus {
    border-bottom-color: #fff;
}

/* Magnetic Send Button */
.btn-container-mag {
    display: flex;
    justify-content: flex-end;
    /* Align right or center? Flex end looks cool */
    margin-top: 20px;
    height: 150px;
    /* Area for magnetic pull */
    align-items: center;
}

.magnetic-send-btn {
    width: auto;
    min-width: 160px;
    height: 50px;
    padding: 0 24px;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: normal;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.05s ease-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.magnetic-send-btn::before {
    display: none;
}

.magnetic-send-btn:hover {
    transform: scale(1.05);
    background-color: #fff;
    color: #000;
    animation: none;
}

.btn-txt {
    font-size: 1rem;
    /* Adjusted for pill button */
    letter-spacing: 2px;
    font-weight: 600;
    z-index: 2;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .contact-container {
        flex-direction: column;
        padding: 40px 20px;
        overflow-y: auto;
        /* Allow internal scroll if needed */
    }

    .contact-left {
        flex: none;
        padding: 40px 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        gap: 40px;
    }

    .contact-right {
        padding: 40px 0;
    }

    .huge-email {
        margin-top: 0;
    }

    .outline-text {
        font-size: 3rem;
    }

    .contact-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .time-widget {
        width: 100%;
        justify-content: space-between;
        text-align: left;
    }

    .time-flex {
        justify-content: flex-start;
    }

    .btn-container-mag {
        justify-content: center;
    }
}

/* ----------------------------------------------------------- */
/* GLOBAL DARK MODE TOGGLE (Triggered by Contact Section) */
/* ----------------------------------------------------------- */
body {
    transition: background-color 0.8s ease, color 0.8s ease;
}

body.dark-mode {
    background-color: #0e0e0e;
    /* Softer Dark Grey */
    color: #fff;
}

/* Fix the white frame issue around the contact section */


/* If navbar is present, adapt it */
body.dark-mode .navbar {
    background: rgba(14, 14, 14, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .logo-text,
body.dark-mode .nav-links a,
body.dark-mode .login-btn {
    color: #fff;
}

body.dark-mode .nav-links a::after {
    background: #fff;
}

body.dark-mode .mobile-menu-btn span {
    background-color: #fff;
}

/* ----------------------------------------------------------- */
/* DARK MODE OVERRIDES (Sections) */
/* ----------------------------------------------------------- */

/* Matrix/Services Section */
body.dark-mode .matrix-section,
body.dark-mode .matrix-cell {
    background-color: #0e0e0e;
    color: #fff;
}

body.dark-mode .matrix-cell {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .q1,
body.dark-mode .q2,
body.dark-mode .q3 {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .cell-content h3 {
    color: #fff;
}

body.dark-mode .ch-line {
    background: rgba(255, 255, 255, 0.3);
}

body.dark-mode .matrix-cell:hover {
    background-color: #1a1a1a;
    border-color: var(--accent-yellow);
    outline-color: var(--accent-yellow);
}

body.dark-mode .click-more {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

body.dark-mode .click-more:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Hero Section Elements */
body.dark-mode .hero h1 {
    color: #fff;
}

body.dark-mode .hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .trust-badge {
    background: #1a1a1a;
    color: #fff;
}

body.dark-mode .floating-card {
    background: #1a1a1a;
    color: #fff;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode .search-bar {
    background: #2a2a2a;
    color: #fff;
}

body.dark-mode .card-header,
body.dark-mode .card-header-sm,
body.dark-mode .achievement-content h4 {
    color: #fff;
}

body.dark-mode .card-tabs .active {
    border-bottom-color: #fff;
    color: #fff;
}

/* Projects Section */
body.dark-mode .project-section,
body.dark-mode .projects-section,
body.dark-mode .projects-editorial {
    background-color: #0e0e0e;
    color: #fff;
}

body.dark-mode .journey-header h2,
body.dark-mode .journey-header p,
body.dark-mode .tag,
body.dark-mode .link-arrow {
    color: #fff;
}

body.dark-mode .link-arrow:hover {
    color: var(--accent-yellow);
}

/* Projects Sticky Header Override */
body.dark-mode .projects-section .journey-header {
    background-color: #0e0e0e !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .project-card {
    border-color: rgba(255, 255, 255, 0.1);
    background-color: #1a1a1a;
}

body.dark-mode .project-content {
    border-right-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .project-title {
    color: #fff;
}

body.dark-mode .project-desc,
body.dark-mode .project-tags {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .project-link {
    color: #fff;
}

body.dark-mode .project-card {
    background-color: #1a1a1a;
}

body.dark-mode h2,
body.dark-mode h3,
body.dark-mode p {
    color: #fff;
}

body.dark-mode .project-title {
    color: #fff;
}

/* About Section */
body.dark-mode .about-section {
    background-color: #0e0e0e;
}

/* Dark Mode Scrollbar */
body.dark-mode ::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

/* About/Journey Section Override */
body.dark-mode .about-section,
body.dark-mode .journey-header {
    background-color: #0e0e0e;
}

body.dark-mode .journey-item {
    background-color: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .journey-item:hover {
    background-color: #222;
}

body.dark-mode .journey-item.active {
    background-color: transparent !important;
    /* Removed grey background */
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .item-left h3,
body.dark-mode .item-middle h4 {
    color: #fff;
}

body.dark-mode .date,
body.dark-mode .item-middle p {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .pill {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.dark-mode .details-info p {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .btn-arrow-circle {
    background: #fff;
    color: #000;
}

body.dark-mode .gallery-img {
    filter: brightness(0.7);
}

/* Button & Link Overrides for Dark Mode */
body.dark-mode .btn-primary {
    background-color: #fff;
    color: #000;
}

body.dark-mode .register-btn {
    background-color: #fff;
    color: #000;
}

body.dark-mode .card-meeting .link {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .card-meeting .label,
body.dark-mode .card-meeting .time {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .card-meeting h3 {
    color: #fff;
}

body.dark-mode .link-arrow {
    background: transparent;
    color: #fff;
}

/* ----------------------------------------------------------- */
/* PRELOADER */
/* ----------------------------------------------------------- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Signature Loader */
.loader-signature {
    position: relative;
    width: 250px;
    max-width: 80vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-signature img {
    width: 100%;
    height: auto;
    filter: invert(1);
    mix-blend-mode: screen;

    /* Soft Edge Ink Reveal */
    -webkit-mask-image: linear-gradient(to right, black 50%, transparent 60%);
    mask-image: linear-gradient(to right, black 50%, transparent 60%);
    -webkit-mask-size: 300% 100%;
    mask-size: 300% 100%;
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;

    animation: signInk 2.5s ease-out forwards;
}

@keyframes signInk {
    to {
        -webkit-mask-position: 0% 0;
        mask-position: 0% 0;
    }
}

@keyframes textAppear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lineGrow {
    to {
        width: 100%;
    }
}

/* ----------------------------------------------------------- */
/* TOAST NOTIFICATION */
/* ----------------------------------------------------------- */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #000;
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 100000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 24px;
    height: 24px;
    background: var(--accent-yellow);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    font-size: 14px;
}

body.dark-mode .toast-notification {
    background: rgba(20, 20, 20, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ----------------------------------------------------------- */
/* EMAIL PUZZLE STYLES */
/* ----------------------------------------------------------- */
.email-transition-container {
    margin-top: -40px;
    min-height: 200px;
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

/* LOCKED STATE */
.email-locked-state {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.email-locked-state:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-yellow);
}

.lock-text {
    font-family: monospace;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
}

.email-locked-state:hover .lock-text {
    color: var(--accent-yellow);
}

/* CSS Lock Icon */
.lock-icon {
    position: relative;
    width: 24px;
    height: 24px;
}

.lock-body {
    position: absolute;
    bottom: 0;
    left: 2px;
    width: 20px;
    height: 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 3px;
    transition: background 0.3s;
}

.lock-shackle {
    position: absolute;
    top: 0;
    left: 6px;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    transition: border-color 0.3s, transform 0.3s;
}

.email-locked-state:hover .lock-body {
    background: var(--accent-yellow);
}

.email-locked-state:hover .lock-shackle {
    border-color: var(--accent-yellow);
    transform: translateY(-2px);
}

/* PUZZLE STATE */
.email-puzzle-state {
    display: none;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 3px solid var(--accent-purple);
    animation: fadeIn 0.4s ease;
    width: 100%;
    max-width: 350px;
}

.puzzle-title {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--accent-purple);
    letter-spacing: 1px;
}

.puzzle-equation {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: #fff;
}

.puzzle-equation input {
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--accent-yellow);
    width: 60px;
    text-align: center;
    font-family: inherit;
    font-size: inherit;
    padding: 0 5px;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
    /* Firefox */
}

/* Hide spin buttons for Chrome, Safari, Edge, Opera */
.puzzle-equation input::-webkit-outer-spin-button,
.puzzle-equation input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.puzzle-equation input:focus {
    border-color: var(--accent-yellow);
}

.puzzle-submit {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 16px;
    font-family: monospace;
    cursor: pointer;
    transition: all 0.3s;
    width: fit-content;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.puzzle-submit:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: #000;
}

.puzzle-error {
    color: #ff4444;
    font-size: 0.8rem;
    font-family: monospace;
    height: 15px;
}

/* UNLOCKED STATE */
.email-unlocked-state {
    display: none;
    animation: slideInLeft 0.5s ease;
    width: 100%;
}

.email-unlocked-state .huge-email {
    margin-top: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -----------------------------------------------------------
   CASE STUDY SLIDE-OVER PANEL
----------------------------------------------------------- */
.case-study-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-study-panel.active {
    visibility: visible;
    opacity: 1;
}

.case-study-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.case-study-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 600px;
    max-width: 90%;
    height: 100%;
    background: #ffffff;
    padding: 60px 40px;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
}

.dark-mode .case-study-content {
    background: #111;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.case-study-panel.active .case-study-content {
    transform: translateX(0);
}

/* Close Button */
.close-case-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.close-case-btn:hover {
    opacity: 1;
}

/* Content Styling */
.case-category {
    font-family: var(--font-family);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-purple);
    font-weight: 600;
}

.case-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin: 10px 0 20px;
    line-height: 1.1;
    color: var(--text-main);
}

.live-link-icon {
    font-size: 1.8rem;
    color: var(--accent-purple);
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.3s ease;
    display: inline-block;
    transform: translateY(2px);
}

.live-link-icon:hover {
    opacity: 1;
    transform: translateY(0px) translateX(2px);
    color: var(--accent-yellow);
}

.case-meta {
    margin-bottom: 30px;
}

.stack-pill {
    display: inline-block;
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #555;
    font-weight: 500;
}

.dark-mode .stack-pill {
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
}

.case-image-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .case-image-wrapper {
    border-color: rgba(255, 255, 255, 0.1);
}

.case-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.case-section {
    margin-bottom: 40px;
}

.case-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
}

.case-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Fix Project Title Layout for Inline Arrow */
.project-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
    display: flex;
    align-items: center;
    /* Align arrow vertically with text */
    gap: 15px;
    flex-wrap: nowrap;
}

.project-title .text-mask {
    display: block;
    /* Essential for reveal animation mask */
    width: auto;
    /* Allow it to shrink to content width */
    flex-shrink: 0;
}

/* =========================================
   Project Visuals - Rich UI Elements
   ========================================= */

/* Common Container Styles */
.project-visual {
    position: relative;
    overflow: hidden !important;
    /* Clip content to stay in box */
    /* background: #f9f9f9 !important; */
    /* Let inline styles or specific visuals handle BG if needed, or default to generic */
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* 1. Terminal / Code Window (Refined) */
.visual-terminal {
    width: 90%;
    height: auto;
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-family: 'Fira Code', monospace;
    overflow: hidden;
    border: 1px solid #333;
    animation: float 6s ease-in-out infinite;
}

.terminal-header {
    background: #252526;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.terminal-body {
    padding: 20px;
    color: #d4d4d4;
    font-size: 0.8rem;
    line-height: 1.6;
}

.typing-cursor::after {
    content: '▋';
    animation: blink 1s infinite;
    color: #27c93f;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* 2. Dashboard / Analytics Visual */
.visual-dashboard {
    width: 85%;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 2;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.dash-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.dash-badge {
    background: #ecfccb;
    color: #4d7c0f;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.dash-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 80px;
    padding-top: 10px;
}

.bar {
    flex: 1;
    background: #f1f5f9;
    border-radius: 4px;
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.bar-fill {
    display: block;
    width: 100%;
    background: linear-gradient(to top, #3b82f6, #60a5fa);
    border-radius: 4px;
    /* Animation removed here to be triggered by classes if needed, or kept simple */
}

/* 3. App Card (Glassmorphism / Mobile UI) */
.visual-app-card {
    width: 200px;
    /* Reduced width */
    background: rgba(255, 255, 255, 0.9);
    /* More opaque */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    transform: rotate(-2deg);
    /* Reduced rotation */
    transition: transform 0.4s ease;
}

.visual-app-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.app-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    margin-bottom: 5px;
    box-shadow: 0 8px 15px rgba(16, 185, 129, 0.3);
}

.app-text {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.app-sub {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
}

.app-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background: #111;
    color: white;
    font-size: 0.8rem;
    border-radius: 20px;
    width: 100%;
    border: none;
    cursor: pointer;
}

/* 4. POS / Receipt Visual */
.visual-receipt {
    width: 240px;
    background: #fff;
    padding: 25px;
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    font-family: 'Courier Prime', 'Courier New', monospace;
    position: relative;
    transform: rotate(2deg);
}

.visual-receipt::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 10px;
    background: radial-gradient(circle, transparent, transparent 50%, #fff 50%, #fff 100%) -7px -8px / 16px 16px repeat-x;
}

.receipt-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: #444;
}

.receipt-total {
    border-top: 1px dashed #ccc;
    margin-top: 15px;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1rem;
    color: #000;
}

/* 5. LMS / Student Card */
.visual-student-card {
    width: 260px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px;
    gap: 15px;
    border: 1px solid #f3f4f6;
}

.student-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.student-info {
    flex: 1;
}

.student-info h4 {
    font-size: 0.95rem;
    margin: 0;
    color: #111827;
    font-weight: 600;
}

.student-info p {
    font-size: 0.75rem;
    margin: 4px 0 0;
    color: #6b7280;
}

.grade-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

/* =========================================
   Mobile Warning Overlay
   ========================================= */
#mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0d0d0d;
    z-index: 10000;
    color: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

#mobile-warning .icon {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

#mobile-warning h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 400;
}

#mobile-warning p {
    font-size: 1rem;
    color: #aaa;
    max-width: 300px;
    line-height: 1.5;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

/* Show only on screens smaller than 1024px */
@media screen and (max-width: 1024px) {
    #mobile-warning {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(15px);
        z-index: 99999;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    /* Coding Terminal Style Card */
    .terminal-alert {
        background: #1e1e1e;
        border: 1px solid #333;
        border-radius: 12px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
        max-width: 400px;
        width: 100%;
        overflow: hidden;
        font-family: 'Space Mono', 'Consolas', monospace;
        text-align: left;
        animation: alertPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    @keyframes alertPop {
        from {
            transform: scale(0.9);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    .terminal-alert-header {
        background: #2d2d2d;
        padding: 10px 15px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid #333;
    }

    .terminal-dots {
        display: flex;
        gap: 6px;
    }

    .terminal-dots span {
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }

    .terminal-dots span:nth-child(1) {
        background: #ff5f56;
    }

    .terminal-dots span:nth-child(2) {
        background: #ffbd2e;
    }

    .terminal-dots span:nth-child(3) {
        background: #27c93f;
    }

    .terminal-alert-title {
        flex: 1;
        text-align: center;
        font-size: 0.75rem;
        color: #888;
        margin-right: 42px;
        /* balance dots */
    }

    .terminal-alert-body {
        padding: 25px;
        color: #ddd;
    }

    .alert-code {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 25px;
    }

    .alert-keyword {
        color: #ff5f56;
    }

    /* Red for Error */
    .alert-cmd {
        color: #27c93f;
    }

    /* Green for > */

    #forceDesktopBtn {
        width: 100%;
        padding: 12px;
        background: #333;
        border: 1px solid #555;
        color: #fff;
        font-family: inherit;
        font-size: 0.85rem;
        cursor: pointer;
        border-radius: 6px;
        transition: all 0.2s;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    #forceDesktopBtn:hover {
        background: #444;
        border-color: var(--accent-yellow);
        color: var(--accent-yellow);
    }

    /* Hide Content Behind */
    .app-container,
    .navbar {
        display: none !important;
    }
}

/* -----------------------------------------------------------
   ROTATE DEVICE HINT
   ----------------------------------------------------------- */
#rotate-hint {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100000;
    display: none;
    /* Flex via JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: fadeOutHint 0.5s ease-out 3s forwards;
}

@keyframes fadeOutHint {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.phone-rotate-icon {
    width: 40px;
    height: 70px;
    border: 3px solid #fff;
    border-radius: 6px;
    position: relative;
    margin-bottom: 25px;
    animation: rotatePhone 2.5s ease-in-out infinite;
}

.phone-rotate-icon::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
}

@keyframes rotatePhone {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }

    20% {
        transform: rotate(90deg);
        opacity: 1;
    }

    50% {
        transform: rotate(90deg);
        opacity: 1;
    }

    60% {
        transform: rotate(0deg);
        opacity: 0;
    }

    100% {
        transform: rotate(0deg);
        opacity: 1;
    }
}

#rotate-hint p {
    color: #fff;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

/* =========================================
   Service Detail Modal Styles
   ========================================= */
.service-details {
    font-family: var(--font-sans);
    color: var(--text-main);
}

.service-intro {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.service-list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .service-list-grid {
        grid-template-columns: 1fr;
    }
}

.service-category h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-purple);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 5px;
}

body.dark-mode .service-category h4 {
    border-color: rgba(255, 255, 255, 0.1);
}

.service-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-category ul li {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
    color: var(--text-secondary);
}

.service-category ul li::before {
    content: '•';
    color: var(--accent-purple);
    position: absolute;
    left: 0;
    font-weight: bold;
}

@keyframes runBob {

    0%,
    100% {
        transform: scaleX(-1) translateY(0);
    }

    50% {
        transform: scaleX(-1) translateY(-4px);
    }
}

/* Dino Dust Effect */
.lock-icon {
    position: relative;
    display: inline-block;
}

.lock-icon::after {
    content: '•';
    color: #888;
    position: absolute;
    left: -2px;
    bottom: 0px;
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    animation: dustPuff 0.6s infinite ease-out;
}

@keyframes dustPuff {
    0% {
        transform: translate(10px, 0) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 0.6;
    }

    100% {
        transform: translate(-15px, -5px) scale(1.5);
        opacity: 0;
    }
}

/* -----------------------------------------------------------
   SKILL GROUP (Professional Interaction)
   ----------------------------------------------------------- */
.skill-group {
    padding: 15px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.03);
    /* Light Mode default */
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    cursor: default;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.skill-group:hover {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #ffbd2e;
}

.skill-group .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #555;
    font-weight: 600;
}

.skill-group:hover .label {
    color: #ffbd2e;
}

.skill-group .value {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #222;
    transition: color 0.3s;
}

.skill-group:hover .value {
    color: #000;
}

/* Dark Mode Support */
body.dark-mode .skill-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-mode .skill-group:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .skill-group .label {
    color: #888;
}

body.dark-mode .skill-group:hover .label {
    color: #ffbd2e;
}

body.dark-mode .skill-group .value {
    color: #ccc;
}

body.dark-mode .skill-group:hover .value {
    color: #fff;
}