/* smui.css */

:root {
  --sm-bg: #ffffff;
  --sm-text: #181818;
  --sm-muted: #777777;
  --sm-line: rgba(0, 0, 0, 0.08);
  --sm-accent: #1a5e2e;
  --sm-soft: #f5f2ec;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

img { max-width: 100%; height: auto; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  color: var(--sm-text);
  background: url('bgpic.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  max-width: 100vw;
}

a { color: var(--sm-accent); }

/* =========================
   Hero
========================= */

.sm-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-align: center;
  overflow: hidden;
  padding-top: 72px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: none;
}

.sm-hero__content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sm-hero__title {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 800;
  color: var(--sm-accent);
  margin-bottom: 12px;
}

.sm-hero__subtitle {
  display: inline-block;
  font-size: 1.1rem;
  color: #555;
  background: rgba(255, 255, 255, 0.35);
  padding: 6px 24px;
  border-radius: 30px;
}

.sm-hero__avatar {
  position: absolute;
  top: calc(30% + 22px);
  right: 15%;
  transform: translateY(-50%);
  z-index: 1;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.sm-hero__hint {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 40px 0 20px;
  color: #aaa;
  font-size: 0.9rem;
}

.sm-hero__link {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 20px;
  padding-bottom: 40px;
}

.sm-hero__link a {
  font-weight: 700;
  text-decoration: none;
  color: var(--sm-accent);
}

/* =========================
   Navbar
========================= */

.sm-navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sm-line);
}

.sm-navbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
}

.sm-navbar__brand {
  display: grid;
  gap: 2px;
  color: var(--sm-text);
  text-decoration: none;
  font-weight: 700;
}

.sm-navbar__brand small {
  color: var(--sm-muted);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.sm-navbar__menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
}

.sm-navbar__menu a {
  color: var(--sm-text);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.82;
  transition: opacity 0.2s ease;
}

.sm-navbar__menu a:hover,
.sm-navbar__menu a.is-active {
  opacity: 1;
}

.sm-navbar__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--sm-line);
  background: transparent;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .sm-navbar__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sm-navbar__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 24px;
    min-width: 180px;
    padding: 16px;
    border: 1px solid var(--sm-line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: 0.2s ease;
  }

  .sm-navbar.is-open .sm-navbar__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .sm-navbar__menu ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* =========================
   Main wrapper (全宽磨砂层)
========================= */

.sm-main {
  background: var(--glass-bg);
  padding-bottom: 80px;
  margin-top: -5px;
  position: relative;
  z-index: 3;
}

/* =========================
   Section
========================= */

.sm-section {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 24px;
}

.sm-section__eyebrow {
  margin: 0 0 8px;
  color: var(--sm-muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sm-section__title {
  margin: 0 0 28px;
  font-size: clamp(24px, 5vw, 36px);
  line-height: 1.15;
  word-break: break-word;
}

/* =========================
   Main Project Cards
========================= */

.sm-cards {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.sm-card {
  display: flex;
  flex-direction: column;
  width: 320px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 25px;
  padding: 25px;
  transition: all 0.3s ease;
}

.sm-card:hover {
  transform: translateY(-10px);
  border-color: var(--sm-accent, #1a5e2e);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.sm-card__image {
  width: 100%;
  height: 160px;
  border-radius: 15px;
  margin-bottom: 20px;
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.sm-card__title {
  margin-bottom: 10px;
  font-size: 1.25rem;
  color: #333;
}

.sm-card__desc {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.sm-card__note {
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.sm-card__links {
  margin-bottom: 6px;
}

.sm-card__links a {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.sm-card__links a:hover {
  text-decoration: underline;
}

.sm-card__time {
  margin-top: 14px;
  font-size: 12px;
  color: #aaa;
}

@media (max-width: 768px) {
  .sm-card {
    width: 100%;
  }
}

/* =========================
   Gallery
========================= */

.sm-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 18px;
}

.sm-gallery__item {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 0;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(247, 244, 231, 0.7);
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
}

.sm-gallery__thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.sm-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.sm-gallery__item:hover .sm-gallery__thumb img {
  transform: scale(1.04);
}

.sm-gallery__info {
  padding: 14px 16px 16px;
}

.sm-gallery__name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.sm-gallery__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--sm-muted);
  word-break: break-word;
}

.sm-gallery__time {
  margin: 6px 0 0;
  font-size: 11px;
  color: #aaa;
}

/* =========================
   Lightbox
========================= */

.sm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.78);
}

.sm-lightbox[hidden] {
  display: none;
}

.sm-lightbox__figure {
  margin: 0;
  width: min(80vw, 900px);
}

.sm-lightbox__figure img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
}

.sm-lightbox__figure figcaption {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.sm-lightbox__btn {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sm-lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.sm-lightbox__btn[data-action='close'] {
  top: 24px;
  right: 24px;
}

.sm-lightbox__btn[data-action='prev'] {
  left: 24px;
}

.sm-lightbox__btn[data-action='next'] {
  right: 24px;
}

/* =========================
   Floating
========================= */

.sm-floating__top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  width: 46px;
  height: 46px;
  border: 1px solid var(--sm-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  color: var(--sm-text);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.25s ease;
}

.sm-floating__top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.sm-floating__top:hover {
  background: var(--sm-accent);
  color: #ffffff;
}

/* =========================
   Cursor
========================= */

.sm-cursor-dot,
.sm-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  pointer-events: none;
  border-radius: 999px;
}

.sm-cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--sm-accent);
}

.sm-cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(24, 24, 24, 0.45);
  transition:
    width 0.18s ease,
    height 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.sm-cursor-ring.is-hover {
  width: 56px;
  height: 56px;
  background: rgba(24, 24, 24, 0.05);
  border-color: rgba(24, 24, 24, 0.7);
}

.sm-cursor-hide,
.sm-cursor-hide * {
  cursor: none !important;
}

@media (pointer: coarse) {
  .sm-cursor-dot,
  .sm-cursor-ring {
    display: none;
  }

  .sm-cursor-hide,
  .sm-cursor-hide * {
    cursor: auto !important;
  }
}

/* =========================
   Responsive
========================= */

@media (max-width: 640px) {
  .sm-hero__avatar {
    width: 80px;
    height: 80px;
    right: 10px;
    top: calc(20% + 22px);
  }

  .sm-section {
    padding: 60px 16px;
  }

  .sm-lightbox__btn[data-action='prev'] {
    left: 8px;
  }

  .sm-lightbox__btn[data-action='next'] {
    right: 8px;
  }
}
