:root {
    --bg: #f8f9fc;
    --text: #0f172a;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-dark: #1e40af;
    --border: rgba(0, 0, 0, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}


body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.05), transparent);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
    letter-spacing: -0.01em;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5vw;
}

/* Background Watermark Logo */
.watermark-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    /* Increased for WOW effect */
    height: 80vw;
    max-width: 1200px;
    max-height: 1200px;
    background: url('../img/watermark.png') no-repeat center center;
    background-size: 50% 50%;
    opacity: 0.066;
    /* Subtler but much larger */
    z-index: -1;
    pointer-events: none;
    filter: grayscale(1);
}

/* Navigation - Floating minimalist */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2.5rem 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.15);
    /* Much more transparent */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-nav.scrolled {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
}

.glass-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-transform: lowercase;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    padding: 0.5rem;
    border-radius: 12px;
}

.nav-links a svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    transition: all 0.3s;
}

.nav-links a span {
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(0, 0, 0, 0.03);
    gap: 0.75rem;
}

.glass-nav.scrolled {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
}

.menu-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    z-index: 2000;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
    color: var(--text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Show menu toggle when navigation is hidden OR always on mobile */
body.scrolled .menu-toggle,
.menu-toggle.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}


.menu-toggle.active {
    background: var(--text);
    color: white;
}

@media (max-width: 1024px) {

    .nav-links,
    .lang-switch {
        display: none;
    }

    .menu-toggle {
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: scale(1) !important;
        top: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }

    .glass-nav {
        display: none;
        /* Hide header completely on mobile to let icon take over */
    }

@media (max-width: 1024px) {
    .nav-page-indicator {
        top: 3.5rem !important;
    }
}

    /* Add more space to the following element (content) */
    .content-page,
    .hero-section {
        padding-top: 4rem;
    }

}


.menu-toggle.active {
    background: var(--text);
    color: white;
}

@media (max-width: 1024px) {

    .nav-links,
    .lang-switch {
        display: none;
    }

    .menu-toggle {
        opacity: 1;
        pointer-events: auto;
        transform: scale(1);
    }
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    /* Ensure watermark doesn't overflow */
}

/* Watermark in Overlay */
.nav-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    max-width: 800px;
    max-height: 800px;
    background: url('../img/watermark.png') no-repeat center center;
    background-size: contain;
    opacity: 0.05;
    /* Very subtle */
    pointer-events: none;
    z-index: -1;
    filter: grayscale(1);
}


.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Staggered reverse animation for smoother exit */
.nav-overlay:not(.active) .nav-overlay-links a {
    transition-duration: 0.3s;
    transition-delay: 0s;
}

.nav-overlay:not(.active) .nav-overlay-links a:nth-child(1) {
    transition-delay: 0.05s;
}

.nav-overlay:not(.active) .nav-overlay-links a:nth-child(2) {
    transition-delay: 0.1s;
}

.nav-overlay:not(.active) .nav-overlay-links a:nth-child(3) {
    transition-delay: 0.15s;
}

.nav-overlay:not(.active) .nav-overlay-links a:nth-child(4) {
    transition-delay: 0.2s;
}

.nav-overlay:not(.active) .nav-overlay-lang {
    transition-delay: 0s;
}



.nav-overlay-links {
    display: flex;
    flex-direction: column;
    /* Force vertical layout */
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}



.nav-overlay-links a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align start to allow expansion */
    width: 64px;
    /* Default width (icon only) */
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    /* Capsule shape when expanded */
    color: var(--text);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(20px);
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    /* Hide text initially */
    padding: 0;
    position: relative;
}

/* Page Indicator Scroll Behavior */
body.scrolled .nav-page-indicator {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0.9);
    filter: blur(4px);
    pointer-events: none;
}


.nav-overlay-links a span {
    display: block;
    opacity: 0;
    white-space: nowrap;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
    padding-right: 2rem;
}

/* Hover effect - Expand */
.nav-overlay-links a:hover {
    width: 280px;
    /* Expand width */
    background: rgba(255, 255, 255, 0.85);
    /* More solid background */
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.nav-overlay-links a:hover span {
    opacity: 1;
    transform: translateX(0);
}

.nav-overlay.active .nav-overlay-links a {
    transform: translateY(0);
    opacity: 1;
}

.nav-overlay-links a svg {
    min-width: 64px;
    /* Fix icon size */
    width: 64px;
    height: 32px;
    /* Adjusted size inside circle */
    stroke-width: 1.5;
    transition: all 0.3s ease;
    z-index: 2;
}

.nav-overlay-links a:hover svg {
    stroke: var(--accent);
    transform: scale(0.9);
}

/* Staggered animation for links */
.nav-overlay.active .nav-overlay-links a:nth-child(1) {
    transition-delay: 0.1s;
}

.nav-overlay.active .nav-overlay-links a:nth-child(2) {
    transition-delay: 0.15s;
}

.nav-overlay.active .nav-overlay-links a:nth-child(3) {
    transition-delay: 0.2s;
}

.nav-overlay.active .nav-overlay-links a:nth-child(4) {
    transition-delay: 0.25s;
}

.nav-overlay-lang {
    margin-top: 4rem;
    display: flex;
    gap: 1.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease 0.3s;
}

.nav-overlay.active .nav-overlay-lang {
    transform: translateY(0);
    opacity: 1;
}

.nav-overlay-lang img {
    width: 32px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


.nav-links a:hover span,
.nav-links a.active span {
    max-width: 200px;
    opacity: 0.7;
}

.nav-links a.active svg {
    color: var(--accent);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.nav-links a.active {
    background: rgba(59, 130, 246, 0.05);
}

/* Page Indicator below Nav */
.nav-page-indicator {
    position: fixed;
    top: 10.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    text-align: center;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.glass-nav.scrolled+.nav-page-indicator {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px) scale(0.9);
    filter: blur(4px);
    pointer-events: none;
}


.current-page-label {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.9rem 3rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}





.lang-switch {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.lang-switch a {
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    opacity: 0.4;
    filter: grayscale(1);
}

.lang-switch a img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lang-switch a.active,
.lang-switch a:hover {
    opacity: 1;
    filter: grayscale(0);
    transform: translateY(-2px) scale(1.1);
}

.lang-switch a.active img {
    box-shadow: 0 0 0 2px var(--accent);
}

/* Hero Section */
.hero,
.content-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 12rem;
}

.content-page h1 {
    display: none;
}


.hero-content,
.page-content {
    max-width: 1400px;
    /* Increased for wider layout */
}

.contact-form-container {
    max-width: 1200px;
    /* Even wider as requested */
    width: 100%;
    margin: 4rem auto;
}

@media (max-width: 768px) {
    .contact-form-container {
        max-width: 100%;
        margin-top: 2rem;
    }
}



.gradient-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 3rem;
    color: var(--text);
}

/* Quote styling */
/* Quote styling - Premium Upgrade */
.quote {
    position: relative;
    margin: 4rem auto;
    padding: 2.5rem 3rem;
    max-width: 800px;
    text-align: center;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.quote:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.6);
}

.quote::before {
    content: "“";
    position: absolute;
    top: -30px;
    left: 20px;
    font-family: 'League Spartan', serif;
    font-size: 8rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.15;
    pointer-events: none;
}

.quote p {
    font-family: 'League Spartan', sans-serif;
    /* Changed to League Spartan for more character */
    font-size: 1.5rem;
    /* Larger for impact */
    font-weight: 500;
    font-style: italic;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.quote cite {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-style: normal;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    padding-top: 1rem;
    border-top: 2px solid var(--accent);
}

/* About Me Page Styles */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin: 4rem 0;
}

.portrait-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 24px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.portrait-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.portrait-placeholder::after {
    content: "Portrait Placeholder";
    position: absolute;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.quote-small {
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.quote-small p {
    font-size: 1.1rem;
}

.quote-small cite {
    font-size: 0.8rem;
    padding-top: 0.5rem;
}


/* Footer section */
.footer {
    position: relative;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 400;
    max-width: 800px;
    margin: 0 auto;
}

.accent-text {
    color: var(--text);
    font-weight: 600;
}

/* AI Chat - Overhaul for WOW factor */
#chat-toggle {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    /* Modern squircle */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

#chat-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow);
}

#chat-toggle .icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

#ai-chat {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 380px;
    height: 600px;
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
}

.chat-hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) translateY(40px);
    pointer-events: none;
}

.chat-header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-title span:last-child {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
}

.close-chat {
    background: transparent;
    border: none;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    color: var(--text);
    opacity: 0.4;
    transition: opacity 0.3s;
}

.close-chat:hover {
    opacity: 1;
}

.chat-body {
    flex: 1;
    padding: 0 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scrollbar-width: thin;
}

.chat-body::-webkit-scrollbar {
    width: 4px;
}

.message {
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 1.25rem;
    border-radius: 20px;
    max-width: 85%;
    white-space: break-spaces;
}

.message.system {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user {
    background: var(--text);
    color: var(--bg);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chat-input-area {
    padding: 2rem;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.chat-input-area textarea {
    flex: 1;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    max-height: 120px;
    transition: all 0.3s;
}

.chat-input-area textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--border);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.02);
}

.send-btn {
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.send-btn:hover {
    background: #000;
    transform: translateY(-2px);
}

.send-btn svg {
    width: 20px;
    height: 20px;
}

/* Modern Typing Indicator */
.typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 10px 15px !important;
    min-height: 45px;
}

.typing span {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
    opacity: 0.3;
}

.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* Premium Mobile Multi-Optimization */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .glass-nav {
        padding: 1.5rem 0;
        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--glass-border);
    }

    .glass-nav .container {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .nav-links {
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.85rem;
        letter-spacing: 0.05em;
        padding: 0.5rem;
    }

    .logo {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .lang-switch {
        gap: 1.5rem;
        justify-content: center;
    }

    .lang-switch a img {
        width: 32px;
    }

    .lang-switch a {
        opacity: 0.6;
    }

    .hero,
    .content-page {
        padding-top: 0.5rem;
        text-align: center;
        justify-content: flex-start;
    }

    .gradient-text {
        font-size: 2.8rem;
        margin-bottom: 2rem;
    }

    /* Quote mobile styling */
    .quote {
        padding-left: 1rem;
        margin-bottom: 2rem;
        text-align: left;
    }

    .quote p {
        font-size: 1rem;
    }

    .quote cite {
        font-size: 0.85rem;
    }

    /* Main text mobile */
    .main-text {
        font-size: 1rem;
        text-align: left;
    }

    /* Footer mobile */
    .footer {
        margin-top: 3rem;
        padding: 2rem 0;
    }

    .footer-text {
        font-size: 0.9rem;
    }

    #ai-chat {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    #chat-toggle {
        bottom: 2rem;
        right: 2rem;
        width: 80px;
        height: 80px;
        box-shadow: 0 15px 50px rgba(59, 130, 246, 0.4);
    }

    #chat-toggle .icon {
        font-size: 2.5rem;
    }

    .message {
        max-width: 90%;
        padding: 1rem;
        font-size: 1rem;
        /* Slightly larger for easier reading on mobile */
    }
}