/* ===== CSS Custom Properties ===== */
:root {
  --bg:        #0a0a0a;
  --surface:   #121212;
  --border:    #1f1f1f;
  --text:      #e8e8e8;
  --text-muted:#888;
  --accent:    #c9a96e;
  --accent-dim:rgba(201, 169, 110, 0.12);
  --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max-width: 1200px;
  --nav-h:     64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== Navigation ===== */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  transition: background .35s, backdrop-filter .35s;
}
#nav.scrolled {
  background: rgba(10, 10, 10, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 36px;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--text-muted);
  transition: color .25s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:first-child { transform: rotate(45deg) translate(3px, 3px); }
.nav-toggle.open span:last-child  { transform: rotate(-45deg) translate(3px, -3px); }

/* ===== Hero ===== */
#hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(201, 169, 110, .06) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(201, 169, 110, .03) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 3px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.hero-name {
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 300;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.hero-tags {
  font-size: 13px;
  color: rgba(255,255,255,.35);
  letter-spacing: 2px;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-arrow {
  display: block;
  width: 20px;
  height: 20px;
  border-right: 1px solid rgba(255,255,255,.3);
  border-bottom: 1px solid rgba(255,255,255,.3);
  transform: rotate(45deg);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .3; transform: rotate(45deg) translate(0, 0); }
  50%      { opacity: 1;   transform: rotate(45deg) translate(4px, 4px); }
}

/* ===== Section Common ===== */
section {
  padding: 140px 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 20px;
}
.section-num {
  font-size: 13px;
  color: var(--accent);
  font-weight: 300;
  letter-spacing: 2px;
}
.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 300;
  letter-spacing: -0.5px;
}
.section-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 60px;
  font-weight: 300;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.9;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.stat-item {
  text-align: center;
  padding: 28px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color .3s;
}
.stat-item:hover {
  border-color: rgba(201, 169, 110, .3);
}
.stat-value {
  display: block;
  font-size: 36px;
  font-weight: 200;
  color: var(--accent);
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ===== Gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 12px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
}
.gallery-item.tall  { grid-row: span 2; }
.gallery-item.wide  { grid-column: span 2; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s, filter .4s;
  filter: brightness(.85);
}
.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1);
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 1px;
  transition: all .4s;
}
.gallery-item:hover .gallery-placeholder {
  border-color: rgba(201, 169, 110, .4);
  color: var(--accent);
  background: #1a1a1a;
}

/* ===== Gaming ===== */
.game-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.game-card {
  padding: 48px 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color .3s, transform .3s;
}
.game-card:hover {
  border-color: rgba(201, 169, 110, .3);
  transform: translateY(-4px);
}
.game-icon {
  font-size: 36px;
  margin-bottom: 20px;
}
.game-card h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.game-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ===== Fitness ===== */
.fitness-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.fitness-focus h3 {
  font-size: 15px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 36px;
}

.lift-bars {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lift-bar {
  display: grid;
  grid-template-columns: 48px 1fr 56px;
  align-items: center;
  gap: 16px;
}
.lift-name {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.bar-track {
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: var(--w);
  background: var(--accent);
  border-radius: 1px;
  transition: width 1.2s cubic-bezier(.16,1,.3,1);
}
.lift-weight {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}

.fitness-philosophy blockquote {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-muted);
  border-left: 1px solid var(--accent);
  padding-left: 24px;
  font-style: italic;
}

/* ===== 3D Printing ===== */
.print-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.print-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .3s, transform .3s;
}
.print-card:hover {
  border-color: rgba(201, 169, 110, .3);
  transform: translateY(-4px);
}
.print-placeholder,
.print-card > img {
  height: 200px;
  width: 100%;
  object-fit: cover;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 1px;
}
.print-card h3 {
  padding: 20px 20px 6px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
}
.print-card p {
  padding: 0 20px 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== Engineering ===== */
.eng-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.eng-category {
  padding: 36px 28px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color .3s;
}
.eng-category:hover {
  border-color: rgba(201, 169, 110, .3);
}
.eng-category h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.eng-category li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
  position: relative;
  padding-left: 16px;
}
.eng-category li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 1px;
  background: rgba(255,255,255,.2);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: var(--bg);
  padding: 12px 28px;
  border-radius: 4px;
  font-size: 14px;
  letter-spacing: 1px;
  z-index: 3000;
  opacity: 0;
  transition: all .35s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Guestbook ===== */
.comment-form {
  margin-bottom: 48px;
}
.form-row {
  display: flex;
  gap: 10px;
  max-width: 640px;
}
.form-row input {
  flex: 1;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .3s;
}
.form-row input:focus {
  border-color: rgba(201, 169, 110, .5);
}
.form-row button {
  padding: 12px 28px;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background .3s, color .3s;
  font-family: var(--font);
  white-space: nowrap;
}
.form-row button:hover {
  background: var(--accent);
  color: var(--bg);
}

.comments-list {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.comment-item {
  padding: 18px 20px;
  border-left: 1px solid var(--border);
  transition: border-color .3s;
}
.comment-item:hover {
  border-left-color: rgba(201, 169, 110, .4);
}
.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.comment-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}
.comment-time {
  font-size: 11px;
  color: var(--text-muted);
}
.comment-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}
.comments-empty {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 40px 0;
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }
  .form-row button {
    width: 100%;
  }
}

/* ===== Footer ===== */
#contact {
  text-align: center;
  padding: 120px 48px 80px;
  border-top: 1px solid var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-content h2 {
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 32px;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 48px;
}
.contact-link {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 1px;
  transition: color .25s;
  position: relative;
}
.contact-link:hover { color: var(--accent); }
.contact-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .25s;
}
.contact-link:hover::after { transform: scaleX(1); }

.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,.2);
  letter-spacing: 1px;
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.92);
  align-items: center;
  justify-content: center;
}
.lightbox.open {
  display: flex;
}
.lightbox-close {
  position: absolute;
  top: 32px;
  right: 48px;
  font-size: 36px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .25s;
  line-height: 1;
}
.lightbox-close:hover { color: var(--text); }

.lightbox-content {
  max-width: 85vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for cards */
.reveal-delay-1 { transition-delay: 0s; }
.reveal-delay-2 { transition-delay: .1s; }
.reveal-delay-3 { transition-delay: .2s; }
.reveal-delay-4 { transition-delay: .3s; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .eng-grid   { grid-template-columns: 1fr 1fr; }
  .gallery    { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.wide { grid-column: span 1; }
}

@media (max-width: 768px) {
  section { padding: 100px 24px; }
  #nav     { padding: 0 24px; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    padding: 48px;
    background: rgba(10, 10, 10, .96);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    transition: right .4s ease;
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 16px; }

  .nav-toggle { display: flex; }

  .hero-scroll { bottom: 32px; }

  .about-stats { grid-template-columns: 1fr; gap: 16px; }

  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 160px;
    gap: 8px;
  }
  .gallery-item.tall,
  .gallery-item.wide { grid-row: auto; grid-column: auto; }

  .game-cards { grid-template-columns: 1fr; }
  .fitness-content { grid-template-columns: 1fr; gap: 40px; }
  .print-grid { grid-template-columns: 1fr; }
  .eng-grid   { grid-template-columns: 1fr; }

  .contact-links { flex-wrap: wrap; gap: 24px; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; }
}
