/* Shared styles for inner pages (about, projects) */
:root {
  --bg: #1a1a1b; --bg-2: #232325; --line: rgba(255,255,255,.1);
  --text: #fff; --muted: rgba(255,255,255,.72); --faint: rgba(255,255,255,.5);
  --pad: clamp(24px, 6vw, 64px); --maxw: 1200px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: "Libre Franklin", Helvetica, Arial, sans-serif; font-weight: 300; line-height: 1.7; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { padding-left: var(--pad); padding-right: var(--pad); max-width: calc(var(--maxw) + 2 * var(--pad)); margin-left: auto; margin-right: auto; }
.eyebrow { font-family: "Poppins", sans-serif; font-weight: 700; font-size: .8rem; letter-spacing: .28em; text-transform: uppercase; color: var(--faint); }
h1, h2, h3 { font-family: "Poppins", sans-serif; font-weight: 700; letter-spacing: -.02em; line-height: 1.08; }
h1 { font-size: clamp(2.6rem, 6vw, 5.5rem); margin-top: .8rem; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.4rem); color: var(--muted); max-width: 36em; margin-top: 1.6rem; text-wrap: balance; }
p { color: var(--muted); max-width: 40em; }
p + p { margin-top: 1.1rem; }
section { padding: clamp(56px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.page-head { padding-top: clamp(120px, 16vw, 200px); padding-bottom: clamp(56px, 7vw, 96px); }
.grid { display: grid; gap: clamp(24px, 3vw, 48px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.split { display: grid; gap: clamp(32px, 5vw, 80px); grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.3fr; } }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; padding: clamp(24px, 3vw, 40px); }
.card h3 { margin-top: 1rem; }
.card p { margin-top: .6rem; font-size: .98rem; }
.btn { display: inline-block; margin-top: 2rem; padding: .9rem 1.8rem; font-family: "Poppins", sans-serif; font-weight: 700; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; background: #fff; color: #1a1a1b; border-radius: 2px; transition: transform .2s, opacity .2s; }
.btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.btn + .btn { margin-left: .8rem; }
.btn:hover { transform: translateY(-2px); opacity: .9; }
.placeholder { background: repeating-linear-gradient(135deg, #2a2a2c 0 14px, #262628 14px 28px); border: 1px dashed rgba(255,255,255,.2); border-radius: 4px; display: grid; place-items: center; color: var(--faint); font-family: "Poppins", sans-serif; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; text-align: center; padding: 1rem; }
.todo { background: rgba(255, 214, 102, .14); color: #ffd666; padding: 0 .25em; border-radius: 2px; }

/* Facts row on project pages */
.facts { display: flex; flex-wrap: wrap; gap: 1.2rem 3rem; margin-top: 2.4rem; }
.facts dt { font-family: "Poppins", sans-serif; font-weight: 700; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin-top: .2rem; color: #fff; }

/* Timeline on about page */
.timeline { list-style: none; }
.timeline > li { display: grid; grid-template-columns: 1fr; gap: .3rem; padding: 1.6rem 0; border-top: 1px solid var(--line); }
.timeline > li:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 700px) { .timeline > li { grid-template-columns: 11rem 1fr; gap: 2rem; } }
.timeline .when { font-family: "Poppins", sans-serif; font-weight: 700; font-size: .85rem; color: var(--faint); letter-spacing: .05em; }
.timeline h3 + p { margin-top: .3rem; }

/* Project cards */
.project-card { text-decoration: none; display: block; transition: transform .25s, border-color .25s; }
.project-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.3); }
.project-card .logo { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: #1a1a1b; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 1.3rem; }
.project-card .logo svg { width: 34px; height: 34px; fill: currentColor; }
.project-card .shot { aspect-ratio: 16 / 9; margin-top: 1.6rem; }
.project-card .more { display: inline-block; margin-top: 1.2rem; font-family: "Poppins", sans-serif; font-weight: 700; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }

/* Photo panel on about page */
.portrait { aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: #3e3e40; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 48px 0 56px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
footer small { color: var(--faint); font-size: .85rem; }
.social { display: flex; gap: 1.2rem; list-style: none; }
.social a { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; opacity: .8; transition: opacity .2s; }
.social a:hover { opacity: 1; }
.social svg { width: 22px; height: 22px; fill: currentColor; }

/* Logo link + menu (same behavior as homepage) */
.home-link { position: fixed; top: 22px; left: 26px; z-index: 10; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 1.05rem; text-decoration: none; letter-spacing: -.01em; }
.menu-btn { position: fixed; top: 22px; right: 26px; z-index: 10; width: 40px; height: 30px; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 4px; background: #fff; border-radius: 1px; transition: .3s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(13px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-13px) rotate(-45deg); }
.topbar { position: fixed; inset: 0 0 auto 0; height: 76px; z-index: 4; background: linear-gradient(to bottom, rgba(26,26,27,.95), rgba(26,26,27,0)); pointer-events: none; }
nav { position: fixed; inset: 0; z-index: 5; background: rgba(10,8,6,.96); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.menu-open nav { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity .3s, visibility 0s; }
nav ul { list-style: none; text-align: center; }
nav a { font-family: "Poppins", sans-serif; font-weight: 700; font-size: clamp(2rem, 5vw, 3.5rem); text-decoration: none; line-height: 1.6; text-transform: uppercase; letter-spacing: .04em; }
nav a { color: #fff; transition: color .2s; }
nav a:hover, nav a:focus-visible, nav a[aria-current="page"] { color: rgba(255,255,255,.6); }
a:focus-visible, .menu-btn:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (max-width: 700px) {
  .home-link { top: 17px; left: 24px; font-size: .95rem; }
  .menu-btn { top: 18px; right: 18px; width: 28px; height: 20px; }
  .menu-btn span { height: 3px; }
  .menu-open .menu-btn span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
  .menu-open .menu-btn span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
  .topbar { height: 60px; }
  .btn + .btn { margin-left: 0; }
  .btn { margin-right: .8rem; }
}

/* Contact form */
.contact-form { display: grid; gap: 1.2rem; align-content: start; }
.contact-form label { display: grid; gap: .45rem; font-family: "Poppins", sans-serif; font-weight: 700; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.contact-form .opt { text-transform: none; letter-spacing: 0; font-weight: 400; font-family: "Libre Franklin", sans-serif; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: 400 1rem/1.5 "Libre Franklin", Helvetica, Arial, sans-serif; letter-spacing: 0; text-transform: none;
  color: #fff; background: #1a1a1b; border: 1px solid rgba(255,255,255,.18); border-radius: 3px; padding: .8rem .9rem; width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: #fff; }
.contact-form .field-row { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.contact-form .btn { margin-top: .4rem; justify-self: start; border: 0; cursor: pointer; }
.contact-form .btn:disabled { opacity: .6; cursor: default; transform: none; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; font-size: .95rem; }
.form-status.ok { color: #9be39b; }
.form-status.err { color: #ffb4a6; }

/* About: photo strip */
.photo-strip { display: grid; gap: clamp(12px, 2vw, 24px); grid-template-columns: repeat(2, 1fr); margin-top: 2.4rem; }
@media (min-width: 900px) { .photo-strip { grid-template-columns: repeat(4, 1fr); } }
.photo-strip figure { margin: 0; }
.photo-strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: #2a2a2c; }
.photo-strip figcaption { margin-top: .6rem; font-size: .85rem; color: var(--faint); }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.filters button { font: 700 .8rem "Poppins", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: transparent; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: .55rem 1.1rem; cursor: pointer; }
.filters button.active, .filters button:hover { color: #1a1a1b; background: #fff; border-color: #fff; }
.masonry { columns: 3 300px; column-gap: clamp(12px, 1.6vw, 20px); }
.g-item { margin: 0 0 clamp(12px, 1.6vw, 20px); break-inside: avoid; }
.g-item[hidden] { display: none; }
.g-item a { display: block; border-radius: 4px; overflow: hidden; }
.g-item img { width: 100%; height: auto; transition: transform .4s, opacity .3s; }
.g-item a:hover img { transform: scale(1.03); }
.lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(8,8,9,.96); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 82vh; margin: 0 auto; border-radius: 2px; }
.lightbox figcaption { margin-top: 1rem; color: var(--muted); font-size: .95rem; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font-size: 3rem; line-height: 1; padding: .4rem 1rem; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) { .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; } }

/* Resume details on About */
.timeline .org { font-size: .95rem; color: #fff; opacity: .85; margin-top: .15rem; }
.timeline .org + p { margin-top: .6rem; }
.bullets { margin: .8rem 0 0 1.1rem; color: var(--muted); max-width: 44em; }
.bullets li { margin-top: .4rem; padding-left: .2rem; }
.bullets li::marker { color: var(--faint); }
.timeline.compact > li { grid-template-columns: 1fr; gap: .1rem; padding: 1rem 0; }
.timeline.compact > li:first-child { padding-top: 0; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.chips li { font-size: .88rem; color: var(--muted); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: .35rem .85rem; }

/* Full-width photo banner with text overlaid */
.page-hero {
  position: relative; display: flex; align-items: flex-end;
  min-height: min(74vh, 705px);
  padding: 140px 0 clamp(48px, 7vw, 96px);
  background: #111 var(--hero) center 40% / cover no-repeat;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(26,26,27,.82) 30%, rgba(12,12,14,.55) 65%, rgba(12,12,14,.45) 100%);
}
.page-hero .wrap { position: relative; width: 100%; }
.page-hero .eyebrow { color: rgba(255,255,255,.7); }
.page-hero .lead { color: rgba(255,255,255,.88); }
/* Phones and tablets: banner only as tall as its text */
@media (max-width: 1199px) { .page-hero { min-height: 430px; padding-top: 130px; padding-bottom: 48px; } }
@media (max-width: 700px) { .page-hero { min-height: 392px; padding-top: 96px; padding-bottom: 36px; background-position: 60% center; } }
.page-hero + section { border-top: 0; }
.email-hint { text-transform: none; letter-spacing: 0; font: 400 .9rem "Libre Franklin", sans-serif; color: #ffd666; min-height: 0; }
.hint-fix { background: none; border: 0; padding: 0; color: #ffd666; font: inherit; text-decoration: underline; cursor: pointer; }
.contact-form ::placeholder { color: rgba(255,255,255,.35); opacity: 1; }
.email-hint:empty { display: none; }
.contact-form .form-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .4rem; }
.contact-form .form-actions .btn { margin: 0; }
.contact-form .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.contact-form select {
  appearance: none; -webkit-appearance: none;
  padding-right: 2.8rem;
  background: #1a1a1b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ffffff' stroke-opacity='.7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 1rem center / 12px 8px;
}
.contact-form .form-actions { align-items: center; gap: 1.4rem; }
.link-reset { background: none; border: 0; padding: 0; cursor: pointer; font: 400 .95rem "Libre Franklin", sans-serif; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link-reset:hover { color: #fff; }
@media (max-width: 700px) { footer .wrap { flex-direction: column-reverse; align-items: center; text-align: center; } }
