/* thomasquilty.com */
:root {
  --bg: #eae6dd;
  --bg-soft: #f2efe8;
  --ink: #2d2d2a;
  --ink-soft: #5e5b54;
  --line: #d4cec2;
  --accent: #b5653f;
  --accent-text: #995535;  /* deeper terracotta for words, so they're easy to read */
  --max: 1080px;
  --head: "Manrope", system-ui, sans-serif;
  --body: "Poppins", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: inherit; }
p { margin: 0 0 1.1em; }
strong { font-weight: 600; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ink); color: var(--bg); padding: .75rem 1.25rem; z-index: 10; }

/* Text only for screen readers (hidden on screen) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Visible outline when moving around the page with the keyboard (Tab key) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip:focus-visible { outline-color: var(--bg); outline-offset: -4px; }

/* Bigger tap areas for small text links, without changing how they look */
.logo, .nav a, .site-footer a, .socials a { position: relative; }
.logo::before, .nav a::before, .site-footer a::before, .socials a::before {
  content: ""; position: absolute; left: -4px; right: -4px; top: 50%;
  height: 44px; transform: translateY(-50%);
}

/* Header */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -.01em;
  text-decoration: none;
}
.nav { display: flex; gap: 1.75rem; }
.nav a {
  font-family: var(--head);
  font-size: .95rem;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: border-color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--accent); }
.menu-btn { display: none; background: none; border: 0; padding: 10px; margin: -3.6px; cursor: pointer; color: var(--ink); }
.menu-btn svg { display: block; }

@media (max-width: 720px) {
  .menu-btn { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 4.6rem; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: .5rem 1.5rem 1rem;
    z-index: 5;
  }
  .nav.open { display: flex; }
  .nav a { padding: .7rem 0; border: 0; font-size: 1.05rem; }
  .nav a[aria-current="page"] { color: var(--accent-text); }
}

/* Layout */
main { max-width: var(--max); margin: 0 auto; padding: 1rem 1.5rem 4rem; }
.label {
  display: inline-block;
  font-family: var(--head);
  font-weight: 700;
  font-size: 1rem;
  text-transform: lowercase;
  border-bottom: 2px solid var(--accent);
  line-height: 1.25;
  margin: 0 0 1.5rem;
  padding-bottom: 1px;
}
h1, h2, h3 { font-family: var(--head); line-height: 1.25; margin: 0; }

/* About */
.about { display: grid; grid-template-columns: 5fr 6fr; gap: 3.5rem; align-items: start; padding-top: 1.5rem; }
.about-photo { position: sticky; top: 2rem; }  /* photo stays in view while you read */
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.about h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 1.75rem; }
.about .lede { font-family: var(--head); color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 2rem; }
.cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-block;
  font-family: var(--head);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  padding: .7rem 1.4rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
@media (max-width: 820px) {
  /* tablet: photo and text side by side */
  .about { grid-template-columns: 2fr 3fr; gap: 2rem; padding-top: 0; }
}
@media (max-width: 639px) {
  /* phone: square photo on top, so your name shows on the first screen */
  .about { grid-template-columns: 1fr; gap: 1.75rem; }
  .about-photo { position: static; }
  .about-photo img { aspect-ratio: 1 / 1; object-position: 50% 30%; }
}

/* Experience */
.section { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; padding-top: 1rem; }
.entry { display: grid; grid-template-columns: 1fr 340px; gap: 3rem; margin-bottom: 3rem; }
.entry:last-child { margin-bottom: 0; }
.entry.no-img { grid-template-columns: 1fr; max-width: 760px; }
.entry > picture { position: sticky; top: 2rem; align-self: start; }  /* photo stays beside its text */
.entry img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.entry h3 { font-size: 1.05rem; font-weight: 700; }
.entry h3 span { font-weight: 400; }
.meta { font-size: .9rem; color: var(--ink-soft); font-style: italic; margin: .15rem 0 1rem; }
.list { display: grid; gap: 1.75rem; max-width: 760px; }
.list h3 { font-size: 1rem; font-weight: 700; }
.edu h3 { font-size: 1.1rem; }
.edu p { margin: 0; }
.plain { list-style: none; padding: 0; margin: 0; }
/* Title on the left, date or place on the right (stacks on phones) */
.role { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; column-gap: 1.5rem; margin-bottom: 1rem; }
.role .meta { margin: .15rem 0 0; white-space: nowrap; }
.edu .role { margin-bottom: .35rem; }
@media (max-width: 820px) {
  /* tablet: smaller photo column, still side by side */
  .entry { grid-template-columns: 1fr 220px; gap: 2rem; }
}
@media (max-width: 639px) {
  /* phone: wide photo above each entry, so less scrolling */
  .entry { grid-template-columns: 1fr; gap: 1.25rem; }
  .entry > picture, .entry > img { order: -1; position: static; }
  .entry img { aspect-ratio: 3 / 2; }
  .entry img.focus-low { object-position: 50% 62%; }
  .role { display: block; }
  .role .meta { white-space: normal; }
}

/* Gallery */
.gallery-intro { max-width: 620px; color: var(--ink-soft); margin-bottom: 2rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.grid button { padding: 0; border: 0; background: var(--line); cursor: zoom-in; border-radius: 3px; overflow: hidden; }
.grid img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s ease, opacity .3s; }
.grid button:hover img { transform: scale(1.03); }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; } }

.lightbox {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(30, 29, 27, .94);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 2px; }
.lb-btn {
  position: absolute; background: none; border: 0; color: #f2efe8;
  font-size: 2rem; line-height: 1; padding: 1rem; cursor: pointer; opacity: .8;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: .5rem; right: .75rem; }
.lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .5rem; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; color: #cfc9bd; font-size: .85rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.4fr; grid-template-rows: auto 1fr; column-gap: 4rem; row-gap: 2.5rem; padding-top: 1rem; }
.contact form { grid-column: 2; grid-row: 1 / 3; align-self: start; }
.contact-photo { grid-column: 1; grid-row: 2; align-self: start; }
.contact-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.contact h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 1rem; }
.socials { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .6rem; }
.socials a { font-family: var(--head); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--accent); }
form { display: grid; gap: 1.1rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: grid; gap: .35rem; font-family: var(--head); font-size: .9rem; font-weight: 600; }
label small { font-weight: 400; color: var(--ink-soft); }
input, textarea {
  font: inherit; font-weight: 400; color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .75rem .9rem;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 160px; resize: vertical; }
.hidden { display: none; }
@media (max-width: 820px) {
  .contact { grid-template-columns: 1fr; gap: 2rem; }
  .contact form, .contact-photo { grid-column: auto; grid-row: auto; }
  .contact-photo { max-width: 420px; }  /* sits below the form on smaller screens */
  .row { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: .85rem; color: var(--ink-soft);
}
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent-text); }

/* Thanks page */
.thanks { text-align: center; padding: 5rem 0; }
.thanks h1 { font-size: 2.2rem; margin-bottom: 1rem; }
