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

:root {
      --black: #111;
      --gray: #888;
      --light-gray: #f5f5f5;
      --border: #e8e8e8;
      --white: #fff;
      --grad: linear-gradient(90deg, #6a5acd, #ff6584);
}

html { scroll-behavior: smooth; }

body {
      font-family: 'Plus Jakarta Sans', sans-serif;
      color: var(--black);
  background: var(--white);
      font-size: 18px;
      line-height: 1.7;
}

hr {
      border: none;
      border-top: 1px solid var(--border);
      margin: 0;
}

.gradient-text {
      background: var(--grad);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
}

/* NAV */
nav {
      position: fixed;
      top: 0; left: 0; right: 0;
      z-index: 100;
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(8px);
      border-bottom: 1px solid var(--border);
      padding: 8px 56px;
      display: flex;
      align-items: center;
      justify-content: space-between;
}

.nav-logo {
      display: flex;
      align-items: center;
      gap: 16px;
      font-weight: 800;
      font-size: 26px;
      letter-spacing: 0.02em;
      text-decoration: none;
      color: var(--black);
}

.nav-logo img {
      height: 68px;
      width: 68px;
      object-fit: contain;
      display: block;
}

.nav-links {
      display: flex;
      gap: 40px;
      list-style: none;
}

.nav-links a {
      text-decoration: none;
      color: var(--gray);
      font-size: 18px;
      font-weight: 600;
      letter-spacing: 0.03em;
      transition: color 0.2s;
}

.nav-links a:hover { color: var(--black); }

.nav-toggle {
      display: none;
      flex-direction: column;
      justify-content: center;
      gap: 6px;
      width: 36px;
      height: 36px;
      background: none;
      border: none;
      cursor: pointer;
      padding: 0;
}

.nav-toggle span {
      display: block;
      width: 100%;
      height: 3px;
      background: var(--black);
      border-radius: 2px;
      transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* SECTIONS */
section {
      padding: 80px 56px;
      max-width: 1200px;
      margin: 0 auto;
}

section:first-of-type { padding-top: 150px; }

.section-label {
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.14em;
      color: var(--gray);
      text-transform: uppercase;
      margin-bottom: 48px;
}

/* RESEARCH / WELCOME */
.welcome-text {
      font-size: 17px;
      color: var(--black);
      line-height: 1.8;
      max-width: 920px;
      margin: 0 auto 64px;
      text-align: center;
}

.welcome-text strong { font-weight: 800; }
.welcome-text .area-title { font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }

.research-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 24px;
}

.research-card {
      position: relative;
  background: var(--white);
      border-radius: 16px;
      padding: 40px 32px;
      z-index: 1;
}

.research-card::before {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      padding: 2px;
      background-size: 300% 300%;
      animation: gradientMove 3.5s ease infinite;
      -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      -webkit-mask-composite: xor;
      mask-composite: exclude;
      z-index: -1;
}

.research-card:nth-child(1)::before {
      background-image: linear-gradient(120deg, #6a5acd, #ff6584, #6a5acd);
      animation-delay: 0s;
}

.research-card:nth-child(2)::before {
      background-image: linear-gradient(120deg, #ff6584, #ffb347, #ff6584);
      animation-delay: -1.2s;
      animation-direction: reverse;
}

.research-card:nth-child(3)::before {
      background-image: linear-gradient(120deg, #4fd1c5, #6a5acd, #4fd1c5);
      animation-delay: -2.4s;
}

@keyframes gradientMove {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
}

.research-num {
      font-size: 13px;
      font-weight: 700;
      color: var(--gray);
      letter-spacing: 0.1em;
      margin-bottom: 20px;
}

.research-title {
      font-size: 22px;
      font-weight: 800;
      line-height: 1.3;
      margin-bottom: 16px;
}

.research-desc {
      font-size: 16px;
      color: var(--gray);
      line-height: 1.7;
}

/* NEWS */
#news { border-top: 1px solid var(--border); }

.news-title {
      text-align: center;
          font-size: 24px;
      font-weight: 800;
      margin-bottom: 56px;
}

.news-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 24px;
      width: 100%;
}

.news-item {
      display: grid;
      grid-template-columns: 140px 1fr;
      gap: 24px;
      align-items: baseline;
}

.news-date {
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.04em;
      color: var(--gray);
      white-space: nowrap;
}

.news-text {
      font-size: 15px;
      font-weight: 400;
      color: var(--black);
      line-height: 1.6;
}

/* PUBLICATIONS */
#publications { border-top: 1px solid var(--border); }

.pub-list { display: flex; flex-direction: column; gap: 0; }

.pub-item {
      display: grid;
          grid-template-columns: 380px 1fr;
      gap: 48px;
      padding: 48px 0;
      border-bottom: 1px solid var(--border);
      align-items: start;
}

.pub-img {
          width: 380px;
      height: 190px;
      object-fit: cover;
      background: var(--light-gray);
      display: block;
}

.pub-img-placeholder {
          width: 380px;
      height: 190px;
      background: var(--light-gray);
}

.pub-title {
      font-size: 21px;
      font-weight: 700;
      line-height: 1.4;
      margin-bottom: 12px;
}

.pub-title a {
      text-decoration: none;
      color: var(--black);
}

.pub-title a:hover { text-decoration: underline; }

.pub-authors {
      font-size: 16px;
      color: var(--gray);
      margin-bottom: 16px;
}

.pub-authors strong { color: var(--black); font-weight: 600; }

.pub-venue {
      font-size: 15px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      margin-bottom: 12px;
}

.pub-links { display: flex; gap: 12px; }

.pub-link {
      font-size: 14px;
      font-weight: 600;
      letter-spacing: 0.04em;
      color: var(--black);
      text-decoration: none;
      border-bottom: 1px solid var(--black);
      padding-bottom: 1px;
}

.pub-link:hover { opacity: 0.5; }

/* MEMBERS */
#members { border-top: 1px solid var(--border); }

.members-section-title {
      font-size: 15px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--gray);
      margin-bottom: 32px;
}

.pi-card {
      display: flex;
      gap: 32px;
      align-items: flex-start;
      margin-bottom: 56px;
}

.member-photo {
      width: 160px;
      aspect-ratio: 1;
      background: var(--light-gray);
      flex-shrink: 0;
}

.member-photo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
}

.pi-info .member-name { font-size: 24px; }
.pi-info .member-role { font-size: 16px; margin-bottom: 10px; }

.member-name {
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 4px;
}

.member-role {
      font-size: 14px;
      color: var(--gray);
      margin-bottom: 8px;
}

.member-links {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      font-size: 13px;
}

.member-links a {
      color: var(--black);
      text-decoration: none;
}

.member-links a:hover { opacity: 0.5; }

.members-hr { margin: 56px 0; }

.researchers-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 40px 56px;
}

.researcher-card {
      display: flex;
      gap: 20px;
      align-items: flex-start;
}

.researcher-card .member-photo {
      width: 160px;
      height: 160px;
}

.researcher-bullets {
      padding-left: 18px;
      font-size: 14px;
      color: var(--gray);
      line-height: 1.7;
      margin-top: 8px;
}

.researcher-bullets li { margin-bottom: 4px; }

/* RECRUITING */
#recruiting { border-top: 1px solid var(--border); min-height: 50vh; display: flex; align-items: center; }

.recruit-text {
      font-size: 16px;
      line-height: 1.8;
      max-width: 900px;
}

.recruit-text a {
      color: var(--black);
      font-weight: 700;
      text-decoration: none;
      border-bottom: 2px solid var(--black);
}

.recruit-text a:hover { opacity: 0.5; }

/* GALLERY (event-based, centered) */
#gallery { border-top: 1px solid var(--border); }

.gallery-event {
      text-align: center;
      padding: 64px 0;
}

.gallery-event:first-child { padding-top: 0; }

.gallery-event-title {
      font-size: 19px;
      font-weight: 800;
      margin-bottom: 32px;
}

.gallery-event-photos {
      display: flex;
      justify-content: center;
          align-items: flex-start;
      flex-wrap: wrap;
      gap: 16px;
      margin-bottom: 28px;
}

.gallery-event-photo {
        width: 260px;
        overflow: hidden;
}

.gallery-event-photo img {
        width: 100%;
        height: auto;
        display: block;
}

.gallery-event-desc {
      font-size: 15px;
      color: var(--gray);
      max-width: 640px;
      margin: 0 auto;
      line-height: 1.7;
}

/* LAB INFO / MAP */
#lab-info { border-top: 1px solid var(--border); }

.lab-info-text {
      font-size: 16px;
      color: var(--gray);
      line-height: 1.8;
      margin-bottom: 32px;
}

.lab-info-text strong { color: var(--black); }

.lab-map {
      width: 100%;
      height: 360px;
      border: none;
      filter: grayscale(20%);
}

/* CONTACT / FOOTER */
footer {
      border-top: 1px solid var(--border);
      padding: 36px 56px;
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      max-width: 1200px;
      margin: 0 auto;
}

.footer-left h2 {
      font-size: 18px;
      font-weight: 800;
      margin-bottom: 10px;
}

.footer-left p {
      font-size: 16px;
      color: var(--gray);
      line-height: 1.7;
}

.footer-left a {
      color: var(--black);
      text-decoration: none;
      border-bottom: 1px solid var(--black);
}

.footer-right {
      font-size: 14px;
      color: var(--gray);
      text-align: right;
}

/* MOBILE */
@media (max-width: 900px) {
      nav { height: 64px; padding: 0 20px; }
      .nav-logo img { height: 44px; width: 44px; }
      .nav-logo { font-size: 18px; gap: 10px; }

  .nav-toggle { display: flex; }

  .nav-links {
          display: none;
          position: fixed;
          top: 64px;
          left: 0;
          right: 0;
          background: var(--light-gray); box-shadow: 0 12px 24px rgba(0,0,0,0.08);
          flex-direction: column;
          align-items: center;
          justify-content: center;
                gap: 14px;
              padding: 16px 0;
              border-top: 1px solid var(--border);
  }

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

  .nav-links a { font-size: 20px; }

  section { padding: 64px 24px; }
      section:first-of-type { padding-top: 100px; }
      .research-grid { grid-template-columns: 1fr; }
      .pub-item { grid-template-columns: 1fr; }
      .pub-img, .pub-img-placeholder { width: 100%; height: 200px; }
      .pi-card { flex-direction: column; }
      .researchers-grid { grid-template-columns: 1fr; }
      .news-item { grid-template-columns: 1fr; gap: 6px; }
                  .gallery-event-photo { width: 200px; }
      footer { flex-direction: column; gap: 24px; align-items: flex-start; }
      .footer-right { text-align: left; }
}
