:root {
    --bg: #f9f8f5;
    --bg-card: #ffffff;
    --bg-subtle: #f2f0eb;
    --text-primary: #1a1917;
    --text-secondary: #5a5750;
    --text-muted: #9a968e;
    --border: #e5e2da;
    --accent: #2a6049;
    --accent-light: #e8f2ed;
    --accent-text: #1d4433;
    --tag-bg: #eeede8;
    --tag-text: #4a4740;
    --nav-bg: rgba(249, 248, 245, 0.88);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
}

[data-theme="dark"] {
    --bg: #141412;
    --bg-card: #1e1d1b;
    --bg-subtle: #242320;
    --text-primary: #f0ede6;
    --text-secondary: #a09b91;
    --text-muted: #6a6560;
    --border: #2e2c29;
    --accent: #4d9a7a;
    --btn-bg: #333333;
    --btn-text: #e0e0e0;
    --accent-light: #1a2e26;
    --accent-text: #7dcba8;
    --tag-bg: #2a2925;
    --tag-text: #b0ab9f;
    --nav-bg: rgba(20, 20, 18, 0.88);
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    transition: background 0.25s, color 0.25s;
}

/* ── NAV ── */
nav {
    position: sticky;
    top: 0;
    width: 100%;
    min-width: 100vw;
    z-index: 1100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background 0.25s, border-color 0.25s;
}

.nav-inner {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    height: 58px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    font-family: 'DM Serif Display', serif;
    font-size: 1.15rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin-left: 2rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

/* Hamburger — hidden on desktop, shown on mobile */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Theme toggle */
.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
    transition: all 0.15s;
}

.theme-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.theme-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Reset sticky/z-index for nav elements that aren't the site navbar */
nav.breadcrumb {
  position: static;
  z-index: auto;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
  border-bottom: none;
  width: auto;
  min-width: 0;
}

/* ── NAV DROPDOWNS ── */

.nav-links li.has-dropdown,
.nav-links li.has-subdropdown { position: relative; }

.dropdown {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.75rem 0 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 1200;
  pointer-events: none;
  overflow: visible;
}

.has-dropdown:hover > .dropdown,
.has-dropdown.open   > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Sub-dropdown opens to the right */
.dropdown--sub {
  top: 0;
  left: 100%;
  z-index: 1300;
  padding: 0.35rem 0;      /* override parent's 0.75rem top padding */
  transform: none;          /* no vertical slide — opens sideways */
  transition: opacity 0.18s ease, visibility 0.18s;
}

/* Invisible bridge fills the gap so mouse doesn't lose hover */
.dropdown--sub::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 8px;
  height: 100%;
}

.has-subdropdown:hover > .dropdown--sub,
.has-subdropdown.open  > .dropdown--sub {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  white-space: nowrap;
  border-radius: 6px;
  margin: 0 0.3rem;
  transition: background 0.12s;
}

.dropdown a:hover { background: var(--bg-subtle) !important; }

.dropdown-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.5rem 1rem 0.15rem;
  pointer-events: none;
  user-select: none;
}

.dropdown-divider-item {
  padding: 0.3rem 0.75rem;
  pointer-events: none;
}

.dropdown-divider-line {
  height: 1px;
  background: var(--border);
}

/* Small chevron icon inside nav link text — hidden on desktop, shown on mobile */
.nav-chevron {
  display: none;
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
  transition: transform 0.2s;
}

/* Rotate chevrons when dropdown is open */
.has-dropdown.open > a .nav-chevron:not(.nav-chevron--right) { transform: rotate(180deg); }
.has-subdropdown.open > a .nav-chevron--right                { transform: rotate(90deg); }

/* ── LAYOUT ── */
main {
    max-width: 90%;
    width: 1000px;
    margin: 2rem auto;
    padding: 0 1.25rem;
}

section {
    padding: 5rem 0 3rem;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

h2.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* ── HERO ── */
#about {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.6rem, 6vw, 4rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

h1 em {
    font-style: italic;
    color: var(--accent);
}

.hero-bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.75;
    margin-bottom: 2.25rem;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover { opacity: 0.88; }

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-outline:hover {
    background: var(--bg-subtle);
    border-color: var(--text-muted);
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.stat-num {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Divider */
.section-divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

/* ── EXPERIENCE ── */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.exp-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.exp-item:last-child { border-bottom: none; }

.exp-meta { padding-top: 0.1rem; }

.exp-company {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.exp-period {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.exp-location {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.exp-role {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.exp-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.exp-bullets li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    padding-left: 1rem;
    position: relative;
}

.exp-bullets li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
}

/* ── SKILLS ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.skill-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.skill-card-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.skill-card-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.skill-card h3 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    font-size: 0.78rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    line-height: 1.6;
}

/* ── PROJECTS ── */

/* Mobile first: single column, image below text */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: stretch;
    width: 100%;
}

.project-card-link {
    display: block;
    text-decoration: none;
    position: relative;
}

.project-card-link::after {
    content: "View Details";
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.project-card-link:hover::after { opacity: 1; }

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.6rem 1rem;
}

.project-card h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.project-role {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent-text);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.project-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    font-style: italic;
}

/* Mobile thumbnail */
.project-thumb {
    width: 100%;
    flex-shrink: 0;
    height: 180px;
    max-width: 100%;
    overflow: hidden;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Desktop: two columns, image on the right side */
@media (min-width: 700px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
    }

    .project-card {
        flex-direction: row;
    }

    .project-thumb {
        width: 180px;
        height: 100%;
        flex-shrink: 0;
        align-self: stretch;
        overflow: hidden;
    }

    .project-thumb img {
        width: 180px;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }
}

/* ── CONTACT ── */
#contact { padding-bottom: 6rem; }

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.75rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.contact-detail:hover { color: var(--accent); }

.contact-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-subtle);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 15px;
    height: 15px;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-detail:hover .contact-icon { background: var(--accent-light); }
.contact-detail:hover .contact-icon svg { stroke: var(--accent); }

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem;
}

.contact-card-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.contact-card-role {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.contact-card-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 1.25rem;
}

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-text);
    background: var(--accent-light);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
}

.dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── EMAIL TOOLTIP ── */
.tooltip-container {
    position: relative;
    display: inline-block;
    z-index: 500;
}

.tooltip-text {
    visibility: hidden;
    width: 260px;
    background-color: var(--bg-card);
    color: var(--text-secondary);
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
    line-height: 1.4;
    box-shadow: var(--shadow);
    position: absolute;
    z-index: 600;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--border) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* ── PDF VIEWER ── */
#canvasWrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

#pdfCanvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* Force all links to inherit text color */
a, a:visited, a:hover, a:active {
    color: inherit !important;
    text-decoration: none;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow { animation: fadeUp 0.5s ease both; animation-delay: 0.05s; }
h1             { animation: fadeUp 0.55s ease both; animation-delay: 0.12s; }
.hero-bio      { animation: fadeUp 0.55s ease both; animation-delay: 0.2s; }
.hero-links    { animation: fadeUp 0.55s ease both; animation-delay: 0.28s; }
.hero-stats    { animation: fadeUp 0.55s ease both; animation-delay: 0.36s; }

/* ── RESPONSIVE ── */
@media (max-width: 699px) {
    .hamburger { display: flex; margin-left: auto; }

    .nav-links {
        display: none;
        margin-left: 0;
        position: absolute;
        top: 58px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        padding: 0.5rem 1.25rem 1rem;
        text-align: center;
    }

    .nav-links.open { display: flex; }
    .nav-links li:last-child a { border-bottom: none; }

    /* Mobile dropdowns — expand inline instead of floating */
    .dropdown {
      position: static !important;
      opacity: 1 !important;
      visibility: visible !important;
      transform: none !important;
      box-shadow: none !important;
      border: none !important;
      border-left: 2px solid var(--border) !important;
      border-radius: 0 !important;
      background: transparent !important;
      padding: 0 !important;
      pointer-events: auto !important;
      display: none;
      margin-left: 1rem;
      z-index: auto !important;
    }

    .has-dropdown.open > .dropdown,
    .has-subdropdown.open > .dropdown--sub { display: block; }

    .dropdown--sub { margin-left: 1rem !important; }

    .dropdown a {
      padding: 0.45rem 0.75rem !important;
      margin: 0 !important;
      border-radius: 0 !important;
      justify-content: flex-start !important;
    }

    .nav-chevron { display: inline-block; }

    .exp-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .exp-meta {
        display: flex;
        gap: 1rem;
        align-items: baseline;
        flex-wrap: wrap;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    main { padding: 0 1.25rem; }
    .nav-inner { padding: 0 1.25rem; }

    .projects-main,
    .projects-main article,
    .projects-main section,
    .projects-main video,
    .projects-main img {
        max-width: 100%;
        box-sizing: border-box;
    }

    .projects-main article { padding: 0; }
    .projects-main article h2 { font-size: 1.3rem; }

    .project-card { flex-direction: column !important; }

    .project-thumb {
        width: 100% !important;
        height: 160px !important;
    }

    .project-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        object-position: center center !important;
    }
}

.projects-main {
    max-width: 900px;
    width: 100%;
    margin: 4rem auto;
    padding: 0 1.25rem;
    box-sizing: border-box;
}

.hero-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-photo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .profile-photo {
        order: -1;
        margin-bottom: 1rem;
    }

    .hero-text { order: 1; }
}


/* ═══════════════════════════════════════════════
   PROJECT PAGES — shared styles
   Used by: blacksmith.html, knife.html, workbench.html, and all future project pages
   ═══════════════════════════════════════════════ */

/* ── Page header ── */
.project-header {
    padding: 3rem 0 2.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}

.project-header h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    letter-spacing: -0.025em;
    animation: none;
}

.project-header .subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* ── Back link ── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.15s;
}

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

.back-link svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Breadcrumb ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Project intro layout ── */
.project-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3.5rem;
    align-items: start;
}

.project-intro p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.project-intro-meta {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.meta-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.meta-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.meta-value {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ── Content sections ── */
.content-section {
    margin-bottom: 3.5rem;
}

.content-section-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.content-section-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.content-section-header .section-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Article typography ── */
article h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 2rem 0 0.65rem;
    letter-spacing: -0.01em;
}

article p {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1rem;
}

article ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

article ul li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    padding-left: 1rem;
    position: relative;
}

article ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
}

/* ── Video ── */
.video-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    margin-bottom: 1rem;
}

.video-wrap video {
    width: 100%;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

.video-caption {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.6rem;
}

/* ── Photo grids ── */
.photo-grid {
    display: grid;
    gap: 0.75rem;
}

.photo-grid-2 { grid-template-columns: repeat(2, 1fr); }
.photo-grid-3 { grid-template-columns: repeat(3, 1fr); }
.photo-grid-4 { grid-template-columns: repeat(4, 1fr); }

.photo-grid img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}

.photo-grid img:hover {
    opacity: 0.9;
    transform: scale(1.01);
}

.photo-feature {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    object-fit: cover;
    display: block;
    max-height: 420px;
    cursor: pointer;
    transition: opacity 0.15s;
    margin-bottom: 0.75rem;
}

.photo-feature:hover { opacity: 0.9; }

/* ── Lightbox ── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(6px);
    cursor: zoom-out;
}

.lightbox.open,
.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: min(90vw, 900px);
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 60px rgba(0,0,0,0.5);
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.lightbox-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    white-space: nowrap;
}

/* ── Responsive: project pages ── */
@media (max-width: 699px) {
    .project-intro {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .photo-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .photo-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ── PHOTO CAPTION OVERLAY ── */
.img-tip {
  position: relative;
  display: block;
}

.img-tip img {
  display: block;
  width: 100%;
}

.img-tip .tip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 1.5rem 0.75rem 0.6rem;
  border-radius: 0 0 8px 8px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.img-tip:hover .tip {
  opacity: 1;
  transform: translateY(0);
}

/* ── VIDEO CAPTION + CLICK-TO-ENLARGE ── */
/* Wraps a video-wrap to add hover tooltip and a zoom-in cursor */
.video-tip {
  position: relative;
  display: block;
  cursor: zoom-in;
}

.video-tip .tip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 1.5rem 0.75rem 0.6rem;
  border-radius: 0 0 12px 12px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 2;
}

.video-tip:hover .tip {
  opacity: 1;
  transform: translateY(0);
}

/* ── VIDEO MODAL ── */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(6px);
  cursor: zoom-out;
  flex-direction: column;
  gap: 0.75rem;
}

.video-modal.open { display: flex; }

.video-modal video {
  max-width: min(92vw, 1100px);
  max-height: 80vh;
  border-radius: 6px;
  box-shadow: 0 8px 60px rgba(0,0,0,0.5);
  cursor: default;
  display: block;
}

.video-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2001;
}

.video-modal-close:hover { background: rgba(255,255,255,0.2); }

.video-modal-caption {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
  max-width: min(92vw, 1100px);
}

/* ────────────────────────────────────────── */

.img-tip--feature .tip {
  border-radius: 0 0 12px 12px;
}