/* ============================================================
   ezhozhao.github.io — site.css
   Design system for the redesigned site.
   Shared across index, news, projects, blogs, contact.
   Last updated: 2026-05-12
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #FAFAFA;
  --ink: #0A0A0A;
  --ink-soft: #1A1A1A;
  --muted: #5C5C5C;
  --hint: #8A8A8A;
  --hairline: #EAEAEA;
  --accent: #1A2B4A;

  --display: 'Jost', 'Futura', -apple-system, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --wrap-max: 1100px;
  --prose-max: 720px;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- Layout container ---------- */
.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Nav ---------- */
.site-nav { border-bottom: 1px solid var(--hairline); }
.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}
.site-nav .brand {
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--ink);
}
.site-nav ul {
  display: flex;
  gap: 32px;
}
.site-nav ul a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}
.site-nav ul a:hover,
.site-nav ul a.current { color: var(--ink); }
.site-nav ul a.current {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 64px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
}
.portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #E5E5E5;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 16px 40px rgba(10, 20, 40, 0.08),
    0 4px 12px rgba(10, 20, 40, 0.04);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-text h1 {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.hero-text .tagline {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 40px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.hero-text p {
  max-width: 560px;
  margin-bottom: 20px;
  color: var(--ink-soft);
}
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 32px;
}
.social-row a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.social-row a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Section labels (shared) ---------- */
.section-label {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Info strip ---------- */
.info-strip {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 40px 0;
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.info-block .section-label { margin-bottom: 16px; display: block; }
.info-block li {
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--ink);
}
.info-block li small {
  color: var(--muted);
  font-size: 13px;
  display: block;
  margin-top: 2px;
}

/* ---------- Skills ---------- */
.skills {
  padding: 32px 0 8px;
  border-bottom: 1px solid var(--hairline);
}
.skills-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 12px 0;
  align-items: baseline;
}
.skills-row .items {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
}
.skills-row .items span { color: var(--muted); margin: 0 8px; }

/* ---------- Certifications ---------- */
.certs {
  padding: 48px 0;
  border-bottom: 1px solid var(--hairline);
}
.certs h3 {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.certs ul { max-width: var(--prose-max); }
.certs li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  align-items: baseline;
}
.certs li:last-child { border-bottom: 1px solid var(--hairline); }
.certs .cert-name { color: var(--ink); }
.certs .cert-meta {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.certs .more {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}
.certs .more a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

/* ---------- What I work on ---------- */
.work { padding: 64px 0; }
.work h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}
.work-list { max-width: var(--prose-max); }
.work-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: baseline;
}
.work-list li:first-child { border-top: 1px solid var(--hairline); }
.work-list .num {
  font-family: var(--display);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.work-list .desc {
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- Page header (used on projects, news, blogs, contact) ---------- */
.page-header {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 48px;
}
.page-header h1 {
  font-family: var(--display);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.page-header .lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.6;
}

/* ---------- Project cards ---------- */
.project-card {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 40px;
  padding: 32px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: #FFFFFF;
  margin-bottom: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover {
  border-color: #D0D0D0;
  box-shadow: 0 8px 24px rgba(10, 20, 40, 0.04);
}
.project-image {
  background: #F2F2F2;
  border-radius: 2px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
}
.project-image img {
  width: 100%; height: 100%; object-fit: cover;
}
/* Poster variant: portrait poster fills the full card width.
   We use `cover` so the image extends edge-to-edge; the navy background is a
   safety net for any sub-pixel gaps. `object-position: center 30%` keeps the
   title block visible and trims only the decorative top/bottom circles. */
.project-image.poster {
  background: #0E1B33; /* matches HD poster's navy — invisible when cover fills */
}
.project-image.poster img {
  object-fit: cover;
  object-position: center 30%;
}
.project-image.accent {
  background: var(--accent);
  color: #FFFFFF;
}
.project-image.accent span {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 0 24px;
}
.project-body {
  display: flex;
  flex-direction: column;
}
.project-tags {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.project-tags span {
  color: var(--accent);
  margin: 0 6px;
}
.project-title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--ink);
}
.project-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.project-desc:last-of-type { margin-bottom: 0; }
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
}
.project-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 3px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.project-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.project-links a::after {
  content: " \2192";
  opacity: 0.6;
}

/* Sub-items inside a grouped project card */
.sub-items {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}
.sub-items .sub-label {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.sub-items ul {
  list-style: none;
}
.sub-items li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
  font-size: 14px;
}
.sub-items li:last-child { border-bottom: none; }
.sub-items .sub-name { color: var(--ink); }
.sub-items .sub-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
}
.sub-items .sub-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- News page ---------- */
.news-list {
  max-width: 760px;
  margin: 0;
}
.news-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
  align-items: baseline;
}
.news-item:last-child {
  border-bottom: 1px solid var(--hairline);
}
.news-date {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.news-content {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.news-content a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.news-content a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Blogs page ---------- */
.blog-list {
  max-width: 760px;
  margin: 0;
}
.blog-entry {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--hairline);
  align-items: start;
}
.blog-entry:last-child {
  border-bottom: 1px solid var(--hairline);
}
.blog-thumb {
  background: #F2F2F2;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-body {
  display: flex;
  flex-direction: column;
}
.blog-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin-bottom: 10px;
}
.blog-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}
.blog-title a:hover {
  color: var(--accent);
}
.blog-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.blog-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.blog-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.blog-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Contact page ---------- */
.contact-primary {
  padding: 24px 0 56px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 48px;
}
.contact-email {
  display: inline-block;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
  word-break: break-all;
}
.contact-email:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.contact-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 32px 0 24px;
}
.contact-channels a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.contact-channels a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.contact-note {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  max-width: 560px;
  line-height: 1.6;
  margin-top: 16px;
}
.contact-map-section {
  padding-bottom: 32px;
}
.contact-map-section .section-label {
  display: block;
  margin-bottom: 8px;
}
.contact-map-section h2 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
#map {
  width: 100%;
  height: 420px;
  max-height: 60vh;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 32px 0;
  margin-top: 48px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 0 32px;
  }
  .portrait { max-width: 240px; }
  .hero-text h1 { font-size: 40px; }
  .info-strip { grid-template-columns: 1fr; gap: 32px; }
  .skills-row { grid-template-columns: 1fr; gap: 4px; }
  .certs li { grid-template-columns: 1fr; gap: 4px; }

  .project-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }
  .page-header { padding: 48px 0 32px; }
  .page-header h1 { font-size: 36px; }

  .news-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .blog-entry {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .blog-thumb {
    aspect-ratio: 16 / 9;
    max-height: 240px;
  }

  .contact-email { font-size: 28px; }
  #map { height: 320px; }

  .nav-toggle { display: inline-block; }
  .site-nav ul {
    display: none;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 16px 0 8px;
    border-top: 1px solid var(--hairline);
    margin-top: 16px;
  }
  .site-nav.open ul { display: flex; }
  .site-nav.open .site-nav-inner { flex-wrap: wrap; }
}
