@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
    --primary-bg: #f4f7f6;
    --secondary-bg: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.1);
    --text-color: #333;
    --heading-color: #000;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --accent-gradient: linear-gradient(45deg, #ff8a00, #e52e71);
    --text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="dark"] {
    --primary-bg: #0d0d2b;
    --secondary-bg: rgba(20, 20, 45, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #c0c0e0;
    --heading-color: #fff;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.8;
    margin: 0;
    padding: 0;
    transition: background-color 0.5s, color 0.5s;
    overflow-x: hidden; /* Allow vertical scroll, hide horizontal */
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    animation: fade-in 1s ease-out;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--secondary-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 60px;
}

nav .logo {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--heading-color);
    text-decoration: none;
}

nav .nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 400;
    transition: color 0.3s;
    position: relative;
}

nav .nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--accent-gradient);
    transition: all 0.3s ease;
}

nav .nav-links a:hover:after, nav .nav-links a.active:after {
    width: 100%;
    left: 0;
}

.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: 3.5em;
    color: var(--heading-color);
    margin: 0;
}

.site-header {
    text-align: center;
    padding: 100px 0;
}

.site-header h1 {
    font-size: 4em;
    letter-spacing: -1.5px;
    color: var(--heading-color);
    text-shadow: var(--text-shadow);
}

.site-header .subtitle {
    font-size: 1.3em;
    max-width: 600px;
    margin: 15px auto 0;
    color: var(--text-color);
    text-shadow: var(--text-shadow);
}

section {
    margin-bottom: 40px;
}

section h2 {
    font-size: 2em;
    color: var(--heading-color);
    margin-bottom: 25px;
    text-shadow: var(--text-shadow);
}

.team-member-card, .project-card, .research-item, .contact-method {
    background: var(--secondary-bg);
    backdrop-filter: blur(10px);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-member-card:hover, .project-card:hover, .research-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px var(--shadow-color);
}

.team-member-card {
    display: flex;
    align-items: center;
    gap: 30px;
}

.team-member-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.team-member-card h2 {
    font-size: 1.6em;
    margin: 0;
}

.team-member-card h3 {
    font-size: 1.1em;
    color: var(--text-color);
    opacity: 0.8;
    margin: 5px 0 10px;
    font-weight: 400;
}

.contact-method a {
    color: var(--heading-color);
    font-size: 1.3em;
    text-decoration: none;
    font-weight: 600;
}

footer {
    text-align: center;
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    opacity: 0.8;
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-dropdown {
    position: relative;
}

.language-button {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 8px;
}

.language-options {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.language-dropdown.open .language-options {
    display: flex;
    flex-direction: column;
}

.language-options a {
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-color);
}

.language-options a:hover {
    color: var(--heading-color);
}

#theme-switcher {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Auctor Chat Widget */
#auctor-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

#chat-toggle-button {
    background: var(--accent-gradient);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

#chat-toggle-button:hover {
    transform: scale(1.1);
}

#chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background: var(--secondary-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 30px var(--shadow-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
    transform-origin: bottom right;
}

#chat-window.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

#chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--heading-color);
}

#close-chat-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5em;
    cursor: pointer;
}

#chat-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    line-height: 1.5;
}

.message p {
    margin: 0;
}

.message.auctor {
    background-color: rgba(128, 128, 128, 0.2);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background: var(--accent-gradient);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

#chat-footer {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--border-color);
}

#chat-input {
    flex-grow: 1;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    color: var(--text-color);
    margin-right: 10px;
}

#chat-input:focus {
    outline: none;
    border-color: #0070f0;
}

#send-chat-button {
    background: var(--accent-gradient);
    border: none;
    border-radius: 8px;
    color: white;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}
