/* ============================================
   奶牛有油 · 个人作品集
   深色主题 / 奶咖棕配色（呼应 LOGO）
============================================ */

:root {
  --bg: #14100e;
  --bg-soft: #1c1613;
  --bg-card: #221a16;
  --border: rgba(214, 189, 168, 0.12);
  --text: #efe7de;
  --text-dim: #a89888;
  --accent: #d6a77a;        /* 奶咖色 */
  --accent-strong: #8a5f43; /* LOGO 棕 */
  --accent-soft: rgba(214, 167, 122, 0.14);
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--accent-strong); color: #fff; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* ---------- 导航 ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  transition: background .3s, padding .3s, box-shadow .3s;
}
.navbar.scrolled {
  padding: 10px 0;
  background: rgba(20, 16, 14, .85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; transition: transform .4s; }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.08); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-size: 1.2rem; font-weight: 700; letter-spacing: 2px; }
.brand-domain {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .68rem; color: var(--text-dim); letter-spacing: 0; white-space: nowrap;
}

.nav-links { display: flex; gap: 36px; }
.nav-link {
  font-size: .95rem; color: var(--text-dim); position: relative; padding: 4px 0;
  transition: color .25s;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--accent); border-radius: 2px;
  transition: width .3s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; text-align: center; padding: 120px 0 80px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 400px at 70% 20%, rgba(138, 95, 67, .22), transparent 70%),
    radial-gradient(500px 380px at 25% 75%, rgba(214, 167, 122, .10), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 80%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.hero-logo {
  width: 130px; height: 130px; object-fit: contain; margin-bottom: 28px;
  filter: drop-shadow(0 8px 32px rgba(138, 95, 67, .5));
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero-title { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: 1px; }
.accent { color: var(--accent); }
.hero-subtitle { margin-top: 14px; color: var(--accent); font-size: 1.05rem; letter-spacing: 3px; }
.hero-desc { margin-top: 18px; color: var(--text-dim); font-size: 1.05rem; }

.hero-actions { margin-top: 36px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 13px 34px; border-radius: 999px;
  font-size: 1rem; font-weight: 600; letter-spacing: 1px;
  transition: transform .25s, box-shadow .25s, background .25s, border-color .25s;
}
.btn:active { transform: scale(.96); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #b98a5e);
  color: #241a12;
  box-shadow: 0 8px 26px rgba(214, 167, 122, .28);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(214, 167, 122, .4); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.btn-lg { padding: 15px 44px; font-size: 1.1rem; }

.hero-stats {
  margin-top: 56px; display: flex; justify-content: center; gap: clamp(32px, 8vw, 80px);
}
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: .85rem; color: var(--text-dim); letter-spacing: 2px; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; justify-content: center;
}
.mouse {
  width: 26px; height: 42px; border: 2px solid var(--text-dim); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 7px;
}
.wheel {
  width: 4px; height: 8px; border-radius: 4px; background: var(--accent);
  animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- 通用 Section ---------- */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block; font-size: .78rem; letter-spacing: 5px; color: var(--accent);
  border: 1px solid var(--border); padding: 6px 16px; border-radius: 999px;
  background: var(--accent-soft);
}
.section-title { margin-top: 18px; font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; }
.section-desc { margin-top: 10px; color: var(--text-dim); }

/* ---------- 分类筛选 ---------- */
.filter-bar {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 48px;
}
.filter-btn {
  padding: 10px 22px; border-radius: 999px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-dim); font-size: .95rem; font-family: inherit;
  transition: all .25s;
}
.filter-btn em { font-style: normal; opacity: .6; margin-left: 4px; font-size: .85em; }
.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active {
  background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent); font-weight: 600;
}

/* ---------- 项目卡片 ---------- */
.project-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.project-card {
  position: relative; overflow: hidden;
  display: block;
  background: linear-gradient(160deg, var(--bg-card), #261d17);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px;
  transition: transform .65s cubic-bezier(.22, .61, .36, 1), border-color .65s ease, box-shadow .65s ease;
  animation: cardIn .8s ease both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 右下角装饰光斑 */
.project-card::before {
  content: ""; position: absolute; bottom: -50px; right: -50px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 167, 122, .15), transparent 70%);
  opacity: .5; transition: transform .9s ease, opacity .9s ease;
  pointer-events: none;
}
/* 顶部流光线 */
.project-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(214, 167, 122, .05));
  opacity: 0; transition: opacity .7s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(214, 167, 122, .5);
  box-shadow: var(--shadow);
}
.project-card:hover::before { transform: scale(1.35); opacity: 1; }
.project-card:hover::after { opacity: 1; }
.project-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), rgba(138, 95, 67, .25));
  border: 1px solid var(--border);
  transition: transform .7s cubic-bezier(.22, .61, .36, 1), background .7s ease;
}
.project-card:hover .project-icon {
  transform: translateY(-2px) scale(1.03);
  background: rgba(214, 167, 122, .22);
}
.project-card h3 { font-size: 1.15rem; font-weight: 700; transition: color .6s ease; }
.project-card:hover h3 { color: var(--accent); }
.project-en { margin-top: 4px; font-size: .82rem; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; }
.project-desc { margin-top: 12px; font-size: .93rem; color: var(--text-dim); min-height: 3em; }
.project-tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: .76rem; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border); color: var(--text-dim);
}
.project-cat {
  position: absolute; top: 22px; right: 22px;
  font-size: .74rem; letter-spacing: 1px; color: var(--text-dim);
}

.empty-tip { text-align: center; color: var(--text-dim); padding: 40px 0; }

/* ---------- 关于 ---------- */
.about-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.about-card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--bg-card), #261d17);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 28px;
  transition: transform .65s cubic-bezier(.22, .61, .36, 1), border-color .65s ease, box-shadow .65s ease;
}
/* 右上角装饰光斑 */
.about-card::before {
  content: ""; position: absolute; top: -46px; right: -46px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 167, 122, .16), transparent 70%);
  opacity: .55; transition: transform .9s ease, opacity .9s ease;
  pointer-events: none;
}
/* 顶部流光线 */
.about-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(214, 167, 122, .05));
  opacity: 0; transition: opacity .7s ease;
}
.about-card:hover {
  transform: translateY(-4px);
  border-color: rgba(214, 167, 122, .5);
  box-shadow: var(--shadow);
}
.about-card:hover::before { transform: scale(1.35); opacity: 1; }
.about-card:hover::after { opacity: 1; }

.about-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
  background: var(--accent-soft); border: 1px solid var(--border);
  color: var(--accent);
  transition: transform .7s cubic-bezier(.22, .61, .36, 1), background .7s ease;
}
.about-card:hover .about-icon {
  transform: translateY(-2px) scale(1.03);
  background: rgba(214, 167, 122, .22);
}
.about-card h3 { font-size: 1.1rem; margin-bottom: 8px; transition: color .6s ease; }
.about-card:hover h3 { color: var(--accent); }
.about-card p { font-size: .93rem; color: var(--text-dim); }

/* ---------- 联系 ---------- */
.contact-box {
  text-align: center; padding: 70px 30px;
  background: linear-gradient(160deg, var(--bg-card), #2a1f18);
  border: 1px solid var(--border); border-radius: 24px; position: relative; overflow: hidden;
}
.contact-box::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 300px at 50% 0%, rgba(214, 167, 122, .12), transparent 70%);
  pointer-events: none;
}
.contact-logo { width: 76px; height: 76px; object-fit: contain; margin-bottom: 18px; }
.contact-box h2 { font-size: 1.8rem; font-weight: 800; }
.contact-box p { margin: 14px 0 30px; color: var(--text-dim); }
.contact-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); padding: 36px 0; background: var(--bg-soft); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 1px; }
.footer-logo { width: 30px; height: 30px; object-fit: contain; }
.footer-copy { color: var(--text-dim); font-size: .88rem; }

/* ---------- 滚动显现动效 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- 近期进行中 · 3屏轮播 ---------- */
.showcase { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 110px 0; }
.showcase .section-head { margin-bottom: 40px; }
.showcase-slider {
  position: relative; overflow: hidden;
  min-height: 320px;
  border-radius: 24px; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.showcase-track {
  position: relative; height: 100%;
}
.showcase-slide {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.showcase-slide.active { z-index: 1; }
.showcase-slide:not(.active) { pointer-events: none; }
.slide-bg { display: none; }

/* 马赛克格子 */
.mosaic {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(6, 1fr);
}
.mosaic-cell {
  opacity: 0;
  transition: opacity .5s ease;
}
.slide-mask {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,16,14,.15) 0%, rgba(20,16,14,.55) 55%, rgba(20,16,14,.92) 100%);
}
.slide-content {
  position: relative; z-index: 1;
  padding: clamp(28px, 6vw, 72px);
  max-width: 640px;
  opacity: 0; transition: opacity .35s ease;
}
.showcase-slide.active .slide-content { opacity: 1; transition-delay: .35s; }
.slide-content h3 {
  margin-top: 16px; font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 800;
  text-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.slide-en { margin-top: 6px; color: var(--accent); letter-spacing: 2px; text-transform: uppercase; font-size: .9rem; }
.slide-desc { margin: 14px 0 26px; color: rgba(239,231,222,.85); font-size: 1rem; }
.slide-content .badge.status {
  display: inline-block; font-size: .8rem; padding: 6px 16px;
  color: #8fd694; border-color: rgba(143,214,148,.3); background: rgba(20,16,14,.55);
}

/* 轮播按钮横向偏移 */
.btn-offset { position: relative; left: 90px; }

/* 轮播右上角状态标签 */
.slide-tag {
  position: absolute; top: 26px; right: 28px; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  color: #8fd694; font-size: .78rem; letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.slide-tag::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #8fd694;
  box-shadow: 0 0 6px rgba(143, 214, 148, .9), 0 0 14px rgba(143, 214, 148, .45);
  animation: dotGlow 2.4s ease-in-out infinite;
}
@keyframes dotGlow {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(143, 214, 148, .9), 0 0 14px rgba(143, 214, 148, .45); }
  50% { opacity: .45; box-shadow: 0 0 2px rgba(143, 214, 148, .4), 0 0 5px rgba(143, 214, 148, .15); }
}

/* 轮播箭头 */
.showcase-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(239,231,222,.25); background: rgba(20,16,14,.45);
  color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .25s, border-color .25s, opacity .25s;
}
.showcase-btn:hover { background: rgba(214,167,122,.25); border-color: var(--accent); }
.showcase-btn.prev { left: 24px; }
.showcase-btn.next { right: 24px; }

/* 轮播圆点 */
.showcase-dots {
  position: absolute; bottom: 24px; right: 32px; z-index: 2;
  display: flex; gap: 10px;
}
.showcase-dots button {
  width: 10px; height: 10px; border-radius: 999px;
  border: none; cursor: pointer; padding: 0;
  background: rgba(239,231,222,.35);
  transition: width .3s, background .3s;
}
.showcase-dots button.active { width: 30px; background: var(--accent); }

/* ---------- 移动端适配 ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 64px; right: 0; flex-direction: column;
    width: min(70vw, 280px); padding: 30px; gap: 22px;
    background: rgba(28, 22, 19, .97); border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border); border-radius: 0 0 0 20px;
    transform: translateX(100%); transition: transform .35s ease;
  }
  .nav-links.open { transform: translateX(0); }

  .section { padding: 80px 0; }
  .showcase { padding: 80px 0; }
  .hero-logo { width: 100px; height: 100px; }
  .hero-stats { margin-top: 40px; }
  .footer-inner { justify-content: center; text-align: center; }

  .showcase-slider { border-radius: 16px; }
  .showcase-btn { width: 42px; height: 42px; font-size: 1.3rem; }
  .showcase-btn.prev { left: 12px; }
  .showcase-btn.next { right: 12px; }
  .showcase-dots { right: 50%; transform: translateX(50%); }
}
