:root{
  --bg:#F2C94C;   /* warm yellow */
  --fg:#0b0b0b;   /* near-black */
  --muted:#444;   /* secondary text */
  --link:#0b0b0b;
  --maxw:1120px;
  --radius:14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background:var(--bg);
  color:var(--fg);
  line-height:1.35;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

a{ color:var(--link); text-decoration-thickness:.08em; text-underline-offset:.15em; }
a:hover{ text-decoration:underline; }

.frame{
  max-width:var(--maxw);
  margin:40px auto 80px;
  padding:clamp(20px,3vw,36px);
  border-radius:var(--radius);
  position: relative;   /* keep content above background art */
  z-index: 1;
}

/* Header (sticky) */
.topbar{
  position: sticky; top: 0; z-index: 100;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  font-weight:600; letter-spacing:.1px; background: var(--bg);
  padding: 14px clamp(20px, 3vw, 36px);
  margin: -14px calc(-1 * clamp(20px, 3vw, 36px)) 0;
  border-bottom: 1px solid rgba(0,0,0,.12);
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:800; font-size: clamp(22px, 2.8vw, 28px);
}
.links{ display:flex; gap:18px; flex-wrap:wrap; font-size:14px; align-items:center; }

/* Hero */
.hero{ margin-top:clamp(28px,3vw,48px); }
.hero h1{
  margin:0; font-weight:800; font-size:clamp(42px,8vw,88px);
  line-height:1.05; letter-spacing:-0.02em; max-width:18ch;
}
.hero h2{ margin:.4rem 0 0; font-size: clamp(18px,2.6vw,28px); }
.hero p{ margin:18px 0 0; max-width:60ch; font-size:clamp(16px,1.6vw,20px); color:var(--muted); }

/* Sections */
section{ padding-top:clamp(36px,6vw,72px); border-top:1px solid rgba(0,0,0,.12); margin-top:clamp(36px,6vw,72px); }
.section-title{ font-size:clamp(14px,1.2vw,16px); letter-spacing:.14em; text-transform:uppercase; font-weight:600; margin-bottom:18px; }

/* Project cards */
.projects{ display:grid; grid-template-columns:1fr; gap:22px; }
@media (min-width:760px){ .projects{ grid-template-columns:1.2fr .8fr; gap:28px; } }
.card{
  border:1px solid rgba(0,0,0,.18); border-radius:12px; padding:clamp(16px,2.2vw,22px);
  transition:transform .08s ease, box-shadow .08s ease; background:transparent;
}
.card:hover{ transform:translateY(-2px); box-shadow:0 6px 0 rgba(0,0,0,.12); }
.card h3{ margin:0 0 6px; font-size:clamp(20px,2.2vw,28px); letter-spacing:-0.01em; }
.card p{ margin:0; color:var(--muted); font-size:15.5px; }
.tag{
  display:inline-block; border:1px solid rgba(0,0,0,.28); padding:.22rem .5rem; border-radius:999px;
  font-size:12px; font-weight:600; letter-spacing:.04em; margin-right:8px;
}
.card .meta{ margin-top:10px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

/* Buttons */
.cta{ display:flex; gap:12px; flex-wrap:wrap; margin-top:18px; }
.btn{
  appearance:none; border:none; background:var(--fg); color:var(--bg);
  padding:.8rem 1.1rem; border-radius:999px; font-weight:700; cursor:pointer;
  font-size:14px; letter-spacing:.02em; text-decoration:none; display:inline-block;
}
.btn.ghost{ background:transparent; color:var(--fg); border:1px solid rgba(0,0,0,.22); }
.btn.small{ padding:.55rem .9rem; font-weight:700; font-size:13px; }

/* Collapsible résumé */
details.resume { border:1px solid rgba(0,0,0,.18); border-radius:12px; background:transparent; padding:0; overflow:hidden; }
details.resume > summary {
  list-style:none; cursor:pointer; padding:1rem 1.1rem; font-weight:800; font-size:clamp(16px,1.6vw,18px);
  display:flex; align-items:center; justify-content:space-between;
}
details.resume > summary::after{ content:"＋"; font-weight:800; transition: transform .15s ease; }
details.resume[open] > summary::after{ content:"−"; transform: rotate(0deg); }
.resume-panel{ padding: .4rem 1.1rem 1.1rem; border-top:1px solid rgba(0,0,0,.12); animation: reveal .2s ease; }
@keyframes reveal { from{opacity:0; transform:translateY(-2px);} to{opacity:1; transform:translateY(0);} }
.resume-grid{ display:grid; grid-template-columns:1fr; gap:18px; margin-top:.6rem; }
@media (min-width:860px){ .resume-grid{ grid-template-columns:1fr 1fr; gap:26px; } }
.item h4{ margin:.2rem 0 0; font-size:18px; }
.item .where{ font-weight:600; }
.item .time{ color:var(--muted); font-size:14px; }
.item ul{ margin:.4rem 0 0 1.1rem; padding:0; }
.item li{ margin:.25rem 0; }

/* Contact form */
form.contact{ display:grid; gap:14px; max-width:720px; }
.field{ display:grid; gap:6px; }
label{ font-weight:700; font-size:14px; letter-spacing:.02em; }
input[type="text"], input[type="email"], textarea{
  width:100%; padding: .85rem 1rem; border-radius:12px; border:1px solid rgba(0,0,0,.24);
  background:rgba(255,255,255,0.12); color:var(--fg); font-size:15px; outline:none;
}
textarea{ min-height:140px; resize:vertical; }
input::placeholder, textarea::placeholder{ color:rgba(0,0,0,.55); }
input:focus, textarea:focus{ border-color: rgba(0,0,0,.6); box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
.status{ font-size:14px; margin-top:4px; min-height: 1.2em; }
.hidden { position:absolute !important; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }

/* Background illustration (place sapiens.png next to this file) */
.page-illustration{
  position: fixed; right: 0; bottom: 0; width: 50vw; height: 50vh;
  background: url('sapiens.png') right bottom / contain no-repeat;
  pointer-events: none; z-index: 0; opacity: 0.6;
}
@media (max-width: 640px){ .page-illustration{ display:none; } }

/* ABOUT: photo left (230x230), text right */
#about .about-grid{
  display:grid;
  grid-template-columns: 230px 1fr; /* photo | text */
  gap: 24px;
  align-items: start;
}
.about-photo{
  width:230px;
  height:230px;
  border-radius:50%;
  object-fit:cover;
  border:0px solid #000;          /* black border */
  box-shadow:0 6px 0 rgba(0,0,0,.08);
  background:#fff;
  justify-self:start;              /* hug the left edge */
}
@media (max-width: 720px){
  #about .about-grid{ grid-template-columns: 1fr; }
  .about-photo{ justify-self:center; margin-top:6px; }
}

/* Mobile header: brand above centered nav */
@media (max-width: 640px){
  .topbar{ flex-direction: column; align-items: center; gap: 8px; padding: 12px 16px; }
  .brand{ font-size: 20px; }
  .links{
    width: 100%;
    justify-content: center;
    gap: 10px 16px;
    flex-wrap: wrap;
    overflow: visible;
    white-space: normal;
  }
  .btn.small{ padding: .5rem .8rem; font-size: 12px; }
}
