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

:root {
  --bg:       #fafaf8;
  --bg-alt:   #f0efea;
  --border:   #e0dfd8;
  --text:     #111111;
  --text-2:   #666666;
  --text-3:   #999999;

  /* Accents — used selectively for color */
  --purple:   #6d28d9;
  --pink:     #db2777;
  --teal:     #0891b2;
  --orange:   #ea580c;
  --green:    #059669;
  --indigo:   #4f46e5;

  --radius: 12px;
  --nav-h:  64px;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
strong { font-weight: 700; }
ul { list-style: none; }

/* ── Nav ──────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(250, 250, 248, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  color: var(--text-2);
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: color 0.15s, transform 0.15s, opacity 0.3s;
}

.nav-logo.visible {
  opacity: 1;
  pointer-events: auto;
}

.nav-logo:hover {
  color: var(--text);
  transform: translateY(-3px);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.01em;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--text);
}
.btn-ghost:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-large {
  padding: 1rem 2.4rem;
  font-size: 1rem;
}

/* ── Hero ─────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem 7rem;
  width: 100%;
}

.hero-eyebrow {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.1s;
}

.hero-name {
  font-size: clamp(4.5rem, 11vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--text);
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.2s;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 1.75rem;
  min-height: 2.2rem;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.3s;
}

.cursor {
  display: inline-block;
  color: var(--pink);
  font-weight: 300;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-bio {
  max-width: 560px;
  color: var(--text-2);
  font-size: 1.1rem;
  line-height: 1.75;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.4s;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.5s;
}

.hero-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.6s;
}

.hero-socials a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-3);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}

.hero-socials a:hover { color: var(--text); }

/* ── Sections ─────────────────────────────────────────────── */
section { padding: 6rem 0; }
section:nth-child(even) { background: var(--bg-alt); }

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 3rem;
  line-height: 1.1;
}

/* ── About ────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-photo img {
  width: 100%;
  display: block;
}

.about-text p {
  color: var(--text-2);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.about-text .btn { margin-top: 1rem; }

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.about-stat {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.about-stat:last-child { border-bottom: none; }

.stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-purple .stat-number { color: var(--purple); }
.stat-pink   .stat-number { color: var(--pink); }
.stat-teal   .stat-number { color: var(--teal); }

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

/* ── Expertise ────────────────────────────────────────────── */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.expertise-card {
  background: var(--bg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.15s;
}

section:nth-child(even) .expertise-card {
  background: var(--bg-alt);
}

.expertise-card:hover { background: #fff; }

.expertise-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}

.card-purple .expertise-icon { color: var(--purple); }
.card-pink   .expertise-icon { color: var(--pink); }
.card-teal   .expertise-icon { color: var(--teal); }
.card-orange .expertise-icon { color: var(--orange); }
.card-green  .expertise-icon { color: var(--green); }
.card-indigo .expertise-icon { color: var(--indigo); }

.expertise-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.expertise-card p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── Experience ───────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  background: var(--border);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.timeline-item {
  background: var(--bg);
  padding: 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background 0.15s;
}

section:nth-child(even) .timeline-item {
  background: var(--bg-alt);
}

.timeline-item:hover { background: #fff; }

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.timeline-left { display: flex; align-items: flex-start; gap: 1rem; }

.timeline-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 0.55rem;
  flex-shrink: 0;
}

.dot-purple { background: var(--purple); }
.dot-pink   { background: var(--pink); }
.dot-teal   { background: var(--teal); }
.dot-orange { background: var(--orange); }

.timeline-role {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--text-2);
  font-weight: 500;
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contract-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
  border: 1.5px solid var(--pink);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.timeline-date {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  padding-top: 0.3rem;
}

.timeline-note {
  font-size: 0.875rem;
  color: var(--text-3);
  font-style: italic;
}

.timeline-para {
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.75;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  border: 1.5px solid transparent;
  letter-spacing: 0.01em;
}

.tag-purple { color: var(--purple); border-color: rgba(109,40,217,0.25); background: rgba(109,40,217,0.06); }
.tag-pink   { color: var(--pink);   border-color: rgba(219,39,119,0.25); background: rgba(219,39,119,0.06); }
.tag-teal   { color: var(--teal);   border-color: rgba(8,145,178,0.25);  background: rgba(8,145,178,0.06); }
.tag-orange { color: var(--orange); border-color: rgba(234,88,12,0.25);  background: rgba(234,88,12,0.06); }

/* ── Work ─────────────────────────────────────────────────── */
.work-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.work-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
  line-height: 1.25;
}

.work-desc {
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.7;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.work-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
  transition: opacity 0.15s;
}

.work-link:hover { opacity: 0.7; }

/* Featured card */
.work-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.work-featured-img {
  min-height: 340px;
  display: block;
  position: relative;
  overflow: hidden;
}

.work-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.work-featured-img:hover img { transform: scale(1.02); }

.work-featured-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.work-featured-img:hover .work-featured-img-overlay { opacity: 1; }

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  letter-spacing: 0.01em;
}

.work-featured-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.work-featured-body .work-desc { margin-top: 0.65rem; }

/* Work grid */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.work-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}

.work-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.work-card-img {
  height: 200px;
  overflow: hidden;
}

.work-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.3s ease;
}

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

/* Phone screenshots — center crop looks better than top */
.work-card-img--phone img { object-position: center top; }

.work-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work-card-body .work-desc { margin-top: 0.6rem; flex: 1; }

/* Image placeholders */
.img-placeholder {
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 0.8rem;
  font-weight: 500;
}

.img-placeholder--ck { background: linear-gradient(135deg, #f5f3ff, #ddd6fe); }

/* Press strip */
.work-press {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.work-press .press-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

.press-apps {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.press-app {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

a.press-app:hover .press-app-name { color: var(--purple); }

.press-app-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.15s;
}

.press-app-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple);
}

.press-app-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

.press-app-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  object-position: 50% 42%;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: block;
  cursor: zoom-in;
}

/* indigo tag (for Crota Timer) */
.tag-indigo { color: var(--indigo); border-color: rgba(99,102,241,0.25); background: rgba(99,102,241,0.06); }
/* green tag (TestBash) */
.tag-green  { color: var(--green);  border-color: rgba(5,150,105,0.25);  background: rgba(5,150,105,0.06); }

/* ── Contact ──────────────────────────────────────────────── */
.contact-inner {
  max-width: 640px;
}

.contact-intro {
  color: var(--text-2);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.contact-links {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-links a {
  font-size: 0.875rem;
  color: var(--text-2);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

.contact-links a:hover {
  color: var(--purple);
  border-color: var(--purple);
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-3);
}

.footer-retro {
  margin-top: 0.6rem;
  font-size: 0.78rem;
}

.footer-retro a {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.footer-retro a:hover { color: var(--purple); }

/* ── Easter egg ───────────────────────────────────────────── */
@keyframes flamein  { from { opacity: 0; transform: scale(0.8) rotate(-3deg); } to { opacity: 1; transform: scale(1) rotate(0deg); } }
@keyframes textpop  { 0% { transform: scale(0) rotate(-10deg); } 70% { transform: scale(1.1) rotate(2deg); } 100% { transform: scale(1) rotate(0deg); } }

#flavor-town {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: radial-gradient(ellipse at center, #7a0000 0%, #3a0000 50%, #000 100%);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#flavor-town.open { display: flex; }

#flavor-town-inner {
  text-align: center;
  animation: flamein 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#flavor-town-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ff6a00;
  text-shadow: 0 0 30px #ff6a00, 0 0 60px #ff3300;
  margin-bottom: 1.5rem;
  animation: textpop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

#flavor-town-img {
  max-width: min(480px, 90vw);
  max-height: 55vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 0 60px rgba(255, 106, 0, 0.6), 0 0 120px rgba(255, 50, 0, 0.3);
  display: block;
  margin: 0 auto;
}

#flavor-town-sub {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: rgba(255, 106, 0, 0.5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}

/* ── Lightbox ─────────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

#lightbox.open { display: flex; }

#lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  cursor: default;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-stats { flex-direction: row; }
  .about-stat { flex: 1; }
}

@media (max-width: 640px) {
  .nav-links li:first-child,
  .nav-links li:nth-child(2) { display: none; }

  .hero-inner { padding: 4rem 1.5rem 5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { display: flex; justify-content: center; }
  .about-photo img { max-width: 240px; }
  .section-inner { padding: 0 1.5rem; }
  section { padding: 4rem 0; }

  .expertise-grid { grid-template-columns: 1fr; }
  .about-stats { flex-direction: column; }

  .timeline-item { padding: 1.5rem; }
  .timeline-header { flex-direction: column; gap: 0.25rem; }

  .work-featured { grid-template-columns: 1fr; }
  .work-featured-img { min-height: 220px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-press { grid-template-columns: 1fr; gap: 1.5rem; }
  .press-divider { display: none; }

  .hero-cta { flex-direction: column; }
  .btn { justify-content: center; }
  .contact-links { gap: 1.25rem; }
}
