:root {
    /* Updated Color Palette */
    --black: #2c3e50; /* Darker, softer black for better readability */
    --lightgrey: #ecf0f1; /* Very light background for contrast */
    --midgrey: #bdc3c7; /* Subtle divider/border color */
    --green1: #1A5319; /* Primary Accent (Header, Titles) */
    --green2: #38761d; /* Secondary Accent (Links, Bold Text) - slightly brighter */
    --shadow-color: rgba(0, 0, 0, 0.08); /* Subtle shadow for depth */
}



/* Base Styles & Typography */
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--lightgrey); 
    line-height: 1.6;
    color: var(--black);
}

html,
p {
    margin: 0;
    padding: 0;
    border: 0;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    letter-spacing: 0.2px; /* Slightly tighter for better look */
    color: var(--black);
}

p {
    margin: 0.5em 0;
}

h1 {
    font-weight: 500;
    color: var(--green1);
    font-size: 1.8em;
    /* padding-top: 20px; */
}

b {
    font-weight: 500;
}

a {
  font-weight: 400;
  text-decoration: none; /* Removed default underline */
  /* text-underline-offset: 4px; */
  color: var(--green2);
  /* text-decoration-color: var(--midgrey); */
  border-bottom: 1px dashed var(--midgrey); /* Subtle dashed underline */
  transition: all 0.2s ease-in-out;
}

a:hover {
  font-weight: 500;
  color: var(--green1);
  border-bottom: 1px solid var(--green1); /* Solid underline on hover */
}


/* Layout */
/* .container {
  width: 900px; 
  margin: 0px auto;
  padding: 20px 0;
} */
/* Layout */
.container {
  /* CHANGE: Use max-width so the container can shrink below 900px */
  max-width: 900px; 
  /* ADD: Use a flexible width for small screens */
  width: 95%; 
  margin: 0px auto;
  padding: 20px 0;
}

.content {
  background-color: #ffffff; /* White background for the main content area */
  padding: 30px;
  box-shadow: 0 4px 10px var(--shadow-color); /* Soft shadow for a "paper" look */
  border-radius: 8px; /* Rounded corners */
}

/* Profile Section */

#profile {
    padding: 0;
    /* margin-bottom: 30px; */
    display: grid;
    grid-template-columns: 250px 1fr; 
    /* gap: 30px; */
}

#profile-left {
  text-align: center;
  justify-content: center;
}

#profile-right {
  /* Bio content */
  padding-top: 5px;
  padding-left: 30px;
}

#profile-right p {
  font-size: 0.95em;
}

#profile-pic img {
    width: 230px; 
    height: auto;
    margin-bottom: 15px;
    border-radius: 10%; 
    box-shadow:
      0 6px 12px var(--shadow-color),
      0 0 8px var(--shadow-color) !important;
    margin-top: 0px;
    margin-left: 10px;
    /* border: 3px solid var(--green1);  */
}

#profile-name {
    font-size: 2.5em; /* Larger name */
    line-height: 1.2;
    font-weight: 700; /* Bolder name */
    margin-bottom: 10px;
    color: var(--green1);
}

.email-address {
    font-size: 0.9em; 
    color: var(--green2);
    font-weight: 400;
    margin-right: 10px;
}

.box {
  text-align: justify;
  hyphens: auto;
  /* font-size: 1.05em;  */
}

/* TLDR Button */
.tldr-btn {
  padding: 3px 10px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.75em;
  font-weight: 400;
  color: var(--green2);
  background-color: transparent;
  border: 1px solid var(--green2);
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  transition: all 0.2s ease-in-out;
  min-width: 50px;
  text-align: center;
  line-height: 1.4;
  box-sizing: border-box;
  height: auto;
  margin: 0;
  vertical-align: middle;
}

.tldr-btn:hover {
  background-color: var(--green2);
  color: #ffffff;
  font-weight: 500;
}

.tags-tldr-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75em;
    font-weight: 400;
    font-family: 'Roboto', sans-serif;
    color: var(--green2);
    background-color: transparent;
    border: 1px solid var(--green2);
    border-radius: 4px;
    padding: 3px 10px;
    display: inline-block;
    text-align: center;
    line-height: 1.4;
    box-sizing: border-box;
    height: auto;
    margin: 0;
    vertical-align: middle;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.tag:hover {
    background-color: var(--green2);
    color: #ffffff;
    font-weight: 500;
}

.tag.active {
    background-color: var(--green2);
    color: #ffffff;
    font-weight: 500;
}

.research-content {
  margin-top: 5px;
}

.tldr-content {
  margin-top: 5px;
  padding-left: 15px;
  border-left: 3px solid var(--green2);
  /* font-style: italic; */
  color: var(--black);
  line-height: 1.6;
}

/* Social Icons */
.social-icons {
  display: flex;
  /* justify-content: center; */
  /* align-items: center; */
  /* padding-bottom: 10px; */
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  /* padding-left: 8px; */
  border: none;
  border-radius: 50%;
  margin-right: 10px;
  transition: background-color 0.2s;
}

.social-icons a:hover {
  border: none;
  background-color: var(--lightgrey);
}

.social-icons a svg {
  height: 20px;
  width: 20px;
  stroke: var(--green1);
  fill: none;
  transition: stroke 0.2s, fill 0.2s;
}

.social-icons a:hover svg {
  stroke: var(--green2);
  fill: var(--green2); 
}

/* Separator */
.divider {
    width: 80px; /* Shorter, centered divider */
    border-top: 2px solid var(--green2);
    margin: -15px 0 10px 0;
}


/* Research Cards */
#research {
  margin-top: 20px;
  padding: 0 20px;
}

#misc {
  margin-top: 20px;
  padding: 0 20px;
}

.research-card {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 8px;
    /* border: 1px solid var(--midgrey); */
    /* box-shadow: 0 2px 5px var(--shadow-color);  */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.research-card:hover {
  box-shadow: 0 6px 15px var(--shadow-color); 
  transform: translateY(-2px);
}

.research-thumb {
    flex-shrink: 0;

    box-shadow:
      0 6px 12px var(--shadow-color),
      0 0 8px var(--shadow-color) !important;

    max-width: 230px !important; /* Slightly smaller media */
    /* width: 100%; */
    border-radius: 10px !important;
}

.research-card-center {
  flex-grow: 1;
  margin-left: 30px;
}

.research-proj-title {
    color: var(--green1);
    font-weight: 500;
    /* font-size: 1.2em; */
    margin-bottom: 5px;
}

.authors a {
  color: var(--black);
  border-bottom: 1px dotted var(--midgrey);
  font-weight: 300;
}

.authors a:hover {
  color: var(--green1);
  border-bottom: 1px solid var(--green1);
}

.research-card-center b {
  font-weight: 500;
  color: var(--green1); /* Highlight venue/year */
  margin-right: 5px;
}

.venue-links a {
  font-weight: 400;
  /* font-size: 0.9em; */
  border-bottom: 1px dashed var(--green2);
}

.venue-links a:hover {
  border-bottom: 1px solid var(--green1);
}

/* Misc List */

.misc-list {
  padding: 0 20px;
}

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

ul li {
  background-image: url('images/leaf.png'); 
  background-size: 16px 16px; 
  background-repeat: no-repeat;
  background-position: 0 4px;
  padding-left: 25px; 
  margin-bottom: 5px; /* Added margin between list items */
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px 0 0 0;
  color: var(--black);
  font-size: 0.8em;
  opacity: 0.7;
}

.footer img {
  height: 14px;
  width: 14px;
  vertical-align: middle;
}

.footer a {
  color: var(--black);
  border-bottom: 1px dashed var(--midgrey);
}

.footer a:hover {
  color: var(--green1);
  border-bottom: 1px solid var(--green1);
}

/* Media Queries for Mobile/Tablet */
@media (max-width: 768px) {
  .container {
    width: 95%; 
    padding: 15px 0;
  }
  
  .content {
    padding: 20px;
  }
 
  /* Profile Section Stack */
  #profile {
    grid-template-columns: 1fr; 
    /* gap: 20px; */
    text-align: center;
  }

  #profile-pic img {
    width: 50%; 
  }
  
  #profile-left {
    padding-top: 0;
    text-align: center;
  }
  
  #profile-name {
    text-align: center;
  }

  #profile-right {
    padding-top: 0;
    padding-left: 10%; 
    padding-right: 10%;
  }

  .box {
    text-align: left; /* Keep bio text left-aligned for readability */
  }

  /* Social Icons Centering */
  .icons {
    text-align: center;
  }
  
  .social-icons {
    justify-content: center;
    margin-bottom: 10px;
  }
  
  .email-address {
    text-align: center;
  }

  /* Experience and Research Card Stacking */
  .experience-list {
    flex-direction: column; 
    gap: 10px;
  }

  .research-card {
    flex-direction: column;
    align-items: center;
    text-align: left;
    padding: 15px 10px;
    box-shadow: 0 4px 6px -2px var(--shadow-color);
  }

  .research-thumb {
    margin-right: 0;
    margin-bottom: 15px;
    max-width: 65% !important; /* Allow image to take full card width */
  }

  .research-card-center {
    margin-top: 10px;
    width: 90%;
  }
  
  #research, #experience, #misc {
    padding: 0 10px;
  }

  #research h1, #experience h1, #misc h1 {
    font-size: 1.5em;
    text-align: center;
  }

  .divider {
    margin: 15px auto 25px auto;
  }

  .tldr-btn {
    font-size: 0.8em;
    padding: 5px 12px;
  }
}
