/* =========================
   Runji Gao Personal Website
   Shared style for all pages
   ========================= */

   :root {
    --bg: #f7f8fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --heading: #111827;
    --accent: #2f5d8c;
    --accent-light: #e8f0f8;
    --border: #e5e7eb;
    --shadow: 0 10px 25px rgba(17, 24, 39, 0.06);
  }
  
  * {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
  }
  
  a {
    color: var(--accent);
    text-decoration: none;
  }
  
  a:hover {
    text-decoration: underline;
  }
  
  .site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  .navbar {
    max-width: 1080px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  
  .logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--heading);
  }
  
  .nav-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
  }
  
  .nav-links a {
    color: var(--muted);
    font-size: 0.96rem;
  }
  
  .nav-links a.active,
  .nav-links a:hover {
    color: var(--accent);
    text-decoration: none;
  }
  
  main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 56px 24px;
  }
  
  .hero {
    display: grid;
    grid-template-columns: 1.7fr 240px;
    gap: 36px;
    align-items: center;
    padding: 48px;
    background: linear-gradient(135deg, #ffffff 0%, #edf4fb 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
  }
  
  .hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
    color: var(--heading);
  }
  
  .subtitle {
    margin: 0 0 20px;
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 600;
  }
  
  .hero-text {
    font-size: 1.08rem;
    color: var(--text);
    max-width: 700px;
  }
  
  .hero-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 26px;
  }
  
  .photo-card {
    width: 240px;
    max-width: 240px;
    height: 240px;
    padding: 0;
    overflow: hidden;
    justify-self: end;
  }
  
  .profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  .button-row {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .button {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 600;
  }
  
  .button:hover {
    text-decoration: none;
    opacity: 0.92;
  }
  
  .button.secondary {
    background: var(--accent-light);
    color: var(--accent);
  }
  
  .section {
    margin-top: 36px;
  }
  
  .section h2 {
    color: var(--heading);
    font-size: 1.55rem;
    margin-bottom: 16px;
  }
  
  .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  
  .grid.two {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
  }
  
  .card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--heading);
  }
  
  .card p {
    margin-bottom: 0;
  }
  
  .footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    padding: 28px 24px;
    font-size: 0.95rem;
  }
  
  @media (max-width: 800px) {
    .navbar {
      align-items: flex-start;
      flex-direction: column;
    }
  
    .hero {
      grid-template-columns: 1fr;
      padding: 30px;
    }
  
    .photo-card {
      justify-self: start;
      width: 200px;
      max-width: 200px;
      height: 200px;
    }
  
    .grid,
    .grid.two {
      grid-template-columns: 1fr;
    }
  }