/* ---------- tokens (light is the base) ---------- */
:root{
  --bg:#f7f5f2;
  --bg-glow:rgba(200,150,80,.18);
  --surface:rgba(255,255,255,.72);
  --surface-hover:#ffffff;
  --border:rgba(20,18,16,.10);
  --border-hover:rgba(20,18,16,.22);
  --text:#16140f;
  --muted:#6b6559;
  --accent:#9a6a1e;
  --shadow:0 1px 2px rgba(20,18,16,.05), 0 8px 24px rgba(20,18,16,.06);
  --shadow-hover:0 2px 4px rgba(20,18,16,.06), 0 14px 34px rgba(20,18,16,.10);
  --radius:16px;
  --font-display:"Instrument Serif",Georgia,"Times New Roman",serif;
  --font-ui:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0b0b0c;
    --bg-glow:rgba(233,196,106,.14);
    --surface:rgba(255,255,255,.045);
    --surface-hover:rgba(255,255,255,.085);
    --border:rgba(255,255,255,.09);
    --border-hover:rgba(255,255,255,.20);
    --text:#f2efe9;
    --muted:#9b968c;
    --accent:#e9c46a;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
    --shadow-hover:0 2px 6px rgba(0,0,0,.45), 0 18px 44px rgba(0,0,0,.5);
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0b0b0c;
  --bg-glow:rgba(233,196,106,.14);
  --surface:rgba(255,255,255,.045);
  --surface-hover:rgba(255,255,255,.085);
  --border:rgba(255,255,255,.09);
  --border-hover:rgba(255,255,255,.20);
  --text:#f2efe9;
  --muted:#9b968c;
  --accent:#e9c46a;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  --shadow-hover:0 2px 6px rgba(0,0,0,.45), 0 18px 44px rgba(0,0,0,.5);
  color-scheme:dark;
}

/* ---------- base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  min-height:100svh;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-ui);
  font-size:15px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
body::before{
  content:"";
  position:fixed;
  inset:-20vh -20vw auto;
  height:70vh;
  background:radial-gradient(60% 60% at 50% 0%, var(--bg-glow), transparent 70%);
  pointer-events:none;
  z-index:0;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
:where(a,button):focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
  border-radius:12px;
}

/* ---------- layout ---------- */
.wrap{
  position:relative;
  z-index:1;
  width:100%;
  max-width:560px;
  margin:0 auto;
  padding:clamp(28px,7vw,64px) clamp(18px,5vw,24px) 48px;
  /* clears the floating WhatsApp button */
  padding-bottom:calc(104px + env(safe-area-inset-bottom));
}

/* ---------- theme toggle ---------- */
.theme-toggle{
  position:fixed;
  top:max(14px, env(safe-area-inset-top));
  right:14px;
  z-index:5;
  width:40px;height:40px;
  display:grid;place-items:center;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  color:var(--muted);
  cursor:pointer;
  transition:color .2s, border-color .2s, transform .2s;
}
.theme-toggle:hover{color:var(--text);border-color:var(--border-hover)}
.theme-toggle:active{transform:scale(.94)}
.theme-toggle svg{width:19px;height:19px}
.theme-toggle .moon{display:none}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .theme-toggle .moon{display:block}
  :root:not([data-theme="light"]) .theme-toggle .sun{display:none}
}
:root[data-theme="dark"] .theme-toggle .moon{display:block}
:root[data-theme="dark"] .theme-toggle .sun{display:none}
:root[data-theme="light"] .theme-toggle .moon{display:none}
:root[data-theme="light"] .theme-toggle .sun{display:block}

/* ---------- header ---------- */
.site-header{text-align:center;margin-bottom:28px}
.avatar{
  width:104px;height:104px;
  margin:0 auto 18px;
  border-radius:999px;
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  background:linear-gradient(145deg,#2a2620,#514637 55%,#8a7350);
  display:grid;place-items:center;
}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar .initials{
  font-family:var(--font-display);
  font-size:40px;
  color:#f2efe9;
  letter-spacing:.02em;
  line-height:1;
  user-select:none;
}
.name{
  font-family:var(--font-display);
  font-weight:400;
  font-size:clamp(34px,9vw,44px);
  line-height:1.08;
  letter-spacing:-.01em;
  margin:0 0 8px;
}
.role{
  margin:0 auto;
  max-width:34ch;
  color:var(--muted);
  font-size:14.5px;
}
.role em{font-family:var(--font-display);font-style:italic;color:var(--accent);font-size:16px}
.meta{
  margin-top:14px;
  display:flex;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
}
.pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:5px 11px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--muted);
  font-size:12.5px;
}
.pill svg{width:13px;height:13px;flex:none}
.dot{width:6px;height:6px;border-radius:999px;background:#3fbf6f;box-shadow:0 0 0 3px rgba(63,191,111,.18);flex:none}

/* ---------- socials ---------- */
.socials{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:24px 0 30px;
  flex-wrap:wrap;
}
.socials:empty{display:none}
.social{
  width:46px;height:46px;
  display:grid;place-items:center;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--muted);
  transition:color .2s, border-color .2s, background .2s, transform .2s;
}
.social svg{width:19px;height:19px}
.social:hover{color:var(--text);border-color:var(--border-hover);background:var(--surface-hover);transform:translateY(-2px)}
.social:active{transform:translateY(0) scale(.96)}

/* ---------- link buttons ---------- */
.section-label{
  display:flex;align-items:center;gap:12px;
  color:var(--muted);
  font-size:11px;
  font-weight:500;
  text-transform:uppercase;
  letter-spacing:.14em;
  margin:0 0 14px;
}
.section-label::after{content:"";flex:1;height:1px;background:var(--border)}

.links{display:flex;flex-direction:column;gap:10px;margin-bottom:34px}
.link{
  display:flex;align-items:center;gap:14px;
  padding:15px 16px;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  transition:transform .18s cubic-bezier(.2,.7,.3,1), border-color .18s, background .18s, box-shadow .18s;
  -webkit-tap-highlight-color:transparent;
}
.link:hover{
  transform:translateY(-2px);
  border-color:var(--border-hover);
  background:var(--surface-hover);
  box-shadow:var(--shadow-hover);
}
.link:active{transform:translateY(0) scale(.99)}
.link .icon{
  width:38px;height:38px;flex:none;
  display:grid;place-items:center;
  border-radius:11px;
  border:1px solid var(--border);
  color:var(--accent);
}
.link .icon svg{width:17px;height:17px}
.link .body{flex:1;min-width:0}
.link .title{display:block;font-weight:600;font-size:14.5px;letter-spacing:-.005em}
.link .sub{display:block;color:var(--muted);font-size:12.5px;margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.link .sub:empty{display:none}
.link .chev{color:var(--muted);flex:none;transition:transform .18s, color .18s}
.link .chev svg{width:15px;height:15px;display:block}
.link:hover .chev{transform:translateX(3px);color:var(--text)}
.link.featured{
  border-color:color-mix(in srgb, var(--accent) 40%, transparent);
  background:linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), var(--surface) 60%);
}
.badge{
  display:inline-block;
  font-size:10px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--accent);
  border:1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius:999px;
  padding:1px 7px;
  margin-left:8px;
  vertical-align:1px;
  white-space:nowrap;
}

/* ---------- work grid ---------- */
.work{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-bottom:34px;
}
.shot{
  position:relative;
  aspect-ratio:1/1;
  border-radius:12px;
  overflow:hidden;
  border:1px solid var(--border);
  background:linear-gradient(145deg,#3a3229,#181613);
  transition:transform .25s cubic-bezier(.2,.7,.3,1), border-color .2s;
}
.shot img{width:100%;height:100%;object-fit:cover;transition:transform .5s cubic-bezier(.2,.7,.3,1)}
.shot:hover{transform:scale(1.03);border-color:var(--border-hover);z-index:2}
.shot:hover img{transform:scale(1.08)}
.shot .cap{
  position:absolute;left:0;right:0;bottom:0;
  padding:18px 10px 8px;
  font-size:11px;
  color:#fff;
  background:linear-gradient(transparent, rgba(0,0,0,.72));
  opacity:0;transition:opacity .25s;
}
.shot .cap:empty{display:none}
.shot:hover .cap,.shot:focus-visible .cap{opacity:1}

/* ---------- footer ---------- */
.site-footer{text-align:center;color:var(--muted);font-size:12px;line-height:1.8}
.foot-actions{display:flex;justify-content:center;gap:8px;margin-bottom:18px;flex-wrap:wrap}
.foot-actions:empty{display:none}
.ghost{
  display:inline-flex;align-items:center;gap:7px;
  padding:9px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--muted);
  font:inherit;font-size:12.5px;
  cursor:pointer;
  transition:color .2s,border-color .2s,background .2s;
}
.ghost:hover{color:var(--text);border-color:var(--border-hover);background:var(--surface-hover)}
.ghost svg{width:14px;height:14px}

/* ---------- floating whatsapp ---------- */
.wa-fab{
  position:fixed;
  right:max(16px, env(safe-area-inset-right));
  bottom:calc(18px + env(safe-area-inset-bottom));
  z-index:8;
  display:flex;align-items:center;gap:0;
  height:56px;
  padding:0 16px;
  border-radius:999px;
  background:#25d366;
  color:#fff;
  box-shadow:0 4px 14px rgba(0,0,0,.22), 0 10px 30px rgba(37,211,102,.28);
  transition:transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s;
  -webkit-tap-highlight-color:transparent;
  animation:fabIn .45s cubic-bezier(.2,.7,.3,1) .8s backwards;
}
.wa-fab svg{width:28px;height:28px;flex:none;display:block}
.wa-fab .wa-text{
  max-width:0;
  overflow:hidden;
  white-space:nowrap;
  font-size:14px;
  font-weight:600;
  opacity:0;
  transition:max-width .28s cubic-bezier(.2,.7,.3,1), opacity .2s, margin-left .28s;
}
.wa-fab:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(0,0,0,.26), 0 14px 38px rgba(37,211,102,.36)}
.wa-fab:active{transform:translateY(0) scale(.96)}
.wa-fab:focus-visible{outline:3px solid #fff;outline-offset:2px}
@media (hover:hover) and (min-width:640px){
  .wa-fab:hover .wa-text,
  .wa-fab:focus-visible .wa-text{max-width:110px;opacity:1;margin-left:10px}
}
@keyframes fabIn{from{opacity:0;transform:translateY(14px) scale(.85)}}

/* ---------- toast ---------- */
.toast{
  position:fixed;
  left:50%;
  bottom:calc(24px + env(safe-area-inset-bottom));
  transform:translate(-50%,140%);
  z-index:10;
  padding:10px 18px;
  border-radius:999px;
  border:1px solid var(--border-hover);
  background:var(--surface-hover);
  color:var(--text);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:var(--shadow-hover);
  font-size:13px;
  transition:transform .35s cubic-bezier(.2,.8,.3,1);
}
.toast.show{transform:translate(-50%,0)}

/* ---------- entrance ---------- */
.reveal{opacity:0;transform:translateY(12px);animation:rise .6s cubic-bezier(.2,.7,.3,1) forwards}
@keyframes rise{to{opacity:1;transform:none}}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-delay:0ms!important;transition-duration:.001ms!important}
  .reveal{opacity:1;transform:none}
}

/* ---------- desktop polish ---------- */
@media (min-width:640px){
  body{font-size:15.5px}
  .wrap{max-width:600px}
  .work{gap:10px}
  .link{padding:16px 18px}
}
