:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f4f7fa;
  --bg-card: #ffffff;
  --bg-card-hover: #eef3f7;
  --text-primary: #14202b;
  --text-secondary: #304250;
  --text-muted: #5e7180;
  --accent: #355063;
  --accent-bright: #20384a;
  --accent-glow: rgba(53, 80, 99, 0.12);
  --border: #c7d3dc;
  --border-hover: #8fa4b3;
  --font-display: "Playfair Display SC", serif;
  --font-cursive: "Cormorant Garamond", serif;
  --font-nav: "Cantarell", sans-serif;
  --font-body: "DM Sans", -apple-system, sans-serif;
  --transition-fast: 0.15s ease;
  --transition-medium: 0.3s ease;
}

[data-theme="dark"] {
  --bg-primary: #0f1419;
  --bg-secondary: #151c23;
  --bg-card: #1a232c;
  --bg-card-hover: #202b35;
  --text-primary: #f3f7fb;
  --text-secondary: #b6c2cd;
  --text-muted: #7f8d99;
  --accent: #88a8c4;
  --accent-bright: #b3cdf0;
  --accent-glow: rgba(136, 168, 196, 0.14);
  --border: #28333d;
  --border-hover: #3a4956;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f4f7fa;
  --bg-card: #ffffff;
  --bg-card-hover: #eef3f7;
  --text-primary: #14202b;
  --text-secondary: #304250;
  --text-muted: #5e7180;
  --accent: #355063;
  --accent-bright: #20384a;
  --accent-glow: rgba(53, 80, 99, 0.12);
  --border: #c7d3dc;
  --border-hover: #8fa4b3;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 15px;
  transition: background var(--transition-medium), color var(--transition-medium);
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text-primary);
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }
}

.header {
  padding: 1.25rem 0 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.header-minimal {
  justify-content: flex-end;
}

.logo {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  display: inline-flex;
  color: var(--text-primary);
}

.logo span {
  display: inline-block;
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    color 0.3s ease,
    filter 0.3s ease;
  transition-delay: calc(var(--i) * 0.05s);
}

.logo:hover span {
  color: var(--accent);
  transform: translateY(-4px);
}

.header-right {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 768px) {
  .header {
    justify-content: flex-end;
  }

  .logo {
    font-size: 2.5rem;
    text-align: center;
  }

  .header-right {
    right: 0;
  }

  .hero-name {
    font-size: 2rem;
    margin-bottom: 0.9rem;
  }
}

.hero {
  padding: 2rem 0 4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.profile-coin {
  width: 220px;
  height: 220px;
  margin-bottom: 1rem;
  perspective: 1200px;
  border-radius: 50%;
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.profile-coin:hover {
  box-shadow:
    0 14px 28px rgba(20, 32, 43, 0.10),
    0 0 0 8px rgba(108, 159, 248, 0.08),
    0 0 26px rgba(108, 159, 248, 0.10);
}

.profile-coin-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.profile-coin:hover .profile-coin-inner {
  animation: profile-coin-spin 2.8s linear infinite;
}

@keyframes profile-coin-spin {
  from {
    transform: rotateY(0deg);
  }

  to {
    transform: rotateY(360deg);
  }
}

.profile-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(20, 32, 43, 0.12);
}

.profile-face-back {
  transform: rotateY(180deg);
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-image-gray {
  filter: grayscale(1) contrast(1.02) brightness(0.96);
}

.cv-link {
  font-family: "Times New Roman", Times, serif;
  font-size: 1.16rem;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: 0.01em;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.cv-link:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.social-icons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.icon-link {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  background: transparent;
  cursor: pointer;
}

.icon-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-bio {
  padding-top: 0.5rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin-bottom: 1.15rem;
  color: var(--text-primary);
  display: inline-flex;
  flex-wrap: wrap;
}

.hero-name span {
  display: inline-block;
  transition: color 0.3s ease, filter 0.3s ease;
}

.hero-name:hover span {
  color: #6c9ff8;
  animation: hero-name-wave 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.08s);
}

@keyframes hero-name-wave {
  0%,
  100% {
    transform: translateY(0);
  }

  35% {
    transform: translateY(-5px);
  }

  65% {
    transform: translateY(1px);
  }
}

.hero-bio p {
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.9;
  margin-bottom: 1.25rem;
}

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

.hero-bio a {
  color: var(--accent-bright);
  border-bottom: 1px solid transparent;
}

.hero-bio a:hover {
  border-bottom-color: var(--accent-bright);
}

.main-content {
  padding: 2rem 0 4rem;
}

.organic-grid {
  display: grid;
  grid-template-columns: 1.78fr 0.82fr;
  gap: 3rem 4rem;
}

@media (max-width: 1024px) {
  .organic-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
}

.left-column,
.right-column {
  display: flex;
  flex-direction: column;
}

.left-column {
  gap: 2.5rem;
  order: 2;
}

.right-column {
  gap: 3rem;
  order: 1;
}

.section {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::after {
  content: "";
  width: 60px;
  height: 1px;
  background: var(--border);
}

.about-text,
.personal-text,
.detail-copy,
.page-intro {
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-text p,
.detail-copy p,
.page-intro p {
  margin-bottom: 1rem;
}

.essay-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.essay-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.essay-nav-item:hover {
  padding-left: 0.75rem;
  color: var(--accent-bright);
}

.essay-nav-item i {
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
}

.essay-nav-item:hover i {
  transform: translateX(4px);
  color: var(--accent);
}

.community-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.community-item {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.community-item:hover {
  border-color: var(--border-hover);
}

.community-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.community-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.chat-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.chat-button:hover {
  background: var(--accent-bright);
  color: white;
  transform: translateY(-1px);
}

.quote-block {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-secondary);
  padding: 1.25rem 1.5rem;
  background: var(--accent-glow);
  border-radius: 4px;
  position: relative;
}

.quote-block::before {
  content: "\"";
  font-size: 3.5rem;
  color: var(--accent);
  opacity: 0.25;
  position: absolute;
  top: -0.25rem;
  left: 0.5rem;
  font-family: Georgia, serif;
}

.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: start;
  padding: 0.55rem 0;
}

.news-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.news-text {
  font-size: 0.98rem;
  color: var(--text-secondary);
}

.news-text strong {
  color: var(--text-primary);
}

.news-list-template .news-item {
  grid-template-columns: 1fr;
  gap: 0.2rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.news-list-template .news-item:hover {
  background: var(--accent-glow);
  margin: 0 -0.75rem;
  padding: 0.85rem 0.75rem;
  border-radius: 4px;
  border-color: transparent;
}

.news-list-template .news-date {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.news-list-template .news-text {
  color: var(--text-secondary);
}

.news-list-template .news-text a {
  color: #6c9ff8;
  font-weight: 600;
}



.news-link-accent {
  color: #6c9ff8;
  font-weight: 600;
}

.news-link-accent:hover {
  color: #5a8ef0;
}


.cloud-widget-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
}

.cloud-widget-frame {
  display: block;
  width: 100%;
  height: 230px;
  border: 0;
}

.pub-list,
.project-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-collapse {
  padding-top: 0;
}

.pub-collapse-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.3rem 0 0.15rem;
  border: 0;
  background: transparent;
  color: var(--accent-bright);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.pub-collapse-toggle i {
  transition: transform var(--transition-fast);
}

.pub-collapse.is-open .pub-collapse-toggle i {
  transform: rotate(180deg);
}

.pub-collapse-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.6rem;
}

.pub-collapse-panel[hidden] {
  display: none;
}

.pub-card,
.project-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.25rem;
  padding: 0;
}


.pub-image-container {
  width: 160px;
  height: 160px;
  position: relative;
  flex-shrink: 0;
}

.pub-image-container img,
.pub-image-container video {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-secondary);
}

.pub-image-container .img-after {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.pub-image-container:hover .img-after {
  opacity: 1;
}


.pub-image-container-text {
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-card));
  border: 1px solid var(--border);
}

.pub-journal-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
  gap: 0.2rem;
}

.pub-journal-line {
  font-family: var(--font-cursive);
  font-size: 1.2rem;
  line-height: 1.05;
  color: var(--text-primary);
}

.pub-info,
.project-info {
  display: flex;
  flex-direction: column;
}

.pub-title,
.project-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.45;
  margin-bottom: 0.35rem;
}

.pub-authors,
.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  line-height: 1.6;
}

.pub-venue,
.project-venue {
  font-size: 0.83rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.pub-links,
.project-links,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-links {
  margin-top: auto;
}

.pub-link,
.tag-pill {
  font-size: 0.78rem;
  padding: 0.2rem 0.45rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.pub-link:hover,
.tag-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-shell {
  min-height: 100vh;
}

.page-hero {
  padding: 2rem 0 2.4rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1.08;
  margin-bottom: 0.9rem;
}

.page-intro {
  font-size: 1.02rem;
}

.detail-copy {
  font-size: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-grid-spaced {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.gallery-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 6px;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.gallery-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.gallery-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.gallery-card-copy {
  padding: 0.9rem;
}

.gallery-card-title {
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.gallery-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 3rem;
  padding-bottom: 4rem;
}

.detail-hero-image {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.project-media-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: -0.15rem 0 1.5rem;
}
.detail-hero-video-shell {
  width: 100%;
  margin-bottom: 1.5rem;
}

.detail-hero-video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #000;
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.meta-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.2rem;
  background: var(--bg-card);
}

.meta-card h3 {
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
}

.meta-list {
  display: grid;
  gap: 0.85rem;
}

.meta-item-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.22rem;
}

.meta-item-value {
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.footer-note {
  margin-top: 0.45rem;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.footer .copyright-name {
  font-family: var(--font-display);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .gallery-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .pub-card,
  .project-card {
    grid-template-columns: 120px 1fr;
    gap: 0.9rem;
    align-items: start;
  }

  .pub-image-container,
  .pub-image-container img,
  .pub-image-container video {
    width: 120px;
    height: 120px;
  }

  .pub-authors,
  .project-desc {
    display: none;
  }

  .project-venue,
  .pub-links,
  .project-links {
    display: flex;
  }

  .pub-venue,
  .project-venue {
    font-size: 0.76rem;
    margin-bottom: 0.45rem;
  }

  .pub-links,
  .project-links {
    gap: 0.3rem;
  }

  .pub-link,
  .tag-pill {
    font-size: 0.72rem;
    padding: 0.18rem 0.4rem;
  }

  .pub-title,
  .project-title {
    margin-bottom: 0.22rem;
    font-size: 0.86rem;
    line-height: 1.4;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid-spaced {
    grid-template-columns: 1fr;
  }

  .cloud-widget-frame {
    height: 230px;
  }
}

.page-meta-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  margin: -0.05rem 0 1.35rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.page-meta-inline strong {
  color: var(--text-primary);
  margin-right: 0.35rem;
}

.detail-layout-single {
  display: block;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(10, 12, 18, 0.84);
  backdrop-filter: blur(8px);
  z-index: 1200;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox-dialog {
  position: relative;
  width: min(92vw, 1080px);
  max-height: 88vh;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(14, 18, 28, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.gallery-lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
}

.gallery-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.gallery-lightbox-figure {
  margin: 0;
}

.gallery-lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(88vh - 5.8rem);
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.03);
}

.gallery-lightbox-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.2rem 0.1rem;
  color: var(--text-secondary);
}

.gallery-lightbox-title {
  font-size: 1rem;
}

.gallery-lightbox-meta {
  color: var(--text-muted);
  white-space: nowrap;
}
.miscellany-copy {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0 0 1rem;
}

.miscellany-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}




