/* ── Apple Glass — Personal Academic Page ── */

:root {
  --teal: #1B6B8A;
  --teal-rgb: 27, 107, 138;
  --hover: #E07A00;
  --hover-rgb: 224, 122, 0;
  --gold-rgb: 212, 175, 55;
  --text: #1d1d1f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

img { max-width: 100%; height: auto; display: block; }

body {
  font-family: 'Lexend', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text);
  background: #f0eeeb;
  background-image:
    radial-gradient(ellipse at 15% 15%, rgba(var(--teal-rgb), 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 55%, rgba(220, 150, 50, 0.09) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(80, 150, 220, 0.09) 0%, transparent 45%),
    radial-gradient(ellipse at 70% 20%, rgba(180, 120, 60, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Links ── */
a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: var(--hover);
}

/* ── Layout ── */
.page-wrapper {
  max-width: 1060px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* ── Glass ── */
.glass-section {
  margin-bottom: 0.9rem;
  animation: rise 0.5s ease-out both;
}
.glass-section:nth-child(2) { animation-delay: 0.06s; }
.glass-section:nth-child(3) { animation-delay: 0.10s; }
.glass-section:nth-child(4) { animation-delay: 0.14s; }
.glass-section:nth-child(5) { animation-delay: 0.17s; }
.glass-section:nth-child(6) { animation-delay: 0.20s; }
.glass-section:nth-child(7) { animation-delay: 0.23s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.glass {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2);
  padding: 1.8rem 2rem;
}

/* ── Section Headings ── */
.section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── Profile — Photo+Contact Left, Bio Right ── */

.profile-grid {
  display: grid;
  grid-template-columns: 36% 1fr;
  gap: 0.6rem 1.4rem;
  align-items: start;
}

.profile-grid .profile-photo-frame {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.profile-bio {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
}

.profile-bio p {
  margin-bottom: 0.4rem;
}

.profile-grid .site-name {
  grid-column: 1;
  grid-row: 2;
  text-align: center;
  align-self: center;
}

.profile-contact {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  text-align: center;
  margin-top: 0.5rem;
}

.bio-block {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.5rem;
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.bio-block:last-child {
  margin-bottom: 0;
}

.bio-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin: 0.4rem 0;
}

/* ── Photo Frame ── */
.profile-photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.photo-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s;
  pointer-events: none;
  border-radius: 12px;
}

.photo-default { z-index: 1; opacity: 1; }
.photo-hover   { z-index: 2; opacity: 0; }
.profile-photo-frame:hover .photo-hover   { opacity: 1; }
.profile-photo-frame:hover .photo-default { opacity: 0; }

/* ── Contact ── */
.contact-email {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.contact-btn {
  display: inline-block;
  padding: 5px 16px;
  background: rgba(var(--teal-rgb), 0.1);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(var(--teal-rgb), 0.18);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--teal);
  box-shadow:
    0 2px 8px rgba(var(--teal-rgb), 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(var(--teal-rgb), 0.05);
  transition: all 0.2s;
}

.contact-btn:hover {
  background: rgba(var(--hover-rgb), 0.1);
  border-color: rgba(var(--hover-rgb), 0.2);
  color: var(--hover);
  box-shadow:
    0 4px 12px rgba(var(--teal-rgb), 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(var(--teal-rgb), 0.08);
  text-decoration: none;
}

.site-name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 0.7rem;
  margin-bottom: 0.15rem;
}

/* ── Paper Cards ── */

.paper-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.25s;
  margin-bottom: 0.9rem;
}

.paper-card:last-child { margin-bottom: 0; }

.paper-card:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}

.paper-card.featured {
  background: rgba(255, 248, 230, 0.3);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  border: 1.5px solid rgba(var(--gold-rgb), 0.25);
  box-shadow:
    0 0 16px rgba(var(--gold-rgb), 0.12),
    0 0 4px rgba(var(--gold-rgb), 0.08),
    inset 0 1px 0 rgba(255, 240, 200, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}
.paper-card.featured:hover {
  background: rgba(255, 248, 230, 0.42);
  box-shadow:
    0 0 24px rgba(var(--gold-rgb), 0.18),
    0 0 8px rgba(var(--gold-rgb), 0.12),
    0 8px 28px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 240, 200, 0.6),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3);
}

/* ── Media (figures) ── */
.paper-media {
  flex: 0 0 36%;
  max-width: 36%;
}

.paper-media video,
.paper-media img {
  width: 100%;
  border-radius: 10px;
}

.paper-media .multi-img {
  display: flex;
  gap: 2px;
}
.paper-media .multi-img img {
  flex: 1;
  min-width: 0;
  border-radius: 8px;
}

/* ── Paper Info ── */
.paper-info { flex: 1; min-width: 0; }

.paper-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.paper-title a { color: inherit; }
.paper-title a:hover { color: var(--teal); }

.paper-authors {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #444;
  margin-bottom: 0.12rem;
}

.paper-note {
  font-size: 0.8rem;
  color: #86868b;
}

.paper-venue {
  font-size: 0.85rem;
  color: #6e6e73;
  margin-bottom: 0.3rem;
}
.paper-venue em {
  font-weight: 600;
  color: #555;
}

/* ── Link pills ── */
.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.paper-links a {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(var(--teal-rgb), 0.08);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(var(--teal-rgb), 0.15);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--teal);
  box-shadow:
    0 1px 6px rgba(var(--teal-rgb), 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.2s;
}
.paper-links a:hover {
  background: rgba(var(--hover-rgb), 0.08);
  border-color: rgba(var(--hover-rgb), 0.18);
  color: var(--hover);
  box-shadow:
    0 3px 10px rgba(var(--hover-rgb), 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

/* ── Content Sections ── */

.content-body p {
  margin-bottom: 0.35rem;
  line-height: 1.55;
}
.content-body p:last-child { margin-bottom: 0; }

/* ── Misc ── */
.misc-row {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}
.misc-photo {
  flex: 0 0 90px;
}
.misc-photo a { display: block; }
.misc-photo img {
  border-radius: 12px;
  transition: transform 0.3s;
}
.misc-photo img:hover { transform: scale(1.03); }
.misc-text { flex: 1; }

/* ── Footer ── */
.site-footer {
  text-align: right;
  padding: 0.8rem 0.5rem 1.5rem;
  font-size: 0.68rem;
  color: #aaa;
}

/* ── Responsive ── */

@media (max-width: 820px) {
  .page-wrapper { padding: 0.6rem; }

  .glass {
    padding: 1.2rem 1rem;
    border-radius: 16px;
  }

  .glass-section { margin-bottom: 0.7rem; }

  .profile-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .profile-grid .profile-photo-frame {
    grid-column: 1;
    grid-row: 1;
    max-width: 250px;
    margin: 0 auto;
  }
  .profile-grid .site-name {
    grid-column: 1;
    grid-row: 2;
    text-align: center;
  }
  .profile-bio {
    grid-column: 1;
    grid-row: 3;
  }
  .profile-contact {
    grid-column: 1;
    grid-row: 4;
    text-align: center;
  }

  .site-name { font-size: 1.5rem; }

  .paper-card { flex-direction: column; }
  .paper-media { flex: none; max-width: 100%; width: 100%; }

  .misc-row { flex-direction: column; text-align: center; }
  .misc-photo { flex: 0 0 auto; width: 90px; }
}

@media (max-width: 400px) {
  .glass { padding: 1rem 0.8rem; border-radius: 14px; }
  .site-name { font-size: 1.3rem; }
  .section-heading { font-size: 1rem; }
  .paper-title { font-size: 0.82rem; }
  .paper-links a { font-size: 0.68rem; padding: 1px 7px; }
}
