/* Daniel Bayliss portfolio — edit the colour tokens here if you want a different accent. */
:root {
  color-scheme: light;
  --paper: #f7f7f4;
  --white: #fff;
  --ink: #202725;
  --muted: #5c6663;
  --line: #d6dbd7;
  --soft: #ecefeb;
  --accent: #37645f;
  --max: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
p, h1, h2, h3, h4, figure, ul, dl { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; }
::selection { background: #c5d9d2; color: var(--ink); }
.container { width: min(calc(100% - 80px), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 16px; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.accent-dot { color: var(--accent); }

/* Shared header and navigation. It wraps naturally on smaller screens. */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { flex: none; font-size: 18px; font-weight: 750; letter-spacing: -.035em; }
.brand-mark { color: var(--accent); margin-left: 3px; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 31px; }
.main-nav a { font-size: 13px; font-weight: 620; letter-spacing: .01em; padding: 10px 0; }
.main-nav a:hover, .site-footer a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* Home hero */
.hero { min-height: 610px; display: grid; grid-template-columns: minmax(0, 1fr) 252px; align-items: end; gap: 90px; padding-block: 80px 88px; }
.eyebrow, .section-label, .aside-label, .card-topline, .build-type, .skill-number, .case-kicker, .case-facts dt, .image-corner, .case-nav-label { text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 750; }
.eyebrow { display: flex; align-items: center; gap: 14px; color: var(--accent); margin-bottom: 30px; }
.eyebrow-rule { width: 32px; height: 2px; background: var(--accent); }
.hero h1 { font-size: clamp(76px, 10vw, 156px); font-weight: 650; line-height: .86; letter-spacing: -.078em; margin: 0 0 34px -7px; }
.hero-role { margin-bottom: 12px; font-size: clamp(22px, 2.4vw, 35px); font-weight: 550; letter-spacing: -.038em; }
.hero-intro { max-width: 620px; color: var(--muted); font-size: 18px; line-height: 1.55; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; min-height: 47px; align-items: center; justify-content: space-between; gap: 29px; padding: 12px 17px; font-size: 13px; font-weight: 700; border: 1px solid var(--ink); transition: background-color .16s ease, color .16s ease, border-color .16s ease; }
.button-dark { color: white; background: var(--ink); }
.button-dark:hover { color: white; background: var(--accent); border-color: var(--accent); }
.button-outline:hover { background: var(--white); }
.hero-aside { border-top: 1px solid var(--ink); padding-top: 15px; padding-bottom: 5px; }
.aside-label { color: var(--accent); margin-bottom: 27px; }
.hero-aside > p:not(.aside-label, .aside-note) { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; padding: 9px 0; margin: 0; }
.hero-aside p span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.hero-aside .aside-note { max-width: 205px; color: var(--muted); font-size: 13px; margin: 28px 0 0; }

/* Section headings and project cards */
.section { padding-block: 100px; }
.section-projects { border-top: 1px solid var(--line); background: var(--white); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 40px; }
.section-label { color: var(--accent); margin-bottom: 16px; }
.section-heading h2, .section-about h2, .section-contact h2 { font-size: clamp(34px, 4.25vw, 58px); font-weight: 620; letter-spacing: -.055em; margin-bottom: 0; }
.section-summary { max-width: 335px; color: var(--muted); font-size: 14px; margin-bottom: 3px; }
.project-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 52px 26px; }
.project-card { min-width: 0; }
.project-card-wide { grid-column: span 7; }
.project-card-narrow { grid-column: span 5; }
.project-card-half { grid-column: span 6; }
.project-image { display: block; position: relative; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.project-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .25s ease; }
.project-image:hover img { transform: scale(1.015); }
.image-corner { position: absolute; left: 14px; bottom: 14px; padding: 7px 9px; background: rgba(247,247,244,.94); color: var(--ink); font-size: 10px; }
.project-card-body { border-top: 1px solid var(--ink); margin-top: 15px; padding-top: 13px; }
.card-topline { display: flex; justify-content: space-between; color: var(--accent); margin-bottom: 10px; }
.project-card h3 { font-size: clamp(24px, 2.5vw, 35px); letter-spacing: -.044em; font-weight: 620; margin-bottom: 10px; }
.project-card h3 a { display: inline-flex; gap: 13px; align-items: baseline; }
.project-card h3 span { font-size: .6em; }
.project-card p { color: var(--muted); max-width: 580px; font-size: 15px; line-height: 1.55; margin-bottom: 19px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tag-list li { border: 1px solid var(--line); padding: 5px 9px; color: #495653; font-size: 11px; font-weight: 600; }
.project-cta { display: inline-flex; gap: 8px; align-items: center; color: var(--accent); font-size: 12px; font-weight: 750; margin-top: 19px; text-decoration: underline; text-underline-offset: 4px; }

/* Smaller projects stay compact even as the list grows. */
.section-builds { border-top: 1px solid var(--line); }
.build-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.build-card { display: flex; align-items: start; gap: 16px; padding: 21px; min-height: 150px; background: var(--paper); }
.build-card img { width: 104px; height: 87px; flex: none; object-fit: cover; border: 1px solid var(--line); }
.build-type { display: block; color: var(--accent); font-size: 10px; margin-bottom: 7px; }
.build-card h3 { font-size: 18px; font-weight: 650; letter-spacing: -.025em; margin-bottom: 8px; }
.build-card p { font-size: 12px; line-height: 1.45; color: var(--muted); margin: 0; }

/* Skills, about and contact */
.section-skills { background: var(--white); border-top: 1px solid var(--line); }
.skills-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.skill-group { border-top: 1px solid var(--ink); padding-top: 13px; }
.skill-number { color: var(--accent); }
.skill-group h3 { font-size: 19px; letter-spacing: -.02em; min-height: 48px; margin: 22px 0 16px; }
.skill-group ul { list-style: none; padding: 0; margin: 0; }
.skill-group li { padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.section-about { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.about-copy { padding-top: 3px; max-width: 575px; }
.about-copy > p:first-child { font-size: 22px; line-height: 1.44; letter-spacing: -.025em; }
.about-copy > p:not(:first-child) { font-size: 15px; color: var(--muted); }
.about-facts { margin: 40px 0 0; border-top: 1px solid var(--ink); }
.about-facts div { display: grid; grid-template-columns: 130px 1fr; gap: 14px; border-bottom: 1px solid var(--line); padding: 13px 0; font-size: 13px; }
.about-facts dt { color: var(--muted); }
.about-facts dd { margin: 0; font-weight: 600; }
.section-contact { background: var(--ink); color: var(--white); }
.section-contact .section-label { color: #a5c9be; }
.section-contact h2 { max-width: 500px; }
.section-contact .accent-dot { color: #a5c9be; }
.section-contact p:not(.section-label) { color: #c2c9c5; font-size: 15px; margin: 24px 0 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.contact-list { border-top: 1px solid #7b8983; align-self: end; }
.contact-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid #53625d; padding: 17px 0; font-size: 14px; }
.contact-list > div span:first-child { color: #aebbb5; }
.contact-list > div span:last-child, .contact-list a { text-align: right; font-weight: 600; }
.contact-list a:hover { color: #b9d9ce; text-decoration: underline; }
.site-footer { background: #19201e; color: #aab5af; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px; padding-block: 23px; font-size: 11px; }
.site-footer a { color: white; }

/* Project case studies. The body is intentionally narrow for readable technical explanations. */
.case-hero { padding-block: 55px 45px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 650; margin-bottom: 48px; }
.back-link:hover { color: var(--accent); }
.case-kicker { color: var(--accent); margin-bottom: 16px; }
.case-hero h1 { max-width: 1050px; font-size: clamp(48px, 7.5vw, 106px); font-weight: 630; letter-spacing: -.07em; margin-bottom: 22px; }
.case-lead { max-width: 820px; color: var(--muted); font-size: clamp(19px, 2.15vw, 27px); line-height: 1.4; letter-spacing: -.025em; margin-bottom: 43px; }
.case-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; border-top: 1px solid var(--ink); padding-top: 17px; margin: 0 0 35px; }
.case-facts div { min-width: 0; }
.case-facts dt { color: var(--accent); margin-bottom: 9px; }
.case-facts dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.case-hero-figure { margin: 0; }
.case-hero-figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--soft); border: 1px solid var(--line); }
figcaption { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 9px; }
.case-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: clamp(36px, 6vw, 100px); padding-block: 30px 95px; }
.case-toc { align-self: start; position: sticky; top: 30px; border-top: 1px solid var(--ink); padding-top: 14px; }
.case-toc p { color: var(--accent); text-transform: uppercase; font-size: 11px; font-weight: 750; letter-spacing: .13em; margin-bottom: 15px; }
.case-toc a { display: block; padding: 6px 0; color: var(--muted); font-size: 12px; }
.case-toc a:hover { color: var(--accent); }
.case-body { min-width: 0; }
.case-section { padding: 37px 0 43px; border-top: 1px solid var(--line); scroll-margin-top: 40px; }
.case-section:first-child { border-top: 1px solid var(--ink); }
.case-section h2 { font-size: clamp(28px, 3vw, 39px); font-weight: 630; letter-spacing: -.045em; margin-bottom: 17px; }
.case-section > p, .case-section > ul { max-width: 780px; color: #424e49; font-size: 16px; line-height: 1.7; }
.case-section > p:last-child, .case-section > ul:last-child { margin-bottom: 0; }
.case-section ul:not(.tag-list) { padding-left: 20px; }
.case-section li + li { margin-top: 7px; }
.case-section .supporting-note { color: var(--muted); font-size: 13px; }
.media-grid { display: grid; gap: 18px; margin: 26px 0 0; }
.media-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.media-grid figure, .wide-figure { min-width: 0; margin: 0; }
.media-grid img, .wide-figure img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border: 1px solid var(--line); background: var(--soft); }
.media-grid.three img { aspect-ratio: 1 / 1; }
.wide-figure { margin-top: 26px; }
.wide-figure img { aspect-ratio: 16 / 9; }
.analysis-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 22px 0 0; border-top: 1px solid var(--ink); }
.analysis-list div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.analysis-list dt { color: var(--accent); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 750; margin-bottom: 5px; }
.analysis-list dd { margin: 0; font-size: 14px; line-height: 1.5; }
.case-section .tag-list { margin-top: 20px; }
.case-pagination { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-pagination a { padding: 25px 0 30px; }
.case-pagination a + a { text-align: right; border-left: 1px solid var(--line); }
.case-pagination a:last-child { padding-left: 20px; }
.case-nav-label { display: block; color: var(--accent); margin-bottom: 7px; }
.case-pagination strong { font-size: 21px; font-weight: 630; letter-spacing: -.03em; }
.case-footer { margin-top: 70px; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr 210px; gap: 35px; min-height: 560px; }
  .build-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
  .media-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .container { width: min(calc(100% - 38px), var(--max)); }
  .header-inner { align-items: start; min-height: 0; padding-block: 17px 10px; flex-direction: column; gap: 10px; }
  .brand { font-size: 17px; }
  .main-nav { width: 100%; justify-content: space-between; gap: 0 13px; }
  .main-nav a { font-size: 12px; padding: 7px 0; }
  .hero { display: block; min-height: 0; padding-block: 65px 65px; }
  .hero h1 { font-size: clamp(67px, 17vw, 112px); margin-left: -4px; margin-bottom: 27px; }
  .hero-role { font-size: 24px; }
  .hero-intro { font-size: 16px; }
  .hero-aside { display: none; }
  .section { padding-block: 70px; }
  .section-heading { display: block; margin-bottom: 28px; }
  .section-summary { margin: 15px 0 0; }
  .project-grid { display: block; }
  .project-card + .project-card { margin-top: 38px; }
  .project-card h3 { font-size: 27px; }
  .build-grid { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-copy > p:first-child { font-size: 20px; }
  .case-hero { padding-block: 35px 30px; }
  .back-link { margin-bottom: 36px; }
  .case-hero h1 { font-size: clamp(48px, 12vw, 76px); }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .case-layout { display: block; padding-block: 0 65px; }
  .case-toc { position: static; display: flex; gap: 6px 18px; flex-wrap: wrap; padding-bottom: 28px; }
  .case-toc p { width: 100%; margin-bottom: 2px; }
  .case-toc a { padding: 1px 0; }
  .case-section { padding: 29px 0 35px; }
  .media-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { display: block; }
  .footer-inner > * { display: block; margin: 0 0 9px; }
}
@media (max-width: 450px) {
  .main-nav { justify-content: flex-start; gap: 0 21px; }
  .hero h1 { font-size: clamp(63px, 17.4vw, 80px); }
  .hero-actions .button { gap: 14px; }
  .build-card { padding: 16px; gap: 13px; }
  .build-card img { width: 82px; height: 74px; }
  .skills-grid { grid-template-columns: 1fr; gap: 32px; }
  .skill-group h3 { min-height: 0; margin: 12px 0; }
  .media-grid.two, .media-grid.three, .analysis-list { grid-template-columns: 1fr; }
  .case-pagination strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .project-image img { transition: none; }
}
