/* Base Styles */
body {
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
  font-size: 16px;
  text-align: justify;
  background-color: #070b0a;
  color: #ccc;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  margin-top: 0px !important;
}

body.light-mode {
  background-color: #f0f0f0;
  color: #222;
}

.link-arrow {
  margin-left: 2px;
  margin-bottom: 5px;
  display: inline;
  vertical-align: middle;
}

a:not(.social-link a) {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(to right, #40e07d 100%, #40e07d 0);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 2px;
  transition: color 0.1s, background-size 0.1s;
  padding: 2px 0;
}

a:not(.social-link a):hover {
  color: #fff;
  background-size: 100% 100%;
}

body.light-mode a:not(.social-link a) {
  background-image: linear-gradient(to right, #2563eb 100%, #2563eb 0);
}

a:not(.social-link a) svg {
  transition: fill 0.3s ease;
}

a:not(.social-link a):hover svg {
  fill: #fff;
}

/* Typography */
h1,
h2 {
  color: #40e07d;
  font-weight: 600;
}

body.light-mode h1,
body.light-mode h2 {
  color: #2563eb;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 3rem;
}

h3 {
  margin-bottom: 5px;
}

p {
  font-size: 16px;
  margin-bottom: 15px;
}

/* Text Colors */
.date {
  color: #9b4dca;
  font-weight: 500;
}

body.light-mode .date {
  color: #f97316;
}

/* Layout */
.container {
  max-width: 70rem;
  margin-bottom: 8rem;
}

.section-top {
  margin-top: 2rem;
  position: sticky;
  top: 0;
  background-color: #070b0a;
  z-index: 1000;
  padding: 1rem 0;
  transition: background-color 0.3s;
  width: 100%;
}

body.light-mode .section-top {
  background-color: #f0f0f0;
}

.section {
  margin-top: 6rem;
}

.section img {
  max-width: 200px;
}

.portfolio-item {
  font-size: 15px;
  border-left: 1px solid #aaa;
  padding: 2px 0px 2px 20px;
  margin-bottom: 20px;
  margin-left: 20px;
}

body.light-mode .portfolio-item {
  border-left: 1px solid #666;
}

.news-container {
  position: relative;
  overflow: hidden;
}

.news-container.collapsed .portfolio-item:nth-child(n + 6) {
  display: none;
}

.news-container.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(
    to bottom,
    rgba(7, 11, 10, 0),
    rgba(7, 11, 10, 1)
  );
  pointer-events: none;
}

body.light-mode .news-container.collapsed::after {
  background: linear-gradient(
    to bottom,
    rgba(240, 240, 240, 0),
    rgba(240, 240, 240, 1)
  );
}

.show-more-news {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px auto 0;
  padding: 0;
  background-color: transparent;
  border: none;
  color: #ccc;
  font-size: 0.9rem;
  position: relative;
  width: 140px;
  transition: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.show-more-news:hover,
.show-more-news:active,
.show-more-news:focus {
  outline: none;
  background-color: transparent;
  color: #ccc;
}

.show-more-news::before,
.show-more-news::after {
  content: "";
  height: 1px;
  background-color: #40e07d;
  flex: 1;
  margin: 0 10px;
  transition: all 0.3s;
  opacity: 0.7;
}

body.light-mode .show-more-news {
  color: #333;
}

body.light-mode .show-more-news:hover,
body.light-mode .show-more-news:active,
body.light-mode .show-more-news:focus {
  color: #333;
}

body.light-mode .show-more-news::before,
body.light-mode .show-more-news::after {
  background-color: #2563eb;
}

body.light-mode .profile-image {
  border: 1px solid #000;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #40e07d;
  box-shadow: 0px 0px 10px 0px #40e07d;
}

.profile-container {
  display: flex;
  flex-direction: column;
}

.profile-image-container {
  margin-bottom: 20px;
}

/* Social Links */
.social-links {
  float: right;
  font-size: 50%;
}

.social-link {
  display: inline-block;
  margin-left: 3rem;
  width: 30px;
  height: 30px;
  fill: #40e07d;
}

.social-link-wale {
  width: 40px !important;
  height: 40px !important;
}

body.light-mode .social-link {
  fill: #222;
}

.social-link a:visited svg {
  fill: #40e07d !important;
}

body.light-mode .social-link a:visited svg {
  fill: #222 !important;
}

.social-link.bigger {
  width: 40px;
}

/* Publications */
.pub {
  font-size: 15px;
  border-left: 1px solid #aaa;
  padding: 2px 0px 2px 20px;
  margin-bottom: 20px;
  margin-left: 20px;
}

body.light-mode .pub {
  border-left: 1px solid #666;
}

.pubs-container {
  position: relative;
  overflow: hidden;
}

.pubs-container.collapsed .pub:nth-child(n + 11) {
  display: none;
}

/* Create fading effect on last visible publication */
.pubs-container.collapsed .pub:nth-child(10) {
  position: relative;
}

.pubs-container.collapsed .pub:nth-child(10)::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: calc(100% + 20px);
  height: 100px;
  background: linear-gradient(
    to bottom,
    rgba(7, 11, 10, 0),
    rgba(7, 11, 10, 1) 80%
  );
  pointer-events: none;
}

body.light-mode .pubs-container.collapsed .pub:nth-child(10)::after {
  background: linear-gradient(
    to bottom,
    rgba(240, 240, 240, 0),
    rgba(240, 240, 240, 1) 80%
  );
}

.show-more-pubs {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px auto 0;
  padding: 0;
  background-color: transparent;
  border: none;
  color: #ccc;
  font-size: 0.9rem;
  position: relative;
  width: 140px;
  transition: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.show-more-pubs:hover,
.show-more-pubs:active,
.show-more-pubs:focus {
  outline: none;
  background-color: transparent;
  color: #ccc;
}

.show-more-pubs::before,
.show-more-pubs::after {
  content: "";
  height: 1px;
  background-color: #40e07d;
  flex: 1;
  margin: 0 10px;
  transition: all 0.3s;
  opacity: 0.7;
}

body.light-mode .show-more-pubs {
  color: #333;
}

body.light-mode .show-more-pubs:hover,
body.light-mode .show-more-pubs:active,
body.light-mode .show-more-pubs:focus {
  color: #333;
}

body.light-mode .show-more-pubs::before,
body.light-mode .show-more-pubs::after {
  background-color: #2563eb;
}

.pub-title {
  display: inline;
}

.pub-venue {
  display: inline-block;
  background-color: rgba(155, 77, 202, 0.15);
  color: #9b4dca;
  font-weight: 500;
  padding: 1px 10px;
  border-radius: 4px;
  font-size: 13px;
  margin-left: 10px;
}

body.light-mode .pub-venue {
  background-color: rgba(249, 115, 22, 0.1);
  color: #f97316;
}

.pub-authors {
  display: block;
}

.main-author {
  font-weight: bold;
  color: #40e07d;
}

body.light-mode .main-author {
  color: #2563eb;
}

/* HF Logo Display */
.hf-logo-light {
  display: none;
}

.hf-logo-dark {
  display: inline-block;
}

body.light-mode .hf-logo-light {
  display: inline-block;
}

body.light-mode .hf-logo-dark {
  display: none;
}

/* Main Ico Display */
.wale-logo-light {
  display: none;
}

.wale-logo-dark {
  display: inline-block;
}

body.light-mode .wale-logo-light {
  display: inline-block;
}

body.light-mode .wale-logo-dark {
  display: none;
}

/* Media Queries */
@media (max-width: 768px) {
  .section .profile-image {
    width: 120px;
    height: 120px;
  }

  .about-content {
    flex-direction: column;
  }

  .social-link {
    margin-left: 1.5rem;
  }
}

@media (min-width: 769px) {
  .profile-container {
    align-items: left;
  }
}
