/* ==========================================================================
   style.css: structure and theme. Day-to-day changes belong in settings.css
   Layout idea: confident left-aligned hero with an arched portrait, soft
   olive and gold panels, generous space.
   ========================================================================== */

:root {
  --c-bg: #F8F6EC;
  --c-surface: #FFFFFF;
  --c-tint: var(--accent-soft);
  --c-ink: #2A2912;
  --c-muted: #5F5E3A;
  --c-line: #DDD9B8;
  --c-accent: var(--accent);
  --c-gold: var(--gold);
  --c-on-accent: #FFFFFF;
  --c-shadow: rgba(62, 58, 12, .24);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #1B1A0D; --c-surface: #26250F; --c-tint: #302E15; --c-ink: #F4F1DC;
    --c-muted: #C5C19A; --c-line: #45431E; --c-accent: var(--accent-dark);
    --c-on-accent: #1B1A0D; --c-shadow: rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --c-bg: #1B1A0D; --c-surface: #26250F; --c-tint: #302E15; --c-ink: #F4F1DC;
  --c-muted: #C5C19A; --c-line: #45431E; --c-accent: var(--accent-dark);
  --c-on-accent: #1B1A0D; --c-shadow: rgba(0, 0, 0, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height);
  overflow-x: hidden;
}
h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: calc(clamp(2.6rem, 7vw, 4.8rem) * var(--heading-scale)); font-weight: 700; }
h2 { font-size: calc(clamp(1.8rem, 4vw, 2.6rem) * var(--heading-scale)); font-weight: 700; }
h3 { font-size: calc(1.4rem * var(--heading-scale)); font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--c-accent); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: max(20px, 4vw);
}
.section { padding-block: clamp(44px, 8vw, var(--section-space)); }
.desc { max-width: var(--description-width); }
.eyebrow {
  font-weight: 800; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-accent); margin-bottom: .9rem;
}
.lede { font-size: 1.2em; color: var(--c-muted); max-width: var(--description-width); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--c-bg) 84%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 12px; }
.brand {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.35rem;
  color: var(--c-ink); text-decoration: none; letter-spacing: -.01em;
}
.site-nav { display: flex; gap: 6px; margin-left: auto; }
.site-nav a {
  padding: .5rem 1rem; border-radius: 999px; text-decoration: none;
  color: var(--c-ink); font-weight: 700; transition: background .2s;
}
.site-nav a:hover { background: var(--c-tint); }
.site-nav a[aria-current="page"] { background: var(--c-tint); box-shadow: inset 0 -2px 0 var(--c-gold); }
.theme-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--c-line);
  background: var(--c-surface); color: var(--c-ink); display: grid; place-items: center; cursor: pointer;
  transition: transform .3s, border-color .2s;
}
.theme-btn:hover { border-color: var(--c-accent); transform: rotate(180deg); }
.theme-btn svg { width: 20px; height: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85em 1.6em; border-radius: 999px; border: 2px solid transparent;
  background: var(--c-accent); color: var(--c-on-accent);
  font: 800 1rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 24px -14px var(--c-shadow); }
.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-accent); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Photos (placeholder shows until the image file exists) ---------- */
.photo {
  position: relative; margin: 0; overflow: hidden;
  background: linear-gradient(145deg, var(--c-tint), color-mix(in srgb, var(--c-accent) 22%, var(--c-surface)));
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.photo__ph {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: .4rem; text-align: center; padding: 1rem; color: var(--c-muted); font-weight: 700; font-size: .95rem;
}
.photo__ph svg { width: 34px; height: 34px; opacity: .75; }
.photo__ph small { font-weight: 600; font-size: .72rem; opacity: .85; word-break: break-all; }

/* ---------- Home hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(28px, 6vw, 72px); align-items: center;
  padding-block: clamp(36px, 7vw, 84px);
}
.hero h1 .name { color: var(--c-accent); }
.tagline { font-family: var(--font-heading); font-weight: 600; font-size: calc(clamp(1.3rem, 2.6vw, 1.85rem) * var(--heading-scale)); line-height: 1.3; max-width: 24ch; margin-bottom: 1.2rem; text-wrap: balance; }
.chips { list-style: none; padding: 0; margin: 0 0 1.8rem; display: flex; gap: 10px; flex-wrap: wrap; }
.chips li { padding: .35rem 1rem; border-radius: 999px; background: var(--c-tint); border: 1px solid color-mix(in srgb, var(--c-gold) 70%, transparent); font-weight: 800; font-size: .95rem; }
.hero-art { position: relative; isolation: isolate; width: min(100%, var(--hero-photo-size)); margin-inline: auto; padding: 0 16px 16px 0; }
.hero-art::before {
  content: ""; position: absolute; inset: 16px 0 0 16px; z-index: -1;
  border: 2px solid var(--c-gold); opacity: .85;
  border-radius: 999px 999px var(--photo-radius) var(--photo-radius);
}
.hero-art::after {
  content: ""; position: absolute; z-index: -2; width: 80%; aspect-ratio: 1; top: -8%; left: -18%;
  border-radius: 50%; background: var(--c-gold); opacity: .22; filter: blur(46px);
  animation: drift 9s ease-in-out infinite;
}
.hero-photo {
  width: 100%; aspect-ratio: 4 / 5;
  border-radius: 999px 999px var(--photo-radius) var(--photo-radius);
  box-shadow: 0 30px 60px -32px var(--c-shadow);
}

/* ---------- Quote ---------- */
.quote-panel { background: var(--c-tint); border-radius: calc(var(--photo-radius) + 6px); padding: clamp(28px, 5vw, 60px); }
.quote-panel blockquote { margin: 0; max-width: 34ch; }
.quote-panel blockquote::before {
  content: "\201C"; display: block; font-family: var(--font-heading); font-size: 5.5rem; line-height: .7;
  color: var(--c-gold); margin-bottom: .2rem;
}
.quote-panel p { font-family: var(--font-heading); font-weight: 600; font-size: calc(clamp(1.5rem, 3.4vw, 2.3rem) * var(--heading-scale)); line-height: 1.25; margin-bottom: .6rem; }
.quote-panel footer { font-weight: 800; color: var(--c-muted); }

/* ---------- Placeholders (spaces Dia fills in) ---------- */
.is-placeholder { color: var(--c-muted); font-style: italic; }
.placeholder-block {
  border: 2px dashed var(--c-line); border-radius: calc(var(--photo-radius) - 8px);
  padding: 1.25rem 1.5rem; color: var(--c-muted);
}
.placeholder-block .tag { display: block; font-style: normal; font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-accent); margin-bottom: .4rem; }

/* ---------- Inner pages ---------- */
.page-head { padding-top: clamp(40px, 7vw, 84px); padding-bottom: 0; }
.story { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.story-photo { width: var(--story-photo-size); max-width: 100%; aspect-ratio: 1 / 1.12; border-radius: var(--photo-radius); box-shadow: 0 30px 60px -36px var(--c-shadow); }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: calc(var(--photo-radius) - 6px); padding: 1.5rem;
  box-shadow: 0 16px 34px -24px var(--c-shadow); transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 24px 40px -22px var(--c-shadow); }
.card__letter {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: color-mix(in srgb, var(--c-gold) 34%, var(--c-surface)); color: var(--c-ink); font: 800 1.1rem var(--font-heading); margin-bottom: 1rem;
}
.card--dashed { background: transparent; border: 2px dashed var(--c-line); box-shadow: none; }
.card--dashed:hover { transform: none; box-shadow: none; }
.hobby .photo { aspect-ratio: 4 / 3; border-radius: calc(var(--photo-radius) - 12px); margin-bottom: 1.1rem; }
.hobby:hover .photo img { transform: scale(1.05); }

.goal-panel { background: var(--c-tint); border-radius: calc(var(--photo-radius) + 6px); padding: clamp(24px, 5vw, 56px); }
.goal-panel .placeholder-block { border-color: color-mix(in srgb, var(--c-accent) 40%, transparent); background: color-mix(in srgb, var(--c-surface) 55%, transparent); }

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.gallery .photo { height: var(--gallery-photo-height); border-radius: calc(var(--photo-radius) - 8px); }
.gallery .photo:hover img { transform: scale(1.06); }

/* ---------- Contact ---------- */
.hello { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 6vw, 72px); align-items: start; }
.form { display: grid; gap: 14px; }
.form label { font-weight: 800; font-size: .95rem; display: block; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; padding: .85em 1em; border-radius: 16px; border: 1.5px solid var(--c-line);
  background: var(--c-surface); color: var(--c-ink); font: inherit; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-accent) 25%, transparent); }
.form textarea { resize: vertical; min-height: 140px; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .btn { justify-self: start; }
.form-status { margin: 0; font-weight: 700; min-height: 1.5em; }
.form-status.ok { color: #1F7A4D; }
.form-status.err { color: #B3361F; }
:root[data-theme="dark"] .form-status.ok { color: #7FE0AE; }
:root[data-theme="dark"] .form-status.err { color: #FF9B88; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-status.ok { color: #7FE0AE; }
  :root:not([data-theme="light"]) .form-status.err { color: #FF9B88; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--c-line); margin-top: clamp(24px, 5vw, 48px); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 28px; color: var(--c-muted); font-size: .95rem; font-weight: 600; }
.foot a { color: inherit; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(18px, 14px); } }
.rise { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .28s; } .d4 { animation-delay: .38s; }
@keyframes reveal-in { from { opacity: .45; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  .reveal { animation: reveal-in linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .story-photo { width: min(100%, var(--story-photo-size)); }
  .hello { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .bar { flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
  .site-nav a { flex: 1; text-align: center; padding-inline: .4rem; }
  .theme-btn { margin-left: auto; }
}
