:root {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #212121;
    --text-secondary: #424242;
    --accent-primary: #1976d2;
    --accent-secondary: #1565c0;
    --header-bg: #212121;
    --footer-bg: #212121;
    --nav-bg: #424242;
    --border-color: #e0e0e0;
    --shadow: rgba(0,0,0,0.08);
}

[data-theme="dark"] {
    --bg-primary: #1e1e20;
    --bg-secondary: #252528;
    --text-primary: #d4d4d8;
    --text-secondary: #a1a1aa;
    --accent-primary: #7c9cbf;
    --accent-secondary: #94aec9;
    --header-bg: #18181b;
    --footer-bg: #18181b;
    --nav-bg: #27272a;
    --border-color: #3f3f46;
    --shadow: rgba(0,0,0,0.4);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 18px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
header {
    background: var(--header-bg);
    color: white;
    padding: 0 !important;
    text-align: center;
    height: auto;
    min-height: auto;
    font-size: 0.8rem;
    line-height: 1;
    transition: background-color 0.3s ease;
}
nav {
    background: var(--nav-bg);
    padding: 0 !important;
    height: auto;
    min-height: auto;
    font-size: 1rem;
    line-height: 1;
    transition: background-color 0.3s ease;
    position: relative;
}
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
nav li {
    margin: 0 1rem;
}
nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}
/* Desktop/default */
nav a:hover {
    background-color: var(--accent-primary);
}

nav a.active {
    background-color: var(--accent-primary);
}

/* Wrap nav content */
.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center; /* center the buttons */
}

.site-name {
  position: absolute;
  left: 0;
  font-weight: 500;       /* bold */
  font-size: 1.1rem;
  color: white;
}

.site-name a {
  color: inherit;
  text-decoration: none;
}

/* Hamburger button: hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  margin-right: 1rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  margin: 3px 0;
  border-radius: 1px;
}

main {
    background: var(--bg-secondary);
    padding: 0.25rem;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.about-content {
    display: flex;
    gap:4rem;
    align-items: flex-start;
}
.about-text {
    flex: 2;
}
.about-sidebar {
    flex: 1;
    min-width: 350px;
    order: -1;
}
.profile-panel {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px var(--shadow);
    text-align: center;
}
.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    margin: 0 auto 0.75rem auto;
    box-shadow: 0 6px 20px var(--shadow);
    object-fit: cover;
    object-position: center center;
    border: 4px solid var(--bg-secondary);
    display: block;
}
.profile-name {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.profile-affiliation {
    color: var(--accent-primary);
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}
.info-block {
    margin-bottom: 0.75rem;
}
.info-block h3 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.2rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.35rem;
    color: var(--text-secondary);
    padding: 0.2rem 0;
}
.contact-item i {
    margin-right: 0.75rem;
    width: 24px;
    color: var(--accent-primary);
    font-size: 1.4rem;
    text-align: center;
    display: inline-block;
}
.contact-item a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s;
}
.contact-item a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}
h1 {
    color: var(--text-primary);
    font-weight: 300;
    margin-bottom: 1rem;
    font-size: 2rem;
}
h2 {
    color: var(--text-primary);
    font-weight: 300;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}
h2:first-child {
    margin-top: 0;
}
p {
    color: var(--text-secondary);
    font-weight: 300;
    text-align: justify;
    margin-bottom: 1rem;
}
p a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s;
}
p a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}
.theme-dropdown {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
}
.theme-toggle {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 4px;
}
.theme-toggle:hover {
    background: var(--accent-primary);
}
.theme-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 120px;
    display: none;
    overflow: hidden;
    margin-top: 0.25rem;
}
.theme-menu.show {
    display: block;
}
.theme-option {
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    text-align: left;
}
.theme-option:hover {
    background: var(--bg-primary);
}
.theme-option.active {
    background: var(--accent-primary);
    color: white;
}
footer {
    background: var(--footer-bg);
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
    transition: background-color 0.3s ease;
}
footer p { color: white; margin: 0; }

/* ===== Research page: section cards ===== */

body.research main {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.research-page {
    padding: 1.75rem 0 2.5rem;
}

.section-card {
    background: var(--bg-secondary);
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px var(--shadow);
    padding: 1.75rem 2rem;
    margin: 0 auto 1.75rem auto;
}

.section-title {
    font-weight: 300;
    font-size: 1.9rem;
    margin: 0;
    color: var(--text-primary);
}

.section-underline {
    width: 130px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    margin: 0.35rem 0 1.2rem;
}

/* Publication block */

.pub-entry {
    margin-bottom: 0.5rem;
}

.pub-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
    color: var(--text-primary);
}

.pub-authors {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.15rem;
}

.pub-venue {
    font-size: 0.95rem;
    color: var(--accent-primary);
    font-weight: 500;
}

/* Buttons / labels */

.pub-links {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;  /* wrapping is ok on narrow screens */
    align-items: center;
    gap: 0.7rem;
    font-size: 0.9rem;
}

.pub-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.23rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-primary);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    font: inherit; /* so buttons & links look the same */
}

/* Base size for all icons in the pills */
.pub-label i {
    font-size: 0.75rem;
    line-height: 1;
}

/* Abstract icon (file) */
.pub-label .fa-file-alt {
    font-size: 0.75rem;
}

/* Journal version icon (link): make it slightly smaller so it looks the same size */
.pub-label .fa-link {
    font-size: 0.65rem;
    transform: translateY(1px); /* tiny vertical adjust so it sits nicely */
}

.pub-label:hover {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
}

/* Abstract box: HIDDEN by default */

.pub-abstract {
    display: none;              /* <== IMPORTANT */
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: justify;
}

.pub-abstract.show {
    display: block;
}

.section-note {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

@media (max-width: 1024px) {
    .about-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    .about-sidebar {
        min-width: auto;
        order: 0;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}
@media (max-width: 768px) {
  body {
    font-size: 16.5px;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }

  .profile-panel {
    padding: 1rem;
  }

  .profile-image {
    width: 240px;
    height: 240px;
    margin-bottom: 0.75rem;
  }

  /* --- NAV: hamburger menu --- */

  nav {
    position: relative; /* for absolute dropdown positioning */
  }

  .nav-inner {
    justify-content: flex-start;
    gap: 0.03rem;  
  }
    
  /* Show hamburger button on mobile */
  .nav-toggle {
    display: block;
    margin-right: 0.25rm;
  }

        .site-name {
    position: static;        /* cancel absolute positioning */
    margin-left: 0.5rem;
    font-weight: 500;
  }


  /* Base nav links (dropdown) – hidden by default */
  nav .nav-links {
    display: none;
    position: absolute;
    top: 100%;              /* DROP BELOW the grey bar */
    left: 0;
    right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 1rem 0.75rem;
    margin: 0;
    z-index: 999;
  }

  /* When nav is open, show the dropdown */
  nav.nav-open .nav-links {
    display: flex;
  }

  nav .nav-links li {
    margin: 0.25rem 0;
  }

  /* ✅ Remove blue background in the hamburger menu */
  nav .nav-links a,
  nav .nav-links a:hover,
  nav .nav-links a:active,
  nav .nav-links a.active {
    background-color: transparent;
  }

  /* ✅ Remove tap highlight glow on mobile safari/chrome */
  nav .nav-links a {
    -webkit-tap-highlight-color: transparent;
  }

  /* Keep the gear icon on the right on mobile */
  .theme-dropdown {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
  }
}



/* Hide the top black bar (header) only on About page */
header { display: none !important; }

/* Completely remove the top black bar (header) on all pages */
header {
  display: none !important;
  height: 0;
  padding: 0;
  margin: 0;
}

