/* ============================================
   DCLab Website - Unified Stylesheet
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary: #3A67B9;
    --primary-dark: #3A67B9;
    --primary-light: #3A67B9;
    --accent: #ff6f00;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border: #e0e0e0;
    --mono: 'Space Mono', monospace;
    --sans: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

/* --- Language Toggle --- */
[data-lang="it"] { display: none; }
html[lang="it"] [data-lang="en"] { display: none; }
html[lang="it"] [data-lang="it"] { display: block; }

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

body {
    font-family: var(--sans);
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-white);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.lang-switch {
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: none;
    border-radius: 6px;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-switch:hover {
    background: var(--primary);
    color: white;
}

/* Mobile hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* ============================================
   UNIFIED BUTTONS & FILTERS
   ============================================ */

/* Base button styles */
.btn,
.filter-btn,
.toggle-btn,
.press-toggle,
.course-link-btn,
.thesis-form-btn,
.cons-toggle,
.cons-site {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: white;
    color: var(--text-primary);
    line-height: 1;
}

/* Primary buttons */
.btn-primary,
.course-link-btn,
.thesis-form-btn {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover,
.course-link-btn:hover,
.thesis-form-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 103, 185, 0.3);
}

/* Secondary buttons */
.btn-secondary {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* Accent buttons */
.btn-accent,
.press-pdf-btn {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-accent:hover,
.press-pdf-btn:hover {
    background: #e56300;
    border-color: #e56300;
}

/* Filter buttons (inactive) */
.filter-btn,
.toggle-btn,
.press-toggle {
    background: white;
    border-color: var(--border);
}

.filter-btn:hover,
.toggle-btn:hover,
.press-toggle:hover {
    border-color: var(--primary);
    background: rgba(58, 103, 185, 0.05);
}

/* Active state for filters */
.filter-btn.active,
.toggle-btn.active,
.press-toggle.is-on {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filter-btn.active:hover,
.toggle-btn.active:hover,
.press-toggle.is-on:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Small buttons */
.cons-toggle,
.cons-site {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Active dot indicator */
.press-toggle .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: background 0.2s;
}

.press-toggle.is-on .dot {
    background: var(--accent);
}

/* Select inputs - unified */
.filter-select,
#press-search,
#press-type,
#press-year,
#press-journal {
    padding: 0.6rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: var(--sans);
    font-size: 0.9rem;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:hover,
#press-search:hover,
#press-type:hover,
#press-year:hover,
#press-journal:hover {
    border-color: var(--primary);
}

.filter-select:focus,
#press-search:focus,
#press-type:focus,
#press-year:focus,
#press-journal:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(58, 103, 185, 0.1);
}

/* Filter containers - unified */
.press-controls,
.theses-filters,
.map-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

#press-search {
    flex: 1 1 280px;
    min-width: 200px;
}

/* ============================================
   PAGE LAYOUT
   ============================================ */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-hero {
    text-align: center;
    padding: 4rem 2rem 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.page-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
}

/* Hero variant with colored background */
.page-hero-colored {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    padding: 4rem 2rem 8rem;
    margin: -2rem -2rem 0;
    text-align: center;
}

.page-hero-colored h1 {
    color: white;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-hero-colored p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
}

.content-section {
    padding: 2rem 0;
}

/* Back link */
.back-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-dark);
}

/* ============================================
   HOMEPAGE - HERO
   ============================================ */
.hero {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 2rem 80px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.hero-content .highlight {
    color: var(--accent);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}

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

.hero-visual {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 20px;
    overflow: hidden;
}

.hero-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="white" stroke-opacity="0.1" stroke-width="1"/></pattern></defs><rect width="1000" height="1000" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* ============================================
   HOMEPAGE - SECTIONS
   ============================================ */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 2rem;
}

.section-bg {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.section-header p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Research cards (homepage) */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.research-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
    cursor: pointer;
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.research-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.research-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
}

.research-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* News cards (homepage) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.news-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.news-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.news-meta {
    padding: 1.5rem;
    background: var(--bg-light);
}

.news-date {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 700;
}

.news-card h3 {
    margin: 0.5rem 0;
    font-size: 1.15rem;
    color: var(--primary-dark);
}

.news-content {
    padding: 1.5rem;
}

.news-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.news-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== Modal enhancements ===== */

.modal-dialog{
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  animation:modalFade .25s ease;
}

@keyframes modalFade{
  from{opacity:0; transform:translateY(10px);}
  to{opacity:1; transform:translateY(0);}
}

.modal-meta{
  margin-bottom:12px;
}

.modal-date{
  font-size:.85rem;
  letter-spacing:.05em;
  text-transform:uppercase;
  opacity:.6;
  margin-bottom:6px;
}

.modal-close{
  width:36px;
  height:36px;
  border-radius:50%;
  transition:background .2s ease, transform .2s ease;
}

.modal-close:hover{
  background:rgba(0,0,0,.08);
  transform:rotate(90deg);
}

/* ===== Buttons inside modal ===== */

.modal-link,
.modal-body .btn-modal{
  display:inline-block;
  padding:10px 18px;
  border-radius:6px;
  font-weight:500;
  font-size:.9rem;
  text-decoration:none;
  transition:all .2s ease;
  cursor:pointer;
}

.modal-link{
  background:#111;
  color:#fff;
}

.modal-link:hover{
  background:#333;
  transform:translateY(-1px);
}

.modal-body .btn-modal.secondary{
  background:#f2f2f2;
  color:#111;
}

.modal-body .btn-modal.secondary:hover{
  background:#e6e6e6;
}

/* ===== Text styling ===== */

.modal-text{
  line-height:1.7;
  font-size:1rem;
  margin-top:10px;
  white-space:pre-line;
}

/* Keyword highlight inside text */
.modal-text .keyword{
  background:rgba(255,230,120,.5);
  padding:2px 6px;
  border-radius:4px;
  font-weight:500;
}

/* Optional subtle tag style if you inject categories */
.modal-text .tag{
  display:inline-block;
  background:#f2f2f2;
  padding:4px 10px;
  border-radius:20px;
  font-size:.75rem;
  margin:4px 6px 4px 0;
  letter-spacing:.03em;
}

.modal-dialog{max-height:calc(100vh - 48px); display:flex; flex-direction:column;}
.modal-body{padding:16px; overflow:auto; flex:1; min-height:0;}

.modal-text{
  white-space:pre-wrap;     /* mostra \n e va a capo */
  overflow-wrap:anywhere;   /* parole lunghe non “tagliano” */
  line-height:1.7;
}

#newsModal .modal-text{max-height:none !important;}
#newsModal .modal-body{overflow:auto !important;}

/* ============================================
   PEOPLE PAGE
   ============================================ */
.people-category {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent);
}

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

.person-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.person-photo {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-light);
}

.person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-info {
    padding: 1.5rem;
}

.person-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.person-role {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.person-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.person-links {
    display: flex;
    gap: 1rem;
    font-size: 1.3rem;
}

.person-links a {
    text-decoration: none;
    transition: transform 0.2s;
}

.person-links a:hover {
    transform: scale(1.2);
}

/* Person Profile Page */
.person-profile {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-photo {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.profile-role {
    color: var(--accent);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.profile-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.profile-links a {
    padding: 0.4rem 1rem;
    background: var(--bg-light);
    border-radius: 6px;
    text-decoration: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.profile-links a:hover {
    background: var(--primary);
    color: white;
}

.profile-bio {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

.research-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.interest-tag {
    padding: 0.3rem 0.8rem;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.course-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.course-card h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.course-card a {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Person publication cards */
.person-pub-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.person-pub-card .pub-authors {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.person-pub-card .pub-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.person-pub-card .pub-venue {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   PUBLICATIONS PAGE
   ============================================ */
.stats-container {
    margin: -80px auto 60px;
    max-width: 1400px;
    padding: 0 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.stat-item {
    text-align: center;
    padding: 1rem;
    border-right: 1px solid var(--border);
    transition: all 0.3s;
}

.stat-item:last-child {
    border-right: none;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-item .stat-number {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--mono);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-item .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Filters */
.filters-section {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
    border: 2px solid #d0e8ff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(13, 71, 161, 0.08);
}

.filters-section.simple {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filters-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filters-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-checkbox:hover {
    border-color: var(--accent);
    background: #fff8f0;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-checkbox label {
    font-weight: 500;
    cursor: pointer;
    flex: 1;
}

/* Publications List */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pub-item {
    display: flex;
    gap: 2rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.pub-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.pub-thumbnail,
.pub-thumbnail-blank {
    flex-shrink: 0;
    width: clamp(180px, 20vw, 320px);
    aspect-ratio: 3 / 4;
    height: auto;
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.pub-thumbnail img,
.pub-thumbnail-blank img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pub-content {
    flex: 1;
}

.pub-authors {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.pub-authors strong {
    color: var(--primary);
    font-weight: 600;
}

.pub-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.pub-venue {
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.pub-venue strong {
    font-weight: 600;
    font-style: normal;
    color: var(--accent);
}

.pub-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.pub-tag {
    padding: 0.3rem 0.8rem;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pub-tag.award {
    background: #fff8e1;
    color: #f57c00;
    border: 1px solid #ffcc80;
}

.pub-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.pub-link {
    padding: 0.5rem 1.25rem;
    background: var(--bg-light);
    border-radius: 6px;
    text-decoration: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.pub-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pub-link.pdf {
    background: #e3f2fd;
    color: #1565c0;
}

.pub-link.pdf:hover {
    background: #1565c0;
    color: white;
}

/* Year Section */
.year-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 3rem 0 2rem;
    padding-left: 1.5rem;
    border-left: 5px solid var(--accent);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* ============================================
   TALKS - FIXED
   ============================================ */
.talk-item {
    display: grid;
    grid-template-columns: 45% 1fr;
    gap: 0;
    padding: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    min-height: 300px;
    transition: all 0.3s;
}

.talk-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.talk-thumbnail {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.talk-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.talk-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ============================================
   EVENTS - Logo sopra, layout a 2 colonne
   ============================================ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.event-item {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}

.event-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.event-logo {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.event-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================
   RESEARCH AREAS PAGE
   ============================================ */
.research-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.research-area-card,
.research-area-card-img {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s;
    overflow: hidden;
}

.research-area-card {
    padding: 2.5rem;
}

.research-area-card:hover,
.research-area-card-img:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.area-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.research-area-card-img:hover .area-cover img {
    transform: scale(1.05);
}

.area-body {
    padding: 1.5rem;
}

.area-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.area-icon-img {
    background: white;
    border: 1px solid var(--border);
}

.area-icon-img img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.area-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.area-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.area-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    padding: 0.3rem 0.8rem;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

/* ============================================
   PROJECTS PAGE
   ============================================ */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-type-section {
    margin-bottom: 2rem;
}

.type-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
}

.projects-grid {
    display: grid;
    gap: 2rem;
}

.project-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.project-logo {
    width: 150px;
    height: 150px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.project-logo-placeholder {
    font-size: 3rem;
}

.project-content {
    flex: 1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.project-acronym {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-left: 1rem;
}

.project-status {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-status.active,
.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.project-status.completed,
.status-completed {
    background: #e3f2fd;
    color: #1565c0;
}

.project-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.meta-item strong {
    color: var(--text-primary);
}

.meta-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.project-coordinator {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    padding: 0.5rem 1.25rem;
    background: var(--bg-light);
    border-radius: 6px;
    text-decoration: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.project-link:hover {
    background: var(--primary);
    color: white;
}

/* ============================================
   COLLABORATIONS PAGE
   ============================================ */
#map-container {
    height: 600px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#collaborations-map,
#collab-map {
    height: 100%;
    width: 100%;
}

/* Leaflet map fix */
.leaflet-container {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
}

.leaflet-tile-pane {
    opacity: 1 !important;
}

/* Custom Leaflet Popup */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 280px;
}

.collaboration-popup {
    padding: 1.25rem;
}

.popup-header {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.popup-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.popup-contact {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.popup-area {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.popup-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.popup-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.popup-link:hover {
    background: var(--primary-dark);
}

/* Collab Stats */
.collab-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--mono);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* List View */
.collaborations-list {
    display: none;
}

.collaborations-list.active {
    display: block;
}

.collab-category {
    margin-bottom: 3rem;
}

.collab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.collab-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
}

.collab-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.collab-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.collab-card-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
}

.collab-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.collab-flag {
    font-size: 1.1rem;
    margin-right: 0.2rem;
}

.collab-card h3 {
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.collab-card .location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.collab-card .contact {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.collab-card .area-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.collab-card .description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.6;
}

/* ============================================
   TOOLS & CONSULTANCIES
   ============================================ */
.tools-grid,
.consultancies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.tool-card,
.consultancy-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.tool-card:hover,
.consultancy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.consultancy-card {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-logo,
.consultancy-logo,
.consultancy-logo-lg {
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tool-logo {
    width: 48px;
    height: 48px;
}

.consultancy-logo {
    width: 80px;
    height: 80px;
}

.consultancy-logo-lg {
    width: 110px;
    height: 110px;
    background: white;
    border: 1px solid var(--border);
}

.tool-logo img,
.consultancy-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.consultancy-logo-lg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.6rem;
}

.tool-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.tool-type {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.tool-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
}

.tool-status.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.consultancy-info {
    flex: 1;
}

.consultancy-info h3 {
    font-size: 1.05rem;
    color: var(--primary-dark);
    margin-bottom: 0.4rem;
}

.consultancy-info p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ============================================
   WORKSHOPS & PRESS
   ============================================ */
.workshops-grid {
    display: grid;
    gap: 1.25rem;
}

.workshop-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    transition: all 0.3s;
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1.25rem;
    align-items: center;
}

.workshop-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.workshop-date-badge {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    text-align: center;
    min-width: 65px;
}

.workshop-date-badge .year {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.workshop-date-badge .type {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.workshop-info h3 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.workshop-event {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.2rem;
}

.workshop-meta {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

/* ============================================
   PRESS REVIEW - FIXED
   ============================================ */
.press-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
}

.press-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.press-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.press-card-image-box {
    width: 100%;
    height: 200px;
    background: var(--bg-light);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.press-card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.press-card-body {
    padding: 1.5rem;
}

.press-card-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.press-card h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.press-card-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.press-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #dc3545;
    color: white;
    border: 2px solid #dc3545;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.press-pdf-btn:hover {
    background: #b02a37;
    border-color: #b02a37;
    transform: translateY(-2px);
}

.press-pdf-btn svg {
    flex-shrink: 0;
}
/* ============================================
   TEACHING PAGE
   ============================================ */
.teaching-section {
    margin-bottom: 2rem;
}

.theses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.thesis-intro {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.thesis-intro p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.thesis-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s;
}

.thesis-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.thesis-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.thesis-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.thesis-types {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.thesis-type {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.thesis-type.research {
    background: rgba(13, 71, 161, 0.1);
    color: var(--primary);
}

.thesis-type.industrial {
    background: rgba(255, 111, 0, 0.1);
    color: var(--accent);
}

.thesis-abstract {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.read-more {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    margin-left: 0.5rem;
}

.read-more:hover {
    text-decoration: underline;
}

.thesis-footer {
    display: flex;
    gap: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.thesis-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.thesis-info svg {
    color: var(--primary);
}

.course-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
}

.course-instructor {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.course-instructor:hover {
    text-decoration: underline;
}

.course-link-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    align-self: flex-start;
    margin-top: 0.25rem;
}

.course-link-btn:hover {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 103, 185, 0.3);
}

/* Force per anchor tag */
a.course-link-btn {
    color: white;
}

a.course-link-btn:hover {
    color: white;
}


/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 4rem 2rem 2rem;
    margin-top: 80px;
}

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

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-address {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
}

/* Social icons */
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
}

.social-link:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* Profile contact icons */
.profile-contact-icons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.profile-contact-icons a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-decoration: none;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s;
}

.profile-contact-icons a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.profile-contact-icons svg {
    flex-shrink: 0;
}

/* Misc */
.bio-short {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 1rem;
}

.bio-toggle {
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    background: none;
    padding: 0;
    margin-top: 0.3rem;
    display: inline-block;
}

.bio-toggle:hover {
    text-decoration: underline;
}

.person-note {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.2rem;
    font-style: italic;
}

.keyword-box {
    margin: 0.6rem 0;
}

.keyword-label {
    display: inline-block;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.keyword-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.keyword-chip {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 0.85rem;
}

.person-card-link {
    text-decoration: none;
    color: inherit;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-category {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.news-text-full {
    white-space: pre-line;
    line-height: 1.7;
}

.news-link-ext {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.news-link-ext:hover {
    text-decoration: underline;
}

.logo-img {
    height: 40px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.news-section-full {
    background: var(--bg-light);
    padding: 4rem 0;
    width: 100%;
}

.news-section-full .section-header,
.news-section-full .news-grid,
.news-section-full #load-more-wrap {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

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

.research-card, .news-card,
.person-card, .publication-item,
.research-area-card, .project-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.research-card:nth-child(1) { animation-delay: 0.1s; }
.research-card:nth-child(2) { animation-delay: 0.2s; }
.research-card:nth-child(3) { animation-delay: 0.3s; }
.research-card:nth-child(4) { animation-delay: 0.4s; }

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3) { animation-delay: 0.3s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        text-align: left;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu .nav-item {
        width: 100%;
        text-align: left;
    }

    .nav-menu .nav-link {
        display: block;
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: left;
    }

    .nav-menu .dropdown-menu {
        display: none;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--bg-light);
        padding: 0;
        margin: 0;
        border-radius: 0;
        max-height: none;
        overflow: visible;
    }

    .nav-item.expanded > .dropdown-menu {
        display: block;
    }

    .nav-item:has(.dropdown-menu) > .nav-link::after {
        content: " ▾";
        margin-left: 0.5rem;
        font-size: 0.8rem;
    }

    .nav-item.expanded:has(.dropdown-menu) > .nav-link::after {
        content: " ▴";
    }

    .nav-menu .dropdown-menu a {
        padding: 0.6rem 1rem;
        display: block;
    }

    .hamburger {
        display: flex;
    }

    .lang-switch {
        text-align: left;
        margin: 0.5rem 1rem;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 60px 2rem 40px;
    }

    .hero-visual {
        height: 300px;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .people-grid,
    .research-areas-grid {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-logo {
        width: 100%;
        height: 200px;
    }

    .pub-item {
        flex-direction: column;
    }

    .pub-thumbnail,
    .pub-thumbnail-blank {
        width: 100%;
        height: 200px;
    }

    .talk-item {
        flex-direction: column;
        min-height: auto;
    }
    
    .talk-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .workshop-card {
        grid-template-columns: 1fr;
    }

    .consultancy-card {
        flex-direction: column;
        text-align: center;
    }

    .filters-section,
    .press-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select,
    #press-type,
    #press-year,
    #press-journal {
        width: 100%;
    }
    
    .theses-filters {
        justify-content: flex-start;
    }

    .courses-grid,
    .theses-grid {
        grid-template-columns: 1fr;
    }
    
    .thesis-header {
        flex-direction: column;
    }
    
    .thesis-types {
        flex-direction: row;
    }
}