:root {
    --berry-teal: #00f2ea;
    --berry-deep: #002d2c;
}

/* 2026 Liquid Gradient Background */
.bg-liquid {
    background: radial-gradient(circle at top right, rgba(0, 242, 234, 0.12), transparent),
                radial-gradient(circle at bottom left, rgba(0, 242, 234, 0.05), transparent),
                #020617;
}

.glass-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 242, 234, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border: 1px solid rgba(0, 242, 234, 0.3);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-5px);
}

.text-gradient {
    background: linear-gradient(135deg, #fff 30%, var(--berry-teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.teal-glow:hover {
    box-shadow: 0 0 30px rgba(0, 242, 234, 0.4);
}

/* --- Font Scaling Logic for Myanmar --- */
html[lang="my"] h1, html[lang="my"] h1 span, html[lang="my"] h2, html[lang="my"] h2 span, html[lang="my"] h3, html[lang="my"] p {
    font-weight: 500;
    line-height: 2; 
} 

html[lang="my"] h1, html[lang="my"] h1 span {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.6;
    padding-top: 10px;
    padding-bottom: 20px;     
}

html[lang="my"] [data-i18n] {
    padding-top: 5px;
    padding-bottom: 10px;
}

/* --- Smooth Language Transition --- */
.lang-fade {
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-out;
    opacity: 1;
}

.lang-fade.hidden-lang {
    opacity: 0;
    transform: translateY(5px); /* Subtle slide down on switch */
}


/* --- Smooth Dialog Transitions --- */
dialog {
    background: #0f172a;
    color: #94a3b8;
    border: 1px solid rgba(0, 242, 234, 0.2);
    border-radius: 24px;
    padding: 0;
    max-width: 650px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    
    /* Animation initial state */
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: 
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        display 0.4s allow-discrete;
}

dialog[open] {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* --- Floating Button Visibility --- */
#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Ensure English vs Myanmar font sizes are handled in the footer too */
html[lang="my"] #contact p {
    font-size: 0.95rem;
}

/* --- Responsive Typography Fixes --- */
@media (max-width: 768px) {
    h1 {
        font-size: 3.5rem !important;
        line-height: 1.1 !important;
    }
    
    html[lang="my"] h1 {
        font-size: 2.2rem !important;
    }

    section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    /* Adjust glass cards for single column */
    .md\:translate-y-6 {
        transform: none !important;
    }
}

/* --- Mobile Menu Logic --- */
body.menu-open {
    overflow: hidden; /* Prevents scrolling when menu is open */
}

@media (max-width: 767px) {
    #navMenu {
        background: rgba(2, 6, 23, 0.98); 
        backdrop-filter: blur(20px);
        height: auto;
        max-height: 80vh; 
        border-bottom: 1px solid rgba(0, 242, 234, 0.1);
        padding: 6rem 2rem 3rem 2rem;
        
        /* Animation states for mobile only */
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(-110%);
        opacity: 0;
        pointer-events: none;
    }

    #navMenu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
}

/* --- Desktop Logic --- */
@media (min-width: 768px) {
    #navMenu {
        display: flex !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: all !important;
        position: static !important;
    }
    
    /* Hide the hamburger button on desktop */
    #mobileMenuBtn {
        display: none;
    }
}

/* 2026 Starting point for open animation */
@starting-style {
  dialog[open] {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
}

dialog::backdrop {
    background: rgba(2, 6, 23, 0);
    backdrop-filter: blur(0px);
    transition: 
        background 0.4s ease,
        backdrop-filter 0.4s ease,
        display 0.4s allow-discrete;
}

dialog[open]::backdrop {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
}

@starting-style {
  dialog[open]::backdrop {
    background: rgba(2, 6, 23, 0);
    backdrop-filter: blur(0px);
  }
}

.dialog-inner { padding: 3rem; }
.dialog-header { color: white; font-size: 1.5rem; font-weight: 800; margin-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem; }
.dialog-content { font-size: 0.95rem; line-height: 1.7; overflow-y: auto; max-height: 50vh; padding-right: 0.5rem; }
.dialog-footer { display: flex; justify-content: flex-end; margin-top: 2rem; }
.btn-close { background: var(--berry-teal); color: #020617; padding: 0.75rem 2rem; border-radius: 99px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.btn-close:hover { opacity: 0.9; transform: scale(1.05); }