/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: white;
  background: #000;
}

/* ========== Header ========== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
}

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 2px;
}

/* ========== Hamburger ========== */
.menu-toggle {
  width: 42px; height: 42px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle .bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  transition: transform .25s ease, opacity .25s ease;
}

.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ========== Backdrop ========== */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.20);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ========== Drawer ========== */
.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(80vw, 340px);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  border-left: 1px solid rgba(255,255,255,.08);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .45s ease;
}
.drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 96px 24px 24px;
  gap: 18px;
}

.drawer-link {
  color: #fff;
  text-decoration: none;
  font-size: 1.15rem;
  letter-spacing: .08em;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background-color .25s ease, transform .25s ease;
}
.drawer-link:hover,
.drawer-link:focus-visible {
  background: rgba(255,255,255,.10);
  transform: translateX(-2px);
}

/* ========== Full-page panels ========== */
.panel {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.15) 30%, rgba(0,0,0,.25));
}

.panel .overlay { position: relative; z-index: 1; }

/* ========== Overlay / Hero text ========== */
.overlay {
  text-align: center;
  background: rgba(0,0,0,.4);
  padding: 40px;
  border-radius: 8px;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  letter-spacing: 4px;
  margin-bottom: 20px;
}

.hero p {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  letter-spacing: 2px;
  font-style: italic;
}

/* ========== Page Layout ========== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 24px 48px;
}

.page-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 28px;
  opacity: .95;
}

/* ========== Projects Grid ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  text-decoration: none;
}

.card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  filter: saturate(0.95);
  transition: transform .35s ease, filter .35s ease;
}

.card-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
}

.card-title {
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: .08em;
  margin-bottom: 2px;
}
.card-sub {
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  letter-spacing: .04em;
}

.card:hover .card-image {
  transform: scale(1.03);
  filter: saturate(1);
}

/* ========== About Page ========== */
.prose {
  line-height: 1.7;
  color: rgba(255,255,255,.92);
  max-width: 70ch;
}
.prose p + p { margin-top: 1em; }

.about-portrait {
  margin-top: 24px;
  max-width: 320px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15);
}

/* ========== Misc ========== */
.contact-block {
  font-size: 1.05rem;
  line-height: 1.8;
}
.link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.muted {
  margin-top: 12px;
  color: rgba(255,255,255,.6);
  font-size: .9rem;
}

/* ========== Contact Form ========== */
.contact-form {
  display: grid;
  gap: 16px;
  max-width: 560px;
}
.contact-form .field {
  display: grid;
  gap: 8px;
}
.contact-form label {
  font-size: .95rem;
  color: rgba(255,255,255,.9);
  letter-spacing: .04em;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  outline: none;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.contact-form .btn {
  justify-self: start;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .2s ease, transform .1s ease;
}
.contact-form .btn:hover { background: rgba(255,255,255,.12); }
.contact-form .btn:active { transform: translateY(1px); }
.contact-form .error {
  min-height: 1em;
  color: #ffb3b3;
  font-size: .85rem;
}
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.form-status {
  margin-top: 8px;
  font-size: .95rem;
}
.form-status.ok { color: #b6f5c2; }
.form-status.err { color: #ffb3b3; }

/* ========== Project Pages ========== */
.project-eyebrow {
  display: block;
  font-size: .85rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .7;
  margin-bottom: 12px;
}
.back-link {
  margin-top: 48px;
  color: rgba(255,255,255,.6);
  font-size: .9rem;
}

/* ========== Services Page ========== */
.services-intro {
  color: rgba(255,255,255,.8);
  line-height: 1.7;
  max-width: 70ch;
}
.services-list {
  list-style: none;
  margin-top: 48px;
}
.service {
  padding: 36px 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.service-tag {
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: 10px;
}
.service-title {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  letter-spacing: .06em;
  font-weight: 600;
  margin-bottom: 14px;
}
.service-body {
  color: rgba(255,255,255,.8);
  line-height: 1.75;
  max-width: 65ch;
}
.services-cta {
  margin-top: 16px;
  padding: 36px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  max-width: 65ch;
  color: rgba(255,255,255,.8);
  line-height: 1.75;
}

/* ========== Footer ========== */
.site-footer {
  padding: 32px 24px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .85rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .04em;
}
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color .2s ease;
}
.footer-nav a:hover { color: rgba(255,255,255,.85); }

/* Active page link in drawer */
.drawer-link[aria-current="page"] {
  background: rgba(255,255,255,.08);
}

/* ========== Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
  .drawer { transition: none; }
  .backdrop { transition: none; }
  .menu-toggle .bar { transition: none; }
  .card-image { transition: none; }
  .drawer-link { transition: none; }
}
