:root{
  --bg:#000;
  --fg:#fff;
  --muted:#9a9a9a;

  --max:1400px;

  --sidebar:220px;
  --gutter:36px;

  --radius:14px;

  /* work grid */
  --colw:360px;
  --colgap:18px;
  --rowgap:18px;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a{ color:inherit; text-decoration:none; }
a:hover{ opacity:.75; }

.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:28px 10px;
}

/* ===== Shared layout (all pages) ===== */
.wrap.layout{
  display:grid;
  grid-template-columns: calc(var(--sidebar) + var(--gutter)) 1fr;
  align-items:start;
}

.sidebar{
  padding-left: var(--gutter);
  padding-top: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.main{
  padding-right: var(--gutter);
  padding-top: 6px;
}

@media (max-width: 820px){
  .wrap.layout{ grid-template-columns: 1fr; }

  .sidebar{
    position: relative;
    height: auto;
    padding-left: 0;
    margin-bottom: 18px;
  }

  .main{
    padding-right: 0;
    padding-top: 0;
  }
}

/* ===== Sidebar typography ===== */
.brand{
  font-family: serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: .2px;
}

.role{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.nav{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  font-size: 13px;
}

.nav a{ opacity:.65; }
.nav a.active{ opacity:1; }

.small{
  font-size:12px;
  color: var(--muted);
}

/* ===== Footer ===== */
.footer{
  margin-top: 32px;
  display:flex;
  justify-content: space-between;
  gap:14px;
  color: var(--muted);
  font-size:12px;
}

.footer-left{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.contact-block{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.contact-title{
  font-size:12px;
  color: var(--muted);
}

/* =========================================================
   CONNECT PAGE (restore sizes to match your screenshot)
   ========================================================= */
.connect{
  margin-top: 6px;
}

.connect-grid{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  align-items:start;
  max-width: 980px;   /* keeps it from stretching too wide */
}

.connect-photo img{
  width: 100%;
  height: auto;
  display:block;
  border-radius: var(--radius);
  background:#0a0a0a;
}

.connect-copy h2{
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 600;
}

.connect-copy p{
  margin: 0 0 14px 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.92);
}

@media (max-width: 900px){
  .connect-grid{
    grid-template-columns: 320px 1fr;
    max-width: 100%;
  }
}

@media (max-width: 700px){
  .connect-grid{
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   WORK PAGE ONLY (scoped so it won’t affect Connect)
   ========================================================= */
body.work-page .grid{
  column-width: var(--colw);
  column-gap: var(--colgap);
}

body.work-page .card{
  display:inline-block;
  width:100%;
  margin: 0 0 var(--rowgap) 0;
  border-radius: 12px;
  overflow:hidden;
  background:#0a0a0a;

  break-inside: avoid;
  -webkit-column-break-inside: avoid;

  cursor:pointer;
}

body.work-page .card img{
  width:100%;
  height:auto;
  display:block;
}

body.work-page .card:hover img{ opacity:.92; }

@media (max-width: 520px){
  :root{
    --colw: 280px;
    --colgap: 14px;
    --rowgap: 14px;
  }
}

/* lightbox overlay (work only) */
body.work-page .noscroll{ overflow:hidden; }

body.work-page .lightbox{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.92);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 26px;
  z-index: 9999;
}

body.work-page .lightbox.open{ display:flex; }

body.work-page .lightbox-close,
body.work-page .lightbox-prev,
body.work-page .lightbox-next{
  position:absolute;
  width:44px;
  height:44px;
  border:0;
  border-radius:999px;
  background: rgba(255,255,255,.10);
  color:#fff;
  cursor:pointer;
}

body.work-page .lightbox-close{
  top:16px;
  right:16px;
  font-size:28px;
}

body.work-page .lightbox-prev,
body.work-page .lightbox-next{
  top:50%;
  transform: translateY(-50%);
  font-size:22px;
}

body.work-page .lightbox-prev{ left:16px; }
body.work-page .lightbox-next{ right:16px; }
