/* ============================================
   THE COLOUR CREATIVE — Global Stylesheet
   ============================================ */

/* Google Fonts — include Light (300) weight */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
  /* Colours */
  --color-bg:          #191617;
  --color-surface:     #211e20;
  --color-surface-2:   #2a2628;
  --color-border:      #434343;
  --color-card-stroke: #404040;
  --color-text:        #F9F9F9;        /* global text — off-white */
  --color-text-sub:    #afafaf;
  --color-text-card:   #F9F9F9;
  --color-accent:      #df1463;

  /* Typography */
  --font-family:       'Inter', sans-serif;
  --font-size-hero:    62px;
  --font-size-card:    24px;
  --font-size-badge:   16px;
  --font-size-nav:     16px;
  --font-size-body:    16px;
  --font-size-sub:     14px;

  --line-height-hero:  83px;
  --letter-spacing-hero: -0.03em;

  /* Spacing */
  --container-max:     1200px;
  --container-px:      120px;
  --nav-top:           32px;
  --nav-right:         32px;
  --hero-top:          152px;
  --section-gap:       80px;
  --card-gap:          50px;   /* exact gap between 2×575px cards = 1200px */
  --grid-gap:          24px;

  /* Card dimensions */
  --card-w:            575px;
  --card-img-h:        504px;
  --card-radius:       20px;

  /* Radii */
  --radius-badge:      999px;
  --radius-avatar:     50%;

  /* Transitions */
  --transition-fast:   0.2s ease;
  --transition-med:    0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

ul {
  list-style: none;
}

/* ============================================
   Layout — Container
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

/* Flush container — no horizontal padding (hero & card grid) */
.container--flush {
  padding-left: 0;
  padding-right: 0;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: var(--nav-top);
  right: var(--nav-right);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav__list {
  display: flex;
  align-items: center;
}

.nav__item {
  display: flex;
  align-items: center;
}

.nav__link {
  color: var(--color-text);
  font-size: var(--font-size-nav);
  font-weight: 400;
  padding: 0 20px;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

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

.nav__link.active {
  color: var(--color-accent);
  font-weight: 700;
}

.nav__divider {
  width: 1px;
  height: 12px;
  background-color: var(--color-border);
  flex-shrink: 0;
}

/* Brand — hidden on desktop, shown in mobile bar */
.nav__brand {
  display: none;
}

/* Mobile hamburger — hidden on desktop */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding-top: var(--hero-top);
  padding-bottom: var(--section-gap);
}

.hero__intro {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

/* ── Avatar ── */
.hero__avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-avatar);
  object-fit: cover;
  flex-shrink: 0;
}

/* ── "Hi, I'm Jake" ── */
.hero__name {
  font-size: 40px;
  font-weight: 700;
  color: #F9F9F9;
  line-height: 40px;
  letter-spacing: -0.04em;
}

/* ── Subtitle ── */
.hero__subtitle {
  font-size: 20px;
  font-weight: 300;
  color: #afafaf;
  letter-spacing: 0;
  line-height: 1.5;
  margin-top: 4px;
}

/* ── Headline ── */
.hero__headline {
  font-size: var(--font-size-hero);
  font-weight: 700;
  line-height: var(--line-height-hero);
  letter-spacing: var(--letter-spacing-hero);
  color: var(--color-text);
  /* No max-width constraint — fills the full flush container */
}

.hero__headline .accent {
  color: var(--color-accent);
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
  margin-bottom: 40px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: var(--font-size-body);
  color: var(--color-text-sub);
  max-width: 560px;
}

/* ============================================
   Card Grid — 2 × 575px = 1200px (no padding)
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, var(--card-w));
  gap: var(--card-gap);
}

/* ============================================
   Project Card
   ============================================ */
.card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--transition-med);
  width: var(--card-w);
}

.card:hover {
  transform: translateY(-6px);
}

/* ── Card image container ── */
.card__image-wrap {
  width: var(--card-w);
  height: var(--card-img-h);
  border-radius: var(--card-radius);
  overflow: hidden;
  position: relative;
  /* Gradient background on the wrapper, not the image */
  background: linear-gradient(to right, rgba(54, 54, 54, 0.4), rgba(62, 62, 62, 0));
  /* Border on the wrapper */
  border: 1.4px solid #404040;
  /* Breathing room around the image */
  padding: 32px;
  /* Backdrop blur */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--transition-med), transform var(--transition-med);
}

.card:hover .card__image-wrap {
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: var(--card-radius);
  transition: transform var(--transition-med);
}

.card:hover .card__image-wrap img {
  transform: scale(1.03);
}

/* Image pinned to the right — dark gradient space bleeds in from the left */
.card__image-wrap--right {
  padding: 32px 0 32px 60px;
}

.card__image-wrap--right img {
  object-fit: contain;
  object-position: right center;
  /* Square off the right corners so they sit flush against the card wall */
  border-radius: 20px 0 0 20px;
}

/* ── Card body (title + badges) ── */
.card__body {
  padding-top: 16px;
}

.card__title {
  font-size: var(--font-size-card);
  font-weight: 600;
  color: var(--color-text-card);
  margin-bottom: 16px;
  line-height: 1.3;
}

.card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================
   Badge
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-badge);
  font-size: var(--font-size-badge);
  font-weight: 400;
  color: var(--color-text);
  transition: border-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.badge:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ============================================
   Page Sections
   ============================================ */
.section {
  padding-bottom: var(--section-gap);
}

.section + .section {
  padding-top: 0;
}

/* ============================================
   Page Hero (inner pages)
   ============================================ */
.page-hero {
  padding-top: var(--hero-top);
  padding-bottom: 56px;
}

.page-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.page-hero__tag::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--color-accent);
}

.page-hero__title {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 20px;
  max-width: 700px;
}

.page-hero__desc {
  font-size: 18px;
  color: var(--color-text-sub);
  max-width: 560px;
  line-height: 1.7;
}

/* ============================================
   Divider
   ============================================ */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  opacity: 0.5;
  margin: var(--section-gap) 0;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
  margin-top: var(--section-gap);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer__brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.footer__brand span {
  color: var(--color-accent);
}

.footer__copy {
  font-size: 13px;
  color: var(--color-text-sub);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer__link {
  font-size: 14px;
  color: var(--color-text-sub);
  transition: color var(--transition-fast);
}

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

/* ============================================
   404 Page
   ============================================ */
.not-found {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  position: relative;
}

.not-found__code {
  font-size: clamp(120px, 20vw, 240px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--color-surface-2);
  margin-bottom: 0;
  user-select: none;
  position: relative;
}

.not-found__code::after {
  content: attr(data-code);
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-accent) 0%, transparent 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.not-found__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 12px;
  margin-top: 32px;
}

.not-found__desc {
  font-size: 16px;
  color: var(--color-text-sub);
  max-width: 380px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.not-found__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--color-accent);
  color: #F9F9F9;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-badge);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.not-found__back:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.not-found__nav-links {
  display: flex;
  gap: 24px;
  margin-top: 48px;
}

.not-found__nav-link {
  font-size: 14px;
  color: var(--color-text-sub);
  transition: color var(--transition-fast);
}

.not-found__nav-link:hover {
  color: var(--color-accent);
}

/* ============================================
   Scroll Reveal Animation
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.36s; }

/* ============================================
   Cursor Glow Effect
   ============================================ */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(223,20,99,0.06) 0%, transparent 70%);
  transition: opacity 0.3s ease;
}

/* ============================================
   Responsive — Tablet (≤ 1024px)
   ============================================ */
@media (max-width: 1024px) {
  :root {
    --container-px:    40px;
    --font-size-hero:  44px;
    --line-height-hero: 54px;
    --card-w:          calc(50% - 16px);
    --card-img-h:      360px;
    --card-gap:        32px;
  }

  /* ── Restore side padding on flush containers for tablet ── */
  .container--flush {
    padding-left: 40px;
    padding-right: 40px;
  }

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

  .card {
    width: 100%;
  }

  .card__image-wrap {
    width: 100%;
    height: var(--card-img-h);
  }

  .hero__name {
    font-size: 30px;
    line-height: 30px;
  }

  .hero__subtitle {
    font-size: 16px;
  }
}

/* ============================================
   Responsive — Mobile (≤ 768px)
   ============================================ */
@media (max-width: 768px) {
  :root {
    --container-px:    24px;
    --font-size-hero:  34px;
    --line-height-hero: 42px;
    --font-size-card:  20px;
    --section-gap:     56px;
    --card-gap:        20px;
    --card-img-h:      260px;
  }

  /* ── Nav: full-width bar ── */
  .nav {
    top: 0;
    right: 0;
    left: 0;
    background: rgba(25, 22, 23, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 16px 24px;
    justify-content: flex-end;
    border-bottom: none;
  }

  .nav__brand {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__list {
    display: none;
    position: fixed;
    top: 57px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(25, 22, 23, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 24px;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    align-items: flex-start;
  }

  .nav__list.open {
    display: flex;
  }

  .nav__item {
    width: 100%;
  }

  .nav__link {
    display: block;
    padding: 14px 0;
    font-size: 18px;
    width: 100%;
  }

  .nav__divider {
    display: none;
  }

  /* ── Hero ── */
  .hero {
    padding-top: 100px;
  }

  .hero__name {
    font-size: 26px;
    line-height: 28px;
    letter-spacing: -0.03em;
  }

  .hero__subtitle {
    font-size: 15px;
  }

  /* ── Restore side padding on flush containers for mobile ── */
  .container--flush {
    padding-left: 24px;
    padding-right: 24px;
  }

  /* ── Card grid: single column ── */
  .card-grid {
    grid-template-columns: 1fr;
  }

  .card {
    width: 100%;
  }

  .card__image-wrap {
    width: 100%;
    height: var(--card-img-h);
  }

  /* ── Footer ── */
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* ── 404 ── */
  .not-found__nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}
