/* ---------- Colours ---------- */
:root {
  --bg: #1a1c1d;
  --surface: #2a2e2f;
  --text: #ebe9e4;
  --muted: #7e8583;
  --accent: #a9b8a4;
  --highlight: #c5d1bf;
    color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f1f0ec;
  --surface: #ffffff;
  --text: #1f2321;
  --muted: #6f7672;
  --accent: #5f735c;
  --highlight: #4a5d47;
  color-scheme: light;
}

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

/* ---------- Page ---------- */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  min-height: 100vh;
}

/* ---------- Header / nav ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.pill {
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  border: 1px solid var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  transition: background-color 0.2s, color 0.2s;
}

.pill:hover {
  background-color: var(--text);
  color: var(--bg);
}

.pill-cta {
  background-color: var(--highlight);
  border-color: var(--highlight);
  color: var(--bg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  background: none;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
}

.theme-toggle svg {
  width: 1rem;
  height: 1rem;
}

.icon-sun { display: none; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
}

.name {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  color: var(--accent);
  font-size: clamp(5rem, 18vw, 16rem);
  line-height: 0.85;
}

.name-first {
  position: absolute;
  left: 2rem;
  top: 12%;
  z-index: 1;          /* back layer */
}

.hero-photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 90%;
  z-index: 2;          /* middle layer */
}

.name-last {
  position: absolute;
  right: 2rem;
  bottom: 4%;
  z-index: 3;          /* front layer */
}

.tagline {
  position: absolute;
  right: 2rem;
  top: auto;
  bottom: 0.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-align: right;
  font-weight: 300;
  z-index: 3;
}

/* ---------- Mobile menu ---------- */
.site-header {
  position: relative;
  z-index: 20;
}

.menu-toggle {
  display: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 10;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu a {
  font-family: "Bebas Neue", sans-serif;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--accent);
  text-decoration: none;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
}

/* ---------- Landing page: no scrolling ---------- */
body.landing {
  height: 100vh;
  height: 100dvh;
  height: var(--app-height, 100dvh);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  min-height: 0;
}

body.landing .hero {
  flex: 1;
  height: auto;
  min-height: 0;
}

/* ---------- Landing entrance animation ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(2.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body.landing .name-first  { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }
body.landing .name-last   { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both; }
body.landing .hero-photo  { animation: fade 1.1s ease 0.35s both; }
body.landing .site-header { animation: fade 0.8s ease 0.6s both; }
body.landing .tagline     { animation: fade 0.8s ease 0.8s both; }

@media (prefers-reduced-motion: reduce) {
  body.landing * {
    animation: none !important;
  }
}

/* ---------- Contact card ---------- */
.contact-card {
  margin: auto;
  width: min(28rem, calc(100% - 2rem));
  padding: 2rem;
  border: none;
  border-radius: 1.25rem;
  background-color: var(--surface);
  color: var(--text);
}

.contact-card[open] {
  animation: fade 0.25s ease;
}

.contact-card::backdrop {
  background: rgb(0 0 0 / 0.6);
  backdrop-filter: blur(4px);
}

.contact-card h2 {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
}

.contact-note {
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--muted);
  border-radius: 0.75rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 6rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.hp {
  position: absolute;
  left: -9999px;
}

.send-btn {
  padding: 0.7rem;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.send-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form-status {
  font-size: 0.85rem;
  min-height: 1.2em;
}

.form-status.success { color: var(--accent); }
.form-status.error   { color: #e07a6b; }

.contact-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.contact-divider::before,
.contact-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--muted);
  opacity: 0.4;
}

.email-address {
  color: var(--text);
  text-decoration: none;
}

.email-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  border: 1px solid var(--muted);
  border-radius: 999px;
}

.email-address {
  white-space: nowrap;
  font-size: clamp(0.8rem, 3.6vw, 0.95rem);
}

.copy-btn {
  background: none;
  font-family: inherit;
  cursor: pointer;
}

.email-open {
  display: block;
  text-align: center;
  padding: 0.7rem;
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  color: var(--text);
}

  /* ---------- Mobile ---------- */
@media (max-width: 700px) {
  .site-header {
    padding: 1rem;
    gap: 0.5rem;
  }

    .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .site-header {
    justify-content: flex-end;
  }

  .pill {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    white-space: nowrap;
  }

  .name {
    font-size: 28vw;
  }

  .name-first {
    left: 1rem;
    top: 4%;
  }

  .name-last {
    right: 1rem;
    bottom: 3%;
    text-shadow: 0 0 2rem var(--bg);
  }

  .hero-photo {
    height: 84%;
    -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 95%);
    mask-image: linear-gradient(to bottom, black 55%, transparent 95%);
  }

  .tagline {
    left: 1rem;
    right: auto;
    top: calc(4% + 24vw);
    text-align: left;
    font-size: 0.85rem;
  }
    .tag-sep {
    display: none;
  }

  .tag-line2 {
    display: block;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 1.5rem;
  }
}