/* ============================================================
   Design tokens — change colors/fonts here
   ============================================================ */
:root {
  /* Colors */
  --bg:           #FAFAF8;   /* warm off-white */
  --bg-card:      #FFFFFF;
  --bg-subtle:    #F5F5F2;
  --text:         #111827;
  --text-muted:   #6B7280;
  --text-light:   #9CA3AF;
  --accent:       #D97706;   /* amber-600 */
  --accent-dark:  #B45309;   /* amber-700 — hover state */
  --accent-bg:    #FEF3C7;   /* amber-50 */
  --accent-text:  #92400E;   /* amber-800 */
  --border:       #E5E7EB;
  --border-hover: #D1D5DB;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --shadow:     0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);

  /* Shape */
  --radius:     12px;
  --radius-sm:  8px;
  --radius-pill: 9999px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Layout */
  --max-w:  800px;
  --nav-h:  64px;
  --pad-x:  24px;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.modal-open { overflow: hidden; }
a      { color: inherit; text-decoration: none; }
ul     { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   Layout helpers
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section { padding: 80px 0; }

/* Border between consecutive content sections (not after hero) */
.section + .section { border-top: 1px solid var(--border); }

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 14px;
}

.section-intro {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 36px;
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(250, 250, 248, 0.80);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.nav.scrolled {
  background: rgba(250, 250, 248, 0.96);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* "Get in Touch" nav button */
.nav-cta {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--accent) !important;
  padding: 6px 14px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s !important;
}
.nav-cta:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

/* Hamburger button (hidden on desktop) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  padding: 0;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.nav-hamburger:hover { background: var(--bg-subtle); }
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile slide-down menu */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 8px 0 16px;
  flex-direction: column;
  z-index: 99;
  box-shadow: var(--shadow);
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 12px var(--pad-x);
  transition: color 0.15s, background 0.15s;
}
.nav-mobile-menu a:hover { color: var(--text); background: var(--bg-subtle); }
.nav-mobile-menu .mobile-cta {
  font-weight: 600;
  color: var(--accent) !important;
  margin-top: 4px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 96px 0 84px;
  position: relative;
  overflow: hidden;
}
/* Subtle dot-grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}
/* Amber glow — top-right */
.hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(217,119,6,0.09) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }

/* Status / availability badge */
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-text);
  background: var(--accent-bg);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
  border: 1px solid rgba(217,119,6,0.18);
}
.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.hero-name {
  font-size: clamp(38px, 5.5vw, 54px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 18px;
}
.hero-headline {
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 560px;
  margin-bottom: 16px;
}
.hero-tagline {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 500px;
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--border-hover); background: var(--bg-card); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding-left: 10px;
  padding-right: 10px;
}
.btn-ghost:hover { color: var(--text); background: var(--bg-subtle); }

/* ============================================================
   Background / Experience section
   ============================================================ */
.highlights-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
}
.highlight-bullet {
  flex-shrink: 0;
  margin-top: 8px;   /* visually align with first text line */
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Company subtitle (e.g. "Pocket Gems" under "War Dragons") */
.company-subtitle {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ============================================================
   Project cards
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.project-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.project-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.project-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.project-media {
  width: 100%;
  height: 176px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(17,24,39,0.04), rgba(217,119,6,0.08)),
    var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 0;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
button.project-media:hover {
  border-color: var(--border-hover);
  box-shadow: inset 0 0 0 1px rgba(217,119,6,0.18);
  transform: translateY(-1px);
}
button.project-media:focus-visible {
  outline: 3px solid rgba(217,119,6,0.28);
  outline-offset: 3px;
}
.project-media-stage {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(17,24,39,0.10);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
button.project-media:hover .project-media-stage {
  transform: scale(1.02);
}
.project-media-stage img,
.project-media-empty {
  display: block;
  width: 100%;
  height: 100%;
}
.project-media-stage img {
  object-fit: cover;
}
.project-media-empty {
  background:
    linear-gradient(135deg, rgba(17,24,39,0.06), rgba(17,24,39,0.01)),
    repeating-linear-gradient(
      135deg,
      rgba(17,24,39,0.05) 0,
      rgba(17,24,39,0.05) 1px,
      transparent 1px,
      transparent 10px
    );
}
.project-media-frame-phone-portrait .project-media-stage {
  width: 82px;
  height: 150px;
  border-radius: 18px;
}
.project-media-frame-phone-landscape .project-media-stage {
  width: min(100%, 250px);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
}
.project-media-frame-desktop .project-media-stage {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
}
.project-media-frame-desktop .project-media-stage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 13px;
  background: rgba(17,24,39,0.08);
  border-bottom: 1px solid rgba(17,24,39,0.08);
  z-index: 1;
}
.project-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.project-description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-text);
  background: var(--accent-bg);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.project-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  margin-top: 2px;
  border-top: 1px solid var(--border);
}
.project-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.15s;
}
.project-link:hover { color: var(--accent-dark); }
.project-link-secondary {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}
.project-link-secondary:hover { color: var(--text); }

/* ============================================================
   Screenshot modal
   ============================================================ */
.screenshot-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.screenshot-modal.open { display: flex; }
.screenshot-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17,24,39,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.screenshot-modal-panel {
  position: relative;
  z-index: 1;
  max-width: min(1040px, 100%);
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.screenshot-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 50%;
  background: rgba(17,24,39,0.92);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  box-shadow: var(--shadow);
}
.screenshot-modal-close:hover { background: #111827; }
.screenshot-modal-close:focus-visible {
  outline: 3px solid rgba(255,255,255,0.42);
  outline-offset: 3px;
}
.screenshot-modal-stage {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 24px 80px rgba(0,0,0,0.36);
}
.screenshot-modal-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.screenshot-modal-stage-phone-portrait {
  height: min(82vh, 820px);
  aspect-ratio: 9 / 19.5;
  border-radius: 32px;
}
.screenshot-modal-stage-phone-landscape {
  width: min(92vw, 1040px);
  aspect-ratio: 16 / 9;
  border-radius: 22px;
}
.screenshot-modal-stage-desktop {
  width: min(92vw, 1040px);
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
}
.screenshot-modal-stage-desktop::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  background: rgba(17,24,39,0.08);
  border-bottom: 1px solid rgba(17,24,39,0.08);
  z-index: 1;
}

/* ============================================================
   What I'm Looking For — role cards
   ============================================================ */
.roles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: box-shadow 0.2s;
}
.role-card:hover { box-shadow: var(--shadow-sm); }
.role-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 7px;
}
.role-description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.footer-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }
.footer-dot { color: var(--border-hover); font-size: 12px; }
.footer-tagline { font-size: 13px; color: var(--text-light); font-style: italic; }
.footer-copy    { font-size: 12px; color: var(--text-light); }

/* ============================================================
   Responsive — single breakpoint at 640px
   ============================================================ */
@media (max-width: 640px) {
  .nav-links     { display: none; }
  .nav-hamburger { display: flex; }

  .hero    { padding: 64px 0 60px; }
  .section { padding: 56px 0; }

  .section-title { font-size: 24px; }
  .section-intro { font-size: 15px; }

  .hero-actions .btn { font-size: 13px; padding: 9px 14px; }

  .projects-grid { grid-template-columns: 1fr; }
  .roles-grid    { grid-template-columns: 1fr; }

  .screenshot-modal {
    padding: 18px;
  }
  .screenshot-modal-close {
    top: 10px;
    right: 10px;
  }
  .screenshot-modal-stage-phone-portrait {
    height: min(82vh, 720px);
  }
  .screenshot-modal-stage-phone-landscape,
  .screenshot-modal-stage-desktop {
    width: 100%;
  }
}
