/* ============================================
   Gao Feng Portfolio - Shared Styles
   Design System: Blueprint / Architectural Drawing
   ============================================ */

:root {
  /* Colors */
  --bg-paper: #FAFAF8;
  --bg-white: #FFFFFF;
  --ink-dark: #1A1A2E;
  --ink-mid: #3D3D52;
  --ink-light: #5A5A6E;
  --ink-faint: #8A8A9E;
  --accent: #C8553D;
  --accent-soft: #E8A598;
  --line: #E0DDD5;
  --line-strong: #C8C5BC;
  --grid: #EEECE6;

  /* Typography */
  --font-sans: "Inter", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", "SF Mono", monospace;
  --font-display: "Inter", "Noto Sans CJK SC", "PingFang SC", sans-serif;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;

  /* Layout */
  --sidebar-width: 260px;
  --content-max: 880px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-paper);
  color: var(--ink-mid);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grid background pattern - subtle blueprint feel */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ============================================
   Layout
   ============================================ */
.layout {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--bg-paper);
  z-index: 10;
}

.brand {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--line);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-dark);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-name span {
  color: var(--accent);
}

.brand-title {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.nav-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink-light);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-item a:hover {
  background: var(--bg-white);
  color: var(--ink-dark);
  border-color: var(--line);
}

.nav-item.active a {
  background: var(--bg-white);
  color: var(--ink-dark);
  border-color: var(--line-strong);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  min-width: 24px;
}

.nav-item.active .nav-num {
  color: var(--accent);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-item {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-item::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Main Content */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

.content-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

/* ============================================
   Typography
   ============================================ */
.hero {
  margin-bottom: var(--space-2xl);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-strong);
  max-width: 200px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--ink-dark);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 17px;
  color: var(--ink-light);
  line-height: 1.7;
  max-width: 600px;
}

/* Section */
.section {
  margin-bottom: var(--space-2xl);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--ink-dark);
}

.section-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-dark);
  letter-spacing: -0.01em;
}

/* ============================================
   Hero Banner Image
   ============================================ */
.hero-banner {
  width: 100%;
  height: 280px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--space-lg);
  position: relative;
  border: 1px solid var(--line);
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26,26,46,0.1) 0%, rgba(26,26,46,0.02) 100%);
  pointer-events: none;
}

/* ============================================
   Image Gallery / Grid
   ============================================ */
.img-grid {
  display: grid;
  gap: 10px;
  margin: var(--space-sm) 0;
}

.img-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.img-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.img-item {
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4/3;
  background: var(--grid);
  transition: all 0.3s ease;
}

.img-item:hover {
  border-color: var(--line-strong);
  transform: scale(1.02);
}

.img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-item.portrait {
  aspect-ratio: 3/4;
}

/* Project card with image */
.project-card.has-image {
  padding: 0;
  overflow: hidden;
}

.project-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--grid);
  position: relative;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project-card.has-image:hover .project-card-image img {
  transform: scale(1.05);
}

.project-card-body {
  padding: var(--space-md);
  position: relative;
}

.project-card-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}

.project-card.has-image:hover .project-card-body::before {
  transform: scaleY(1);
}

/* Award card with image */
.award-card.has-image {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-md);
  padding: 0;
  overflow: hidden;
}

.award-card-image {
  background: var(--grid);
  overflow: hidden;
  min-height: 140px;
}

.award-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.award-card-body {
  padding: var(--space-md) var(--space-md) var(--space-md) 0;
}

/* Feature showcase */
.feature-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.feature-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 20px rgba(26, 26, 46, 0.06);
  transform: translateY(-2px);
}

.feature-card-img {
  height: 160px;
  overflow: hidden;
  background: var(--grid);
}

.feature-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.feature-card:hover .feature-card-img img {
  transform: scale(1.05);
}

.feature-card-body {
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.feature-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-dark);
  margin-bottom: 4px;
}

.feature-card-desc {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.6;
}

/* ============================================
   Project Cards
   ============================================ */
.project-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.project-card {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: var(--space-md);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}

.project-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 20px rgba(26, 26, 46, 0.06);
  transform: translateY(-2px);
}

.project-card:hover::before {
  transform: scaleY(1);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: var(--space-md);
}

.project-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-dark);
  letter-spacing: -0.01em;
}

.project-meta {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink-light);
  white-space: nowrap;
}

.project-tag.accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.project-desc {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.project-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px dashed var(--line);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-value {
  font-size: 13px;
  color: var(--ink-mid);
  font-weight: 500;
}

/* ============================================
   Stats / Metrics
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 2px;
  margin-bottom: var(--space-lg);
}

.stat-item {
  background: var(--bg-white);
  padding: var(--space-md) var(--space-sm);
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink-dark);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-num .accent {
  color: var(--accent);
}

.stat-label {
  font-size: 12px;
  color: var(--ink-light);
}

/* ============================================
   Timeline
   ============================================ */
.timeline {
  position: relative;
  padding-left: var(--space-lg);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line-strong);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-lg);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 6px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  background: var(--bg-paper);
  border-radius: 50%;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-dark);
  margin-bottom: 4px;
}

.timeline-sub {
  font-size: 13px;
  color: var(--ink-light);
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.6;
}

/* ============================================
   Skill Bars
   ============================================ */
.skill-group {
  margin-bottom: var(--space-lg);
}

.skill-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-dark);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-group-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--accent);
}

.skill-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 10px;
}

.skill-name {
  width: 180px;
  font-size: 13px;
  color: var(--ink-mid);
  flex-shrink: 0;
}

.skill-bar {
  flex: 1;
  height: 6px;
  background: var(--grid);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ink-dark), var(--accent));
  border-radius: 3px;
  transition: width 1s ease;
}

.skill-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

/* ============================================
   Award / Highlight Box
   ============================================ */
.award-card {
  background: linear-gradient(135deg, var(--bg-white) 0%, #FFF8F5 100%);
  border: 1px solid var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.award-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.award-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-dark);
}

.award-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  background: var(--accent);
  color: white;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.award-badge.silver {
  background: var(--ink-light);
}

.award-meta {
  font-size: 12px;
  color: var(--ink-light);
  margin-bottom: 8px;
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.award-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.award-desc {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */
.page-footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .sidebar {
    position: relative;
    width: 100%;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: var(--space-md);
  }

  .sidebar-footer {
    display: none;
  }

  .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-item {
    flex: 1;
    min-width: 120px;
  }

  .layout {
    flex-direction: column;
  }

  .main {
    margin-left: 0;
  }

  .content-wrap {
    padding: var(--space-lg) var(--space-md);
  }

  .hero-title {
    font-size: 32px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skill-name {
    width: 120px;
    font-size: 12px;
  }
}

@media (max-width: 500px) {
  .hero-title {
    font-size: 26px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-num {
    font-size: 24px;
  }

  .project-details {
    grid-template-columns: 1fr 1fr;
  }

  .hero-banner {
    height: 200px;
  }

  .feature-showcase {
    grid-template-columns: 1fr;
  }

  .img-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .award-card.has-image {
    grid-template-columns: 1fr;
  }

  .award-card-body {
    padding: var(--space-md);
  }
}
