/* ============================================================
   James Hawkins — Portfolio Site
   styles.css
   ============================================================ */

/* --- Reset & base ------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: #1a1a1a;
  background: #fafaf8;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography -------------------------------------------- */
h1, h2, h3, h4, nav, .label, .availability, .cta-group, .meta {
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

h1 {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #111;
}

h2 {
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #111;
  margin-bottom: 0.9rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #111;
  margin-bottom: 0.4rem;
}

p {
  margin-bottom: 1.3rem;
  color: #2a2a2a;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: #555;
}

/* --- Layout ----------------------------------------------- */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Navigation ------------------------------------------- */
nav {
  padding: 2rem 0;
  border-bottom: 1px solid #e8e6e0;
  margin-bottom: 0;
}

.nav-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  color: #111;
}

.nav-name:hover {
  color: #555;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: #555;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #111;
}

/* --- Footer ----------------------------------------------- */
footer {
  border-top: 1px solid #e8e6e0;
  margin-top: 6rem;
  padding: 2.5rem 0;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #999;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: #999;
  text-decoration: none;
  font-size: 0.8rem;
}

.footer-links a:hover {
  color: #555;
}

/* --- Home: Hero ------------------------------------------- */
.hero {
  padding: 3rem 0 3rem;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 1.25rem;
}

.hero h1 {
  margin-bottom: 2rem;
}

.hero-intro {
  font-size: 1.1rem;
  line-height: 1.75;
  color: #333;
  max-width: 640px;
}

.hero-intro p {
  margin-bottom: 1.2rem;
}

/* --- CTA group -------------------------------------------- */
.cta-group {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: #111;
  color: #fafaf8;
  border: 1px solid #111;
}

.btn--primary:hover {
  background: #333;
  border-color: #333;
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: #111;
  border: 1px solid #ccc;
}

.btn--secondary:hover {
  border-color: #888;
  color: #111;
}

/* --- Availability banner ---------------------------------- */
.availability {
  margin-top: 3rem;
  padding: 1rem 1.25rem;
  background: #f0ede6;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.5;
  max-width: 640px;
}

.availability strong {
  color: #111;
}

/* --- Section divider -------------------------------------- */
.section-divider {
  border: none;
  border-top: 1px solid #e8e6e0;
  margin: 4rem 0;
}

/* --- Featured work (home) --------------------------------- */
.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
}

.featured-header h2 {
  margin-bottom: 0;
}

.featured-header a {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.875rem;
  color: #666;
  text-decoration: none;
}

.featured-header a:hover {
  color: #111;
}

.case-card {
  border-top: 1px solid #e8e6e0;
  padding: 2rem 0;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.case-card:last-child {
  border-bottom: 1px solid #e8e6e0;
}

.case-card-text {
  flex: 1;
  min-width: 0;
}

/* thumbnail when inside a case-card (home page) */
.case-card .thumb-wrap {
  flex: 0 0 200px;
  width: 200px;
  aspect-ratio: 3 / 2;
  margin-bottom: 0;
  align-self: flex-start;
}

.case-card-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.5rem;
}

.case-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.case-card h3 a {
  text-decoration: none;
  color: #111;
}

.case-card h3 a:hover {
  color: #555;
}

.case-card p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0;
}

/* --- Work page -------------------------------------------- */
.page-header {
  padding: 2.5rem 0 2rem;
}

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.page-header .subhead {
  font-size: 1rem;
  color: #666;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.work-list {
  padding-bottom: 2rem;
}

.work-item {
  border-top: 1px solid #e8e6e0;
  padding: 2.5rem 0;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.work-item:last-child {
  border-bottom: 1px solid #e8e6e0;
}

.work-item-text {
  flex: 1;
  min-width: 0;
}

/* thumbnail when inside a work-item (work page) */
.work-item .thumb-wrap {
  flex: 0 0 200px;
  width: 200px;
  aspect-ratio: 3 / 2;
  margin-bottom: 0;
  align-self: flex-start;
}

.work-item-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.6rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.work-item h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.work-item h2 a {
  text-decoration: none;
  color: #111;
}

.work-item h2 a:hover {
  color: #555;
}

.work-item p {
  font-size: 0.97rem;
  color: #555;
  margin-bottom: 1rem;
}

.work-item .read-link {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
  padding-bottom: 1px;
}

.work-item .read-link:hover {
  border-color: #111;
}

.work-item--tbd {
  opacity: 0.45;
}

.work-item--tbd h2 {
  color: #888;
}

/* --- About page ------------------------------------------- */
.about-body {
  padding: 1.5rem 0 4rem;
  overflow: hidden; /* clearfix for floated photo */
}

.about-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* --- Case study ------------------------------------------- */
.cs-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid #e8e6e0;
}

.cs-back {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  color: #999;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 2rem;
  letter-spacing: 0.01em;
}

.cs-back:hover {
  color: #555;
}

.cs-header-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.75rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.cs-header h1 {
  font-size: 2.1rem;
  margin-bottom: 1rem;
  max-width: 620px;
}

.cs-header .cs-intro {
  font-size: 1.05rem;
  color: #555;
  max-width: 580px;
  line-height: 1.7;
}

.cs-body {
  padding: 2.5rem 0;
}

/* --- Case study hero image -------------------------------- */
.cs-hero {
  margin: 1.5rem 0 2.5rem;
}

.cs-section {
  margin-bottom: 2.5rem;
}

.cs-section h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e8e6e0;
}

.cs-section p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.3rem;
}

.cs-section p:last-child {
  margin-bottom: 0;
}

/* --- Pull quote ------------------------------------------- */
.cs-pullquote {
  border-left: 3px solid #e8e6e0;
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 1.75rem;
}

.cs-pullquote p {
  font-size: 1.1rem;
  font-style: italic;
  color: #444;
  line-height: 1.65;
  margin-bottom: 0;
}

/* --- Lists in case study sections ------------------------- */
.cs-section ul {
  margin: 0 0 1.3rem 1.5rem;
  padding: 0;
}

.cs-section ul li {
  font-size: 1rem;
  line-height: 1.8;
  color: #2a2a2a;
  margin-bottom: 0.4rem;
}

.cs-section ul li:last-child {
  margin-bottom: 0;
}

/* --- Footer credit ---------------------------------------- */
.footer-credit {
  max-width: 960px;
  margin: 0.75rem auto 0;
  padding: 0 2rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.72rem;
  color: #bbb;
  text-align: center;
}

/* --- Before/after block ----------------------------------- */
.before-after {
  margin: 2rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.before-after-block {
  background: #f4f2ed;
  border-radius: 4px;
  padding: 1.5rem;
}

.before-after-block .block-label {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.75rem;
}

.before-after-block .block-title {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.4rem;
}

.before-after-block .block-body {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0;
}

/* --- Outcome callout -------------------------------------- */
.outcome-stat {
  display: flex;
  gap: 1.25rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.stat {
  flex: 1;
  min-width: 130px;
  padding: 1.25rem 1.5rem;
  background: #f4f2ed;
  border-radius: 4px;
}

.stat-number {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #111;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  color: #777;
  line-height: 1.4;
}

/* Colored stats in case study header */
.cs-header .outcome-stat {
  margin-top: 2rem;
  margin-bottom: 0;
}

.cs-header .stat:nth-child(1) {
  background: #fdf0ea;
}
.cs-header .stat:nth-child(1) .stat-number {
  color: #b85c38;
}

.cs-header .stat:nth-child(2) {
  background: #edf2f8;
}
.cs-header .stat:nth-child(2) .stat-number {
  color: #3d6b8a;
}

.cs-header .stat:nth-child(3) {
  background: #edf4ec;
}
.cs-header .stat:nth-child(3) .stat-number {
  color: #5c7a52;
}

/* --- Next case study nav ---------------------------------- */
.cs-nav {
  border-top: 1px solid #e8e6e0;
  padding: 2.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.875rem;
}

.cs-nav a {
  color: #555;
  text-decoration: none;
}

.cs-nav a:hover {
  color: #111;
}

.cs-nav .nav-next {
  text-align: right;
}

.cs-nav .nav-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bbb;
  display: block;
  margin-bottom: 0.25rem;
}

/* --- Case study thumbnails -------------------------------- */
/*
 * All thumbnails share the same 3:2 aspect ratio and a subtle
 * warm overlay so the dark mobile screenshot, the light desktop
 * screenshot, and the typographic tile read as a matched set.
 */
.thumb-wrap {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 4px;
  background: #f0ede6;
  margin-bottom: 1.25rem;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  /* subtle warm tint + slight desaturation unifies all three images */
  filter: saturate(0.88) contrast(1.04);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.thumb-wrap:hover img {
  transform: scale(1.02);
  filter: saturate(0.95) contrast(1.04);
}

/* warm sepia-tinted overlay applied identically to every thumb */
.thumb-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(180, 160, 130, 0.10);
  pointer-events: none;
  border-radius: 4px;
}

/* --- Case study screenshot grids -------------------------- */

/* Caption label above a screenshot block */
.cs-figure {
  margin: 2.5rem 0;
}

.cs-figure-caption {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 0.9rem;
}

/* Grid of mobile screenshots (portrait, dark UI) */
.cs-screens-mobile {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.cs-screens-mobile--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 520px;
}

.cs-screen {
  border-radius: 20px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
}

.cs-screen img {
  width: 100%;
  display: block;
}

/* Grid of desktop screenshots (landscape, light UI) */
.cs-screens-desktop {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.cs-screens-desktop--two {
  grid-template-columns: repeat(2, 1fr);
}

.cs-screen-desktop {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e4e1da;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.cs-screen-desktop img {
  width: 100%;
  display: block;
}

/* --- About photo ------------------------------------------ */
.about-photo {
  float: right;
  width: 220px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 4px;
  margin: 0.25rem 0 1.5rem 2.5rem;
  flex-shrink: 0;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  filter: saturate(0.9) contrast(1.03);
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  .cs-header h1 {
    font-size: 1.7rem;
  }

  .before-after {
    grid-template-columns: 1fr;
  }

  .featured-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .cs-nav {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .cs-screens-mobile {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-screens-mobile--two {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .cs-screens-desktop--two {
    grid-template-columns: 1fr;
  }

  /* Stack thumbnails on mobile */
  .case-card,
  .work-item {
    flex-direction: column;
  }

  .case-card .thumb-wrap,
  .work-item .thumb-wrap {
    width: 100%;
    flex: none;
  }

  /* Float photo on mobile */
  .about-photo {
    float: none;
    width: 100%;
    max-width: 280px;
    margin: 0 0 1.5rem 0;
  }
}
