/* Shared card styles. Each page sets its palette on <body class="personal"> or <body class="work">. */

.personal {
  --bg: #f4efe4;
  --sheet: #fffdf8;
  --ink: #1d2414;
  --muted: #5f6655;
  --line: #e6dfcf;
  --accent: #e3a21a;
  --accent-ink: #1d2414;
  --deep: #2f4a2b;
  --deep-ink: #fffdf8;
  --chip: #f6edd5;
}
.work {
  --bg: #e9edf3;
  --sheet: #ffffff;
  --ink: #12213a;
  --muted: #56627a;
  --line: #dbe1ea;
  --accent: #1f4e8c;
  --accent-ink: #ffffff;
  --deep: #12213a;
  --deep-ink: #ffffff;
  --chip: #e8eef7;
}
@media (prefers-color-scheme: dark) {
  .personal {
    --bg: #12150f; --sheet: #1b1f16; --ink: #f2eee3; --muted: #a7ad9b; --line: #2b3124;
    --accent: #f0b43a; --accent-ink: #12150f; --deep: #f0b43a; --deep-ink: #12150f; --chip: #262b1e;
  }
  .work {
    --bg: #0c1220; --sheet: #141c2e; --ink: #e8eef8; --muted: #9aa7bf; --line: #24304a;
    --accent: #7fb0f0; --accent-ink: #0c1220; --deep: #7fb0f0; --deep-ink: #0c1220; --chip: #1c2740;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }

.card {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--sheet);
  box-shadow: 0 0 0 1px var(--line);
}
@media (min-width: 520px) {
  .card { margin: 28px auto 40px; min-height: 0; border-radius: 28px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.12), 0 0 0 1px var(--line); }
}

/* hero */
.hero { position: relative; aspect-ratio: 1 / 0.9; overflow: hidden; background: var(--deep); }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 45%, var(--sheet) 99%);
}
.work .hero img { object-position: 50% 20%; }

.head { position: relative; margin-top: -86px; padding: 0 24px; z-index: 1; }
.kicker {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); padding: 5px 10px; border-radius: 999px; margin-bottom: 12px;
}
h1 {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: 46px; line-height: 1; letter-spacing: -.01em; margin: 0 0 8px;
}
.line { color: var(--muted); font-size: 17px; margin: 0; }

/* primary actions */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 22px 24px 6px; }
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; font-size: 15px; padding: 15px 12px; border-radius: 16px;
  background: var(--chip); color: var(--ink);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { grid-column: 1 / -1; background: var(--deep); color: var(--deep-ink); font-size: 16px; padding: 17px; }
.btn:active { transform: scale(.98); }

/* quick contact row */
.quick { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 10px; padding: 4px 24px 8px; }
.quick a, .quick button {
  appearance: none; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px;
}
.quick svg { width: 20px; height: 20px; color: var(--accent); }
.work .quick svg { color: var(--accent); }

/* sections */
section { padding: 18px 24px 4px; }
h2 {
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin: 6px 0 10px;
}
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.links a {
  display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 16px;
  background: var(--sheet); border: 1px solid var(--line); text-decoration: none;
}
.links a:active { background: var(--chip); }
.badge {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--chip); color: var(--ink); font-weight: 800; font-size: 13px; letter-spacing: .02em;
}
.links .t { display: block; font-weight: 800; font-size: 15px; }
.links .s { display: block; color: var(--muted); font-size: 13px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links .go { margin-left: auto; color: var(--muted); flex: none; }
.links span.txt { min-width: 0; }

.feature a { background: var(--deep); color: var(--deep-ink); border-color: var(--deep); }
.feature .badge { background: rgba(255,255,255,.16); color: var(--deep-ink); }
.feature .s, .feature .go { color: inherit; opacity: .8; }

/* articles */
.articles a { align-items: flex-start; }
.articles .date { flex: none; width: 40px; text-align: center; font-weight: 800; font-size: 11px; line-height: 1.15; color: var(--accent); padding-top: 2px; text-transform: uppercase; }
.articles .date b { display: block; font-size: 17px; color: var(--ink); }
.articles .t { font-size: 15px; line-height: 1.3; white-space: normal; }
.more { margin-top: 8px; width: 100%; }
.hidden-more { display: none; }
.show-all .hidden-more { display: block; }

/* forms */
details.form { border: 1px solid var(--line); border-radius: 18px; margin: 0 0 10px; background: var(--sheet); }
details.form > summary {
  list-style: none; cursor: pointer; padding: 15px 16px; font-weight: 800; display: flex; align-items: center; gap: 12px;
}
details.form > summary::-webkit-details-marker { display: none; }
details.form > summary .badge { width: 34px; height: 34px; border-radius: 10px; }
details.form > summary .badge svg { width: 18px; height: 18px; }
details.form > summary::after { content: "+"; margin-left: auto; font-size: 22px; color: var(--muted); line-height: 1; }
details.form[open] > summary::after { content: "\2212"; }
form { padding: 0 16px 16px; display: grid; gap: 10px; }
label { font-size: 12px; font-weight: 800; color: var(--muted); display: grid; gap: 5px; }
input, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; }
.sent { padding: 0 16px 16px; color: var(--deep); font-weight: 700; }
.work .sent { color: var(--accent); }
.formerr { color: #b3261e; font-size: 14px; margin: 0; }

/* QR sheet */
.sheet-qr { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet-qr.open { display: flex; }
.sheet-qr .panel {
  background: var(--sheet); width: 100%; max-width: 460px; border-radius: 24px 24px 0 0; padding: 22px 24px 32px; text-align: center;
}
@media (min-width: 520px) { .sheet-qr { align-items: center; } .sheet-qr .panel { border-radius: 24px; } }
.sheet-qr img { width: 240px; height: 240px; background: #fff; padding: 14px; border-radius: 16px; image-rendering: pixelated; }
.sheet-qr p { color: var(--muted); margin: 12px 0 16px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ink); color: var(--sheet); padding: 11px 16px; border-radius: 999px; font-weight: 700; font-size: 14px;
  transition: opacity .2s, transform .2s; pointer-events: none; z-index: 20;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

footer { padding: 24px 24px 34px; color: var(--muted); font-size: 13px; text-align: center; }
footer a { color: var(--muted); }

/* brand marks (Simple Icons, CC0) */
.badge.logo { background: var(--chip); }
.badge.logo img { width: 22px; height: 22px; display: block; }
