/* ============================================
   Victor Ng — Personal Site
   style.css
   ============================================ */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* === CSS Variables === */
:root {
  --bg:           #ffffff;
  --text:         #111111;
  --text-muted:   #999999;
  --border:       #e8e8e8;
  --placeholder:  #f2f2f2;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w:        860px;
}

/* === Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

a:hover { opacity: 0.5; }

img { width: 100%; display: block; }

/* === Layout === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   NAV
   ============================================ */
nav {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  opacity: 1;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  margin-top: 6rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
  opacity: 1;
}

/* ============================================
   PLACEHOLDERS (replace with real images)
   ============================================ */
.placeholder {
  background: var(--placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c8c8c8;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font);
}

/* ============================================
   SHARED UTILITIES
   ============================================ */
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.see-all {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

.see-all::after { content: '→'; }

.see-all:hover {
  color: var(--text);
  opacity: 1;
}

section {
  padding: 4rem 0;
}

.divider { border-top: 1px solid var(--border); }

/* ============================================
   INDEX — HERO
   ============================================ */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-name {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-bio {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.75;
}

/* ============================================
   INDEX — RECENT PHOTOS
   ============================================ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.photo-grid .placeholder {
  aspect-ratio: 4 / 3;
}

/* ============================================
   INDEX — RECENT POSTS (list style)
   ============================================ */
.post-list { display: flex; flex-direction: column; }

.post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  gap: 2rem;
  cursor: pointer;
}

.post-item:first-child { border-top: 1px solid var(--border); }

.post-item-left { flex: 1; }

.post-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.post-excerpt {
  font-size: 13px;
  color: var(--text-muted);
}

.post-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================
   PAGE HEADER (about / gallery / blog / gear)
   ============================================ */
.page-header {
  padding: 4.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.page-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.7;
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-content { padding: 4rem 0; }

.about-bio p {
  font-size: 16px;
  line-height: 1.85;
  color: #444444;
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.about-bio p:last-child { margin-bottom: 0; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-top: 3.5rem;
  margin-top: 3.5rem;
  border-top: 1px solid var(--border);
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.stat-value {
  font-size: 15px;
  font-weight: 500;
}

.about-photo-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 1px solid var(--border);
}

.about-photo-row .placeholder { aspect-ratio: 3 / 2; }

/* ============================================
   GALLERY PAGE
   ============================================ */
.gallery-controls {
  display: flex;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.gallery-filter {
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  padding: 0;
  transition: color 0.15s;
}

.gallery-filter:hover,
.gallery-filter.active {
  color: var(--text);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 2rem 0;
}

.gallery-grid .placeholder { aspect-ratio: 1; cursor: pointer; }
.gallery-grid .placeholder:hover { opacity: 0.85; transition: opacity 0.2s; }

/* Varied sizes for visual interest */
.gallery-grid .span2 { grid-column: span 2; aspect-ratio: 2 / 1; }
.gallery-grid .tall  { aspect-ratio: 3 / 4; }

/* ============================================
   BLOG PAGE
   ============================================ */
.blog-list { display: flex; flex-direction: column; }

.blog-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.blog-card:first-child { border-top: 1px solid var(--border); }

.blog-thumb { aspect-ratio: 3 / 2; }

.blog-info .meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1rem;
}

.blog-info h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.blog-info p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

.tag {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  margin-top: 0.75rem;
}

/* ============================================
   GEAR PAGE
   ============================================ */
.gear-section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}

.gear-section:last-child { border-bottom: none; }

.gear-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.gear-list { display: flex; flex-direction: column; gap: 1.75rem; }

.gear-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.gear-thumb {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
}

.gear-info h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.gear-info p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .photo-grid         { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid       { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid .span2{ grid-column: span 2; }
  .about-stats        { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .about-photo-row    { grid-template-columns: 1fr; }
  .blog-card          { grid-template-columns: 1fr; }
  .blog-thumb         { aspect-ratio: 16 / 9; }
  .post-item          { flex-direction: column; gap: 0.2rem; }
  .footer-inner       { flex-direction: column; align-items: flex-start; }
  .nav-links          { gap: 1.25rem; }
  .hero               { padding: 3.5rem 0 3rem; }
  .gallery-controls   { flex-wrap: wrap; gap: 1rem; }
}

@media (max-width: 480px) {
  .about-stats { grid-template-columns: 1fr; }
  .gear-item   { flex-direction: column; }
  .gear-thumb  { width: 100%; height: auto; aspect-ratio: 3 / 2; }
}
