/* GENERAL */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

:root {
  --background-color: #181818;
  --text-color: #e0e0e0;
  --primary-color: #957fef;
  --secondary-color: #3a3a4a;
  --tertiary-color: #ADD8E6;
  --highlight-color: #957fef;
  --green-up: #2ecc71;
  --red-down: #e74c3c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
}

html {
  scroll-behavior: smooth;
}

p {
  color: var(--text-color);
}

/* TRANSITION */

a,
.btn {
  transition: all 300ms ease;
}

/* DESKTOP NAV */

nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

a {
  color: var(--text-color);
  text-decoration: none;
  text-underline-offset: 1rem;
}

a:hover {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: var(--primary-color);
}

.logo {
  font-size: 2rem;
  color: var(--primary-color);
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.3 ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--background-color);
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3 ease-in-out;
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3 ease-in-out;
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 300px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

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

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

.hamburger-icon span:first-child {
  transform: none;
}

.hamburger-icon span:first-child {
  opacity: 1;
}

.hamburger-icon span:first-child {
  transform: none;
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
}

.section-container {
  display: flex;
}

/* PROFILE SECTION */

#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  display: flex;
  height: 600px;
  width: 600px;
  margin: auto 0;
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  margin-top: 50px;
  text-align: center;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.title {
  font-size: 3rem;
  text-align: center;
  color: var(--primary-color);
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* ICONS */

.icon {
  cursor: pointer;
  height: 2rem;
}

/* BUTTONS */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
}

.btn-color-1,
.btn-color-2 {
  border: var(--primary-color) 0.1rem solid;
}

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
}

.btn-color-1,
.btn-color-2:hover {
  background: var(--primary-color);
  color: var(--background-color);
}

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

.btn-color-2 {
  background: none;
  color: var(--text-color);
}

.btn-color-2:hover {
  border: var(--highlight-color) 0.1rem solid;
}

.btn-container {
  gap: 1rem;
}

.btn-social-github{
  font-weight: 600;
  transition: all 300ms ease;
  padding: 0.3rem;
  width: 4rem;
  border-radius: 1rem;
  background-color: var(--text-color);
}

.btn-social-linkedin{
  font-weight: 600;
  transition: all 300ms ease;
  padding: 0.3rem;
  width: 4rem;
  border-radius: 1rem;
  background-color: var(--tertiary-color);
}

/* EXPERIENCE SECTION */

#about {
  position: relative;
  padding: 2rem 0;
  overflow: hidden;
}

#about .experience-details-container {
  flex-direction: column;
  overflow: visible;
  max-width: 90%;
}

#about .title {
  margin-bottom: 2rem;
}

#about p {
  margin: 0 0 1.5rem 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1.8;
  text-align: justify;
  color: var(--text-color);
  max-width: 100%;
}

.about-text-container {
  background-color: var(--secondary-color);
  border-radius: 1rem;
  padding: 2rem;
  border: var(--primary-color) 0.1rem solid;
  margin-bottom: 1.5rem;
}

.experience-sub-title {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.experience-details-container {
  position: relative;
  max-width: 85%;
  margin: 0 auto;
  padding: 0 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.experience-details-container p{
    margin-left: 100px;
    margin-right: 100px;
    margin-top: 20px;
    font-size: 15px;
    margin-bottom: 6px; 
    line-height: 1.7; 
    text-align: justify; 
    color: var(--text-color);
}

.article-container {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: space-around;
}

article {
  display: flex;
  width: 10rem;
  justify-content: space-around;
  gap: 0.5rem;
}

article .icon {
  cursor: default;
}

/* PROJECTS SECTION */

#projects {
  position: relative;
  padding: 0 1rem;
  overflow: hidden;
  max-width: 100%;
  margin: 0 4rem;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 0.5rem;
  margin-top: 2rem;
}

.about-containers,
.about-details-container {
  display: flex;
}

.details-container {
  padding: 1.5rem;
  flex: 1 0 300px;
  background: var(--secondary-color);
  border-radius: 2rem;
  border: var(--primary-color) 0.1rem solid;
  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.color-container {
  border-color: var(--primary-color);
  background: var(--secondary-color);
}

.project-img {
  width: 100%;
  height: 240px;
  border-radius: 2rem;
  margin-bottom: 1rem;
  object-fit: cover;
}

.project-title {
  font-size: 1.4rem;
  margin: 1rem 0;
  color: var(--text-color);
}

.project-title-small {
  font-size: 1rem;
  margin: 1rem 0;
  color: var(--text-color);
}

.project-btn {
  color: var(--text-color);
  border-color: var(--primary-color);
}

/* Keep buttons visible */
.details-container .btn-container {
  margin-top: auto;
}

/* Stock meta on project cards */
.stock-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.75rem 0 0.25rem;
}
.ticker-symbol {
  font-weight: 700;
  letter-spacing: 0.5px;
}
.price {
  font-variant-numeric: tabular-nums;
}
.change.up { color: var(--green-up); }
.change.down { color: var(--red-down); }

/* sparkline removed */
.sparkline { display: none; height: 0; }

/* Ticker bar */
.stock-ticker {
  width: 100%;
  border-top: 1px solid var(--secondary-color);
  border-bottom: 1px solid var(--secondary-color);
  background: rgba(58,58,74,0.4);
  overflow: hidden;
  white-space: nowrap;
}
.stock-ticker .ticker-track {
  display: inline-block;
  padding: 0.5rem 0;
  animation: ticker-scroll 30s linear infinite;
}
.stock-ticker .ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 1.25rem;
  font-size: 0.95rem;
}
.stock-ticker .ticker-item .symbol { font-weight: 600; }
.stock-ticker .ticker-item .delta.up { color: var(--green-up); }
.stock-ticker .ticker-item .delta.down { color: var(--red-down); }

/* Colored symbol pill and chip variants */
.symbol-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  color: #0e0e0e;
}
.pill-rese { background: #ffd166; }
.pill-logi { background: #118ab2; color: #fff; }
.pill-nnre { background: #ef476f; color: #fff; }
.pill-edit { background: #06d6a0; }
.pill-algo { background: #a78bfa; color: #0e0e0e; }
.pill-mood { background: #e91e63; color: #fff; }
.pill-bloc { background: #f39c12; color: #0e0e0e; }
.pill-budg { background: #20c997; color: #0e0e0e; }

.chip.react    { background: #61dafb22; border-color: #61dafb66; }
.chip.python   { background: #3776ab22; border-color: #3776ab66; }
.chip.flask    { background: #ffffff22; border-color: #ffffff66; }
.chip.js       { background: #f7df1e22; border-color: #f7df1e66; }
.chip.htmlcss  { background: #ff573322; border-color: #ff573366; }
.chip.node     { background: #3c873a22; border-color: #3c873a66; }
.chip.n8n      { background: #ff6f6122; border-color: #ff6f6166; }
.chip.d3       { background: #f39c1222; border-color: #f39c1266; }
.chip.ai       { background: #957fef22; border-color: #957fef66; }

/* Ticker language chips */
.ticker-lang {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
}
.ticker-lang .chip {
  border: 1px solid #666a;
  border-radius: 10px;
  padding: 0 6px;
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Pill used inside cards as well */
.stock-meta .symbol-pill { transform: translateY(-1px); }
.pill-generic { background: #8886; color: #fff; }

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Carousel controls and layout */
.carousel-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--primary-color);
  background: rgba(58,58,74,0.6);
  color: var(--text-color);
  display: grid;
  place-items: center;
  z-index: 2;
}
.carousel-btn:hover { background: rgba(149,127,239,0.2); }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }
.arrow-icon { width: 20px; height: 20px; filter: invert(1) hue-rotate(260deg); }
.left-arrow { transform: rotate(180deg); }

#projects-carousel {
  display: flex;
  gap: 1rem;
  transition: transform 0.5s ease;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555a;
}
.carousel-dots .dot.active { background: var(--primary-color); }

/* CONTACT SECTION */

#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: var(--primary-color) 0.1rem solid;
  background: var(--secondary-color);
  margin: 2rem auto;
  padding: 0.5rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container p {
  font-size: larger;
}

.contact-icon {
  cursor: default;
}

.email-icon {
  height: 2.5rem;
}

/* FOOTER SECTION */

footer {
  height: 26vh;
  margin: 0 1rem;
}

footer p {
  text-align: center;
}

/* Scroll Effects */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.appear {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

.hidden{
  border-color: var(--background-color);
  background: var(--background-color);
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 60px;
  overflow: hidden;
}

.projects-carousel-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

#projects-carousel {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
  gap: 1.5rem;
  padding: 1rem 0;
}

#projects-carousel .details-container {
  flex: 0 0 calc(100% / 3.3);
  min-width: calc(100% / 3.3);
  max-width: calc(100% / 3.3);
  height: 400px;
  margin: 0;
  opacity: 1;
  visibility: visible;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

.arrow-icon {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.left-arrow {
  transform: rotate(180deg);
}

.prev-btn {
  left: 50px;
}

.next-btn {
  right: 50px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary-color);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active {
  background: var(--primary-color);
}

@media screen and (max-width: 1200px) {
  #projects-carousel .details-container {
    flex: 0 0 calc(100% / 1.8);
    min-width: calc(100% / 1.8);
    max-width: calc(100% / 1.8);
  }
  
  #about .experience-details-container {
    max-width: 95%;
  }
  
  #about p {
    font-size: 0.95rem;
    line-height: 1.7;
  }
  
  .about-text-container {
    padding: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  #projects-carousel .details-container {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
  }
  
  .experience-details-container {
    padding: 0 40px;
  }
  
  #about .experience-details-container {
    max-width: 100%;
    padding: 0 20px;
  }
  
  #about p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }
  
  .about-text-container {
    padding: 1.2rem;
  }
}