/* michaeljmcglade.com — carved concrete
   Palette: deep concrete near-black w/ grain, Atlantic bog green,
   amber + cold white in tension. Motion: slow, weighty, geological. */

:root {
  --bg: #101312;
  --bg-raised: #161a18;
  --ink: #e9ece9;
  --muted: #97a09a;
  --faint: #5c655f;
  --green: #4f9c71;
  --green-bright: #6cb88c;
  --amber: #d6a04a;
  --line: rgba(233, 236, 233, 0.1);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--amber); color: #14100a; }

/* grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 clamp(1.4rem, 5vw, 3rem);
}

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

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

header {
  padding: 2.2rem 0;
}

header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
}

.wordmark {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

nav { display: flex; gap: 1.8rem; flex-wrap: wrap; }

nav a {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.5s ease;
}

nav a:hover { color: var(--green-bright); }

/* ---------- hero ---------- */

.hero {
  padding: clamp(5rem, 14vh, 9rem) 0 clamp(5rem, 12vh, 8rem);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.4rem;
}

.kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(214, 160, 74, 0.55);
}

h1 {
  font-family: var(--serif);
  font-weight: 320;
  font-size: clamp(2.6rem, 6.4vw, 4.9rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 16ch;
}

h1 em {
  font-style: italic;
  color: var(--green-bright);
}

.hero p {
  margin-top: 2.2rem;
  max-width: 54ch;
  font-size: 1.06rem;
  color: var(--muted);
}

.hero-links {
  margin-top: 3rem;
  display: flex;
  gap: 2.2rem;
  flex-wrap: wrap;
}

.hero-links a {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  padding-bottom: 0.35rem;
  position: relative;
}

.hero-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--faint);
  transition: background 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left;
}

.hero-links a:hover::after {
  background: var(--green-bright);
  transform: scaleX(1.06);
}

/* ---------- sections ---------- */

section { padding: clamp(4rem, 10vh, 7rem) 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.section-head .num {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--green);
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 380;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}

/* ---------- work ---------- */

.project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  padding: clamp(2.2rem, 5vh, 3.4rem) 0;
  border-top: 1px solid var(--line);
}

.project:first-of-type { border-top: none; padding-top: 0; }

.project h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.2;
}

.project h3 a {
  border-bottom: 1px solid transparent;
  transition: color 0.5s ease, border-color 0.5s ease;
}

.project h3 a:hover {
  color: var(--green-bright);
  border-color: var(--green);
}

.project .role {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.project .body p { color: var(--muted); max-width: 58ch; }

.project .facts {
  list-style: none;
  margin-top: 1.6rem;
}

.project .facts li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink);
  display: flex;
  gap: 0.8rem;
}

.project .facts li::before {
  content: "—";
  color: var(--green);
  flex-shrink: 0;
}

.project .more {
  display: inline-block;
  margin-top: 1.7rem;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--green-bright);
}

.project .more:hover { color: var(--ink); }

/* ---------- approach ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.steps li {
  counter-increment: step;
  background: var(--bg);
  padding: 1.7rem 1.4rem 2rem;
  transition: background 0.7s ease;
}

.steps li:hover { background: var(--bg-raised); }

.steps li::before {
  content: "0" counter(step);
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--green);
  margin-bottom: 1.1rem;
}

.steps li strong {
  display: block;
  font-family: var(--serif);
  font-weight: 420;
  font-size: 1.08rem;
  margin-bottom: 0.6rem;
}

.steps li span { font-size: 0.88rem; color: var(--muted); }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
}

.about-grid .lede {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.45;
}

.about-grid .lede em { color: var(--green-bright); font-style: italic; }

.about-grid .rest p { color: var(--muted); font-size: 0.98rem; }
.about-grid .rest p + p { margin-top: 1.1rem; }

/* ---------- contact ---------- */

.contact { padding-bottom: clamp(5rem, 12vh, 8rem); }

.contact .big {
  font-family: var(--serif);
  font-weight: 320;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.15;
  max-width: 18ch;
}

.contact .big a {
  color: var(--green-bright);
  border-bottom: 1px solid var(--green);
  transition: color 0.5s ease;
}

.contact .big a:hover { color: var(--ink); }

.contact .meta {
  margin-top: 2.5rem;
  display: flex;
  gap: 2.2rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--muted);
}

.contact .meta a { color: var(--ink); border-bottom: 1px solid var(--faint); }
.contact .meta a:hover { color: var(--green-bright); border-color: var(--green); }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.6rem;
  font-size: 0.8rem;
  color: var(--faint);
  letter-spacing: 0.04em;
}

footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- case study article ---------- */

.article { max-width: 720px; margin: 0 auto; padding: clamp(3rem, 8vh, 5rem) 0 5rem; }

.article .back {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.article .back:hover { color: var(--green-bright); }

.article h1 {
  margin-top: 2.2rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  max-width: none;
}

.article .standfirst {
  margin-top: 1.8rem;
  font-family: var(--serif);
  font-weight: 350;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--muted);
}

.article .tags {
  margin-top: 2rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.article .tags span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.3rem 0.7rem;
}

.article h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 3.2rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.article h3 {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin: 2.2rem 0 0.7rem;
}

.article p { color: var(--muted); margin-bottom: 1.1rem; }
.article strong { color: var(--ink); font-weight: 500; }

.article ul { list-style: none; margin: 1.2rem 0 1.6rem; }

.article ul li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.95rem;
  display: flex;
  gap: 0.8rem;
}

.article ul li::before { content: "—"; color: var(--green); flex-shrink: 0; }

.article blockquote {
  margin: 2.4rem 0;
  padding-left: 1.6rem;
  border-left: 2px solid var(--green);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 1.4rem 0 2rem;
}

.status-grid div { background: var(--bg); padding: 1.3rem 1.2rem; }

.status-grid .label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.5rem;
}

.status-grid .value { font-size: 0.95rem; color: var(--ink); margin: 0; }

/* ---------- reveal motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .project, .about-grid { grid-template-columns: 1fr; }
  .project .role { margin-bottom: 0.4rem; }
  nav { gap: 1.2rem; }
}
