/* ========================================
   ADV MANISH RAJ - ADVOCATE PORTFOLIO
   ======================================== */

/* ========================================
   CSS VARIABLES - DUAL THEME SUPPORT
   ======================================== */
:root {
    /* Light Theme (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-tertiary: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);

    /* Card Colors */
    --card-blue: #0066ff;
    --card-purple: #8b5cf6;
    --card-green: #10b981;
    --card-orange: #f59e0b;
    --card-coral: #c94a4a;

    /* Accent Colors - Deep Navy for Legal */
    --accent: #1a3a5c;
    --accent-light: rgba(26, 58, 92, 0.1);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    /* Spacing */
    --section-padding: 100px;
    --container-width: 1100px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: #222222;
    --border-light: #333333;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);

    --accent: #4a8abf;
    --accent-light: rgba(74, 138, 191, 0.15);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

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

/* ========================================
   NAVIGATION - Pill Nav
   ======================================== */
.navbar {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-primary);
    padding: 8px 12px;
    border-radius: 50px;
    box-shadow: 0 4px 30px var(--shadow);
    border: 1px solid var(--border);
}

.nav-logo {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 8px 16px;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 50px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .sun-icon {
    display: block;
}

.theme-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 156px 24px 60px;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 7vw, 64px);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-name-italic {
    font-style: italic;
}

.hero-role {
    display: block;
}

.hero-tagline {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 500px;
}

/* Hero Photo */
.hero-photo {
    width: 100%;
    max-width: 380px;
    height: 450px;
    margin: 0 auto;
    overflow: hidden;
}

.hero-photo img {
    width: 100%;
    height: auto;
    filter: grayscale(100%);
    transition: filter var(--transition-normal);
}

.hero-photo img:hover {
    filter: grayscale(0%);
}

.hero-photo-img {
    width: 100%;
    max-width: 380px;
    height: 450px;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px;
    filter: grayscale(100%);
    transition: filter var(--transition-normal);
    transform: scale(1.3);
    transform-origin: center 20%;
}

.hero-photo-img:hover {
    filter: grayscale(0%);
}

.photo-placeholder-hero {
    width: 100%;
    height: 400px;
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 8px;
}

/* ========================================
   TOP RIBBON - Fixed Scrolling Banner
   ======================================== */
.top-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: var(--text-primary);
    color: var(--bg-primary);
    height: 36px;
    overflow: hidden;
    cursor: pointer;
}

.ribbon-track {
    display: flex;
    width: max-content;
    animation: ribbon-scroll 20s linear infinite;
}

.ribbon-content {
    display: flex;
    align-items: center;
    gap: 0;
    height: 36px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ribbon-content span {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0 12px;
}

.ribbon-dot {
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    padding: 0 !important;
}

[data-theme="dark"] .ribbon-dot {
    background: #4a8abf;
}

@keyframes ribbon-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========================================
   HERO MARQUEE BANNERS
   ======================================== */
.marquee {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.marquee + .marquee {
    border-top: none;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 25s linear infinite;
}

.marquee-reverse {
    animation: marquee-scroll-reverse 25s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.marquee-item {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 16px;
    letter-spacing: -0.3px;
}

.marquee-separator {
    font-size: 14px;
    color: var(--text-muted);
    padding: 0 8px;
    user-select: none;
}

/* Intro banner */
.marquee-intro {
    margin-top: 32px;
}

/* Highlight banner - accent style */
.marquee-highlight {
    background: var(--accent);
    border-color: var(--accent) !important;
}

.marquee-highlight .marquee-item {
    color: #ffffff;
}

.marquee-highlight .marquee-separator {
    color: rgba(255, 255, 255, 0.5);
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes marquee-scroll-reverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ========================================
   CONSULTATION CTA BANNER (Full-width)
   ======================================== */
.cta-banner {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 40px 24px;
    text-align: center;
    border-top: 3px solid var(--accent);
}

.cta-inner {
    max-width: 600px;
    margin: 0 auto;
}

.cta-headline {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 24px;
    color: inherit;
}

.cta-headline strong {
    color: #4a8abf;
    font-weight: 700;
}

[data-theme="dark"] .cta-headline strong {
    color: #6aafdf;
}

.consultation-form {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin: 0 auto;
}

.consultation-form input {
    flex: 1;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid transparent;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    transition: border-color var(--transition-fast);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.consultation-form input:focus {
    border-color: var(--accent);
}

.consultation-form button {
    padding: 14px 28px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.consultation-form button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.cta-privacy {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 12px;
    text-align: center;
}

[data-theme="dark"] .cta-privacy {
    color: rgba(255, 255, 255, 0.3);
}

.cta-success {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 16px;
    max-width: 520px;
    margin: 0 auto;
    font-size: 15px;
    font-weight: 500;
    color: #6ecf6e;
}

/* CTA Mobile */
@media (max-width: 600px) {
    .cta-banner { padding: 32px 20px; }
    .cta-headline { font-size: 17px; }
    .consultation-form { flex-direction: column; }
    .consultation-form button { width: 100%; }
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
    background: var(--bg-secondary);
    padding: var(--section-padding) 0;
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-title {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    font-style: italic;
    color: var(--accent);
    margin-bottom: 24px;
}

.about-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
    text-align: justify;
}

.skills-label {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    font-style: italic;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 16px;
}

/* Skill Pills */
.skills-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-pill {
    display: inline-block;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: 50px;
    transition: all var(--transition-fast);
}

.skill-pill:hover {
    background: var(--accent);
    color: #ffffff;
}

/* About Photo */
.about-photo {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 70px;
}

.about-photo-img {
    position: relative;
    z-index: 1;
    width: 380px;
    height: 480px;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(100%);
    border-radius: 8px;
}

.photo-placeholder-about {
    width: 280px;
    height: 380px;
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 8px;
}

/* ========================================
   SECTIONS COMMON
   ======================================== */
section {
    padding: var(--section-padding) 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

/* ========================================
   PRACTICE AREAS - BENTO GRID
   ======================================== */
.practice {
    background: var(--bg-primary);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
}

.bento-card {
    padding: 32px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Card Sizes */
.bento-large {
    grid-row: span 2;
    min-height: 580px;
}

.bento-wide {
    grid-column: span 2;
}

/* Card Colors */
.card-blue {
    background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
    color: #ffffff;
}

.card-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
}

.card-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.card-coral {
    background: linear-gradient(135deg, #c94a4a 0%, #a83232 100%);
    color: #ffffff;
}

.card-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.card-category {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
    margin-bottom: 16px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.bento-large .card-title {
    font-size: 42px;
}

.card-description {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 24px;
    flex-grow: 1;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    transition: background var(--transition-fast);
    width: fit-content;
}

.card-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

.card-link svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   EXPERIENCE SECTION
   ======================================== */
.experience {
    background: var(--bg-secondary);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.exp-card {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
}

.exp-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--shadow);
}

.exp-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 20px;
    margin-bottom: 16px;
}

.exp-company {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.exp-role {
    font-size: 16px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
}

.exp-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
    background: var(--bg-primary);
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 50px;
    transition: all var(--transition-normal);
}

.contact-btn svg {
    width: 20px;
    height: 20px;
}

.contact-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow);
}

.contact-phone:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.contact-email:hover {
    border-color: #c94a4a;
    background: #c94a4a;
    color: #fff;
}

.contact-whatsapp:hover {
    border-color: #25d366;
    background: #25d366;
    color: #fff;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--bg-secondary);
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

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

.footer p {
    font-size: 14px;
    color: var(--text-muted);
}

.back-to-top {
    width: 44px;
    height: 44px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.back-to-top:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.back-to-top:hover svg {
    color: #fff;
}

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

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

/* Staggered animations */
.bento-grid .bento-card:nth-child(1) { transition-delay: 0.1s; }
.bento-grid .bento-card:nth-child(2) { transition-delay: 0.2s; }
.bento-grid .bento-card:nth-child(3) { transition-delay: 0.3s; }
.bento-grid .bento-card:nth-child(4) { transition-delay: 0.4s; }
.bento-grid .bento-card:nth-child(5) { transition-delay: 0.5s; }

.experience-grid .exp-card:nth-child(1) { transition-delay: 0.1s; }
.experience-grid .exp-card:nth-child(2) { transition-delay: 0.2s; }
.experience-grid .exp-card:nth-child(3) { transition-delay: 0.3s; }

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

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .navbar {
        top: 46px;
        left: 10px;
        right: 10px;
        transform: none;
    }

    .nav-container {
        width: 100%;
        justify-content: space-between;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-large {
        grid-row: span 1;
        min-height: 320px;
    }

    .bento-wide {
        grid-column: span 2;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-photo {
        order: -1;
        min-height: 350px;
    }

    .experience-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .experience-grid .exp-card:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu .nav-link {
        font-size: 24px;
        padding: 12px 24px;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }

    .hero-title {
        font-size: clamp(28px, 8vw, 48px);
    }

    .marquee-item { font-size: 15px; }

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

    .bento-large,
    .bento-wide {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 280px;
    }

    .bento-large .card-title {
        font-size: 32px;
    }

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

    .experience-grid .exp-card:last-child {
        grid-column: span 1;
        max-width: 100%;
    }

    .about-text {
        text-align: left;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .footer .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    :root {
        --section-padding: 60px;
    }

    .nav-logo {
        font-size: 12px;
        padding: 6px 12px;
    }

    .hero {
        padding-top: 136px;
    }

    .photo-placeholder-hero {
        height: 300px;
    }

    .about-photo {
        min-height: 300px;
    }

    .photo-placeholder-about {
        width: 220px;
        height: 300px;
        font-size: 48px;
    }

    .bento-card {
        padding: 24px;
        min-height: 240px;
    }

    .card-title {
        font-size: 28px;
    }

    .skills-pills {
        gap: 8px;
    }

    .skill-pill {
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}
