/* ============================================================
   SMWSWK PHOTOGRAPHY — Custom Hyde Theme
   ============================================================ */

/* ── Variables ── */
:root {
  --bg:        #0a0a0a;
  --sidebar-bg:#111111;
  --text:      #e8e4df;
  --muted:     #777;
  --accent:    #c9a96e;
  --border:    #222;
  --radius:    4px;
  --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-serif: 'Georgia', serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-weight: 400; letter-spacing: 0.02em; }
a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.75; }
p { margin: 0.8em 0; }

/* ── Sidebar ── */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  width: 220px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 100;
}
.sidebar-sticky { padding: 2.5rem 1.5rem; height: 100%; display: flex; flex-direction: column; }
.sidebar-about { margin-bottom: 2.5rem; }
.sidebar-about h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.sidebar-about .subtitle {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sidebar-nav { list-style: none; margin-bottom: auto; }
.sidebar-nav li { margin: 0.5rem 0; }
.sidebar-nav a {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: block;
  padding: 0.25rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: all 0.2s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  color: var(--text);
  border-left-color: var(--accent);
}
.sidebar-footer {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── Content ── */
.content {
  margin-left: 220px;
  padding: 3rem 4rem;
  max-width: 1400px;
}

/* ── Photo Gallery Grid ── */
.gallery-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.gallery-header h1 {
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.gallery-header p { font-size: 0.85rem; color: var(--muted); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4 / 3;
}
.gallery-item:hover { opacity: 0.92; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.03); }

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.gallery-item:hover .overlay { opacity: 1; }
.overlay span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Lightbox ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#lightbox.active { display: flex; }
#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}
#lightbox-close {
  position: fixed;
  top: 1.5rem; right: 2rem;
  color: rgba(255,255,255,0.6);
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
  z-index: 1001;
}
#lightbox-close:hover { color: #fff; }
#lightbox-meta {
  position: fixed;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1001;
}

/* ── Home / Index ── */
.home-hero {
  min-height: 74vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
}
.home-hero h1 {
  font-size: 4.6rem;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.1;
}
.home-hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.home-hero .lead {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.8;
  margin-top: 1.5rem;
}
.home-cta {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.btn-outline {
  border-color: var(--border);
  color: var(--muted);
}
.btn-outline:hover { background: var(--border); color: var(--text); }

.btn {
  display: inline-block;
  padding: 0.68rem 1.35rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0;
  border-radius: 8px;
  transition: all 0.25s;
  cursor: pointer;
}
.btn:hover { background: var(--accent); color: var(--bg); opacity: 1; }
.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}
.hero-metrics span {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  font-size: 0.74rem;
  background: rgba(255,255,255,0.02);
}
.hero-metrics strong {
  color: var(--text);
  font-size: 1rem;
  margin-right: 0.25rem;
}

/* ── Home Sections ── */
.spotlight-section,
.project-section,
.skill-section {
  margin-top: 3rem;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.section-heading span {
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: uppercase;
}
.section-heading h2 {
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.feature-card,
.cluster-card,
.project-card {
  background: #0f0f0f;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.feature-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.feature-card:hover,
.cluster-card:hover,
a.project-card:hover {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(201,169,110,0.08);
}
.feature-wide {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}
.feature-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.feature-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-width: 0;
}
.feature-kicker,
.cluster-label {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: uppercase;
}
.feature-body h3,
.cluster-body h3 {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: 1.1rem;
  letter-spacing: 0;
}
.feature-body p,
.cluster-body p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
  margin: 0;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.game-snapshot {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  background: linear-gradient(#0c1730, #12264d 72%, #111827 72%);
  border-right: 1px solid var(--border);
}
.game-snapshot::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255,68,102,0.8);
  box-shadow: 0 0 18px rgba(255,68,102,0.22);
}
.moon {
  position: absolute;
  right: 16%;
  top: 18%;
  width: 46px;
  height: 46px;
  background: #d9c6a5;
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(217,198,165,0.35);
}
.ridge {
  position: absolute;
  bottom: 22%;
  height: 48px;
  background: rgba(35,62,118,0.72);
}
.ridge-a { left: 7%; width: 36%; }
.ridge-b { right: 8%; width: 44%; height: 58px; }
.slash {
  position: absolute;
  width: 120px;
  height: 3px;
  background: #ffe7a3;
  box-shadow: 0 0 12px #ffe7a3;
  transform: rotate(-18deg);
}
.slash-a { left: 24%; top: 42%; }
.slash-b { left: 38%; top: 54%; width: 84px; transform: rotate(20deg); background:#ff6b8a; }
.ninja-dot {
  position: absolute;
  left: 32%;
  bottom: 26%;
  width: 18px;
  height: 30px;
  background: #111;
  border: 2px solid #ef476f;
  border-radius: 8px 8px 4px 4px;
}
.fa-bo-snapshot {
  background: linear-gradient(#ead9b8 0 62%, #8b5635 62% 100%);
}
.fa-bo-snapshot::before {
  border-color: rgba(201,169,110,0.78);
  box-shadow: 0 0 18px rgba(201,169,110,0.2);
}
.class-board {
  position: absolute;
  left: 22%;
  top: 16%;
  width: 56%;
  height: 34%;
  border: 8px solid #6b4b29;
  border-radius: 8px;
  background: #214d3a;
}
.class-board::before,
.class-board::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  height: 5px;
  border-radius: 999px;
  background: rgba(225,232,210,0.7);
}
.class-board::before { top: 30%; }
.class-board::after { top: 62%; }
.fa-wave {
  position: absolute;
  top: 43%;
  width: 34%;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 18px currentColor;
}
.fa-wave-blue {
  left: 21%;
  color: #56b6f0;
  background: #56b6f0;
  transform: rotate(38deg);
}
.fa-wave-red {
  right: 21%;
  color: #e35d48;
  background: #e35d48;
  transform: rotate(-38deg);
}
.desk {
  position: absolute;
  bottom: 18%;
  width: 21%;
  height: 22%;
  border-radius: 8px;
  background: #c98448;
  box-shadow: 0 12px 0 rgba(84,45,25,0.28);
}
.desk-left { left: 11%; }
.desk-right { right: 11%; }
.card-stack {
  position: absolute;
  bottom: 13%;
  width: 34px;
  height: 46px;
  border: 2px solid #d7c8ae;
  border-radius: 5px;
  background: #fffaf0;
  transform: rotate(-8deg);
}
.card-stack-a { left: 41%; }
.card-stack-b { right: 41%; transform: rotate(8deg); }

/* 平行人生 snapshot */
.parallel-life-snapshot {
  background: linear-gradient(#0e0e0b, #1a1810);
}
.parallel-life-snapshot::before {
  border-color: rgba(215,180,106,0.5);
  box-shadow: 0 0 18px rgba(215,180,106,0.15);
}
.pl-timeline {
  position: absolute;
  left: 50%;
  top: 18%;
  width: 2px;
  height: 55%;
  background: rgba(215,180,106,0.25);
}
.pl-node {
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: #d7b46a;
  box-shadow: 0 0 8px rgba(215,180,106,0.5);
}
.pl-node-a { top: 22%; }
.pl-node-b { top: 42%; }
.pl-node-c { top: 62%; }
.pl-fork {
  position: absolute;
  top: 42%;
  width: 36px;
  height: 1px;
  background: rgba(215,180,106,0.2);
}
.pl-fork-left {
  left: 50%;
  transform-origin: left center;
  transform: rotate(28deg);
}
.pl-fork-right {
  left: 50%;
  transform-origin: left center;
  transform: rotate(-28deg);
}
.pl-city {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 18%;
  background: linear-gradient(to top, rgba(215,180,106,0.08), transparent);
}
.pl-city::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 8%;
  height: 40%;
  background: rgba(215,180,106,0.12);
}
.pl-city::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 22%;
  width: 12%;
  height: 65%;
  background: rgba(215,180,106,0.1);
}

.cluster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.cluster-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 280px;
  overflow: hidden;
}
.cluster-card:not(.visual-lab) {
  display: flex;
}
.cluster-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
}
.cluster-cover {
  border-right: 1px solid var(--border);
  background: #141414;
}
.image-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
}
.image-stack img {
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
  display: block;
}
.image-stack img:first-child {
  grid-row: 1 / span 2;
}
.cluster-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.1rem;
}
.cluster-links a,
.mini-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  color: var(--text);
  background: rgba(255,255,255,0.02);
  font-size: 0.72rem;
  text-decoration: none;
}
.cluster-links a:hover {
  opacity: 1;
  color: var(--accent);
  border-color: rgba(201,169,110,0.5);
}
.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.project-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.p-icon { font-size: 1.6rem; margin-bottom: 0.6rem; }
.p-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.p-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}
.p-link {
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0;
  margin-top: 0.8rem;
  opacity: 0.8;
}
.project-card:hover .p-link { opacity: 1; }

/* ── Skill Section ── */
.skill-intro {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.8rem;
  max-width: 720px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.8rem;
  margin-bottom: 3rem;
}

.skill-cat {
  background: #0f0f0f;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
}
.sc-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.sc-items {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.8;
}

.btn-ghost {
  border-color: var(--border);
  color: var(--muted);
}
.btn-ghost:hover { background: var(--border); color: var(--text); }

/* ── Manual Update Button ── */
.update-bar {
  margin-top: 4rem;
  padding: 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.update-bar p { font-size: 0.78rem; color: var(--muted); margin: 0; }
#sync-status {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  min-width: 200px;
}
#sync-status.running { color: var(--accent); }
#sync-status.done { color: #5a8a5a; }
#sync-status.error { color: #a05050; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .feature-grid,
  .cluster-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar { width: 100%; height: auto; position: relative; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-sticky { flex-direction: row; flex-wrap: wrap; padding: 1.5rem; gap: 1rem; align-items: center; }
  .sidebar-about { margin-bottom: 0; }
  .sidebar-nav { display: flex; gap: 1.5rem; margin-bottom: 0; }
  .sidebar-nav a { border-left: none; padding-left: 0; border-bottom: 2px solid transparent; }
  .sidebar-nav a:hover, .sidebar-nav a.active { border-left-color: transparent; border-bottom-color: var(--accent); }
  .sidebar-footer { display: none; }
  .content { margin-left: 0; padding: 2rem 1.25rem; }
  .home-hero { min-height: auto; padding: 3rem 0 2.5rem; }
  .home-hero h1 { font-size: 2.7rem; }
  .home-cta .btn { width: 100%; text-align: center; }
  .section-heading { display: block; }
  .section-heading span { display: block; margin-bottom: 0.3rem; }
  .feature-wide,
  .cluster-card {
    display: flex;
    flex-direction: column;
  }
  .game-snapshot { min-height: 210px; border-right: none; border-bottom: 1px solid var(--border); }
  .cluster-cover { border-right: none; border-bottom: 1px solid var(--border); }
  .image-stack img { min-height: 110px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; }
  .project-grid { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: 1fr; }
}
