/* Taylor D. Dewey — portfolio. One stylesheet, no build step. */

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/nunito-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/nunito-sans-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Muli";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/muli-700.ttf") format("truetype");
}

:root {
  --ink: #272c30;
  --muted: #62707c;
  --accent: #5a3fd6;
  --wash: #eee;
  --footer: #f2f2f2;
  --gradient: linear-gradient(149deg, rgb(74, 234, 220) 0%, rgb(151, 120, 209) 20%, rgb(207, 42, 186) 40%, rgb(238, 44, 130) 60%, rgb(251, 105, 98) 80%, rgb(254, 248, 76) 100%);
  --body-font: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --head-font: "Muli", var(--body-font);
  --shadow: 0 15px 30px -7px rgba(0, 0, 0, 0.125);
  --measure: 970px;
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 20px/1.7 var(--body-font);
  overflow-x: hidden;
}
@media (max-width: 1000px) { body { font-size: 17px; } }
@media (max-width: 600px) { body { font-size: 16px; } }

img { max-width: 100%; height: auto; }
a { color: var(--muted); text-decoration: none; transition: color 0.07s ease-in-out; }
a:hover, a:focus { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 {
  margin: 0 0 3%;
  font-family: var(--head-font);
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: 2em; }
h2 { font-size: 1.6em; }
p, ul { margin: 0 0 1.2em; }
ul { padding-left: 1.2em; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 5%; }
@media (min-width: 1100px) { .wrap { padding: 0; } }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 10; }
.site-header .wrap { max-width: 1300px; padding: 0 8%; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5em; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand img { display: block; width: 93px; height: auto; }
.brand-name { font: 700 26px/1.2 var(--head-font); }
.brand-role { display: block; font: 400 14px/1.4 var(--body-font); }
.brand:hover, .brand:focus { color: #fff; opacity: 0.9; }

.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 30px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: inline-block; padding: 12px 0; font-size: 17px; font-weight: 700; line-height: 2; color: #fff; transition: color 0.3s ease; }
.site-nav a:hover, .site-nav a:focus { color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* Inner pages: a slim gradient band so the white logo and nav stay legible */
.site-header.slim { background: var(--gradient); }
.site-header.slim .bar { min-height: 90px; }

@media (max-width: 600px) {
  .site-header .wrap { padding: 0 5%; }
  .site-header.slim .bar { min-height: 0; padding: 12px 0; gap: 0 1.5em; }
  .brand img { width: 64px; }
  .brand-name { font-size: 22px; }
  .site-nav ul { gap: 0 20px; }
  .site-nav a { padding: 4px 0; line-height: 1.6; }
}

/* Home: header floats over the hero */
.home .site-header { position: absolute; top: 0; left: 0; right: 0; }
.home .brand { display: none; }
.home .bar { justify-content: flex-end; }

/* ---------- Home hero ---------- */
.hero { background: var(--gradient); color: #fff; min-height: 430px; padding: 20px 5%; display: flex; align-items: center; }
.hero-inner { width: 100%; max-width: var(--measure); margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 2em; align-items: center; }
.hero h1 { margin: 0; text-align: right; color: #fff; font-size: 40px; line-height: 1.2; }
.hero p { margin: 0 0 1em; }
.hero p:last-child { margin: 0; }
.hero p a { color: var(--accent); font-weight: 700; }
.hero p a:hover { color: var(--ink); }
@media (max-width: 700px) {
  .hero { align-items: flex-end; padding-top: 110px; padding-bottom: 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 1em; }
  .hero h1 { text-align: left; }
}

.video {
  position: relative; z-index: 2;
  max-width: calc(var(--measure) + 5%);
  margin: calc(-40px - 2em) auto 0;
  padding: 2.5%;
  background: #fff;
}
.video .frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 970px) { .video { margin-left: 2.5%; margin-right: 2.5%; } }
@media (max-width: 500px) { .video { padding: 10px; } }

/* ---------- Home sections ---------- */
.band { padding: 5%; }
.band.wash { background: var(--wash); margin-top: calc(-40px - 2em); padding-top: calc(40px + 3em + 5%); }
.band > .inner { max-width: var(--measure); margin: 0 auto; }
@media (min-width: 1024px) { .band.wash { padding-top: calc(2em + 6% + 5%); } }

.logo-wall { display: flex; flex-wrap: wrap; justify-content: center; margin: 0 -2em 0 0; }
.logo-wall a {
  position: relative; display: block;
  width: calc(33.3% - 2em); margin: 0 2em 2em 0; padding: 2em;
  background: #fff; box-shadow: var(--shadow);
}
.logo-wall a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 5px;
  background: var(--accent); opacity: 0; transition: opacity 0.5s;
}
.logo-wall a:hover::after, .logo-wall a:focus-visible::after { opacity: 1; }
.logo-wall img { display: block; width: 100%; }
@media (max-width: 1000px) { .logo-wall a { padding: 1em; } }
@media (max-width: 500px) {
  .logo-wall { margin-right: -1em; }
  .logo-wall a { width: calc(50% - 1em); margin: 0 1em 1em 0; }
}

.button {
  display: inline-block; padding: 12px 20px;
  background: var(--accent); color: #eee;
  font-size: 20px; line-height: 1; text-align: center;
  transition: box-shadow 0.3s ease;
}
.button:hover, .button:focus { color: #fff; box-shadow: inset 0 0 200px rgba(255, 255, 255, 0.15); }

/* ---------- Inner pages ---------- */
main.page { padding: 6% 0 4%; }
.page-title { font-size: 50px; line-height: 1.3; margin: 0 0 3%; }
@media (max-width: 600px) { .page-title { font-size: 32px; } }

.intro { display: grid; grid-template-columns: 2fr 1fr; gap: 2em; align-items: start; }
@media (max-width: 600px) { .intro { grid-template-columns: 1fr; } }
.toc { padding-left: 1em; }
.toc .toc-heading { margin: 0; font-weight: 700; }
.toc ul { margin: 0; padding: 0; list-style: none; font-size: 18px; }
.toc a { color: var(--accent); }
.toc a:hover { color: var(--ink); }
@media (max-width: 600px) { .toc { background: var(--wash); padding: 1em; } }

hr.rule { height: 0; margin: 30px 0; border: 0; border-top: 1px solid #ddd; }

/* ---------- Leadership values ---------- */
.value-title { display: flex; align-items: center; gap: 0.5em; margin: 1.2em 0 0.5em; }
.value-title img { height: 44px; width: auto; flex: none; }

.quotes { display: grid; gap: 2em; margin: 1.5em 0 2em; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .quotes { grid-template-columns: 1fr; gap: 0; } }
blockquote { margin: 1em 0 1.2em; padding: 0 0 0 30px; border-left: 3px solid var(--ink); font-weight: 700; line-height: 1.4; }
blockquote p { margin: 0 0 1em; }
blockquote cite { display: block; margin-top: 10px; font-style: normal; }

figure { margin: 0; }
figcaption { margin-top: 0.5em; color: var(--muted); font-size: 16px; line-height: 1.5; }
.photo { margin: 2em 0; }
.photo img { display: block; width: 100%; }
.small { font-size: 16px; }

/* ---------- Résumé ---------- */
.resume { max-width: 760px; }
.resume h2 { font-size: 1.2em; margin: 1.8em 0 0.4em; }
.resume ul { margin-bottom: 1.5em; }
.resume li { margin-bottom: 0.4em; }

/* ---------- Portfolio cards ---------- */
.projects { display: grid; gap: 2em; margin-top: 4em; }
.project { display: grid; grid-template-columns: 55% auto; align-items: center; max-width: calc(var(--measure) + 200px); margin: 0 auto; }
.project.right { grid-template-columns: auto 55%; }
.project.right figure { order: 2; }
.project figure { background: rgba(139, 139, 150, 0.1); max-height: 700px; overflow: hidden; display: flex; }
.project figure img { width: 100%; height: 100%; max-height: 700px; object-fit: cover; display: block; }
.project .card { position: relative; z-index: 1; margin-left: -100px; padding: 34px; background: #fff; box-shadow: var(--shadow); }
.project.right .card { margin-left: 0; margin-right: -100px; }
.project h2 { margin: 0 0 0.6em; scroll-margin-top: 2em; }
.project .question { margin: 0 0 1.2em; padding: 1.25em 2.4em; background: var(--wash); }
.project .card p:last-of-type { margin-bottom: 1.2em; }
@media (max-width: 800px) {
    .project, .project.right { grid-template-columns: 1fr; }
  .project.right figure { order: 0; }
  .project .card, .project.right .card { margin: -33% 5% 0; padding: 1.5em; }
}

details { margin-top: 1em; }
summary { padding: 10px 15px; background: rgba(140, 140, 151, 0.1); cursor: pointer; }
summary:hover { background: rgba(140, 140, 151, 0.2); }
.artifacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin: 17px 0 0; padding: 0; list-style: none; }
.artifacts a { display: block; background: rgba(139, 139, 150, 0.1); }
.artifacts img { display: block; width: 100%; border: 1px solid var(--accent); aspect-ratio: 129 / 89; object-fit: cover; transition: opacity 0.2s; }
.artifacts a:hover img, .artifacts a:focus-visible img { opacity: 0.8; }
.artifacts figcaption { display: none; } /* shown in the lightbox */

/* ---------- Footer ---------- */
.site-footer { margin-top: 4em; padding: 2.5em 0; background: var(--footer); font-size: 17px; line-height: 1.5; }
.site-footer .wrap { max-width: 1300px; padding: 0 8%; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--accent); }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.home .site-footer { margin-top: 0; }

/* ---------- Lightbox (portfolio artifacts) ---------- */
.artifacts a { cursor: zoom-in; }
.lightbox { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, 0.96); color: #fff; }
.lightbox[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 3em 0.5em 1em; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 9em); object-fit: contain; background: #fff; }
.lightbox figcaption { max-width: 70ch; margin-top: 1em; color: #fff; font-size: 15px; text-align: center; }
.lightbox button { border: 0; background: none; color: #fff; font: 400 40px/1 var(--body-font); cursor: pointer; padding: 0.2em 0.3em; opacity: 0.8; }
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lb-count { position: absolute; top: 0.9em; left: 1em; font-size: 14px; }
.lightbox form { position: absolute; top: 0.4em; right: 0.6em; }
@media (max-width: 600px) { .lightbox button { font-size: 32px; padding: 0.1em 0.15em; } }
