/* ============================================================
   Photography Portfolio — styles.css
   ============================================================ */

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

:root {
  --bg: #0e0d0b;
  --surface: #161512;
  --border: #2a2820;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --text: #e8e0d0;
  --text-muted: #8a8070;
  --white: #f5f0e8;
  --tab-h: 60px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.03em;
}

/* ── HEADER ── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--tab-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

nav { display: flex; gap: 0; }

nav button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0 22px;
  height: var(--tab-h);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}

nav button:hover { color: var(--text); }
nav button.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── LOGO ── */
.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  cursor: pointer;
  text-decoration: none;
}

.logo-mark { width: 42px; height: 42px; }
.logo-mark circle { fill: none; stroke: var(--gold); stroke-width: 1; }
.logo-mark text {
  fill: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-style: italic;
}

/* ── MAIN CONTENT ── */
main {
  margin-top: var(--tab-h);
  min-height: calc(100vh - var(--tab-h) - 70px);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── HERO ── */
.hero {
  position: relative;
  height: calc(100vh - var(--tab-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0a0908;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(201,168,76,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(201,168,76,0.04) 0%, transparent 50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  opacity: 0.55;
}

.hero-cell {
  background: var(--surface);
  overflow: hidden;
  position: relative;
}

.hero-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.03) 0%, transparent 60%);
}

.hero-cell:nth-child(1) { background: linear-gradient(160deg, #1a1712 30%, #252118); }
.hero-cell:nth-child(2) { background: linear-gradient(200deg, #0f0e0c 20%, #1e1b15); grid-row: span 2; }
.hero-cell:nth-child(3) { background: linear-gradient(140deg, #1c1a14 40%, #100f0d); }
.hero-cell:nth-child(4) { background: linear-gradient(170deg, #161410 30%, #201d16); }
.hero-cell:nth-child(5) { background: linear-gradient(190deg, #111009 20%, #1a1812); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,13,11,0.95) 0%, rgba(14,13,11,0.3) 40%, transparent 70%);
}

.hero-text {
  position: relative;
  z-index: 2;
  padding: 0 60px 60px;
}

.hero-text h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 300;
  line-height: 0.95;
  color: var(--white);
  letter-spacing: -0.01em;
}

.hero-text h1 em { font-style: italic; color: var(--gold); }

.hero-text p {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-hint {
  position: absolute;
  bottom: 30px; right: 60px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollDown 1.8s ease-in-out infinite;
}

@keyframes scrollDown {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── GALLERY ── */
.gallery-section { padding: 80px 40px; }

.section-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.masonry { columns: 3; column-gap: 3px; }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 3px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.masonry-item .ph {
  width: 100%;
  display: block;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}



.masonry-item:hover .ph { transform: scale(1.03); }

.ph-inner { width: 100%; position: relative; }

/* Placeholder image patterns */
/* .ph-1 .ph-inner { padding-bottom: 133%; background: linear-gradient(155deg, #1a1814 0%, #252018 50%, #181610 100%); } */
/* .ph-1 .ph-inner { padding-bottom: 133%; background: image(src="/Resources/Beauty/IMG_0885.jpg") } */
/* .ph-2 .ph-inner { padding-bottom: 66%;  background: linear-gradient(200deg, #1c1a14 0%, #0f0e0b 60%); } */
/* .ph-3 .ph-inner { padding-bottom: 100%; background: linear-gradient(120deg, #161410 0%, #222018 70%); }
.ph-4 .ph-inner { padding-bottom: 150%; background: linear-gradient(170deg, #201d16 0%, #131210 50%, #1a1813 100%); }
.ph-5 .ph-inner { padding-bottom: 75%;  background: linear-gradient(140deg, #111009 0%, #1c1a13 60%); } */
/* .ph-6 .ph-inner { padding-bottom: 120%; background: linear-gradient(190deg, #181612 0%, #232015 70%); }
.ph-7 .ph-inner { padding-bottom: 80%;  background: linear-gradient(160deg, #1e1b14 0%, #0e0d0b 50%); }
.ph-8 .ph-inner { padding-bottom: 110%; background: linear-gradient(130deg, #252118 0%, #161410 60%); }
.ph-9 .ph-inner { padding-bottom: 90%;  background: linear-gradient(175deg, #1a1712 0%, #201e16 50%); } */

.ph-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 40% 35%, rgba(255,255,255,0.03) 0%, transparent 60%);
}

.photo-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.3s;
}

.masonry-item:hover .photo-label { opacity: 1; }

/* ── ABOUT ── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--tab-h) - 70px);
}

.about-image {
  background: linear-gradient(160deg, #1a1712 0%, #0e0d0b 60%);
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

.about-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 40% 30%, rgba(201,168,76,0.08), transparent 60%);
}

.about-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.about-image-placeholder svg { opacity: 0.3; }

.about-content {
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-content .eyebrow {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.about-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 32px;
}

.about-content h2 em { font-style: italic; color: var(--gold); }

.about-content h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  opacity: 0.8;
}

.about-content p {
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 18px;
  font-size: 13px;
}

.about-content p[contenteditable] { outline: none; transition: color 0.2s; }
.about-content p[contenteditable]:focus { color: var(--text); }
.about-content p[contenteditable]:empty::before {
  content: attr(data-placeholder);
  color: var(--border);
}

.divider { width: 40px; height: 1px; background: var(--gold); margin: 32px 0; }

.about-stats { display: flex; gap: 40px; margin-top: 40px; }

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 300;
  color: var(--gold);
}

.stat-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── ASSIGNMENTS ── */
.assignments-section { padding: 80px 60px; max-width: 1200px; margin: 0 auto; }

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 300;
  color: var(--white);
  margin-bottom: 8px;
}

.page-title em { font-style: italic; color: var(--gold); }

.page-subtitle {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 60px;
}

/* ── ASSIGNMENT CARD GRID ── */
.assignment-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 3px;
}

.assignment-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.assignment-card:hover { transform: translateY(-2px); }

.acard-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

/* Cover shows first uploaded photo as background */
.acard-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.assignment-card:hover .acard-cover img { transform: scale(1.05); }

.acard-cover-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1712 0%, #252118 50%, #161410 100%);
}

.acard-cover-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 35% 35%, rgba(201,168,76,0.06), transparent 60%);
}

/* "Add new" card variant */
.acard-cover--add {
  border: 1px dashed var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 28px;
  transition: border-color 0.3s, color 0.3s;
}

.assignment-card--add:hover .acard-cover--add {
  border-color: var(--gold);
  color: var(--gold);
}

.acard-info {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
}

.acard-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--white);
  line-height: 1.2;
}

.acard-sub {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.acard-count {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}

/* ── ASSIGNMENT GALLERY VIEW ── */
.assignment-gallery-view {
  min-height: calc(100vh - var(--tab-h) - 70px);
  padding-bottom: 80px;
}

.agv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 60px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--tab-h);
  background: var(--bg);
  z-index: 10;
}

.agv-back {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.agv-back:hover { color: var(--gold); }

.agv-title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  text-align: center;
}

.agv-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 300;
  color: var(--white);
  outline: none;
  line-height: 1.1;
}

.agv-sub {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  outline: none;
}

.agv-upload-btn {
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
  white-space: nowrap;
  flex-shrink: 0;
}

.agv-upload-btn:hover { background: var(--gold); color: var(--bg); }

.agv-desc-wrap { padding: 28px 60px 0; max-width: 700px; }

.agv-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.9;
  outline: none;
}

.agv-desc:empty::before {
  content: 'Click to add an assignment description…';
  color: var(--border);
}

/* Masonry gallery inside assignment view */
.agv-masonry {
  columns: 3;
  column-gap: 3px;
  padding: 32px 60px 0;
}

.agv-masonry .masonry-item {
  break-inside: avoid;
  margin-bottom: 3px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.agv-masonry .masonry-item .ph {
  width: 100%;
  overflow: hidden;
}

.agv-masonry .masonry-item .ph img {
  width: 100%;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.agv-masonry .masonry-item:hover .ph img { transform: scale(1.04); }

.agv-empty {
  padding: 80px 60px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ── ASSIGNMENT DOCS SECTION ── */
.agv-docs {
  padding: 48px 60px 0;
}

.agv-docs-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.agv-docs-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.agv-doc-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.agv-doc-frame img {
  max-width: 860px;
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 8px 60px rgba(0,0,0,0.6);
}

.agv-doc-caption {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* ── THANK YOU LETTER ── */
.letter-section {
  min-height: calc(100vh - var(--tab-h) - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
}

.letter-wrap {
  max-width: 680px;
  width: 100%;
}

.letter-eyebrow {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.letter-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 32px;
}

.letter-heading em { font-style: italic; color: var(--gold); }

.letter-divider {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 40px;
}

.letter-body p {
  font-size: 14px;
  line-height: 2;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.letter-body p:first-child {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.letter-closing {
  margin-top: 40px;
  margin-bottom: 4px !important;
  color: var(--text) !important;
  font-size: 13px !important;
}

.letter-signature {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px !important;
  font-style: italic;
  font-weight: 300;
  color: var(--white) !important;
  letter-spacing: 0.02em;
  margin-bottom: 0 !important;
}

/* ── CV & JOB APPLICATION — document image pages ── */
.doc-image-section {
  min-height: calc(100vh - var(--tab-h) - 70px);
}

.doc-image-frame {
  padding: 0 60px 80px;
  display: flex;
  justify-content: center;
}

/* When you replace the placeholder with a real <img>, it will display here */
.doc-image-frame img {
  display: block;
  max-width: 860px;
  width: 100%;
  height: auto;
  box-shadow: 0 8px 60px rgba(0,0,0,0.6);
}

/* Placeholder shown until a real image is placed */
.doc-placeholder {
  max-width: 860px;
  width: 100%;
  min-height: 500px;
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
}

.doc-placeholder svg { opacity: 0.4; }

.doc-placeholder span {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.doc-placeholder code {
  font-size: 11px;
  color: var(--border);
  font-family: monospace;
  letter-spacing: 0.03em;
}

/* ── FOOTER ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.footer-contact { display: flex; flex-direction: column; gap: 5px; }

.footer-contact a, .footer-contact span {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact a:hover { color: var(--gold); }

.footer-professor {
  margin-top: 6px;
  color: var(--gold);
  opacity: 0.7;
}

.footer-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-style: italic;
  color: var(--text);
  text-align: center;
}

.footer-social { display: flex; gap: 20px; justify-content: flex-end; }

.footer-social a {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 10px;
  color: var(--border);
  text-align: center;
  margin-top: 12px;
  letter-spacing: 0.1em;
  grid-column: 1 / -1;
}

/* ── EDITABLE HINT ── */
[contenteditable]:hover {
  outline: 1px dashed rgba(201,168,76,0.3);
  outline-offset: 3px;
}

[contenteditable]:focus {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8,7,6,0.97);
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  font-weight: 200;
  transition: color 0.2s;
  z-index: 201;
}

.lightbox-close:hover { color: var(--gold); }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 56px;
  font-weight: 200;
  line-height: 1;
  cursor: pointer;
  padding: 16px 24px;
  transition: color 0.2s;
  z-index: 201;
  user-select: none;
}

.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

.lightbox-prev:hover,
.lightbox-next:hover { color: var(--gold); }

.lightbox-prev[hidden],
.lightbox-next[hidden] { display: none; }

.lightbox-spinner {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.lightbox-spinner.visible { display: block; }

@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox-content.visible { opacity: 1; transform: scale(1); }

.lightbox-img-wrap {
  position: relative;
  line-height: 0;
  max-width: 90vw;
  max-height: calc(90vh - 56px);
  overflow: hidden;
}

.lightbox-img-wrap img {
  display: block;
  max-width: 90vw;
  max-height: calc(90vh - 56px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8);
}

.lightbox-img-wrap img.thumb-preview {
  filter: blur(6px);
  transform: scale(1.02);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.lightbox-img-wrap img.loaded { filter: none; transform: scale(1); }

.lightbox-caption {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.lightbox-caption span {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── HAMBURGER MENU TOGGLE (hidden on desktop) ── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-muted);
  transition: color 0.2s;
  flex-shrink: 0;
}

.menu-toggle:hover { color: var(--gold); }

/* Three-line icon */
.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-toggle-icon::before { top: -7px; }
.menu-toggle-icon::after  { top:  7px; }

/* Animate to × when open */
header.nav-open .menu-toggle-icon          { background: transparent; }
header.nav-open .menu-toggle-icon::before  { transform: rotate(45deg)  translate(0, 7px); }
header.nav-open .menu-toggle-icon::after   { transform: rotate(-45deg) translate(0, -7px); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  /* Header */
  header { padding: 0 16px; }
  .menu-toggle { display: flex; align-items: center; }

  /* Nav dropdown */
  nav {
    display: none;
    position: fixed;
    top: var(--tab-h);
    left: 0; right: 0;
    z-index: 99;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  header.nav-open nav { display: flex; }
  nav button {
    width: 100%;
    height: 52px;
    padding: 0 24px;
    font-size: 11px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
  }
  nav button.active {
    border-left-color: var(--gold);
    border-bottom-color: var(--border);
  }

  /* Hero */
  .hero-text { padding: 0 24px 40px; }
  .scroll-hint { right: 24px; bottom: 20px; }

  /* Portfolio gallery */
  .gallery-section { padding: 40px 16px; }
  .masonry { columns: 2; column-gap: 2px; }

  /* About */
  .about-layout { grid-template-columns: 1fr; }
  .about-image { min-height: 260px; }
  .about-content { padding: 32px 20px 40px; }
  .about-stats { gap: 24px; margin-top: 24px; }

  /* Assignments grid */
  .assignments-section { padding: 40px 20px; }
  .page-subtitle { margin-bottom: 32px; }
  .assignment-card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px; }

  /* Assignment gallery view */
  .agv-header { padding: 16px 20px; flex-wrap: wrap; gap: 12px; }
  .agv-masonry { columns: 2; padding: 16px 16px 0; }
  .agv-docs { padding: 24px 16px 0; }
  .agv-doc-frame img { box-shadow: 0 4px 24px rgba(0,0,0,0.5); }

  /* CV / Job Application — override inline padding styles */
  .doc-image-section h2.page-title  { padding: 40px 20px 8px  !important; }
  .doc-image-section p.page-subtitle { padding: 0   20px 28px !important; }
  .doc-image-frame { padding: 0 16px 48px; }

  /* Footer */
  footer { grid-template-columns: 1fr; padding: 24px 20px; gap: 12px; }
  .footer-name { text-align: left; }
  .footer-social { justify-content: flex-start; }
  .footer-copy { text-align: left; grid-column: 1; }

  /* Thank you letter */
  .letter-section { padding: 48px 24px; align-items: flex-start; }

  /* Lightbox arrows — pull inward so they don't clip */
  .lightbox-prev { left: 0; padding: 12px 14px; font-size: 44px; }
  .lightbox-next { right: 0; padding: 12px 14px; font-size: 44px; }
}

/* Very small screens */
@media (max-width: 480px) {
  .masonry    { columns: 1; }
  .agv-masonry { columns: 1; }
}
