@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:100,300,400,500,700|Material+Icons&display=swap');

/* ===== CSS Variables for Light and Dark Themes ===== */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --nav-bg: #f5f5f5;
    --nav-text: #333333;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --card-bg: #f8f9fa;
    --border-color: #e0e0e0;
    /*--footer-bg: #34495e;*/
    --footer-bg: rgb(28, 28, 28);
    --footer-color: white;
    --shadow: rgba(0, 0, 0, 0.1);
    
    --link-color: #0076df;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --nav-bg: #0d1117;
    --nav-text: #e0e0e0;
    --accent-color: #58a6ff;
    --accent-hover: #4493e6;
    --card-bg: #21262d;
    --border-color: #30363d;
    --footer-bg: #0d1117;
    --footer-color: white;
    --shadow: rgba(0, 0, 0, 0.3);
    
    /*--link-color: #58a6ff;*/
    --link-color: #4493e6;
}


/* My styles */
/*body, p {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300;
  font-stretch: 100%;
  font-display: swap;
}*/

body {
    background-color: var(--bg-color);
}

body, p, content, bibliography {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-stretch: 100%;
    font-display: swap;
    font-size: 16px;
    line-height: 1.6;
    /*background-color: var(--bg-color);*/
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}


h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
}

a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 400;

    &:hover {
     text-decoration: underline; 
    }
}


/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ===== Navigation Bar ===== */
.navbar {
    background-color: var(--nav-bg);
    padding: 0.7rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    font-weight: 400;
    /*box-shadow: 0 2px 5px var(--shadow);*/
     border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: normal;
    color: var(--nav-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Wrapper to keep menu and toggle together on the right */
.nav-container > ul {
    margin-left: auto;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--nav-text);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin-left: 2rem;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sun-icon,
.moon-icon {
    transition: opacity 0.3s ease;
}

[data-theme="light"] .sun-icon {
    display: block;
}

[data-theme="light"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu li a {
    color: var(--nav-text);
    text-decoration: none;
    /*font-weight: 500;*/
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--accent-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--nav-text);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ===== Main Content ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.content {
    margin-top: 2rem;
}

h2 {
    color: var(--text-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content p {
    margin-bottom: 0rem;
    line-height: 1.6;
}


ul.no-bullet {
  list-style-type: none;
  padding-left: 0;
  padding-left: 0em;     /* space for numbers */
  margin: 1em 0;
  font-size: 1rem;
  line-height: 1.5;
}

ul li {
  margin-bottom: 0.5em;    /* spacing between items */
}


ol {
  padding-left: 1.5em;     /* space for numbers */
  margin: 1em 0;
  font-size: 1rem;
  line-height: 1.5;
}

ol li {
  margin-bottom: 0.5em;    /* spacing between items */
}


.content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content li {
    margin-bottom: 0.5rem;
}

/* Project and Publication Cards */
.project-card,
.publication-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/*.project-card:hover,
.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow);
}*/

.project-card h2,
.publication-card h2 {
    color: var(--text-color);
    margin-top: 0rem;
    margin-bottom: 0.5rem;
}


.project-meta,
.publication-meta {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.authors {
    font-style: italic;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
    margin-right: 0.15rem;
}

.btn:hover {
    background-color: var(--accent-hover);
}

/* ===== Footer ===== */
footer {
    background-color: var(--footer-bg);
    text-align: center;
    padding: 0.7em;
    margin-top: 6.45rem;
}

footer p {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 0.80rem;
    font-style: normal;
    font-weight: 300;
    font-stretch: 100%;
    font-display: swap;
    line-height: 1.2;
    color: var(--footer-color);
}

/* ===== About Page Specific Styles ===== */
.about-content {
    /*max-width: 900px;*/
}

.contact-info {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.0rem;
    margin-bottom: 2rem;
}

.contact-info h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.about-section {
    position: relative;
}

.profile-image {
    width: 230px;
    height: 272px;
    /*object-fit: cover;*/
    object-fit: contain;
    border-radius: 8px;
    float: left;
    margin: 0 2rem 1rem 0;
    /*box-shadow: 0 4px 8px var(--shadow);*/
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    shape-outside: margin-box;
}

/*
.profile-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow);
}*/

.about-text {
    /* Removed overflow: hidden to allow text to flow fully after image */
}

.about-text h2 {
    color: var(--text-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    clear: none;
}

.about-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
    text-align: justify;
}

.about-text p:first-child {
    margin-top: 0;
}

/* ===== Responsive Design ===== */
@media screen and (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }
    
    .hamburger {
        display: flex;
    }
    
    .theme-toggle {
        margin-left: auto;
        margin-right: 1rem;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        text-align: center;
        background-color: var(--nav-bg);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem 0;
        gap: 0;
        box-shadow: 0 5px 10px var(--shadow);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
    }
    
    .nav-menu li a {
        display: block;
        padding: 1rem;
        width: 100%;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    /* About page responsive */
    .profile-image {
        float: none;
        display: block;
        margin: 0 auto 1.5rem auto;
        width: 250px;
        height: 250px;
    }
    
    .about-text p {
        text-align: left;
    }
}

@media screen and (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .project-card,
    .publication-card {
        padding: 1.5rem;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
    }
    
    .contact-info {
        padding: 1rem;
    }
}


/****** Showcase Grid ***/

.showcase-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  padding: 2rem 0;
  justify-content: center;
  
  @media (max-width: 800px) {
    grid-template-columns: repeat(4, 1fr);
  }

  @media (max-width: 600px) {
    grid-template-columns: repeat(3, 1fr);
  }

  @media (max-width: 400px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media (max-width: 200px) {
    grid-template-columns: 1fr;
  }
}

.showcase-item {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;

  &:hover {
    .showcase-overlay {
      opacity: 1;
    }
  }
}

.showcase-image {
  width: 100%;
  padding-bottom: 140%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
  position: relative;
}

.showcase-item:hover .showcase-image {
  transform: scale(1.02);
}

.showcase-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
  z-index: 5;
}

.showcase-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
  z-index: 10;
}

.showcase-title {
  margin: 0;
  font-size: 1rem;
  color: white;
}

.showcase-description {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: white;
  text-align: center;
}

.kw {
  color: var(--link-color);
  background: rgba(251, 242, 251);
  padding: 2px 4px;
  border-radius: 4px;
}
