/* ---------- Edit these to restyle the whole site ---------- */
:root {
  --bg: #f4f3ef;
  --ink: #111111;
  --muted: #8a8a85;
  --line: #111111;
  --accent: #B35F27; /* orange from the logo */
  --pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--bg); }

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--pad);
  background: var(--bg);
  border-bottom: 2px solid var(--line);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.top nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.top nav a:hover { color: var(--accent); }
.logo { display: block; line-height: 0; }
.logo img { display: block; height: 40px; width: auto; }

/* ---------- Sections ---------- */
section {
  padding: 0 var(--pad) clamp(60px, 10vw, 140px);
  scroll-margin-top: 90px;
}
/* The page opens straight onto the work */
#playground { padding-top: clamp(28px, 5vw, 64px); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 2px solid var(--line);
  padding-top: 16px;
  margin-bottom: clamp(28px, 5vw, 64px);
}
.section-head h2 {
  font-size: clamp(28px, 5vw, 64px);
  letter-spacing: -0.03em;
}
.count { font-size: 14px; color: var(--accent); }

/* ---------- Poster grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 40px);
}

.poster { cursor: pointer; }

.frame {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #dcdad3;
  overflow: hidden;
  transition: transform 0.25s ease;
}
.poster:hover .frame { transform: translateY(-6px); }

.frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(48px, 9vw, 120px);
  letter-spacing: -0.05em;
  color: #c4c2ba;
}

.poster:hover .ph { color: var(--accent); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 80px);
}
.lead {
  font-size: clamp(32px, 6vw, 84px);
  line-height: 0.98;
  color: var(--accent);
  letter-spacing: -0.04em;
}
.about-text p {
  font-size: clamp(16px, 1.7vw, 22px);
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 1.2em;
  max-width: 34em;
}

/* ---------- CV ---------- */
.cv-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(32px, 6vw, 96px);
}
.cv-block {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 2fr;
  gap: 20px;
}
.cv-main .cv-block + .cv-block {
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: clamp(28px, 4vw, 48px);
  border-top: 2px solid var(--accent);
  width: 100%;
}
.cv-block h3 {
  font-size: clamp(20px, 2.4vw, 32px);
  letter-spacing: -0.02em;
}
.cv-items { display: grid; gap: clamp(24px, 3vw, 40px); }
.cv-item h4 {
  font-size: clamp(22px, 3vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.cv-item p {
  font-size: clamp(16px, 1.7vw, 22px);
  font-weight: 400;
  line-height: 1.3;
  margin-top: 6px;
}
.cv-item .cv-date { color: var(--accent); font-size: clamp(14px, 1.4vw, 18px); }
.cv-skills { grid-template-columns: minmax(80px, 1fr) 2fr; }
.cv-skills ul { list-style: none; }
.cv-skills li {
  font-size: clamp(16px, 1.7vw, 22px);
  font-weight: 400;
  line-height: 1.5;
}
.cv-skills li::before { content: "\00b7\00a0"; color: var(--accent); font-weight: 700; }

/* ---------- Contact ---------- */
.big-link {
  display: inline-block;
  font-size: clamp(28px, 7vw, 110px);
  letter-spacing: -0.04em;
  border-bottom: 4px solid var(--accent);
  line-height: 1.05;
  word-break: break-all;
}
.big-link:hover { background: var(--accent); color: var(--bg); }

.links {
  list-style: none;
  display: flex;
  gap: 28px;
  margin-top: 32px;
  font-size: clamp(16px, 2vw, 24px);
}
.links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.small { margin-top: 24px; font-size: 14px; color: var(--muted); font-weight: 400; }

/* ---------- Footer ---------- */
footer {
  display: flex;
  justify-content: space-between;
  padding: 20px var(--pad);
  border-top: 2px solid var(--line);
  font-size: 13px;
}
footer a:hover { color: var(--accent); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(244, 243, 239, 0.97);
  padding: 24px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; }
.lightbox .close {
  position: absolute;
  top: 12px;
  right: 20px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 40px;
  cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .cv-grid { grid-template-columns: 1fr; }
}

/* ===== MOBILE ONLY - nothing below changes the desktop version ===== */

/* Phones: one full-width poster per row */
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 520px) {
  /* Header: smaller logo, menu on the same line */
  .top { padding: 12px var(--pad); gap: 12px; }
  .logo img { height: 28px; }
  .top nav { gap: 12px; font-size: 12px; flex-wrap: wrap; justify-content: flex-end; }

  /* Tighter spacing between sections */
  section { padding-bottom: 48px; scroll-margin-top: 64px; }
  #playground { padding-top: 24px; }
  .section-head { margin-bottom: 24px; }

  /* CV: stack blocks, skills in two columns */
  .cv-block, .cv-skills { grid-template-columns: 1fr; gap: 12px; }
  .cv-skills ul { columns: 2; column-gap: 24px; }
  .cv-skills li { break-inside: avoid; }
  /* Phone only: labels stay bold, item names go regular weight so they don't clash */
  .cv-block h3 { font-size: 20px; }
  .cv-item h4 { font-size: 24px; font-weight: 400; }

  /* Contact: keep the email on one line */
  .big-link { font-size: 6.3vw; word-break: normal; overflow-wrap: anywhere; }
}
