/* ============================================
   ACE STUDIO — Apple-Inspired Enhancements
   ============================================ */

/* Subtle gradient background for sections */
.gradient-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(212, 175, 55, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Frosted glass card — Apple macOS style */
.glass-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
}

body.light-theme .glass-card {
    background: rgba(44, 44, 46, 0.72);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

/* Thin section divider */
.section-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    margin: 0;
}

body.light-theme .section-divider {
    background: rgba(255, 255, 255, 0.08);
}

/* Animated gold gradient text */
.gradient-text {
    background: linear-gradient(135deg, #d4af37 0%, #e8c84b 50%, #d4af37 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50%       { background-position: 100% center; }
}

/* Gold pill badge */
.modern-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.24);
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #d4af37;
}

body.light-theme .modern-badge {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.28);
    color: #b8860b;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }

/* ============================================
   Language Switcher
   ============================================ */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-right: 8px;
    background: rgba(128,128,128,0.12);
    border-radius: 999px;
    padding: 4px 8px;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans, 'Montserrat', sans-serif);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 2px 4px;
    color: var(--text-muted, rgba(255,255,255,0.55));
    transition: color 0.2s ease;
    line-height: 1;
}

.lang-btn:hover {
    color: #d4af37;
}

.lang-btn.active {
    color: #d4af37;
}

.lang-sep {
    color: var(--text-muted, rgba(255,255,255,0.25));
    font-size: 0.65rem;
    line-height: 1;
    user-select: none;
}

/* Dark mode adjustments (class is called light-theme but activates dark bg) */
.light-theme .lang-btn {
    color: rgba(255,255,255,0.45);
}

.light-theme .lang-btn:hover,
.light-theme .lang-btn.active {
    color: #d4af37;
}

.light-theme .lang-sep {
    color: rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
    .lang-switcher {
        display: none;
    }
}

/* ============================================
   Back-to-Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 96px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary, #F5F5F7);
    border: 1px solid var(--border-light, rgba(0,0,0,0.08));
    color: var(--text, #1D1D1F);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s var(--ease-out-back, cubic-bezier(0.34,1.56,0.64,1)),
                background 0.2s ease, box-shadow 0.2s ease;
    z-index: 900;
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--gold, #d4af37);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(212,175,55,0.3);
    transform: translateY(-2px);
}

body.light-theme .back-to-top {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.15);
    color: var(--text, #F5F5F7);
}

/* ============================================
   Mobile menu — lang switcher
   ============================================ */
.mobile-menu .lang-switcher {
    display: flex;
    margin-top: 8px;
    background: rgba(128,128,128,0.1);
    align-self: center;
}

/* ============================================
   Nav link hover underline
   ============================================ */
.nav-center a {
    position: relative;
}

.nav-center a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gold, #d4af37);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1));
}

.nav-center a:hover::after,
.nav-center a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ============================================
   Section title refined spacing
   ============================================ */
.section-title {
    line-height: 1.08;
}

/* ============================================
   Filosofia section: gold left border on text
   ============================================ */
.filosofia-text {
    position: relative;
    padding-left: 0;
}

/* ============================================
   Stat number shimmer on hover
   ============================================ */
.stat:hover .stat-number {
    text-shadow: 0 0 20px rgba(212,175,55,0.4);
}

/* ============================================
   Portfolio item hover caption refinement
   ============================================ */
.portfolio-overlay {
    transition: opacity 0.35s ease, transform 0.35s var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1));
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(-4px);
}

/* ============================================
   Footer links hover
   ============================================ */
.footer-col a {
    position: relative;
    display: inline-block;
}

.footer-col a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gold, #d4af37);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.footer-col a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
