/* GENERAL */

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

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

p {
  color: rgb(85, 85, 85);
}

/* 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: black;
  text-decoration: none;
  text-decoration-color: white;
}

a:hover {
  color: grey;
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: rgb(181, 181, 181);
}

.logo {
  font-size: 2rem;
}

.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: black;
  transition: all 0.3 ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  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: black;
  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: 400px;
  width: 400px;
  margin: auto 0;
}

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

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}

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

.title {
  font-size: 3rem;
  text-align: center;
}

#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: rgb(53, 53, 53) 0.1rem solid;
}

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

.btn-color-1,
.btn-color-2:hover {
  background: rgb(53, 53, 53);
  color: white;
}

.btn-color-1:hover {
  background: rgb(0, 0, 0);
}

.btn-color-2 {
  background: none;
}

.btn-color-2:hover {
  border: rgb(255, 255, 255) 0.1rem solid;
}

.btn-container {
  gap: 1rem;
}

/* ABOUT SECTION */

#about {
  position: relative;
}


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

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

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

.about-pic {
  border-radius: 2rem;
}


.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: white;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  text-align: center;
}

.section-container {
  gap: 4rem;
  height: 80%;
}

.section__pic-container {
  height: 400px;
  width: 400px;
  margin: auto 0;
}

/* EXPERIENCE SECTION */

#experience {
  position: relative;
}

.experience-sub-title {
  color: rgb(85, 85, 85);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.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;
}

.color-container {
  border-color: rgb(163, 163, 163);
  background: rgb(250, 250, 250);
}

.project-img {
  border-radius: 2rem;
  width: 90%;
  height: 90%;
}

.project-title {
  margin: 1rem;
  color: black;
}

.project-btn {
  color: black;
  border-color: rgb(163, 163, 163);
}

/* CONTACT */

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

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  background: (250, 250, 250);
  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;
}

/* ==== RECENT ACTIVITIES — HORIZONTAL SLIDER ==== */
/* === Activity-card inner image slider === */
.activity-card .activity-slider {
  position: relative;
  border-bottom: 1px solid rgb(163, 163, 163);
  overflow: hidden;
}

.activity-card .activity-slider .slides {
  position: relative;
  width: 100%;
  height: 240px;            /* match your card image look; tweak if needed */
  background: rgb(250, 250, 250);
}

.activity-card .activity-slider .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 400ms ease;
}

.activity-card .activity-slider .slide.is-active {
  opacity: 1;
}

/* Prev/Next buttons */
.activity-card .slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}

.activity-card .slider-btn:hover { background: rgba(0,0,0,0.65); }
.activity-card .slider-btn.prev { left: 8px; }
.activity-card .slider-btn.next { right: 8px; }

/* Dots */
.activity-card .dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.activity-card .dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.2);
  cursor: pointer;
}

.activity-card .dots .dot.is-active { background: #fff; }

/* Larger screens: slightly taller slider if you want */
@media (min-width: 1200px) {
  .activity-card .activity-slider .slides { height: 260px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .activity-card .activity-slider .slide { transition: none; }
}
/* ── Circular profile image ─────────────────────────────── */
#profile .section__pic-container {
  width: 280px;              /* tweak to taste */
  height: 280px;             /* must match width */
  border-radius: 50%;
  overflow: hidden;          /* hide image corners */
  display: grid;
  place-items: center;
  border: 3px solid rgb(163,163,163);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  background: #f7f7f7;       /* subtle fallback bg */
}

#profile .section__pic-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;         /* fill the circle without distortion */
  display: block;
}

/* Optional: scale up on larger screens */
@media (min-width: 992px) {
  #profile .section__pic-container {
    width: 320px;
    height: 320px;
  }
}

/* ========= Global mobile-friendly defaults ========= */
html { -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; height: auto; display: block; }

/* Fix typo in contact bg */
.contact-info-upper-container { background: rgb(250, 250, 250); }

/* Disable heavy hover lifts on touch devices */
@media (hover:none) {
  .activity-card:hover { transform:none; box-shadow:none; }
}

/* ========= Tablets (<=1024px) ========= */
@media (max-width: 1024px) {
  /* Layout spacing */
  section { padding: 2rem 3rem !important; }      /* override 3rem 10rem */
  /* Two-column sections stack vertically */
  .section-container { flex-direction: column; gap: 2rem; height: auto; }

  /* Text sizing */
  .title { font-size: 2.2rem; }
  .section__text__p2 { font-size: 1.25rem; }

  /* Profile image */
  #profile .section__pic-container { width: 260px; height: 260px; }

  /* Activities grid: 2-up */
  .activities-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
  }
  /* Slider height a bit taller on tablet */
  .activity-card .activity-slider .slides { height: 220px; }

  /* Publications list padding */
  .publications-list { padding: 0 1rem; }
}

/* ========= Phones (<=768px) ========= */
@media (max-width: 768px) {
  /* Use the hamburger nav on phones */
  #desktop-nav { display: none !important; }
  #hamburger-nav {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1000;
    border-bottom: 1px solid #eee;
  }

  /* Tighter page spacing */
  section { margin: 0 1rem !important; padding: 1.5rem 0 !important; }

  /* Profile header */
  #profile {
    flex-direction: column;
    gap: 1.25rem;
    padding-top: 1rem !important;
  }
  #profile .section__pic-container { width: 200px; height: 200px; margin: 0 auto; }
  .title { font-size: 1.9rem; }
  .section__text__p2 { font-size: 1.1rem; }

  /* About blocks */
  .about-containers { gap: 1rem; margin: 1rem 0; }
  .details-container { padding: 1rem; }

  /* Experience articles -> single column */
  .article-container { flex-direction: column; gap: 1rem; }
  article { width: 100%; justify-content: flex-start; }

  /* Activities grid: 1-up */
  .activities-grid { grid-template-columns: 1fr; gap: 1rem; }
  .activity-card { border-radius: 1rem; }
  .activity-card .activity-slider .slides { height: 200px; }
  .activity-card .slider-btn { width: 40px; height: 40px; } /* touch size */

  /* Hobbies gallery: 1-up */
  .paintings-gallery { grid-template-columns: 1fr; gap: 1rem; }
  .painting-image { height: 220px; }

  /* Contact block stacks */
  .contact-info-upper-container {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    border-radius: 1rem;
    padding: 0.75rem;
  }

  footer { height: auto; padding: 1rem 0; }
}

/* ========= Small phones (<=480px) ========= */
@media (max-width: 480px) {
  .title { font-size: 1.7rem; }
  .section__text__p1 { font-size: 0.95rem; }
  .section__text__p2 { font-size: 1rem; }
  #profile .section__pic-container { width: 160px; height: 160px; }

  /* Slider: slightly shorter + larger dots/buttons */
  .activity-card .activity-slider .slides { height: 180px; }
  .activity-card .slider-btn { width: 44px; height: 44px; }
  .activity-card .dots { gap: 8px; }
  .activity-card .dots .dot { width: 10px; height: 10px; }

  /* Publication items tighter */
  .publication-item { padding: 1rem; }
  .publication-title { font-size: 1rem; }
}

/* === About: make left photo match right content height (1:1 square) === */
@media (min-width: 992px) {
  #about .section-container {
    display: grid;                 /* only About uses grid */
    grid-template-columns: auto 1fr;
    align-items: stretch;          /* both columns same row height */
    gap: 3rem;
    height: auto;                  /* let content define height */
  }

  #about .section__pic-container {
    height: 58%;                  /* = height of right content */
    aspect-ratio: 1 / 1;           /* keep it square */
    min-height: 260px;             /* don’t let it be tiny */
    max-height: 520px;             /* sensible cap (tweak) */
    width: auto;                   /* width derives from aspect ratio */
    border-radius: 2rem;
    overflow: hidden;
    border: 1px solid rgb(163,163,163);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    background: #fff;
  }

  #about .section__pic-container img.about-pic {
    width:100%;
    height: 100%;
    object-fit: cover;             /* fills the square, no distortion */
    border-radius: inherit;
    display: block;
  }
}

/* Mobile/tablet: stack & use a nice size without forcing 1:1 match */
@media (max-width: 991.98px) {
  #about .section-container { display: flex; flex-direction: column; gap: 1.5rem; }
  #about .section__pic-container {
    width: min(75vw, 420px);
    aspect-ratio: 1 / 1;
    height: auto;
    margin: 0 auto;
    border-radius: 2rem;
    overflow: hidden;
  }
  #about .section__pic-container img.about-pic { width: 100%; height: 100%; object-fit: cover; }
}


/* === Publications: 2-column grid on desktop === */
@media (min-width: 1024px) {
  #publications .publications-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(340px, 1fr));
    gap: 5rem 1.5rem;    /* row / column gaps */
    align-items: stretch;
  }
  /* Use grid gaps instead of item margins */
  #publications .publication-item {
    margin: 0 !important;
    display: flex;          /* let links sit at the bottom */
    flex-direction: column;
    height: 100%;
  }
  #publications .publication-links {
    margin-top: auto;       /* push buttons to the bottom for equal-height cards */
  }
   #publications .publication-year {
        align-self: flex-start;
        display: inline-flex;
        background: rgb(250, 250, 250);
        border: 1px solid rgb(163, 163, 163);
        padding: 0.3rem 0.8rem;
        border-radius: 1rem;
        font-size: 0.85rem;
        font-weight: 600;
        color: rgb(53, 53, 53);
        margin-bottom: 0.5rem;
        width: auto;;
      }
}

/* Keep single column on tablets/phones (already your default) */

/* Shared card grid */
.cards-grid{
  display:grid;
  grid-template-columns: repeat(3,minmax(280px,1fr));
  gap: 1rem 1.25rem;
  margin-top: 1rem;
}

/* Card look aligned with your details/activity cards */
.item-card{
  background:#fff;
  border:1px solid rgb(163,163,163);
  border-radius: 1.5rem;
  padding: 1.25rem;
  transition: transform .25s ease, box-shadow .25s ease;
}
.item-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
}

.item-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:.75rem; margin-bottom:.35rem;
}
.item-title{
  font-size:1.05rem; font-weight:600; color: rgb(53,53,53);
  line-height:1.35; margin:0;
}
.item-meta{
  font-size:.9rem; color: rgb(100,100,100);
  margin:.2rem 0 .45rem;
}
.item-desc{
  font-size:.95rem; color: rgb(85,85,85);
  line-height:1.55;
}

/* Badges */
.badge{
  display:inline-flex; align-items:center; gap:.35rem;
  padding:.25rem .6rem; border-radius: 999px;
  font-size:.75rem; font-weight:600;
  background: rgb(250,250,250);
  border:1px solid rgb(163,163,163);
  color: rgb(53,53,53);
}
.badge.success{ background:#eefaf0; border-color:#bfe3c3; color:#256b2e; }
.badge.info{ background:#eef5ff; border-color:#c8d9ff; color:#234f9b; }

/* Slightly denser on phones */
@media (max-width:768px){
  .cards-grid{ gap:1rem; }
  .item-card{ border-radius:1rem; padding:1rem; }
  .item-title{ font-size:1rem; }
}


/* Scholar badge area */
#publications .scholar-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .5rem 0 1rem;
}

.scholar-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: #1a73e8;          /* Google blue */
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
}
.scholar-badge:hover { background: #0f5bd7; }
.scholar-badge img { width: 16px; height: 16px; display: block; }

/* Tiny “Citations” chip that sits next to a title */
.pub-cites {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: .5rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: rgb(250,250,250);
  border: 1px solid rgb(220,220,220);
  font-size: .8rem;
  color: rgb(53,53,53);
  vertical-align: middle;
  white-space: nowrap;
}
.pub-cites a { color: inherit; text-decoration: none; }
.pub-cites a:hover { text-decoration: underline; }


/* Scholar-like “Cited by” widget */
.cited-widget {
  max-width: 360px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cited-header {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; color: #222; margin-bottom: 10px;
}
.cited-header a { font-size: 12px; text-decoration: none; color: #1a73e8; }
.cited-table {
  width: 100%; border-collapse: collapse; font-size: 14px; color: #333; margin-bottom: 8px;
}
.cited-table th, .cited-table td {
  padding: 6px 4px; border-bottom: 1px solid #efefef; text-align: left;
}
.cited-table th { font-weight: 600; color: #666; }
.cited-table .metric { width: 45%; color: #555; }
.cited-chart-wrap { margin-top: 10px; }
.cited-note { margin-top: 6px; color: #777; font-size: 12px; }
@media (max-width: 480px) { .cited-widget { max-width: 100%; } }


#projects {
  position: relative;
}

#projects .publications-list {
  max-width: 1200px;
  margin: 0 auto;
}

#projects .publication-item {
  background: white;
  border: 1px solid rgb(163, 163, 163);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#projects .publication-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#projects .publication-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgb(53, 53, 53);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

#projects .publication-authors {
  font-size: 0.9rem;
  color: rgb(85, 85, 85);
  margin-bottom: 0.5rem;
  font-style: italic;
}

#projects .publication-venue {
  font-size: 0.9rem;
  color: rgb(100, 100, 100);
  margin-bottom: 0.5rem;
}

#projects .publication-links {
  margin-top: 0.5rem;
}

#projects .publication-links a {
  display: inline-block;
  padding: 0.4rem 1rem;
  margin-right: 0.5rem;
  background: rgb(53, 53, 53);
  color: white;
  border-radius: 1rem;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.3s ease;
}

#projects .publication-links a:hover {
  background: rgb(0, 0, 0);
}

#projects .publication-year {
  display: inline-block;
  background: rgb(250, 250, 250);
  border: 1px solid rgb(163, 163, 163);
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgb(53, 53, 53);
  margin-bottom: 0.5rem;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
  #projects .publications-list {
    padding: 0 1rem;
  }
  
  #projects .publication-item {
    padding: 1rem;
  }
}

/* Desktop 2-column grid (same as publications) */
@media (min-width: 1024px) {
  #projects .publications-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(340px, 1fr));
    gap: 5rem 1.5rem;
    align-items: stretch;
  }
  
  #projects .publication-item {
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  #projects .publication-links {
    margin-top: auto;
  }
  
  #projects .publication-year {
    align-self: flex-start;
    display: inline-flex;
    background: rgb(250, 250, 250);
    border: 1px solid rgb(163, 163, 163);
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgb(53, 53, 53);
    margin-bottom: 0.5rem;
    width: auto;
  }
}

/* YouTube Demo Embed Styling */
.project-demo {
  margin: 1rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgb(250, 250, 250);
  border: 1px solid rgb(163, 163, 163);
}

.project-demo iframe {
  width: 100%;
  height: 250px;
  display: block;
  border: none;
}

@media (min-width: 768px) {
  .project-demo iframe {
    height: 280px;
  }
}

@media (min-width: 1024px) {
  .project-demo iframe {
    height: 300px;
  }
}