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

:root {
  --black:   #333333;
  --white:   #ffffff;
  --gray:    #f5f5f5;
  --mid:     #999999;
  --border:  #e5e5e5;
  --font:    'Inter', system-ui, -apple-system, sans-serif;
  --nav-h:   64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ─── Header / Nav ──────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--black);
  transition: opacity 0.2s;
}

.nav-links a:hover { opacity: 0.5; }

.nav-links a.active { border-bottom: 1px solid var(--black); }

.nav-contact {
  border: none;
  padding: 0;
}

/* Mobile menu */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  transition: transform 0.3s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  gap: 20px;
  z-index: 99;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-mobile .nav-contact {
  align-self: flex-start;
}

/* ─── Page Layout ───────────────────────────────────────────────── */
main { flex: 1; }

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.page-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.page-intro {
  font-size: 17px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 64px;
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
}

.work-header .page-title { margin-bottom: 0; }

.resume-btn {
  flex-shrink: 0;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  border: 1px solid var(--black);
  padding: 10px 20px;
  transition: background 0.2s ease, color 0.2s ease;
}

.resume-btn:hover {
  background: var(--black);
  color: #fff;
}

@media (max-width: 768px) {
  .work-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* ─── Home ──────────────────────────────────────────────────────── */
.home-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px;
}

.home-brand {
  display: inline-block;
  /* headline typeface, a touch larger, lowercase */
  font-size: clamp(38px, 6.3vw, 76px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: lowercase;
  /* white letters with a thin outline — hollow, white-on-white look.
     paint-order:stroke draws the stroke BEHIND the white fill so counters
     (the openings in e, a, o) stay clean instead of filling in. */
  color: var(--white);
  -webkit-text-stroke: 2.5px var(--black);
  text-stroke: 2.5px var(--black);
  paint-order: stroke fill;
  margin-bottom: 14px;
}

.home-hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.home-hero p {
  font-size: 18px;
  color: #444;
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.btn {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--black);
  padding: 12px 28px;
  transition: background 0.2s, color 0.2s;
}

.btn:hover { background: var(--black); color: var(--white); }

/* ─── Work Page ─────────────────────────────────────────────────── */
.work-section {
  margin-bottom: 64px;
}

.work-section h2 {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.work-intro {
  font-size: 17px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 48px;
}

.job {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.job-meta {
  padding-top: 4px;
}

.job-logo {
  display: block;
  max-width: 180px;
  max-height: 48px;
  margin-bottom: 10px;
}

.job-logo--raised {
  position: relative;
  top: -6px;
  margin-bottom: 6px;
}

.job-logo--raised-sm {
  position: relative;
  top: -3px;
  margin-bottom: 2px;
}

.job-certs {
  margin-top: 32px;
}

.job-certs-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 18px;
}

.job-cert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.job-cert img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.job-cert span {
  font-size: 12px;
  color: #555;
  line-height: 1.4;
}

.job-company {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.job-dates {
  font-size: 13px;
  color: var(--mid);
}

.job-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.job-overview {
  font-size: 15px;
  font-weight: 300;
  color: #444;
  line-height: 1.75;
  margin-bottom: 12px;
}

.exp-label {
  font-weight: 600;
}

.job-desc {
  font-size: 15px;
  color: #444;
  line-height: 1.75;
}

/* ─── AI Page ───────────────────────────────────────────────────── */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 64px;
  margin-top: 48px;
}

.ai-item h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.ai-item p {
  font-size: 15px;
  color: #444;
  line-height: 1.75;
}

/* ─── Gallery Grid ──────────────────────────────────────────────── */
.gallery-header {
  width: 100%;
  display: block;
  margin-bottom: 40px;
}

.gallery-grid {
  columns: 2;
  column-gap: 12px;
  margin-top: 40px;
}

.gallery-grid img {
  width: 100%;
  margin-bottom: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
  break-inside: avoid;
}

.gallery-grid img:hover { opacity: 0.9; }

/* ─── Collection Cards ──────────────────────────────────────────── */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.collection-card {
  cursor: pointer;
}

.collection-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: 12px;
}

.collection-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.collection-card:hover .collection-card-img img { transform: scale(1.03); }

.collection-card h3 {
  font-size: 16px;
  font-weight: 700;
}

/* ─── Special Projects ──────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.project-card {
  cursor: pointer;
}

.project-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--gray);
}

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

.project-card:hover .project-card-img img { transform: scale(1.03); }

.project-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.project-card p {
  font-size: 14px;
  color: var(--mid);
}

/* ─── Art ───────────────────────────────────────────────────────── */
.art-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}

.art-card {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.art-card-img {
  height: 360px;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--gray);
}

.art-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.art-card:hover .art-card-img img { transform: scale(1.03); }

.art-card h3 {
  font-size: 16px;
  font-weight: 700;
}

.art-card p {
  font-size: 14px;
  font-weight: 300;
  color: #444;
  line-height: 1.6;
  margin-top: 6px;
}

/* ─── Blog ──────────────────────────────────────────────────────── */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 56px;
  margin-top: 40px;
  align-items: start;
}

/* Feed (left) */
.blog-feed { display: flex; flex-direction: column; }

.blog-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
}
.blog-card:first-child { border-top: 1px solid var(--border); }

.blog-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--gray);
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}
.blog-card:hover .blog-card-img img { opacity: 0.85; }

.blog-card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  transition: opacity 0.2s;
}
.blog-card:hover .blog-card-title { opacity: 0.55; }

.blog-card-date {
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 12px;
}

.blog-card-summary {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: #555;
}

/* Archive (right) */
.blog-archive {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  /* Own scroll area: expanding a deep year/month scrolls WITHIN the nav,
     independent of the much-longer blog feed. */
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
  /* Shift up 23px so the first title's underline still lands on the first card's
     top divider — kept as the box's own top edge so overflow doesn't clip it. */
  margin-top: -23px;
}
.blog-archive-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
/* Collapsible section title (caret button) — the archive is hidden until clicked */
button.blog-archive-title.arc-section {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  font-family: inherit;
  color: var(--black);
  cursor: pointer;
  text-align: left;
}
.blog-archive-title .arc-caret {
  font-size: 9px;
  color: var(--mid);
  display: inline-block;
  transition: transform 0.15s;
}
.blog-archive-title.arc-section.open .arc-caret { transform: rotate(90deg); }
.blog-archive ul { list-style: none; margin: 0; padding: 0; }
.blog-archive .arc-children { display: none; padding-left: 16px; }
.blog-archive .arc-node.open > .arc-children { display: block; }

.blog-archive .arc-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: none;
  border: none;
  padding: 5px 0;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--black);
  cursor: pointer;
  text-align: left;
}
.blog-archive .arc-toggle:hover { color: var(--mid); }
.blog-archive .arc-caret {
  font-size: 9px;
  color: var(--mid);
  transition: transform 0.15s;
  display: inline-block;
  width: 8px;
}
.blog-archive .arc-node.open > .arc-toggle .arc-caret { transform: rotate(90deg); }
.blog-archive .arc-count { color: var(--mid); font-size: 12px; margin-left: auto; }

.blog-archive .arc-post {
  display: block;
  padding: 4px 0 4px 15px;
  font-size: 13px;
  font-weight: 300;
  color: #555;
  text-decoration: none;
  line-height: 1.45;
}
.blog-archive .arc-post:hover { color: var(--black); }

/* Day-leaf "DD — Title": title gets its own column so wrapped lines hang under
   the title's first letter rather than under the day number. */
.blog-archive .arc-day-post { display: flex; gap: 5px; }
.blog-archive .arc-day-num { flex: none; }

/* Second nav title (Blogspot Archive) — sits below the first tree, normal spacing */
.blog-archive-title.secondary { margin-top: 30px; }

/* Blogspot archive section (left column, beneath the new posts) */
.blog-main { min-width: 0; }
.blogspot-section { margin-top: 64px; }
.blogspot-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 22px;
  font-weight: 600;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--black);
}
.blogspot-heading span { font-size: 14px; font-weight: 400; color: var(--mid); }
.blogspot-note {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  color: #666;
  margin: 14px 0 0;
}
.blog-card-img.is-empty { background: var(--gray); }
.blogspot-more {
  display: block;
  width: 100%;
  margin-top: 32px;
  padding: 14px;
  background: none;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.blogspot-more:hover { background: var(--black); color: #fff; border-color: var(--black); }

/* Individual post page */
.blog-post-date {
  font-size: 14px;
  color: var(--mid);
  margin: -4px 0 24px;
}
/* Hero matches the text column width (720px), centered, for all posts. */
.blog-post-hero { display: block; width: 100%; max-width: 720px; margin: 0 auto 32px; }
/* 2-up photo grid within a post */
.blog-post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 720px;
  margin: 40px auto;
}
.blog-post-grid img { width: 100%; display: block; }
/* Small footnote/disclaimer line */
.blog-post-note { font-size: 14px; color: var(--mid); font-style: italic; }
/* Additional images flow at text width, centered, below the hero. */
.blog-post-gallery { max-width: 720px; margin: 0 auto 32px; }
.blog-post-gallery img { width: 100%; display: block; margin-bottom: 28px; }
.blog-post-gallery img:last-child { margin-bottom: 0; }
/* Image + caption pairs (comparison posts) */
.blog-post-figure { max-width: 720px; margin: 0 auto 28px; }
.blog-post-figure img { width: 100%; display: block; }
.blog-post-figure figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--mid);
  margin-top: 8px;
}
.blog-post-body { max-width: 720px; margin: 0 auto; }
.blog-post-body p {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.8;
  color: #333;
  margin-bottom: 20px;
}
.blog-post-body p:last-child { margin-bottom: 0; }
.blog-post-body img { width: 100%; margin: 28px 0; }

@media (max-width: 768px) {
  .blog-layout { grid-template-columns: 1fr; gap: 36px; }
  .blog-archive { position: static; max-height: none; overflow: visible; margin-top: 0; }
}
@media (max-width: 480px) {
  .blog-card { grid-template-columns: 1fr; gap: 14px; }
  .blog-card-img { aspect-ratio: 16 / 9; }
}

/* ─── Contact Page ──────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 48px;
}

.contact-info h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-info p, .contact-info a {
  font-size: 15px;
  color: #444;
  display: block;
  margin-bottom: 24px;
}

.contact-info a:hover { opacity: 0.6; }

form { display: flex; flex-direction: column; gap: 16px; }

input, textarea {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--border);
  font-family: var(--font);
  font-size: 15px;
  color: var(--black);
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, textarea:focus { border-color: var(--black); }
input::placeholder, textarea::placeholder { color: var(--mid); }
textarea { resize: vertical; min-height: 120px; }

button[type="submit"] {
  align-self: flex-start;
  margin-top: 8px;
  background: none;
  border: 1px solid var(--black);
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 28px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

button[type="submit"]:hover { background: var(--black); color: var(--white); }

/* ─── Lightbox ──────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #333;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #333;
  font-size: 28px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 16px;
  user-select: none;
}

.lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #333;
  font-size: 13px;
  opacity: 0.6;
}

/* ─── Footer ────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.footer-links a {
  font-size: 13px;
  color: var(--mid);
  transition: color 0.2s;
}

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

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

/* ─── Project Story Layout ──────────────────────────────────────── */
.story-hero {
  width: 100%;
  margin-bottom: 20px;
}

.story-hero-crop {
  width: 100%;
  height: 420px;
  overflow: hidden;
  margin-bottom: 20px;
}

.story-hero-crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-bottom: 48px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.arthur-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 60%;
  margin: 0 auto;
}

.arthur-grid img { width: 100%; }

.story-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

.story-row.right .story-row-img { order: 2; }
.story-row.right .story-row-text { order: 1; }

.story-row-img img {
  width: 100%;
  display: block;
  margin-bottom: 8px;
}

.story-row-img img:last-child { margin-bottom: 0; }

.story-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.story-2x2 img { width: 100%; margin-bottom: 0; }

.story-row-text p {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 16px;
}

.story-row-text p:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  .story-row { grid-template-columns: 1fr; }
  .story-row.right .story-row-img { order: 0; }
  .story-row.right .story-row-text { order: 0; }
}

/* ─── Sub-page back link ────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 32px;
  transition: color 0.2s;
}

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

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .ai-grid { grid-template-columns: 1fr; gap: 32px; }
  .job { grid-template-columns: 1fr; gap: 8px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .gallery-grid { columns: 1; }
  .collection-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .gallery-grid { columns: 1; }
  .home-hero { padding: 60px 24px; }
}
