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

:root {
    --primary: #003366;
    /* Official Navy */
    --primary-dark: #002244;
    --accent: #009999;
    /* Official Teal */
    --accent-light: #e6f7f7;
    --bg-body: #f4f7f9;
    --text-main: #1a202c;
    --text-muted: #718096;
    --border: #e2e8f0;
    --radius: 0px;
    /* Stronger academic lines */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Public Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

/* DGES Style Utility Bar */
.top-bar {
    background-color: var(--primary-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-switcher {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
}

.lang-switcher .active {
    color: white;
}

/* Header */
.header {
    background-color: var(--primary);
    color: white;
    padding: 30px 0 0 0;
    position: relative;
    z-index: 100;
}

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

.profile-section {
    display: flex;
    gap: 30px;
    align-items: center;
    padding-bottom: 30px;
}

.profile-img {
    width: 140px;
    height: 140px;
    border: 3px solid var(--accent);
    object-fit: cover;
}

.profile-info h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 5px;
}

.institution {
    font-size: 0.9rem;
    opacity: 0.8;
}

.breadcrumbs {
    margin-top: 15px;
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Navigation - Square DGES Style */
.academic-nav {
    display: flex;
}

.nav-tab {
    padding: 15px 30px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 4px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    position: relative;
    z-index: 110;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
    background: #fff;
    color: var(--primary);
    border-bottom-color: var(--accent);
}

/* Layout */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    background: white;
    min-height: 600px;
}

/* Sidebar DGES Style */
.sidebar {
    background: #fff;
    padding: 40px 0;
    border-right: 1px solid var(--border);
}

.sidebar-block {
    margin-bottom: 40px;
}

.sidebar-header {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
    padding: 0 30px 15px 30px;
    border-bottom: 2px solid var(--accent);
    margin: 0 30px 20px 30px;
}

.side-item {
    display: block;
    padding: 12px 30px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.side-item:hover {
    background: var(--bg-body);
    color: var(--accent);
}

.side-item i {
    font-size: 0.6rem;
    margin-right: 10px;
    vertical-align: middle;
}

.sidebar-promo {
    padding: 30px;
    background: var(--bg-body);
    margin: 0 20px;
}

/* Content Area */
.content-area {
    padding: 60px 40px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 40px;
    color: var(--primary);
    position: relative;
}

.card {
    border: 1px solid var(--border);
    padding: 30px;
    margin-bottom: 20px;
}

.content-rich-text p {
    margin-bottom: 20px;
    color: #4a5568;
    line-height: 1.8;
}

/* API Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.card-project {
    border-top: 4px solid var(--accent);
}

.project-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    margin-bottom: 10px;
}

/* Dictionary Cards Refinement */
.dictionary-card {
    border-left: 5px solid var(--accent);
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dictionary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.translation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.translation-row:last-child {
    border-bottom: none;
}

.lang-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-value {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.word-main {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
}

.word-badge {
    font-size: 0.65rem;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Timeline */
.timeline {
    border-left: 2px solid var(--border);
    margin-left: 20px;
    padding-left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
}

.time {
    font-weight: 800;
    color: var(--primary);
    font-size: 0.85rem;
}

/* Footer */
.footer {
    background: #1a202c;
    color: #a0aec0;
    padding: 80px 0;
    border-top: 10px solid var(--accent);
}

.footer h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.footer a {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.85rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background: white;
    width: 800px;
    max-width: 90%;
}

.modal-header {
    background: var(--primary);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

#suggest-word-form {
    padding: 40px;
}

/* Buttons & Inputs */
.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.search-box {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    outline: none;
}

.search-box:focus {
    border-color: var(--accent);
}

/* Responsive */
@media (max-width: 992px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}