/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: #666;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 80px;
    width: auto;
    max-width: 80px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* Ensure each nav item participates in the flex gap and aligns correctly.
   Some browsers / layouts can make certain list items not participate as expected,
   so make list items inline-flex and add an explicit fallback spacing for the
   language dropdown to guarantee visual parity with other items. */
.nav-menu > .nav-item {
    display: inline-flex;
    align-items: center;
}

/* Explicit spacing for the language dropdown nav item as a robust fallback
   so it always has the same horizontal gap as other nav items. */
.nav-menu > .nav-item.nav-lang {
    margin-right: 2rem; /* matches the .nav-menu gap */
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #667eea;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding-top: 120px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {

/* language switcher */
.lang-switcher { margin-right: 4.5rem; }
.lang-btn {
    background: transparent;
    border: 1px solid #e2e6ea;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight:600;
    display:flex;
    align-items:center;
    gap:8px;
}
.lang-btn .flag-icon { width:20px; height:auto; display:inline-block; }
.lang-btn .lang-abbr { font-size:0.9rem; letter-spacing:0.04em; }
.lang-btn.active {
    background:#0b76d1;
    color:#fff;
    border-color: #0b76d1;
}
.lang-btn:hover { filter:brightness(0.95); }

/* Dropdown styles for language selector */
.lang-dropdown { position: relative; margin-right: 2rem; }
.lang-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 0 4px; /* smaller padding to keep toggle compact */
    font-size: 1rem; /* match nav menu text size */
    cursor: pointer;
    line-height: 1;
}
.lang-dropdown-toggle .dropdown-caret { opacity:0.7; margin-left:4px; font-size:0.8rem; }
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0px;
    min-width: auto; /* let contents define width */
    background: #fff;
    border: 1px solid #e6e9ec; /* much thinner border for compactness */
    box-shadow: 0 6px 18px rgba(20,30,50,0.06);
    border-radius: 6px;
    padding: 4px; /* small padding so the box hugs icons */
    display: none !important;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lang-dropdown.open .lang-dropdown-menu { display:flex !important; }
.lang-dropdown-menu li { list-style:none; margin: 0; }
.lang-dropdown-menu .lang-btn { width: auto; text-align: center; padding: 4px; border-radius:4px; border: none; background:transparent; font-size: 1rem; display:inline-flex; align-items:center; justify-content:center; }

.lang-dropdown-menu .lang-btn:hover { background:#f5f7fa; }

/* Menu-only appearance: hide the textual abbreviation inside the popup so
   the opened menu displays only flags for compact selection. */
.lang-dropdown-menu .lang-abbr { display: none; }

/* Make the flag icons smaller than or equal to the menu font size. */
.lang-dropdown .flag-icon,
.lang-dropdown-toggle .flag-icon,
.lang-dropdown-menu .flag-icon {
    width: 0.6em; /* compact: ~60% of the font size */
    height: auto;
    display: inline-block;
}

/* NOTE: Toggle hiding on open removed — popup will instead hide the
    currently-selected option via JavaScript so the toggle remains visible
    while the menu shows only the selectable flags. */

/* make dropdown toggle visually similar height to nav items */
.navbar .lang-dropdown-toggle { height: auto; }

/* Compact layout for publications page - smaller fonts and tighter spacing */
.publications-page { font-size: 13px; line-height: 1.15; }
.publications-page .container { max-width: 1100px; }
.publications-page .section-header { margin-bottom: 0.6rem; }
.publications-page .section-header h1 { font-size: 1.25rem; margin-bottom: 0.15rem; }
.publications-page .section-header p { font-size: 0.88rem; margin-bottom: 0.6rem; color:#555; }
.publications-page .publications-list { display:block; }
.publications-page .publication { margin-bottom: 6px; padding: 8px 10px; border-bottom: 1px solid #eee; }
.publications-page .publication h3 { font-size: 1.0rem; margin: 0 0 4px 0; font-weight:600; }
.publications-page .publication p { font-size: 0.82rem; margin: 0 0 4px 0; color:#333; }
.publications-page .publication a { font-size: 0.78rem; }
.publications-page .btn { padding: 6px 8px; font-size: 0.82rem; }
.publications-page .footer { padding-top: 10px; }

/* Make sure the whole page is compact on narrower viewports too */
@media (max-height: 900px) {
    .publications-page { font-size: 12px; }
    .publications-page .publication h3 { font-size: 0.98rem; }
}

@media (max-width: 700px) {
    /* On small screens keep it readable but compact */
    .publications-page { font-size: 12px; }
    .publications-page .publication { padding:6px 8px; }
}
    font-size: 7rem;
    color: #333;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.hero-img:hover {
    transform: scale(1.05);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    color: #333;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
}

/* About Section */
.about {
    padding: 100px 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    color: #333;
    margin-bottom: 1rem;
}

.about-features {
    list-style: none;
    margin-top: 2rem;
}

.about-features li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: #333;
}

.about-features i {
    color: #667eea;
    margin-right: 1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat h4 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat p {
    color: #666;
    margin: 0;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: #f8f9fa;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 2rem;
}

.service-card h3 {
    color: #333;
    margin-bottom: 1rem;
}

.service-card p {
    color: #666;
}

/* Portfolio Section */
.portfolio {
    padding: 100px 0;
    background: white;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.portfolio-image {
    height: 200px;
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-content h3 {
    color: #333;
    margin-bottom: 1rem;
}

.portfolio-content p {
    color: #666;
    margin: 0;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: #f8f9fa;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.contact-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #666;
    margin: 0;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #ccc;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #667eea;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
}

.footer-bottom p {
    color: #ccc;
    margin: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Scroll animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}