/* MB Technical — site styles.
   The colours and fonts are set once here; change them and the whole site follows. */
:root {
  --bg: #0b0b0d;
  --panel: #16161a;
  --line: #2a2a31;
  --text: #f2f0ee;
  --muted: #a9a6ad;
  --orange: #f7a04b;
  --pink: #ee3f6f;
  --accent: linear-gradient(90deg, var(--orange), var(--pink));
  --serif: Georgia, "Palatino Linotype", Palatino, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: 2rem; }
h2::after {
  content: ""; display: block; width: 64px; height: 3px;
  margin-top: 0.75rem; background: var(--accent);
}
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.5rem clamp(1rem, 4vw, 3rem);
  background: #000; border-bottom: 1px solid var(--line);
}
.brand img { height: 56px; width: auto; }
.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.site-header nav a {
  font-family: var(--serif); font-style: italic; font-size: 1.15rem;
  text-decoration: none; padding: 0.4rem 0; border-bottom: 2px solid transparent;
}
.site-header nav a:hover { border-image: var(--accent) 1; }

/* ---------- Intro ---------- */
.hero {
  background:
    linear-gradient(rgba(11, 11, 13, 0.5), rgba(11, 11, 13, 0.55) 65%, var(--bg)),
    url("images/background.jpg") center / cover no-repeat;
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
}
.hero-inner {
  max-width: 1050px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 380px) 1fr;
  gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
}
.portrait {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 30%;
  border-radius: 6px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.eyebrow {
  margin: 0 0 0.5rem; font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase;
  background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block; font-weight: 600;
}
h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); margin-bottom: 1.5rem; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.35rem); margin: 0 0 1rem; max-width: 30em; }
.social { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.social a {
  display: inline-block; padding: 0.45rem 1rem; border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px; text-decoration: none; font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.35);
}
.social a:hover { border-color: var(--orange); color: var(--orange); }

/* ---------- Portfolio ---------- */
.portfolio, .contact {
  max-width: 1300px; margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
}
.grid {
  display: grid; gap: 1.75rem 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.work { margin: 0; }
.work a { display: block; overflow: hidden; border-radius: 4px; background: var(--panel); }
.work img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.work a:hover img { transform: scale(1.04); opacity: 0.85; }
.work figcaption { margin-top: 0.6rem; font-size: 0.92rem; line-height: 1.4; color: var(--muted); }

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
.contact-details p { margin: 0 0 0.75rem; }
.contact-details a { text-decoration-color: var(--pink); text-underline-offset: 3px; }
form { display: grid; gap: 1rem; }
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: grid; gap: 0.3rem; font-size: 0.9rem; color: var(--muted); }
input, textarea {
  width: 100%; padding: 0.7rem 0.8rem; font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
}
input:focus, textarea:focus { outline: none; border-color: var(--orange); }
textarea { resize: vertical; }
.trap { position: absolute; left: -9999px; }
button[type="submit"] {
  justify-self: end; padding: 0.75rem 2.25rem; font: inherit; font-weight: 600;
  color: #000; background: var(--accent); border: 0; border-radius: 4px; cursor: pointer;
}
button[type="submit"]:hover { filter: brightness(1.1); }
button[disabled] { opacity: 0.6; cursor: wait; }
#form-status { margin: 0; min-height: 1.6em; font-size: 0.95rem; }
#form-status.ok { color: #7bd88f; }
#form-status.error { color: #ff8a8a; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem 1rem; text-align: center; font-size: 0.85rem;
  color: var(--muted); border-top: 1px solid var(--line);
}
.site-footer p { margin: 0; }

/* ---------- Photo viewer ---------- */
#lightbox {
  border: 0; padding: 0; background: transparent; color: var(--text);
  max-width: 94vw; max-height: 94vh; overflow: visible;
}
#lightbox::backdrop { background: rgba(0, 0, 0, 0.9); }
#lightbox img { max-width: 94vw; max-height: 82vh; margin: 0 auto; border-radius: 4px; }
#lightbox p { text-align: center; margin: 0.75rem 0 0; }
#lightbox .close {
  position: fixed; top: 0.75rem; right: 1rem; width: 44px; height: 44px;
  font-size: 2rem; line-height: 1; color: #fff; background: rgba(0, 0, 0, 0.5);
  border: 0; border-radius: 50%; cursor: pointer;
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .hero-inner, .contact { grid-template-columns: 1fr; }
  .portrait { max-width: 320px; margin: 0 auto; }
  .hero-text { text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .social { justify-content: center; }
  .brand img { height: 44px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem 0.75rem; }
  form .row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work img { transition: none; }
}
