/* ===== COLOR + SPACING VARIABLES =====
   Change a color here once and it updates everywhere. */
:root {
  --white: #ffffff;
  --black: #111111;         /* text — near-black reads softer than pure #000 */
  --red: #CD1515;           /* vivid red — the accent (rgba(205,21,21,1)) */
  --red-50: #E68A8A;        /* vivid red at ~50% (mixed with white) — used on hover */
  --gray-line: #E7E7E7;     /* subtle borders for empty thumbnails */
  --gray-thumb: #F4F4F4;    /* empty thumbnail fill */
  --max-width: 1080px;
  --gap: 24px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Sticky-footer layout: header (auto) · content (1fr, grows) · footer (auto).
     Keeps the footer pinned to the bottom even on short pages. */
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

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

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky;          /* stays at the top as you scroll */
  top: 0;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--gray-line);
  z-index: 10;
}

.logo { font-weight: 700; font-size: 18px; }

/* Homepage logo → name crossfade.
   Default: the CN mark shows, the name is collapsed + invisible.
   After the first click ("click away"), .name-revealed swaps them. */
.logo--home { display: inline-flex; align-items: center; }

.logo-mark {
  display: block;
  height: 40px;
  width: auto;
  max-width: 40px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.5s ease, max-width 0.5s ease;
}

.logo-name {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  color: var(--black);
  transition: opacity 0.8s ease, max-width 0.8s ease;
}

body.name-revealed .logo-mark { opacity: 0; max-width: 0; }
body.name-revealed .logo-name { opacity: 1; max-width: 240px; }

.nav { display: flex; gap: 28px; }

.nav a { font-size: 15px; transition: color 0.15s ease; }
.nav a:hover { color: var(--red); }   /* full red on hover — accessible (5.6:1) */
.nav a.active { color: var(--red); font-weight: 600; }   /* current page */

/* ===== HERO ===== */
.hero {
  width: 100%;                 /* fill the width (grid item), then cap below */
  max-width: var(--max-width);
  margin: 0;                   /* left-aligned (was centered) */
  padding: 140px 32px 120px;   /* generous whitespace, homepage feel */
}

.hero-eyebrow {
  font-size: 16px;
  font-weight: 400;           /* not bold */
  color: var(--black);        /* black */
  margin-bottom: 20px;
}

.hero-name {
  font-size: clamp(44px, 8vw, 96px);   /* scales with screen size */
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--red);          /* name in vivid red */
}

.hero-keywords {
  margin-top: 24px;
  font-size: 14px;   /* small scannable tags — 14px + dark grey stays readable/accessible */
  color: #444;
  max-width: 620px;
}

.hero-intro {
  margin-top: 24px;
  font-size: clamp(18px, 2.2vw, 24px);   /* now the prominent line (swapped) */
  font-weight: 500;
  max-width: 760px;
}

.hero-cta {
  display: inline-block;
  margin-top: 36px;
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  background: var(--red);
  padding: 14px 28px;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.hero-cta:hover { background: var(--red-50); }   /* 50% red on hover */

/* Subtle primary-action link — guides to the Work page without a heavy button */
.hero-link {
  display: inline-block;
  margin-top: 36px;
  font-size: 17px;
  font-weight: 600;
  color: var(--black);
  transition: color 0.15s ease;
}
.hero-link:hover { color: var(--red); text-decoration: underline; }   /* accessible */

/* Location — lowest priority, muted, at the bottom of the hero */
.hero-meta {
  margin-top: 28px;
  font-size: 15px;
  color: #777;
}

/* ===== SECTIONS ===== */
.section {
  width: 100%;                 /* fill the width (grid item), then cap below */
  max-width: var(--max-width);
  margin: 0 auto;              /* centered (content pages) */
  padding: 64px 32px;
}

.section-title {
  position: relative;                     /* anchor for the animated bar */
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 32px;
  padding-bottom: 12px;
}

/* Animated underline — fills left-to-right like a progress bar on load */
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;                 /* grow from the left edge */
  animation: grow-bar 0.9s ease-out forwards;
}

@keyframes grow-bar {
  to { transform: scaleX(1); }
}

/* Accessibility: respect visitors who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .section-title::after {
    transform: scaleX(1);
    animation: none;
  }
}

/* ===== WORK GRID ===== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* 3 columns on desktop */
  gap: var(--gap);
}

.work-card { display: block; }

.thumb {
  aspect-ratio: 4 / 3;         /* keeps every thumbnail the same shape */
  background: var(--gray-thumb);
  border: 1px solid var(--gray-line);
  border-radius: 8px;
}

.work-card-title {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 600;
}

.work-card-meta { font-size: 14px; color: #777; margin-top: 2px; }

/* ===== ABOUT ===== */
.about-text {
  font-size: 18px;
  max-width: 680px;
  color: #333;
}

.about-text p { margin-bottom: 20px; }   /* space between paragraphs */

.about-highlight {
  font-weight: 600;
  color: var(--black);
  border-left: 3px solid var(--red);   /* red accent bar on the standout line */
  padding-left: 16px;
}

.about-skills {
  font-size: 15px;
  color: #555;
}

.about-skills span {
  display: block;
  font-weight: 700;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  margin-bottom: 4px;
}

/* ===== CONTACT ===== */
.contact-row { display: flex; flex-wrap: wrap; gap: 16px; }

.contact-btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border: 2px solid var(--red);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.contact-btn:hover {
  background: var(--red-50);    /* fills with 50% red on hover */
  border-color: var(--red-50);
  color: var(--white);
}

.copy-feedback {
  margin-top: 14px;
  font-size: 14px;
  color: var(--red);
  min-height: 20px;    /* reserves space so layout doesn't jump */
}

/* ===== FOOTER (permanent contact sheet) ===== */
.site-footer {
  background: var(--red);        /* red band (replaces the black) */
  color: var(--white);          /* white on red = 5.6:1 contrast, passes AA */
  padding: 40px 32px 40px;      /* reduced top padding */
}

.footer-inner {
  max-width: none;              /* fill the full width — credit sits at the far right */
  margin: 0;
  display: flex;
  flex-wrap: wrap;               /* stacks nicely on small screens */
  gap: 40px;
  justify-content: space-between;
}

.footer-col p { font-size: 16px; margin-bottom: 8px; }

.footer-label {
  color: var(--white);          /* white label — distinguished by weight/spacing */
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Accessible hover: underline instead of low-contrast pink text */
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.footer-col--right { text-align: right; }

.footer-copy {
  max-width: var(--max-width);
  margin: 48px auto 0;
  font-size: 13px;
  color: var(--white);
  opacity: 0.9;
}

@media (max-width: 640px) {
  .footer-col--right { text-align: left; }   /* left-align on phones */
}

/* ===== RESPONSIVE (phones/tablets) ===== */
@media (max-width: 820px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .work-grid { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .hero { padding: 72px 24px 60px; }
}
