/* ---------------------------------------------
   Katherine Hollister — Portfolio
   Design tokens
--------------------------------------------- */
:root {
  --color-bg: #faf7f2;
  --color-surface: #f1ece2;
  --color-text: #2b2724;
  --color-text-muted: #6f6862;
  --color-accent: #665f5b;
  --color-cream: #f7f5ed;
  --color-border: #e3dcd0;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.75em;
  display: block;
}

.text-muted { color: var(--color-text-muted); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid var(--color-accent);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.button--primary {
  background: var(--color-accent);
  color: var(--color-cream);
}
.button--primary:hover { background: #514b47; }

.button--ghost {
  background: transparent;
  color: var(--color-accent);
}
.button--ghost:hover { background: var(--color-accent); color: var(--color-cream); }

/* ---------------------------------------------
   Header / nav
--------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}

.nav__logo img {
  height: 28px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text);
  position: relative;
  padding-bottom: 2px;
}

.nav__links a[aria-current="page"] {
  color: var(--color-accent);
}

.nav__links a:hover {
  color: var(--color-accent);
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 720px) {
  .nav__toggle { display: block; }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav--open .nav__links {
    max-height: 300px;
  }

  .nav__links a {
    display: block;
    padding: 1rem var(--gutter);
    border-top: 1px solid var(--color-border);
  }
}

/* ---------------------------------------------
   Hero
--------------------------------------------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20, 17, 15, 0.75) 0%, rgba(20, 17, 15, 0.35) 60%, rgba(20, 17, 15, 0.15) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  color: var(--color-cream);
  padding: 3rem var(--gutter) 3.5rem;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}

.hero__content .eyebrow {
  color: var(--color-cream);
  opacity: 0.9;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.hero__content h1 {
  color: var(--color-cream);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.hero__content p {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.hero__actions .button--ghost {
  color: var(--color-cream);
  border-color: rgba(247, 245, 237, 0.6);
}
.hero__actions .button--ghost:hover {
  background: var(--color-cream);
  color: var(--color-text);
}

/* ---------------------------------------------
   Page header (non-home pages)
--------------------------------------------- */
.page-header {
  padding: 6rem 0 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

/* ---------------------------------------------
   Sections
--------------------------------------------- */
section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-surface);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------------------------------------------
   Work grid
--------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.work-card {
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.work-card__mark {
  width: 40px;
  height: 40px;
}

.work-card__tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.25em 0.75em;
}

/* ---------------------------------------------
   Lists (resume, skills)
--------------------------------------------- */
.stack-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem 1rem;
}

.stack-list li {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.6em 0.9em;
  font-size: 0.9rem;
  background: var(--color-cream);
}

.entry {
  border-bottom: 1px solid var(--color-border);
  padding: 2rem 0;
}
.entry:first-of-type { padding-top: 0; }
.entry:last-of-type { border-bottom: none; }

.entry__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.entry__org { font-weight: 600; }

/* ---------------------------------------------
   Footer
--------------------------------------------- */
.site-footer {
  background: var(--color-accent);
  color: var(--color-cream);
  padding: 3.5rem 0 2rem;
}

.site-footer a {
  color: var(--color-cream);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  flex-wrap: wrap;
}

.footer-bottom {
  border-top: 1px solid rgba(247, 245, 237, 0.2);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(247, 245, 237, 0.7);
}

.placeholder-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ---------------------------------------------
   Case study pages
--------------------------------------------- */
.cs-hero {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0;
}

.cs-hero h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  max-width: 14ch;
}

.cs-hero h1 em {
  font-style: italic;
}

.cs-meta {
  display: flex;
  gap: clamp(2rem, 6vw, 5rem);
  flex-wrap: wrap;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.cs-meta__item .eyebrow { margin-bottom: 0.35em; }
.cs-meta__item p { margin: 0; font-weight: 500; }

.cs-section {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 6rem 0;
}

.cs-section--short {
  min-height: 0;
  padding: 5rem 0;
}

.cs-statement {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  line-height: 1.25;
  max-width: 24ch;
  margin: 0;
}

.cs-statement em { font-style: italic; }

.cs-statement--small {
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  max-width: 30ch;
}

.cs-waves {
  background-color: var(--color-surface);
  background-image: url("../images/waves.svg");
  background-size: 340px;
}

.cs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 3rem 2rem;
  width: 100%;
}

.cs-stat__number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1;
}

.cs-stat__label {
  margin-top: 0.5rem;
  color: var(--color-text-muted);
}

.cs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.cs-list li {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1.3;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
}

.cs-list li:last-child { border-bottom: none; }

.cs-list__index {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  min-width: 2em;
}

.cs-visual {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
}

.cs-visual--waves {
  background-image: url("../images/waves.svg");
  background-size: 280px;
}

.cs-visual img { width: 100%; height: 100%; object-fit: cover; }

.cs-visual__hint {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.5em 1.2em;
}

/* NDA gate */
.cs-gate {
  background: var(--color-accent);
  color: var(--color-cream);
  padding: 7rem 0;
  text-align: center;
}

.cs-gate h2 {
  color: var(--color-cream);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
}

.cs-gate p {
  max-width: 44ch;
  margin: 0 auto 2rem;
  color: rgba(247, 245, 237, 0.8);
}

.cs-gate__form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cs-gate__form input {
  font: inherit;
  padding: 0.85em 1.2em;
  border-radius: var(--radius);
  border: 1px solid rgba(247, 245, 237, 0.4);
  background: rgba(247, 245, 237, 0.08);
  color: var(--color-cream);
  min-width: 240px;
}

.cs-gate__form input::placeholder { color: rgba(247, 245, 237, 0.5); }

.cs-gate__form input:focus {
  outline: none;
  border-color: var(--color-cream);
}

.cs-gate .button--primary {
  background: var(--color-cream);
  color: var(--color-text);
  border-color: var(--color-cream);
}

.cs-gate .button--primary:hover { background: #e8e4d6; }

.cs-gate__error {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #f3c9b9;
  min-height: 1.4em;
}

.cs-gate__request {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.cs-gate__request a {
  color: var(--color-cream);
  text-decoration: underline;
}

/* Prev / next case study */
.cs-nav {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 4rem 0;
}

.cs-nav a {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.cs-nav a:hover { color: var(--color-accent); text-decoration: underline; }

/* Scroll reveals */
[data-reveal] {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal="tilt"] {
  transform: perspective(800px) translateY(60%) rotateX(-45deg);
  transform-origin: bottom center;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

/* Clickable work cards */
a.work-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

a.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(43, 39, 36, 0.08);
}

.work-card__cta {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
}
