/* ===== Variables ===== */
:root {
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-primary-light: #eef2ff;
  --color-ok: #22c55e;
  --color-ok-light: #f0fdf4;
  --color-warn: #f59e0b;
  --color-warn-light: #fffbeb;
  --color-fail: #ef4444;
  --color-fail-light: #fef2f2;
  --color-info: #3b82f6;
  --color-info-light: #eff6ff;
  --color-secondary: #0f172a;
  --color-text: #334155;
  --color-text-light: #64748b;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-border: #e2e8f0;
  --color-card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-sans: 'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  --font-mono: 'Fira Code','JetBrains Mono','Consolas',monospace;
  --container-max: 1200px;
}

/* ===== Reset ===== */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:80px; }
body { font-family:var(--font-sans); font-size:15px; line-height:1.6; color:var(--color-text); background:var(--color-bg); -webkit-font-smoothing:antialiased; }
img { max-width:100%; display:block; }
a { text-decoration:none; color:inherit; }
ul { list-style:none; }
button { border:none; background:none; cursor:pointer; font-family:inherit; }

/* ===== Layout ===== */
.container { max-width:var(--container-max); margin:0 auto; padding:0 24px; }
.section { padding:64px 0; }
.section__header { margin-bottom:32px; }
.section__tag { display:inline-block; font-size:0.75rem; font-weight:600; text-transform:uppercase; letter-spacing:0.08em; color:var(--color-primary); background:var(--color-primary-light); padding:4px 12px; border-radius:100px; margin-bottom:10px; }
.section__title { font-size:1.5rem; font-weight:700; color:var(--color-secondary); line-height:1.3; }

/* ===== Header ===== */
.header { position:fixed; top:0; left:0; right:0; z-index:1000; background:rgba(255,255,255,0.9); backdrop-filter:blur(12px); border-bottom:1px solid transparent; transition:var(--transition); }
.header.scrolled { border-bottom-color:var(--color-border); box-shadow:var(--shadow-sm); }
.nav { display:flex; align-items:center; justify-content:space-between; height:56px; }
.nav__logo { display:flex; align-items:center; gap:8px; font-size:1rem; font-weight:700; color:var(--color-secondary); font-family:var(--font-mono); }
.nav__logo-icon { width:28px; height:28px; display:flex; align-items:center; justify-content:center; background:var(--color-primary-light); border-radius:var(--radius-sm); color:var(--color-primary); }
.nav__logo-icon svg { width:16px; height:16px; }
.nav__list { display:flex; gap:4px; }
.nav__link { display:block; padding:6px 12px; font-size:0.85rem; font-weight:500; color:var(--color-text-light); border-radius:var(--radius-sm); transition:var(--transition); }
.nav__link:hover,.nav__link.active { color:var(--color-primary); background:var(--color-primary-light); }
.nav__toggle { display:none; flex-direction:column; gap:5px; width:28px; }
.nav__toggle span { display:block; height:2px; background:var(--color-secondary); border-radius:2px; transition:var(--transition); }

/* ===== Home Hero ===== */
.home-hero { padding-top:56px; background:var(--color-bg-alt); border-bottom:1px solid var(--color-border); padding-bottom:48px; }
.home-hero__title { font-size:2rem; font-weight:800; color:var(--color-secondary); margin-bottom:8px; font-family:var(--font-mono); }
.home-hero__desc { font-size:0.95rem; color:var(--color-text-light); margin-bottom:24px; }
.home-hero__stats { display:flex; gap:32px; }
.home-hero__stat { display:flex; flex-direction:column; }
.home-hero__stat-num { font-size:1.75rem; font-weight:800; color:var(--color-primary); line-height:1; }
.home-hero__stat-label { font-size:0.8rem; color:var(--color-text-light); margin-top:4px; }

/* ===== Project Cards Grid ===== */
.projects-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.project-card { display:flex; flex-direction:column; background:var(--color-card); border:1px solid var(--color-border); border-radius:var(--radius-md); padding:20px; transition:var(--transition); }
.project-card:hover { box-shadow:var(--shadow-md); border-color:var(--color-primary-light); }
.project-card__header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.project-card__title { font-size:1rem; font-weight:700; color:var(--color-secondary); }
.project-card__status { font-size:0.7rem; font-weight:600; padding:3px 10px; border-radius:100px; white-space:nowrap; }
.project-card__status--active { background:var(--color-ok-light); color:var(--color-ok); }
.project-card__status--completed { background:var(--color-info-light); color:var(--color-info); }
.project-card__status--paused { background:var(--color-warn-light); color:var(--color-warn); }
.project-card__desc { font-size:0.85rem; color:var(--color-text-light); line-height:1.5; margin-bottom:12px; flex:1; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.project-card__meta { display:flex; justify-content:space-between; font-size:0.75rem; color:var(--color-text-light); font-family:var(--font-mono); margin-bottom:12px; }
.project-card__progress { display:flex; align-items:center; gap:10px; }
.project-card__progress-bar { flex:1; height:6px; background:var(--color-border); border-radius:100px; overflow:hidden; }
.project-card__progress-fill { height:100%; background:var(--color-primary); border-radius:100px; }
.project-card__progress-label { font-size:0.75rem; font-weight:600; color:var(--color-text-light); font-family:var(--font-mono); }

/* ===== Project Hero ===== */
.project-hero { padding-top:56px; background:var(--color-bg-alt); border-bottom:1px solid var(--color-border); padding-bottom:32px; }
.project-hero__back { display:inline-block; font-size:0.85rem; color:var(--color-primary); font-weight:500; margin-bottom:16px; transition:var(--transition); }
.project-hero__back:hover { color:var(--color-primary-dark); }
.project-hero__header { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.project-hero__title { font-size:1.75rem; font-weight:800; color:var(--color-secondary); font-family:var(--font-mono); }
.project-hero__status { font-size:0.75rem; font-weight:600; padding:4px 12px; border-radius:100px; }
.project-hero__status--active { background:var(--color-ok-light); color:var(--color-ok); }
.project-hero__status--completed { background:var(--color-info-light); color:var(--color-info); }
.project-hero__status--paused { background:var(--color-warn-light); color:var(--color-warn); }
.project-hero__meta { display:flex; gap:8px; flex-wrap:wrap; }
.project-hero__tag { font-size:0.75rem; font-weight:600; font-family:var(--font-mono); color:var(--color-text-light); background:var(--color-card); border:1px solid var(--color-border); padding:3px 10px; border-radius:var(--radius-sm); }

/* ===== Requirements ===== */
.requirements__content { max-width:720px; }
.requirements__content h2 { font-size:1.15rem; font-weight:700; color:var(--color-secondary); margin:24px 0 12px; }
.requirements__content h2:first-child { margin-top:0; }
.requirements__content p { font-size:0.9rem; color:var(--color-text); margin-bottom:12px; line-height:1.7; }
.requirements__content ul { margin:0 0 16px 20px; list-style:disc; }
.requirements__content li { font-size:0.9rem; color:var(--color-text); margin-bottom:6px; line-height:1.6; }
.requirements__content strong { color:var(--color-secondary); font-weight:600; }

/* ===== Progress / Milestones ===== */
.progress__bar-wrap { display:flex; align-items:center; gap:16px; margin-bottom:32px; max-width:720px; }
.progress__bar { flex:1; height:8px; background:var(--color-border); border-radius:100px; overflow:hidden; }
.progress__fill { height:100%; background:var(--color-primary); border-radius:100px; transition:width 0.6s ease; }
.progress__label { font-size:0.85rem; font-weight:600; color:var(--color-text-light); font-family:var(--font-mono); white-space:nowrap; }

.milestones__timeline { position:relative; max-width:720px; margin:0 auto; padding-left:40px; }
.milestones__timeline::before { content:''; position:absolute; left:15px; top:0; bottom:0; width:2px; background:var(--color-border); }
.milestone { position:relative; padding:0 0 40px 32px; }
.milestone:last-child { padding-bottom:0; }
.milestone__dot { position:absolute; left:-32px; top:4px; width:14px; height:14px; border-radius:50%; border:3px solid var(--color-border); background:var(--color-bg); z-index:1; }
.milestone--done .milestone__dot { border-color:var(--color-ok); background:var(--color-ok); }
.milestone--active .milestone__dot { border-color:var(--color-primary); background:var(--color-primary); box-shadow:0 0 0 4px var(--color-primary-light); }
.milestone--upcoming .milestone__dot { border-color:var(--color-border); background:var(--color-bg); }
.milestone__date { font-size:0.8rem; font-weight:600; color:var(--color-text-light); margin-bottom:4px; font-family:var(--font-mono); }
.milestone__title { font-size:1rem; font-weight:600; color:var(--color-secondary); margin-bottom:4px; }
.milestone__desc { font-size:0.85rem; color:var(--color-text-light); line-height:1.6; }
.milestone__status { display:inline-block; font-size:0.7rem; font-weight:600; padding:2px 8px; border-radius:100px; margin-top:6px; }
.milestone--done .milestone__status { background:var(--color-ok-light); color:var(--color-ok); }
.milestone--active .milestone__status { background:var(--color-primary-light); color:var(--color-primary); }
.milestone--upcoming .milestone__status { background:var(--color-bg-alt); color:var(--color-text-light); border:1px solid var(--color-border); }

/* ===== Team Chips ===== */
.team__chips { display:flex; flex-wrap:wrap; gap:12px; }
.team__chip { display:flex; align-items:center; gap:8px; background:var(--color-card); border:1px solid var(--color-border); border-radius:100px; padding:6px 14px 6px 6px; transition:var(--transition); }
.team__chip:hover { box-shadow:var(--shadow-sm); }
.team__chip-avatar { width:28px; height:28px; display:flex; align-items:center; justify-content:center; background:var(--color-primary-light); border-radius:50%; color:var(--color-primary); font-size:0.8rem; font-weight:700; flex-shrink:0; }
.team__chip-name { font-size:0.85rem; font-weight:600; color:var(--color-secondary); }
.team__chip-role { font-size:0.75rem; color:var(--color-text-light); }

/* ===== Footer ===== */
.footer { background:var(--color-secondary); color:#94a3b8; padding:20px 0; }
.footer__bottom { text-align:center; font-size:0.75rem; }

/* ===== Scroll Top ===== */
.scroll-top { position:fixed; bottom:24px; right:24px; width:36px; height:36px; display:flex; align-items:center; justify-content:center; background:var(--color-primary); color:#fff; border-radius:50%; box-shadow:var(--shadow-md); opacity:0; visibility:hidden; transform:translateY(10px); transition:var(--transition); z-index:99; }
.scroll-top.visible { opacity:1; visibility:visible; transform:translateY(0); }
.scroll-top:hover { background:var(--color-primary-dark); }
.scroll-top svg { width:18px; height:18px; }

/* ===== Animations ===== */
.fade-in { opacity:0; transform:translateY(16px); transition:opacity 0.5s ease,transform 0.5s ease; }
.fade-in.visible { opacity:1; transform:translateY(0); }

/* ===== Responsive ===== */
@media (max-width:1024px) {
  .projects-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:768px) {
  .section { padding:48px 0; }
  .section__title { font-size:1.25rem; }
  .nav__toggle { display:flex; }
  .nav__menu { position:fixed; top:56px; left:0; right:0; background:var(--color-bg); border-bottom:1px solid var(--color-border); padding:16px; transform:translateY(-120%); transition:var(--transition); box-shadow:var(--shadow-md); }
  .nav__menu.open { transform:translateY(0); }
  .nav__list { flex-direction:column; gap:4px; }
  .projects-grid { grid-template-columns:1fr; }
  .home-hero__title { font-size:1.5rem; }
  .project-hero__title { font-size:1.35rem; }
  .project-hero__header { flex-direction:column; align-items:flex-start; gap:8px; }
}
