/* =========================
   Base variables
========================= */
:root{
  --max: 1120px;
  --pad: 18px;
  --text: #111;
  --muted: #666;
  --line: #e6e6e6;
  --bg: #fff;
  --card: #fff;
}

/* =========================
   Reset / base
========================= */
*{
  box-sizing: border-box;
}

html{
  -webkit-text-size-adjust: 100%;
}

body{
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  font-size: 16px;
}

a{
  color: inherit;
  text-decoration: none;
}

a:hover{
  color: var(--muted);
}

/* =========================
   Layout
========================= */
.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--pad) 48px;
}

/* =========================
   Header & navigation
========================= */
header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 18px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.site-title{
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: lowercase;
  color: var(--muted);
}

/* Navigation (desktop default) */
nav{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 14px;
}

nav a{
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--text);
  white-space: nowrap;
}

nav a[aria-current="page"]{
  background: #f2f2f2;
}

/* =========================
   Typography
========================= */
h1{
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
}

h2{
  margin: 22px 0 10px;
  font-size: 18px;
}

p{
  margin: 0 0 12px;
}

.muted{
  color: var(--muted);
}

/* =========================
   Content blocks
========================= */
.panel{
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--card);
}
/* Works grid */
.grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.card{
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
}

.card img{
  width: 100%;
  height: auto;
  display: block;
  background: #f7f7f7;
}

.card .meta{
  padding: 12px 12px 14px;
  font-size: 14px;
}

.card .meta strong{
  display: block;
  margin-bottom: 3px;
}

.card .meta span{
  color: var(--muted);
}

/* Responsive grid */
@media (max-width: 900px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px){
  .grid{ grid-template-columns: 1fr; }
}

/* =========================
   Footer
========================= */
footer{
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* =========================
   Responsive behaviour
========================= */

/* Tablet */
@media (max-width: 560px){

  h1{
    font-size: 24px;
  }

  nav{
    flex-wrap: wrap;
    gap: 6px 10px;
  }

  nav a{
    white-space: nowrap;
    padding: 6px 10px;
  }
}
/* Archive text */
.archive-intro{
  max-width: 70ch;
}

/* Gallery grid (archive + selected can share this) */
.gallery{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 900px){
  .gallery{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px){
  .gallery{ grid-template-columns: 1fr; }
}

figure{
  margin: 0;
}

.thumb{
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fafafa;
}

.thumb img{
  width: 100%;
  height: auto;
  display: block;
}

.caption{
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
