/* ===========================
   robertmcnally.co.uk
   Stylesheet — June 2026
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

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

:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #111827;
  --text-body: #374151;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --accent: #1d4ed8;
  --max-content: 680px;
  --max-layout: 1100px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ---- Layout ---- */

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px 96px;
}

/* ---- Navigation ---- */

nav {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-layout);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-name:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* ---- Hero ---- */

.hero {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 80px 24px 72px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 600px;
}

.hero-body {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 540px;
}

.hero-body p + p {
  margin-top: 14px;
}

/* ---- Page header ---- */

.page-header {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 64px 24px 48px;
}

.page-header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.7;
}

.page-header p a {
  color: var(--accent);
}

/* ---- Sections ---- */

.home-section {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.home-section + .home-section {
  border-top: 1px solid var(--border);
  padding-top: 64px;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ---- Writing list ---- */

.writing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.writing-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 7px;
  line-height: 1.4;
}

.writing-item h3 a {
  color: var(--text);
  text-decoration: none;
}

.writing-item h3 a:hover {
  color: var(--accent);
}

.writing-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.writing-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.coming-soon {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---- Icon headings ---- */
.icon-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-heading svg {
  color: var(--text-muted);
  opacity: 0.55;
  flex-shrink: 0;
}

/* ---- Work item icon ---- */
.work-item-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.work-item-header svg {
  color: var(--text-muted);
  opacity: 0.5;
  flex-shrink: 0;
  margin-top: 3px;
}
.work-item-header h3 {
  margin-bottom: 0;
  line-height: 1.4;
}

/* ---- Work list ---- */

.work-list {
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.work-item h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.work-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.work-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.78;
}

/* ---- About / prose ---- */

.about-prose h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 56px;
  margin-bottom: 18px;
  color: var(--text);
}

.about-prose .role-block {
  margin-bottom: 32px;
}

.about-prose .role-title {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.about-prose .role-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.about-prose p {
  font-size: 0.975rem;
  line-height: 1.82;
  color: var(--text-body);
  margin-bottom: 16px;
}

.about-prose p:last-child {
  margin-bottom: 0;
}

.about-prose a {
  color: var(--accent);
}

/* ---- Now page ---- */

.now-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-style: italic;
}

.now-block {
  margin-bottom: 44px;
}

.now-block h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.now-block p,
.now-block li {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.78;
}

.now-block ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Contact ---- */

.contact-intro {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 500px;
}

.contact-email {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  display: inline-block;
  margin-bottom: 40px;
}

.contact-email:hover {
  color: var(--accent);
}

.contact-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 460px;
}

.contact-note a {
  color: var(--accent);
}

/* ---- Text link ---- */

.text-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 20px;
}

.text-link:hover {
  text-decoration: underline;
}

/* ---- Divider ---- */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 52px 0;
}

/* ---- Footer ---- */

footer {
  margin-top: auto;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-layout);
  margin: 0 auto;
  padding: 0 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

/* ---- Mobile ---- */

@media (max-width: 640px) {
  .nav-links {
    gap: 16px;
  }
  .nav-links a {
    font-size: 0.8rem;
  }
  .hero {
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .nav-links {
    gap: 12px;
  }
}
