/* ============================================================
   STYLE.CSS — Zhihong Ma Portfolio
   This ONE file controls the look of ALL pages.
   Every HTML file links to this stylesheet.

   HOW TO READ CSS:
   selector { property: value; }
   The selector targets an element (like header, p, .nav-name)
   The property is what you want to change (color, font-size...)
   The value is what you set it to (#111, 16px, bold...)
   ============================================================ */


/* ── 1. LOAD FONTS FROM GOOGLE ──────────────────────────────
   This imports our three fonts from the internet.
   Barlow Semi Condensed = big titles
   Barlow                = body text
   DM Mono               = small labels and tags
   ──────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@300;400;600;700&family=Barlow:wght@300;400;500&family=DM+Mono:wght@400&display=swap');


/* ── 2. RESET ───────────────────────────────────────────────
   Browsers add default spacing to elements.
   This removes it so we start with a clean slate.
   ──────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


/* ── 3. VARIABLES (our color + font shortcuts) ──────────────
   Instead of writing #1A6BFF every time we want blue,
   we save it as --blue and use var(--blue) anywhere.
   To change the blue color sitewide, edit ONLY this line.
   ──────────────────────────────────────────────────────── */
:root {
  --black:       #111111;   /* main text */
  --white:       #ffffff;   /* background */
  --gray:        #888888;   /* secondary text */
  --light:       #f5f5f5;   /* light gray background */
  --border:      #e0e0e0;   /* thin dividing lines */
  --blue:        #1A6BFF;   /* accent color */

  --font-title:  'Barlow Semi Condensed', sans-serif;
  --font-body:   'Barlow', sans-serif;
  --font-mono:   'DM Mono', monospace;

  --pad:         80px;      /* left/right page padding */
}


/* ── 4. BODY ────────────────────────────────────────────────
   Styles the whole page.
   max-width stops the site getting too wide on big monitors.
   margin: 0 auto centers it.
   ──────────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--black);
  max-width: 1440px;
  margin: 0 auto;
}


/* ════════════════════════════════════════════════════════════
   HEADER — the top navigation bar
   It stays fixed at the top as you scroll.
   ════════════════════════════════════════════════════════════ */

header {
  position: fixed;       /* sticks to top of screen */
  top: 0;
  left: 0;
  right: 0;
  max-width: 1440px;
  margin: 0 auto;
  background-color: var(--white);
  border-bottom: 0;
  display: flex;
  justify-content: space-between;  /* pushes name left, links right */
  align-items: center;
  padding: 20px var(--pad);
  z-index: 100;          /* makes sure header sits above other content */
}

/* "Zhihong Ma" text on the left side of the header */
.nav-name {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none; /* removes link underline */
  color: var(--black);
}

/* The list of nav links (Home, About, Portfolio, Contact) */
nav ul {
  display: flex;         /* puts links in a row */
  gap: 36px;             /* space between each link */
  list-style: none;      /* removes bullet points */
}

/* Each individual nav link */
nav ul a {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
}

/* When you hover OR when it's the current page → turns black */
nav ul a:hover,
nav ul a.active {
  color: var(--black);
}


/* ════════════════════════════════════════════════════════════
   PAGE SECTIONS — the building blocks of each page
   ════════════════════════════════════════════════════════════ */

/* Standard content section used throughout */
.section {
  padding: 80px var(--pad);
  border-bottom: 1px solid var(--black);
}

/* The big title area at the top of inner pages */
.page-hero {
  padding: 140px var(--pad) 64px; /* extra top padding clears the fixed header */
  border-bottom: 1px solid var(--black);
}

/* Small label that appears above each section e.g. "About" "Portfolio" */
.sec-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* The horizontal line that extends after the label text */
.sec-label::after {
  content: '';           /* creates an empty element */
  flex: 1;               /* stretches to fill remaining space */
  height: 0.5px;
  background-color: var(--border);
}


/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */

/* Black filled button → "View Work →" */
.btn-primary {
  display: inline-block;
  background-color: var(--black);
  color: var(--white);
  padding: 13px 28px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--blue);  /* turns blue on hover */
}

/* Outline button → "Contact Me" */
.btn-outline {
  display: inline-block;
  background-color: transparent;
  color: var(--black);
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--black);
  cursor: pointer;
}

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}


/* ════════════════════════════════════════════════════════════
   STATS BLOCK  (5 Projects  /  2+ Years  /  NYC)
   Uses CSS Grid to make 3 equal columns side by side.
   ════════════════════════════════════════════════════════════ */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* 3 equal columns */
  gap: 1px;                               /* 1px gap = thin border line between cells */
  background-color: var(--border);        /* background shows through gap = dividers */
  margin-bottom: 32px;
}

/* Each individual stat cell */
.stat {
  background-color: var(--white);
  padding: 20px 16px;
}

/* The big number e.g. "5" or "2+" */
.stat-number {
  font-family: var(--font-title);
  font-size: 36px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}

/* The word below the number e.g. "Projects" */
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 5px;
}


/* ════════════════════════════════════════════════════════════
   SKILL TAGS  (HTML/CSS · Typography · Figma...)
   ════════════════════════════════════════════════════════════ */

/* The row of tags */
.skills-wrap {
  display: flex;
  flex-wrap: wrap;  /* wraps to next line if needed */
  gap: 7px;
  margin-top: 24px;
}

/* Default tag style (gray border) */
.skill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 5px 11px;
  border: 0.5px solid var(--border);
  color: #555;
}

/* Blue tag → add class="skill blue" to an element */
.skill.blue {
  border-color: var(--blue);
  color: var(--blue);
}


/* ════════════════════════════════════════════════════════════
   EDUCATION BLOCK
   ════════════════════════════════════════════════════════════ */

.edu-block {
  border-top: 0.5px solid var(--border);
  padding-top: 24px;
  margin-top: 32px;
}

.edu-block-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 14px;
}

.edu-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
}

.edu-name {
  font-size: 13px;
  font-weight: 500;
}

.edu-sub {
  font-size: 11px;
  color: var(--gray);
  margin-top: 3px;
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #bbb;
}


/* ════════════════════════════════════════════════════════════
   PORTFOLIO — PROJECT ROWS
   Each project is one clickable row.
   Grid columns: [number] [title+desc] [category] [year] [arrow]
   ════════════════════════════════════════════════════════════ */

.proj-table {
  border-top: 1.5px solid var(--black);
}

/* One project row — it's also an <a> link to the project page */
.proj-row {
  display: grid;
  grid-template-columns: 64px 1fr 200px 80px 32px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none;
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s, padding-left 0.15s;
}

.proj-row:hover {
  background-color: #fafafa;
  padding-left: 8px;
}

/* The number "01", "02"... */
.proj-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #ccc;
}

.proj-row:hover .proj-num {
  color: var(--blue);
}

/* Project title */
.proj-title {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

/* Short description below title */
.proj-desc {
  font-size: 12px;
  font-weight: 300;
  color: var(--gray);
}

/* Category in blue */
.proj-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--blue);
  padding: 0 16px;
}

/* Year */
.proj-year {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #bbb;
  text-align: center;
}

/* Arrow → */
.proj-arrow {
  font-size: 18px;
  color: #ccc;
  text-align: right;
  transition: color 0.2s, transform 0.2s;
}

.proj-row:hover .proj-arrow {
  color: var(--blue);
  transform: translate(4px, -4px); /* moves slightly up-right on hover */
}


/* ════════════════════════════════════════════════════════════
   CONTACT PAGE — info + form
   ════════════════════════════════════════════════════════════ */

/* Two-column layout: contact info left, form right */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

/* "Let's work together." heading */
.contact-head {
  font-family: var(--font-title);
  font-size: clamp(40px, 4vw, 64px); /* scales with screen width */
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.contact-sub {
  font-size: 14px;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 32px;
}

/* Container for contact links */
.contact-links {
  border-top: 1.5px solid var(--black);
}

/* One contact link row (email, address, phone) */
.contact-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 13px;
}

/* Small label on the right e.g. "Email ↗" */
.contact-link-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #bbb;
}


/* ════════════════════════════════════════════════════════════
   CONTACT FORM FIELDS
   ════════════════════════════════════════════════════════════ */

/* Space between each field */
.form-group {
  margin-bottom: 16px;
}

/* Label above each field e.g. "NAME" "EMAIL" */
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

/* Single-line text input */
.form-input {
  width: 100%;
  padding: 11px 13px;
  background-color: var(--light);
  border: 0.5px solid var(--border);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--black);
  outline: none;
}

.form-input:focus {
  border-color: var(--black); /* border goes dark when typing */
}

/* Multi-line message box */
.form-textarea {
  width: 100%;
  padding: 11px 13px;
  background-color: var(--light);
  border: 0.5px solid var(--border);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--black);
  height: 110px;
  resize: none;    /* prevent user resizing */
  outline: none;
}

.form-textarea:focus {
  border-color: var(--black);
}

/* Send Message button */
.form-btn {
  background-color: var(--black);
  color: var(--white);
  border: none;
  padding: 13px 28px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 8px;
}

.form-btn:hover {
  background-color: var(--blue);
}


/* ════════════════════════════════════════════════════════════
   SITE FOOTER — bottom of every page
   ════════════════════════════════════════════════════════════ */

.site-footer {
  border-top: 1.5px solid var(--black);
  padding: 20px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #bbb;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-social {
  display: flex;
  gap: 24px;
}

.footer-social a {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray);
  text-decoration: none;
}

.footer-social a:hover {
  color: var(--black);
}


/* ════════════════════════════════════════════════════════════
   PROJECT DETAIL PAGES
   Used by project-01.html through project-05.html
   ════════════════════════════════════════════════════════════ */

/* Top section with big title + meta info side by side */
.project-hero {
  padding: 140px var(--pad) 64px;
  border-bottom: 1px solid var(--black);
  display: grid;
  grid-template-columns: 1fr 320px;  /* title takes most space, meta is 320px */
  gap: 80px;
  align-items: end;
}

/* The big project title e.g. "Summer Program Poster Series" */
.project-title {
  font-family: var(--font-title);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

/* "← Back to Portfolio" link */
.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
  margin-bottom: 32px;
}

.back-link:hover {
  color: var(--black);
}

/* Container for Category / Year / Course info */
.project-meta {
  border-top: 1.5px solid var(--black);
  padding-top: 24px;
}

/* One row in the meta block */
.project-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 12px;
}

.meta-key {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meta-val {
  font-weight: 500;
}

/* Full-width image area (16:9 ratio) */
.project-img-full {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--light);
  border: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 2-column image grid */
.project-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

/* 4-column image grid */
.project-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

/* Square image box */
.project-img-sq {
  aspect-ratio: 1 / 1;
  background-color: var(--light);
  border: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* When you add a real <img> tag, it fills the box */
.project-img-full img,
.project-img-sq img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder text shown BEFORE you add real images.
   Replace with: <img src="your-image.jpg" alt="description"> */
.img-placeholder {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #ccc;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px;
}

/* Project overview text */
.project-desc {
  font-size: 15px;
  font-weight: 300;
  color: #444;
  line-height: 1.8;
  max-width: 680px;
}

/* "Next Project →" bar linking to the next project page */
.next-project {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px var(--pad);
  border-top: 1.5px solid var(--black);
  text-decoration: none;
  color: var(--black);
  transition: background 0.15s;
}

.next-project:hover {
  background-color: var(--light);
}

.next-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.next-title {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 600;
}

.next-arrow {
  font-size: 32px;
  color: #ccc;
}


/* ════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATION
   Add class="reveal" to any element you want to animate.
   JavaScript in each HTML file watches when it scrolls into
   view and adds class "visible" to trigger the animation.
   ════════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;                              /* starts invisible */
  transform: translateY(24px);            /* starts 24px lower */
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;                              /* fades in */
  transform: translateY(0);               /* moves up to normal position */
}
