/* ============================================================
   Griffin Terry — Portfolio
   Bold & modern design system
   ============================================================ */

:root {
  /* Palette */
  --bg:        #0b0b12;
  --bg-2:      #12121d;
  --surface:   #16162400;
  --card:      #15151f;
  --card-2:    #1b1b29;
  --line:      rgba(255,255,255,0.08);
  --text:      #f4f4f8;
  --muted:     #a3a3b5;
  --muted-2:   #6f6f86;

  /* Accent */
  --accent:    #7c5cff;   /* electric violet */
  --accent-2:  #00e5c0;   /* mint */
  --accent-3:  #ff5c8a;   /* pink */
  --grad:      linear-gradient(120deg, var(--accent), var(--accent-3) 55%, var(--accent-2));

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1120px;
  --radius: 20px;
  --radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* keep section tops clear of the sticky nav */
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%; /* stop iOS auto-inflating text in landscape */
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

/* Ambient background glows */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.20;
  pointer-events: none;
}
body::before { background: var(--accent);   top: -20vw; left: -15vw; }
body::after  { background: var(--accent-2); bottom: -25vw; right: -20vw; opacity: 0.14; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11,11,18,0.6);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }
.nav__cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg) !important;
  font-weight: 600;
}
.nav__toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s;
}
.btn--primary {
  background: var(--grad);
  color: #0b0b12;
  box-shadow: 0 8px 30px -10px var(--accent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px var(--accent); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent); color: #fff; transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; position: relative; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 14ch;
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead {
  margin-top: 24px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 56ch;
}
.hero__actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Section scaffolding ---------- */
.section { padding: 80px 0; }
.section__head { margin-bottom: 44px; max-width: 60ch; }
.section__kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section__head h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-weight: 800;
}
.section__head p { margin-top: 16px; color: var(--muted); font-size: 1.08rem; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.about__body p { color: var(--muted); margin-bottom: 18px; font-size: 1.06rem; }
.about__body strong { color: var(--text); }
.about__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.about__card h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); margin-bottom: 18px; }
.headshot {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 22px;
  display: block;
}
.factlist { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.factlist li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.97rem; }
.factlist li b { color: var(--accent-2); font-weight: 700; min-width: 18px; }
.placeholder {
  border: 1px dashed rgba(124,92,255,0.5);
  background: rgba(124,92,255,0.06);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.9rem;
}
.placeholder b { color: var(--accent); }

/* ---------- Project cards ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  min-height: 280px;
}
.pcard::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx,50%) var(--my,0%), rgba(124,92,255,0.10), transparent 40%);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.pcard:hover { transform: translateY(-6px); border-color: rgba(124,92,255,0.5); }
.pcard:hover::after { opacity: 1; }
.pcard__tag {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(0,229,192,0.08);
  border: 1px solid rgba(0,229,192,0.25);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.pcard h3 { font-size: 1.5rem; letter-spacing: -0.01em; margin-bottom: 10px; }
.pcard p { color: var(--muted); font-size: 1rem; margin-bottom: 20px; flex-grow: 1; }
.pcard__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 11px;
  border-radius: 999px;
}
.pcard__link { font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.pcard__link .arrow { transition: transform 0.2s; }
.pcard:hover .pcard__link .arrow { transform: translateX(5px); }
.pcard--soon { opacity: 0.6; }
.pcard--soon .pcard__tag { color: var(--muted-2); background: transparent; border-color: var(--line); }

/* ---------- Case study page ---------- */
.case-hero { padding: 64px 0 40px; }
.backlink { color: var(--muted); font-size: 0.92rem; display: inline-flex; gap: 8px; align-items: center; margin-bottom: 30px; }
.backlink:hover { color: var(--text); }
.case-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.03em; line-height: 1.05; font-weight: 800; max-width: 18ch; }
.case-logo { width: auto; max-width: 280px; height: auto; display: block; margin-bottom: 6px; }
.case-hero .lead { margin-top: 20px; color: var(--muted); font-size: 1.2rem; max-width: 60ch; }
.case-meta {
  display: flex; flex-wrap: wrap; gap: 36px;
  margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line);
}
.case-meta div span { display: block; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); margin-bottom: 6px; }
.case-meta div b { font-size: 1rem; font-weight: 600; }

.case-body { padding: 20px 0 60px; }
.case-section { padding: 40px 0; border-top: 1px solid var(--line); }
.case-section:first-child { border-top: 0; }
.case-section h2 { font-size: 1.7rem; letter-spacing: -0.01em; margin-bottom: 18px; }
.case-section h3 { font-size: 1.15rem; margin: 26px 0 10px; }
.case-section p { color: var(--muted); margin-bottom: 16px; font-size: 1.06rem; max-width: 70ch; }
.case-section p strong, .case-section li strong { color: var(--text); }
.case-section ul { list-style: none; margin: 6px 0 18px; max-width: 70ch; }
.case-section ul li {
  color: var(--muted); padding-left: 26px; position: relative; margin-bottom: 12px; font-size: 1.05rem;
}
.case-section ul li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 8px; height: 8px; border-radius: 2px; background: var(--grad);
}

/* Stat band */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 8px 0 10px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 24px;
}
.stat b { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* Screenshot gallery — masonry flow so cards size to their content
   instead of stretching to align into a rigid grid */
.shots { column-count: 2; column-gap: 18px; margin: 10px 0; }
.shot {
  break-inside: avoid;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.shot img {
  width: 100%; height: auto; display: block;
  border-bottom: 1px solid var(--line);
}
.shot figcaption {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
/* Fallback state shown until the image file is added */
.shot--empty {
  aspect-ratio: 16/10;
  border: 1px dashed rgba(124,92,255,0.45);
  background: rgba(124,92,255,0.06);
  justify-content: center;
}
.shot--empty figcaption { color: var(--muted); text-align: center; }
.shot--empty figcaption::before {
  content: "Screenshot pending — "; color: var(--accent); font-weight: 600;
}

.callout {
  border-left: 3px solid var(--accent);
  background: var(--card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px; margin: 8px 0 20px; color: var(--muted);
}
.callout b { color: var(--text); }

/* ---------- Timeline / Experience ---------- */
.timeline { display: flex; flex-direction: column; gap: 4px; }
.trow {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.trow:first-child { border-top: 0; }
.trow__when { color: var(--muted-2); font-size: 0.9rem; font-weight: 600; padding-top: 4px; }
.trow__what h3 { font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 4px; }
.trow__what .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.trow__where { color: var(--accent-2); font-size: 0.88rem; font-weight: 600; margin-bottom: 10px; }
.trow__what p { color: var(--muted); font-size: 1.02rem; }
.trow__what p:last-child { margin-bottom: 0; }

@media (max-width: 700px) {
  .trow { grid-template-columns: 1fr; gap: 8px; }
  .trow__when { padding-top: 0; }
}

/* ---------- Contact ---------- */
.contact { text-align: center; padding: 90px 0; }
.contact h2 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; margin-bottom: 16px; }
.contact p { color: var(--muted); font-size: 1.1rem; margin-bottom: 30px; }
.contact__links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted-2); font-size: 0.9rem; }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 32px; }
  .projects-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .shots { column-count: 1; }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__links.open {
    display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg-2); padding: 20px 24px; gap: 18px; border-bottom: 1px solid var(--line);
  }
}

/* Phones: tighten spacing, enlarge tap targets, scale hero/case type down */
@media (max-width: 560px) {
  .container { padding: 0 18px; }

  .hero { padding: 60px 0 48px; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.6rem); max-width: 100%; }
  .hero p.lead { max-width: 100%; }
  .hero__actions { gap: 10px; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  .section { padding: 56px 0; }
  .section__head { margin-bottom: 30px; }

  .about__card { padding: 22px; }
  .headshot { max-width: 220px; margin-left: auto; margin-right: auto; }

  .case-hero { padding: 36px 0 28px; }
  .case-logo { max-width: 200px; }
  .case-meta { gap: 18px 26px; margin-top: 26px; padding-top: 22px; }
  .case-section { padding: 30px 0; }
  .case-section h2 { font-size: 1.45rem; }
  .case-section p,
  .case-section ul li { font-size: 1rem; }

  .contact { padding: 64px 0; }
  .contact__links .btn { width: 100%; justify-content: center; }

  .footer__inner { flex-direction: column; gap: 6px; }
}

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