:root {
  --bg: #090909;
  --panel: #101010;
  --text: #f4f2ed;
  --muted: #aaa7a0;
  --line: rgba(255,255,255,.14);
  --card: rgba(255,255,255,.045);
  --card-hover: rgba(255,255,255,.09);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body { min-height: 100vh; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 46vw) 1fr;
}

.portrait {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #d8d8d8;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  filter: grayscale(100%) contrast(1.03);
  display: block;
}

.portrait-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 55%, rgba(9,9,9,.5) 100%),
    linear-gradient(0deg, rgba(0,0,0,.15), transparent 36%);
  pointer-events: none;
}

.content {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.04), transparent 32%),
    var(--panel);
  padding: 56px clamp(28px, 6vw, 96px);
}

.content-inner {
  width: min(640px, 100%);
  margin: 0 auto;
}

.intro { margin-bottom: 38px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: .96;
  letter-spacing: -.055em;
  text-transform: uppercase;
}

.tagline {
  max-width: 510px;
  margin: 20px 0 0;
  color: #c8c5bf;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
}

.links {
  display: grid;
  gap: 12px;
}

.link-card {
  min-height: 78px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
  border-color: rgba(255,255,255,.3);
}

.icon-wrap {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
}

.icon-wrap svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.link-title {
  font-size: 15px;
}

.link-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.arrow {
  color: #8e8b85;
  font-size: 18px;
}

footer {
  margin-top: 32px;
  color: #77746f;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .shell { display: block; }

  .portrait {
    position: relative;
    height: min(72vh, 620px);
  }

  .portrait-shade {
    background: linear-gradient(0deg, #101010 0%, transparent 35%);
  }

  .content {
    min-height: auto;
    padding: 14px 20px 44px;
  }

  .content-inner {
    transform: translateY(-28px);
  }

  h1 {
    font-size: clamp(40px, 13vw, 64px);
  }
}

/* ---- Contact button + form ---- */
.content { position: relative; }

.contact-btn {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font: 700 11px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.contact-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-btn:hover { background: var(--card-hover); border-color: rgba(255,255,255,.3); }
.contact-btn:focus-visible, .cf-close:focus-visible, .cf-send:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

body.cf-lock { overflow: hidden; }

.cf-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  background: rgba(0,0,0,0);
  transition: background .2s ease;
}
.cf-overlay.is-open { background: rgba(0,0,0,.6); }
.cf-overlay[hidden] { display: none; }
.cf-overlay[hidden]:target { display: flex; background: rgba(0,0,0,.6); } /* no-JS fallback via #contact */
.cf-overlay:target .cf-panel { transform: none; opacity: 1; }
.cf-backdrop { position: absolute; inset: 0; border: 0; background: transparent; cursor: default; }

.cf-panel {
  position: relative;
  width: min(460px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 34px 32px 40px;
  background: #121212;
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(0,0,0,.5);
  transform: translateX(24px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}
.cf-overlay.is-open .cf-panel { transform: none; opacity: 1; }

.cf-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
.cf-head .eyebrow { margin-bottom: 10px; }
.cf-head h2 { margin: 0; font-size: 34px; line-height: 1; letter-spacing: -.04em; text-transform: uppercase; }
.cf-close {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--text);
  font-size: 20px; line-height: 1; cursor: pointer; text-decoration: none;
}
.cf-close:hover { background: var(--card-hover); }

.cf-form { display: grid; gap: 16px; }
.cf-field { display: grid; gap: 7px; }
.cf-field label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.cf-field label small { font-weight: 400; letter-spacing: .06em; text-transform: none; }
.cf-field input, .cf-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  color: var(--text);
  font: 15px/1.45 Arial, Helvetica, sans-serif;
}
.cf-field textarea { min-height: 150px; resize: vertical; }
.cf-field input:focus, .cf-field textarea:focus { outline: none; border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.07); }
.cf-field [aria-invalid="true"] { border-color: #e0806f; }
.cf-err { min-height: 0; color: #f0a090; font-size: 12px; }
.cf-err:empty { display: none; }

.cf-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.cf-send {
  margin-top: 4px;
  padding: 15px 18px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 14px;
  background: var(--text);
  color: #0a0a0a;
  font: 700 12px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .18s ease;
}
.cf-send:hover { opacity: .88; }
.cf-send[disabled] { opacity: .5; cursor: progress; }

.cf-status { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.cf-status:empty { display: none; }
.cf-status.ok { padding: 14px 16px; border: 1px solid rgba(140,210,160,.35); border-radius: 12px; background: rgba(120,200,140,.08); color: #bfe6c9; }
.cf-status.error { padding: 14px 16px; border: 1px solid rgba(240,140,120,.35); border-radius: 12px; background: rgba(240,120,100,.08); color: #f3c0b4; }
.cf-form.is-sent .cf-field, .cf-form.is-sent .cf-send { display: none; }
.cf-alt { margin: 22px 0 0; color: #77746f; font-size: 12px; }
.cf-alt a { color: var(--muted); }

@media (max-width: 820px) {
  .contact-btn { position: fixed; top: 14px; right: 14px; background: rgba(16,16,16,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .cf-panel { width: 100%; padding: 24px 20px 32px; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cf-panel, .cf-overlay { transition: none; }
}
