:root {
  --paper: #fafafa;
  --ink: #111827;
  --muted-ink: #4b5563;
  --line: #e5e7eb;
  --accent: #2563eb;   /* blue */
  --accent-2: #166534; /* tree green */
  --accent-3: #6b7280; /* rock */
  --shadow: 0 2px 8px rgba(17, 24, 39, 0.04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, system-ui, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  color: var(--ink);
  background: var(--paper);
}

.container {
  width: min(860px, 92%);
  margin: 0 auto;
}

.topbar { position: sticky; top: 0; background: var(--paper); border-bottom: 0; z-index: 40; }
.bar-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.toplinks { display: inline-flex; gap: 14px; }
.toplinks a { color: var(--ink); text-decoration: underline; }
.toplinks a:hover { color: var(--ink); text-decoration: underline; }
.icons { display: inline-flex; gap: 10px; }
.icon { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; color: var(--ink); }
.icon svg { width: 20px; height: 20px; }

.site-header { position: sticky; top: 0; background: rgba(250, 250, 250, 0.8); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { color: var(--ink); font-weight: 700; text-decoration: none; letter-spacing: 0.3px; }

.nav { display: flex; gap: 14px; }
.nav a { color: var(--muted-ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.nav-toggle { display: none; background: transparent; border: 0; cursor: pointer; width: 40px; height: 40px; border-radius: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #d1d5db; margin: 5px auto; transition: transform .2s ease, opacity .2s ease; }

@media (max-width: 780px) { .nav-toggle { display: none; } }

.hero { padding: 68px 0 22px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; align-items: center; } }
.identity h1 { font-family: -apple-system, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif; font-weight: 800; font-size: clamp(28px, 8vw, 72px); line-height: 1; margin: 0 0 10px; letter-spacing: -0.01em; white-space: nowrap; }
.tagline { color: var(--muted-ink); margin: 0; }
.about { color: var(--muted-ink); margin: 10px 0 0; max-width: 60ch; line-height: 1.7; }
.connect { color: var(--muted-ink); margin: 10px 0 0; max-width: 60ch; line-height: 1.7; }
/* links removed from hero */
.portrait-wrap { justify-self: end; }
.portrait { width: min(260px, 70%); max-height: 42vh; object-fit: cover; border-radius: 0; border: 0; background: transparent; }
@media (max-width: 900px) { .portrait-wrap { justify-self: center; } .portrait { width: 100%; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
}

.hero-text h1 { font-family: 'Fraunces', serif; font-weight: 700; font-size: clamp(34px, 6vw, 62px); margin: 0 0 8px; letter-spacing: -0.5px; }
.subtitle { color: var(--muted-ink); font-size: clamp(16px, 2.5vw, 18px); margin: 0 0 22px; }

.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; background: white; box-shadow: none; font-weight: 600; }
.button:hover { text-decoration: none; }
.button.primary { background: var(--ink); color: white; border: 1px solid var(--ink); }
.button.small { padding: 8px 10px; font-size: 14px; }

.card { background: transparent; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.card blockquote { border: none; margin: 24px 0; padding: 0; color: var(--muted-ink); line-height: 1.8; font-style: italic; }
.card details { margin: 16px 0; text-align: center; }
.card details summary { cursor: pointer; text-align: left; }
.card details img { display: block; margin: 10px auto; max-width: 100%; height: auto; }
.section { padding: 44px 0; }
.section h2 { margin: 0 0 14px; font-size: clamp(22px, 3vw, 28px); }
.section p { color: var(--muted-ink); line-height: 1.7; }
.card hr { border: none; border-top: 1px solid var(--line); margin: 40px 0 16px; }
.card small { font-size: 12px; color: #9ca3af; }
.page-title { font-family: -apple-system, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif; font-weight: 800; letter-spacing: -0.01em; font-size: clamp(22px, 5vw, 36px); margin: 0 0 6px; }
.muted { color: var(--muted-ink); }

.project-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.project-item { background: transparent; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
/* removed quick-links in minimal landing */
.project-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.project-links { display: inline-flex; gap: 8px; color: var(--muted-ink); }
.project-links a { color: var(--accent-3); text-decoration: underline; }
.project-links a:hover { color: var(--accent-3); text-decoration: underline; }
/* linked title */
.project-head h3 { margin: 0; font-size: 18px; }
.project-head h3 a { color: var(--ink); text-decoration: none; }
.project-head h3 a:hover { color: var(--ink); text-decoration: none; }
.project-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: var(--ink); }
.project-icon svg { width: 18px; height: 18px; }

/* Projects grid & cards */
.projects-section { margin-top: 18px; }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 900px) { .project-grid { grid-template-columns: 1fr; } }
.project-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.project-media { width: 100%; background: #f3f4f6; border-bottom: 1px solid var(--line); aspect-ratio: 16/9; height: 0; }
.project-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-body { padding: 14px; }
.project-body p { margin: 8px 0 0; color: var(--muted-ink); line-height: 1.6; }
.project-meta { margin-top: 6px; color: var(--muted-ink); font-size: 12px; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 980px) { .gallery-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item { margin: 0; border: 0; border-radius: 10px; overflow: hidden; background: transparent; }
.gallery-item img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; display: block; border: 1px solid var(--line); border-radius: 10px; background: #f9fafb; cursor: default; }
.gallery-item figcaption { padding: 6px 2px; color: var(--muted-ink); text-align: center; }

/* Album header */
.album-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; }
.album-head h2 { margin: 0; }
.album-cover { width: 120px; height: auto; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in; background: #f9fafb; }

.album-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 10px 0 20px; }
@media (max-width: 980px) { .album-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .album-grid { grid-template-columns: 1fr; } }
.album-card { display: flex; flex-direction: column; gap: 0; background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 0; cursor: pointer; text-align: left; box-shadow: none; transition: transform .12s ease; overflow: hidden; max-width: 100%; }
.album-card:hover { transform: translateY(-1px); }
.album-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border: 0; border-radius: 10px 10px 0 0; background: #f9fafb; display: block; }
.album-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.album-title { font-weight: 700; }
.album-count { color: var(--muted-ink); font-size: 12px; }
/* Tight wrapper for cover, meta has its own padding and divider */
.album-meta { padding: 8px 10px; border-top: 1px solid var(--line); }
/* Card CTA */
.album-cta { font-size: 12px; color: var(--accent-3); text-decoration: underline; }

/* Lightbox */
.lightbox { display: none; }

/* Single-column grid for album view */
.gallery-grid.single { grid-template-columns: 1fr; gap: 12vh; }
.gallery-grid.single .gallery-item { scroll-snap-align: center; scroll-snap-stop: always; min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gallery-grid.single .gallery-item figcaption { margin-top: 8px; }

/* Scale down portrait photos in album view */
.gallery-grid.single .gallery-item img.portrait { max-width: 72%; max-height: 72vh; margin-left: auto; margin-right: auto; border: 0; }

/* Scroll snap for album view */
html.album-snap, body.album-snap { scroll-snap-type: y mandatory; scroll-padding-top: 60px; scroll-behavior: auto; }

/* In album view, let the site topbar scroll away and pin the album head */
html.album-snap .topbar { position: static; }
.album-head { position: sticky; top: 0; background: var(--paper); border-bottom: 1px solid var(--line); z-index: 30; padding: 10px 0; }

/* Hide page title and blurb in album view */
html.album-snap .page-title,
html.album-snap .page-title + .muted { display: none; }

/* Album modal */
.album-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.75); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 1050; }
.album-modal.hidden { display: none; }
.album-modal-content { background: #fff; color: var(--ink); width: min(1100px, 96vw); max-height: 96vh; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.album-modal-head { position: sticky; top: 0; z-index: 1; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.album-close { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; cursor: pointer; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.album-modal-body { padding: 14px; overflow: auto; }
.album-modal-body .gallery-grid { margin-top: 6px; }
/* Scroll lock when modal open */
body.modal-open { overflow: hidden; }

/* Resume */
.resume-frame { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.resume-frame iframe { width: 100%; height: 80vh; border: 0; display: block; }

.project h3 { margin: 0 0 6px; font-size: 18px; }
.project p { margin: 0 0 14px; }
.card-actions { display: flex; gap: 8px; }

.site-footer { border-top: 1px solid var(--line); margin-top: 32px; background: transparent; }
.site-footer .container { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 18px 0; color: var(--muted-ink); }
.site-footer a { color: var(--accent-3); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.dot { opacity: 0.5; }

/* Reveal disabled */
[data-reveal] { opacity: 1; transform: none; transition: none; }

/* Improve selection */
::selection { background: rgba(59,130,246,0.25); }

/* Subtle nature header rule under hero */
.hero::after { content: none; }


