:root {
    --max: 900px;
}

/* Base styles */
body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    line-height: 1.5;
    margin: 0;
    color: #111;
    overflow-x: hidden; /* Prevent horizontal scroll when menu opens */
}

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.site-header {
    background: #f5f5f5;
    padding: .5rem 0;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1rem;
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

h1 a {
    text-decoration: none;
    color: inherit;
}

/* Navigation */
.site-header nav {
    display: flex;
    gap: 1rem;
}

.site-header nav a {
    text-decoration: none;
    color: #333;
}

/* Hero / buttons */
.hero {
    padding: 1rem 0 2rem 0;
    padding-left: 10px;
}

.btn {
    display: inline-block;
    padding: .5rem 1rem;
    border: 1px solid #222;
    text-decoration: none;
}

/* Footer */
.site-footer {
    background: #fafafa;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    margin-top: 2rem;
    text-align: center;
}

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

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #555;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.linkedin:hover {
    background-color: #0077b5;
    color: white;
}

.github:hover {
    background-color: #333;
    color: white;
}

.researchgate:hover {
    background-color: #00ccbb;
    color: white;
}

.copyright {
    font-size: 0.9rem;
    color: #666;
}

/* Sections */
section {
    margin: 10px 0;
    padding: 0px 10px 0px 10px;
}

section h3 {
    font-size: 1.6em;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

section h4 {
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
}

/* Publications */
.publications ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.publications li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.publications a {
    color: #007acc;
    text-decoration: none;
}

.publications a:hover {
    text-decoration: underline;
}

/* ---------- Hamburger & responsive nav ---------- */
/* hide on desktop by default */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    z-index: 101;
}

/* three bars */
.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 2px;
    transition: transform .28s ease, opacity .2s ease;
}

/* ----- mobile behaviour ----- */
@media (max-width: 768px) {
    /* Mobile header layout */
    .header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 0;
    }

    /* Hamburger button and site title inline */
    .mobile-header-group {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
    }

    /* show hamburger on mobile (left) */
    .menu-toggle {
        display: flex;
        order: 0;
    }

    .site-title {
        order: 1;
        margin: 0;
    }

    /* Hide nav links by default on mobile */
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: #f5f5f5;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        padding: 80px 20px 20px;
        transition: left 0.3s ease;
        z-index: 99;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    /* Show nav when active */
    .nav-links.active {
        left: 0;
    }

    /* Overlay when menu is open */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 98;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        display: block;
        padding: 12px 0;
        text-decoration: none;
        color: #333;
        font-size: 1.1rem;
        border-bottom: 1px solid #e5e5e5;
    }

    /* Adjust profile image size on mobile */
    .profile-img {
        width: 32px;
        height: 32px;
    }
}

/* ----- hamburger animation to "X" ----- */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* Desktop styles */
@media (min-width: 769px) {
    .nav-overlay {
        display: none;
    }
}

/* About page specific styles */
.about-content {
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.about-intro {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.interests-section {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.interests-section h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.4rem;
}

.interests-list {
    list-style-type: none;
    padding-left: 0;
}

.interests-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.interests-list li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #007acc;
}

.collaboration {
    background: #f0f7ff;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #007acc;
    margin: 2rem 0;
}

.hobbies {
    font-style: italic;
    color: #555;
    margin-top: 1.5rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .about-content {
        padding: 1.5rem 1rem;
    }
}

/* Contact page specific styles */
.contact-content {
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.contact-content h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.contact-info {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.contact-email {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.contact-email a {
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
}

.contact-email a:hover {
    text-decoration: underline;
}

.contact-note {
    font-style: italic;
    color: #555;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .contact-content {
        padding: 1.5rem 1rem;
    }
    
    .contact-info {
        padding: 1.5rem;
    }
}


/* =========================================
   THEME TOGGLE (Moon/Sun)
========================================= */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  padding: 0.8rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: #111;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, transform 0.3s ease, color 0.3s ease;
  z-index: 999;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* =========================================
   DARK THEME VARIABLES
========================================= */
:root {
  --max: 900px;
  --accent: #0077ff;
}

/* Dark Mode */
body.dark-theme {
  --header-bg: #1e1e1e;
  --body-bg: #121212;
  --footer-bg: #1e1e1e;
  --text-color: #f1f1f1;
  --card-bg: #1f1f1f;
  --border-color: #333;
}

body.dark-theme {
  background: var(--body-bg);
  color: var(--text-color);
}

body.dark-theme .site-header {
  background: var(--header-bg);
  border-bottom-color: var(--border-color);
}

body.dark-theme .site-footer {
  background: var(--footer-bg);
  border-top-color: var(--border-color);
}

body.dark-theme .quote-section {
  background: #2a2a2a;
  color: var(--text-color);
}

body.dark-theme .quote-date {
  color: #ccc;
}

body.dark-theme #quote-text {
  color: #f1f1f1;
}

body.dark-theme #quote-author {
  color: #aaa;
}

body.dark-theme .theme-toggle {
  background: var(--header-bg);
  color: var(--text-color);
}

body.dark-theme .publications a {
  color: #4da6ff;
}

body.dark-theme section h3,
body.dark-theme section h4 {
  color: var(--text-color);
  border-bottom-color: #333;
}

body.dark-theme .publications li {
  color: var(--text-color);
}

/* MOBILE NAVIGATION DARK THEME */
body.dark-theme .nav-links {
  background: var(--header-bg);
  border-right: 1px solid var(--border-color);
}

body.dark-theme .nav-links a {
  color: var(--text-color);
  border-bottom-color: var(--border-color);
}

body.dark-theme .menu-toggle span {
  background: var(--text-color);
}

body.dark-theme .nav-overlay {
  background: rgba(0, 0, 0, 0.7);
}

/* Smooth transitions */
body {
  transition: background-color 0.4s ease, color 0.4s ease;
}

.site-header,
.site-footer,
.quote-section,
.nav-links,
.menu-toggle span {
  transition: background-color 0.4s ease, 
              color 0.4s ease, 
              border-color 0.4s ease,
              background 0.4s ease;
}

/* ABOUT PAGE DARK THEME */
body.dark-theme .about-content h2 {
  color: var(--text-color);
  border-bottom-color: var(--border-color);
}

body.dark-theme .about-intro {
  color: var(--text-color);
}

body.dark-theme .interests-section {
  background: #2a2a2a;
  color: var(--text-color);
}

body.dark-theme .interests-section h3 {
  color: var(--text-color);
}

body.dark-theme .interests-list li:before {
  color: #4da6ff;
}

body.dark-theme .collaboration {
  background: #1a2a3a;
  border-left-color: #4da6ff;
  color: var(--text-color);
}

body.dark-theme .hobbies {
  color: #ccc;
}

/* CONTACT PAGE DARK THEME */
body.dark-theme .contact-content h2 {
  color: var(--text-color);
  border-bottom-color: var(--border-color);
}

body.dark-theme .contact-info {
  background: #2a2a2a;
  color: var(--text-color);
}

body.dark-theme .contact-email a {
  color: #4da6ff;
}

body.dark-theme .contact-note {
  color: #ccc;
  border-top-color: var(--border-color);
}