@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-dark: #090b10;
    --panel-bg: rgba(16, 20, 31, 0.7);
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.4);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(16px);
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== LIGHT THEME ===== */
body.light-theme {
    --bg-dark: #f0f4f8;
    --panel-bg: rgba(255, 255, 255, 0.75);
    --text-primary: #0d1117;
    --text-secondary: #444c56;
    --border-color: rgba(0, 0, 0, 0.1);
    background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 30px 30px;
}
/* Light mode transitions */
body.light-theme .btn-glass { color: #0d1117; border-color: rgba(0,0,0,0.2) !important; }
body.light-theme .btn-glass:hover { color: #ffffff !important; }

body.light-theme .hero-image { opacity: 0.35; }
body.light-theme .hero-overlay { background: linear-gradient(to bottom, rgba(240, 244, 248, 0.5), var(--bg-dark)); }
body.light-theme nav.scrolled { background: rgba(240, 244, 248, 0.9); }
body.light-theme .glass-card { box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
body.light-theme footer { background: rgba(255,255,255,0.4); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-dark); color: var(--text-primary);
    font-family: 'Inter', sans-serif; line-height: 1.6; overflow-x: hidden;
    background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* ===== 3D MODEL HOTSPOTS ===== */
.Hotspot {
    background: transparent;
    border: none;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* 1. Beyaz Yuvarlak */
.hotspot-center {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px dashed #ffffff; 
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
    transition: all 0.3s;
    position: absolute;
    z-index: 2;
}

/* Hover olunca dönmeye başlasın */
.Hotspot:hover .hotspot-center {
    animation: spinHotspot 2s linear infinite;
    background: rgba(56, 189, 248, 0.6);
    border-color: #38bdf8;
    transform: scale(1.3);
}

@keyframes spinHotspot {
    100% { transform: scale(1.3) rotate(360deg); }
}

/* 2. Kırık Çizgi (SVG) */
.hotspot-line {
    position: absolute;
    bottom: 50%; 
    left: 50%;
    width: 50px;
    height: 40px;
    overflow: visible;
    pointer-events: none;
    opacity: 0;
    transform-origin: bottom left;
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.hotspot-line polyline {
    fill: none;
    stroke: rgba(255,255,255,0.9);
    stroke-width: 2.5;
    stroke-dasharray: 4; /* Kesik/Kırık çizgi efekti */
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.9));
}

.Hotspot:hover .hotspot-line {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.1s;
}

/* 3. Metin Kutusu (Annotation) */
.HotspotAnnotation {
    position: absolute;
    left: calc(50% + 55px); /* Çizginin bittiği hizaya yakın */
    bottom: calc(50% + 5px); /* SVG yüksekliği 40px, oraya hizala */
    background: rgba(15, 23, 42, 0.75);
    border-left: 3px solid var(--accent);
    padding: 12px 18px;
    border-radius: 0 10px 10px 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-right: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    width: max-content;
    max-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) translateX(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    color: white;
    text-align: left;
    z-index: 3;
}

.HotspotAnnotation h4 {
    margin: 0 0 6px 0;
    color: var(--accent);
    font-size: 1rem;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.HotspotAnnotation p {
    margin: 0;
    font-size: 0.8rem;
    color: #e2e8f0;
    line-height: 1.5;
}

.Hotspot:hover .HotspotAnnotation {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateX(0);
    transition-delay: 0.2s;
}

h1, h2, h3, .font-heading { font-family: 'Outfit', sans-serif; font-weight: 800; }

/* Navigation */
nav {
    position: fixed; top: 0; width: 100%; padding: 1.5rem 10%;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; transition: var(--transition);
}
nav.scrolled {
    padding: 0.8rem 10%; background: rgba(9, 11, 16, 0.85);
    backdrop-filter: var(--glass-blur); border-bottom: 1px solid var(--border-color);
}
.logo-container { height: 80px; transition: var(--transition); display: flex; align-items: center; gap: 2rem; }
nav.scrolled .logo-container { height: 60px; }

/* ===== NAV ACTIONS (right side group) ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Language Switcher - Inline in Navbar */
.lang-switcher {
    display: flex;
    gap: 4px;
    align-items: center;
    background: var(--panel-bg);
    padding: 5px 10px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}
.lang-btn.active {
    color: var(--bg-dark);
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}
.lang-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.theme-toggle-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: scale(1.1);
}
.theme-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}
/* Dark mode (default): show moon, hide sun */
.theme-icon.sun  { opacity: 0; transform: rotate(90deg) scale(0.5); }
.theme-icon.moon { opacity: 1; transform: rotate(0deg) scale(1); }
/* Light mode: show sun, hide moon */
body.light-theme .theme-icon.sun  { opacity: 1; transform: rotate(0deg) scale(1); }
body.light-theme .theme-icon.moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }

.logo-img { height: 100%; width: auto; }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
    text-decoration: none; color: var(--text-secondary); font-weight: 600;
    font-size: 0.95rem; transition: var(--transition); position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--accent); transition: var(--transition); box-shadow: 0 0 8px var(--accent-glow);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* Hero */
.hero {
    height: 100vh; display: flex; flex-direction: column; justify-content: flex-start;
    align-items: center; text-align: center; position: relative; overflow: hidden;
    padding: 200px 10% 0;
}
.hero-image {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: -1; opacity: 0.45; filter: contrast(110%) brightness(0.8);
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(9, 11, 16, 0.4), var(--bg-dark));
    z-index: -1;
}
.hero-content { z-index: 10; max-width: 900px; }

.hero-badge {
    color: var(--accent); text-transform: uppercase; letter-spacing: 5px;
    font-weight: 800; font-size: 0.9rem; margin-bottom: 1rem; display: block;
}
.hero h1 {
    font-size: clamp(3rem, 7vw, 5rem); line-height: 1.1; margin-bottom: 1.5rem;
}
.hero p {
    color: var(--text-secondary); font-size: 1.25rem; max-width: 650px;
    margin: 0 auto 3rem; font-weight: 400;
}

/* Glass Buttons */
.btn-glass {
    padding: 1rem 3rem; background: var(--panel-bg); backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color); color: white; border-radius: 100px;
    font-weight: 700; text-decoration: none; transition: var(--transition);
    text-transform: uppercase; letter-spacing: 2px; font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.btn-glass:hover {
    background: var(--accent); color: var(--bg-dark); transform: scale(1.05);
    box-shadow: 0 0 30px var(--accent-glow); border-color: transparent;
}

/* Sections */
section { padding: 9rem 10%; }
.section-header { margin-bottom: 5rem; text-align: center; }
.accent-line { width: 60px; height: 4px; background: var(--accent); margin: 1.5rem auto; border-radius: 2px; box-shadow: 0 0 10px var(--accent-glow); }

/* Mission/Vision Cards */
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 2.5rem; }
.glass-card {
    background: var(--panel-bg); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-color);
    padding: 3.5rem 2.5rem; border-radius: 24px; transition: var(--transition); position: relative;
    overflow: hidden;
}
.glass-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.05), transparent 60%);
    pointer-events: none;
}
.glass-card:hover { transform: translateY(-12px); border-color: var(--accent); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.glass-card h3 { font-size: 1.75rem; margin-bottom: 1.5rem; color: var(--accent); border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; }
.glass-card p { font-size: 1.05rem; font-weight: 300; }

/* ===== CONTACT SECTION ===== */
.contact-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: start;
}

.contact-form-card {
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin-left: 0.5rem;
}

.form-group input, 
.form-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

body.light-theme .form-group input,
body.light-theme .form-group textarea {
    background: rgba(0, 0, 0, 0.02);
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.05);
    box-shadow: 0 0 15px var(--accent-glow);
}

.form-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.2rem;
}

.form-status.success { color: #10b981; }
.form-status.error { color: #ef4444; }

.contact-info-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    transition: var(--transition);
}

.info-item:hover {
    transform: translateX(10px);
    border-color: var(--accent);
}

.info-icon {
    font-size: 1.8rem;
    background: rgba(56, 189, 248, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.info-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    color: var(--accent);
}

.info-text p {
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.5;
}

.social-links-row {
    display: flex;
    gap: 1.2rem;
    margin-top: 0.8rem;
}

.social-link {
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    color: var(--accent);
    transform: translateY(-5px);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

#contact { padding-bottom: 4rem; }

/* Footer */
footer { padding: 3rem 10% 4rem; border-top: 1px solid var(--border-color); background: rgba(0,0,0,0.3); text-align: center; }

.footer-minimal {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

@media (max-width: 968px) {
    .nav-links { display: none; }
    .contact-container { grid-template-columns: 1fr; gap: 2rem; }
    #contact { padding-bottom: 3rem; }
}

/* ===== PROJECTS TREE ===== */
.projects-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.projects-hub {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.projects-hub-ring {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 2px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.15), inset 0 0 30px rgba(56, 189, 248, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 20, 31, 0.8);
    backdrop-filter: blur(16px);
    position: relative;
    z-index: 2;
}

body.light-theme .projects-hub-ring {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.2), inset 0 0 20px rgba(56, 189, 248, 0.1);
}

.projects-hub-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
}

.projects-svg-wrap {
    width: 100%;
    max-width: 900px;
    margin-top: -10px;
}

.projects-svg {
    width: 100%;
    height: 110px;
    display: block;
}

.projects-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    width: 100%;
    max-width: 900px;
    margin-top: 0;
}

/* Project Card */
.project-card {
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -40%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.04), transparent 60%);
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(56, 189, 248, 0.08);
}

.project-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 100px;
    padding: 4px 14px;
    margin-bottom: 1rem;
}

.project-tag-secondary {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.3);
}

.project-card-title {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.project-card-subtitle {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.project-img-wrap {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
}

.project-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-img {
    transform: scale(1.03);
}

.project-img-placeholder {
    width: 100%;
    height: 220px;
    border-radius: 16px;
    border: 2px dashed rgba(56, 189, 248, 0.25);
    background: rgba(56, 189, 248, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.project-card:hover .project-img-placeholder {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.06);
}

.placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.placeholder-inner span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
}

.project-card-desc {
    font-size: 0.97rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.project-specs {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color);
}

.project-specs li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.spec-icon {
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

@media (max-width: 768px) {
    .projects-cards { grid-template-columns: 1fr; }
    .projects-hub-ring { width: 120px; height: 120px; }
    .projects-hub-logo { width: 85px; height: 85px; }
}

/* ===== JOIN MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 11, 16, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: rgba(16, 20, 31, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 28px;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(56, 189, 248, 0.06);
    transform: translateY(30px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.4rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 1.4rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent);
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 2rem 2.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-logo {
    height: 52px;
    width: auto;
    flex-shrink: 0;
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.modal-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.modal-form-wrap {
    padding: 1.5rem 2rem 2rem;
}

.modal-form-wrap iframe {
    border-radius: 16px;
    display: block;
    background: transparent;
}

@media (max-width: 600px) {
    .modal-box { border-radius: 20px; }
    .modal-header { padding: 1.5rem 1.5rem 1rem; }
    .modal-form-wrap { padding: 1rem; }
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

.back-to-top:hover {
    background: var(--accent);
    color: #ffffff;
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 30px var(--accent-glow);
    border-color: transparent;
}

body.light-theme .back-to-top {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}


/* ===== MENU TOGGLE (Hamburger) ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-primary);
    border-radius: 10px;
    transition: var(--transition);
}

/* Animations for Hamburger */
.menu-toggle.active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 968px) {
    nav { padding: 1rem 5%; }
    .menu-toggle { display: flex; }
    
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background: rgba(9, 11, 16, 0.95);
        backdrop-filter: blur(25px);
        width: 80%;
        height: 100vh;
        padding: 5rem 2rem;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        border-left: 1px solid var(--border-color);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    body.light-theme .nav-links {
        background: rgba(240, 244, 248, 0.95);
    }

    .nav-links.active { right: 0; }
    .nav-links li { margin: 1.5rem 0; width: 100%; text-align: center; }
    .nav-links a { font-size: 1.2rem; display: block; width: 100%; }

    .nav-actions {
        position: fixed;
        right: -100%;
        bottom: 0;
        width: 80%;
        padding: 2rem;
        flex-direction: column;
        background: transparent;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        gap: 1.5rem;
    }
    
    .nav-actions.active { right: 0; }
    
    .lang-switcher, .theme-toggle-btn, .nav-actions .btn-glass {
        width: 100%;
        justify-content: center;
    }
}

/* ===== GENERAL MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    section { padding: 5rem 5%; }
    .section-header { margin-bottom: 3rem; }
    
    .hero { padding: 160px 5% 0; height: auto; min-height: 90vh; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; margin-bottom: 2rem; }
    
    .grid-container { grid-template-columns: 1fr; gap: 1.5rem; }
    .glass-card { padding: 2rem 1.5rem; border-radius: 20px; }
    .glass-card h3 { font-size: 1.5rem; }
    
    .projects-tree { margin-top: 2rem; }
    .projects-svg-wrap { display: none; } /* Hide complicated SVG on mobile */
    .projects-cards { gap: 1.5rem; margin-top: 2rem; }
    .project-card { padding: 1.5rem; border-radius: 20px; }
    .project-card-title { font-size: 1.5rem; }
    
    .contact-container { gap: 1.5rem; }
    .contact-form-card { padding: 1.5rem; border-radius: 20px; }
    .info-item { padding: 1.2rem; border-radius: 16px; gap: 1rem; }
    .info-icon { width: 45px; height: 45px; font-size: 1.4rem; }
    
    .back-to-top { bottom: 1.5rem; right: 1.5rem; width: 48px; height: 48px; }
    
    #largeModelViewer { height: 60vh; }
    .modal-box { width: 98vw; height: 95vh; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .hero-btns .btn-glass { width: 100%; text-align: center; }
    
    .modal-header h3 { font-size: 1.2rem; }
    .modal-header { gap: 0.8rem; padding: 1.5rem 1rem; }
    .modal-logo { height: 40px; }
    
    .HotspotAnnotation {
        max-width: 200px;
        padding: 8px 12px;
    }
    .HotspotAnnotation h4 { font-size: 0.9rem; }
    .HotspotAnnotation p { font-size: 0.75rem; }
}


