/* ==========================================
   ROOT & RESET
   ========================================== */
:root {
  --bg:          #0a0a0a;
  --bg-2:        #111111;
  --bg-3:        #181818;
  --border:      rgba(255, 255, 255, 0.07);
  --text:        #e8e6e1;
  --text-muted:  #6b6b6b;
  --text-soft:   #a0a0a0;

  /* ── Gold accent ── */
  --accent:      #c9a84c;
  --accent-dim:  rgba(201, 168, 76, 0.12);
  --accent-glow: rgba(201, 168, 76, 0.18);

  --font-display: 'Syne', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --nav-h:        64px;
  --radius:       4px;
  --max-w:        1100px;
  --transition:   0.25s ease;
}

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

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

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ==========================================
   NAV
   ========================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

/* logo.png image in the nav */
.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Fallback text shown if logo.png fails */
.nav-logo-fallback {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

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

.nav-links a {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 5rem) 2rem 0;
  overflow: hidden;
}

/* Gradient background — replaces the grid */
.hero-glow {
  position: absolute;
  inset: 0;
  /* Deep radial gradient with a faint warm glow at top-centre */
  background:
    radial-gradient(ellipse 70% 55% at 50% -10%,  rgba(201,168,76,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 100% 60% at 80% 100%, rgba(201,168,76,0.04) 0%, transparent 60%),
    linear-gradient(180deg, #0f0e0b 0%, #0a0a0a 60%);
  pointer-events: none;
}

/* Hero layout: headshot left, text right */
.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: flex;
  gap: 4rem;
  align-items: flex-start;
  animation: fadeUp 0.8s ease both;
}

/* ── Headshot ── */
.headshot-wrap {
  flex-shrink: 0;
  width: 200px;
}

.headshot-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.headshot-placeholder svg {
  width: 56px; height: 56px;
}

.headshot-placeholder span {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0 0.5rem;
}

/* Real photo — swap out the placeholder div for this class */
.headshot-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}

/* ── Hero text column ── */
.hero-text { flex: 1; min-width: 0; }

.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 1.75rem;
}

.divider { margin: 0 0.5rem; opacity: 0.4; }

.hero-bio {
  max-width: 580px;
  font-size: 0.87rem;
  color: var(--text-soft);
  line-height: 1.85;
  margin-bottom: 2rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.25rem;
}

.hero-tags span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  background: var(--bg-2);
  transition: border-color var(--transition), color var(--transition);
}
.hero-tags span:hover { border-color: var(--accent); color: var(--accent); }

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
  font-weight: 700;
}
.btn-primary:hover { background: transparent; color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-full { width: 100%; text-align: center; }

/* ==========================================
   TICKER  — seamless infinite scroll
   ========================================== */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  margin-top: 5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* Fade edges */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%);
}

.ticker-track {
  display: flex;
  width: max-content;
  /* animation is applied by JS once the clone is in place */
}

.ticker-set {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}

.tool-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 1.5rem;
  transition: color var(--transition);
}
.tool-item:hover { color: var(--accent); }

/* Real brand logo fetched from cdn.simpleicons.org */
.tool-icon-img {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  flex-shrink: 0;
  display: block;
}

/* Wrapper for hand-drawn fallback SVGs */
.tool-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-icon-wrap .tool-icon-svg,
.tool-icon-wrap svg {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  display: block;
}

/* Text badge shown when CDN fetch fails entirely */
.tool-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  font-size: 0.55rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.tool-label { white-space: nowrap; }

.ticker-sep {
  color: var(--accent);
  font-size: 0.9rem;
  opacity: 0.5;
  user-select: none;
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==========================================
   SECTIONS — SHARED
   ========================================== */
.projects,
.contact {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 7rem 2rem;
}

.section-header { margin-bottom: 4rem; }

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

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ==========================================
   PROJECTS
   ========================================== */
.project-category { margin-bottom: 5rem; }

.category-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
}
.category-title .accent { font-size: 0.75rem; margin-right: 0.75rem; }

/* ── Carousel shell ── */
.carousel-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.carousel-viewport {
  overflow: hidden;
}

/* The grid itself — JS hides/shows cards; gap between visible cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

/* Carousel navigation row */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.carousel-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.carousel-btn:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
}
.carousel-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.carousel-counter {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}

.project-card {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.25s ease;
}
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover   { background: var(--bg-3); }

/* ── Slideshow ── */
.project-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-2);
  flex-shrink: 0;
}

.slide-display {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Placeholder shown while real images are absent / loading */
.slideshow-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-2);
}
.slideshow-placeholder svg {
  width: 56px; height: auto; opacity: 0.4;
}
.slideshow-placeholder span {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* Real images injected by JS */
.slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.slide-img.active { opacity: 1; }

/* Arrow buttons */
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10,10,10,0.65);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  width: 32px; height: 32px;
  border-radius: 2px;
  cursor: pointer;
  display: none;           /* shown by JS when images are ready */
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  z-index: 2;
  line-height: 1;
}
.slide-btn:hover { background: var(--accent); border-color: var(--accent); color: #0a0a0a; }
.slide-prev { left: 8px; }
.slide-next { right: 8px; }

/* Counter e.g. "2 / 3" */
.slide-counter {
  position: absolute;
  bottom: 8px; right: 10px;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: rgba(10,10,10,0.6);
  padding: 2px 6px;
  border-radius: 2px;
  display: none;
  z-index: 2;
}

/* ── Card body ── */
.project-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.project-card-top { display: flex; flex-direction: column; gap: 0.4rem; }

.project-tag {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

.project-card p {
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.8;
  flex: 1;
}

.project-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}
.project-skills span {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 2px;
}

/* ==========================================
   CONTACT
   ========================================== */
.contact-intro {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-left {
  display: flex;
  flex-direction: column;
}

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 4rem;
  align-items: start;
}

.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-group label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.85rem 1rem;
  transition: border-color var(--transition);
  resize: vertical;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-status {
  font-size: 0.75rem;
  color: var(--accent);
  min-height: 1em;
  letter-spacing: 0.05em;
}

.contact-info { display: flex; flex-direction: column; gap: 2rem; }

.contact-item { display: flex; flex-direction: column; gap: 0.35rem; }

.contact-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-item a, .contact-item span {
  font-size: 0.85rem;
  color: var(--text-soft);
  transition: color var(--transition);
}
.contact-item a:hover { color: var(--accent); }

.contact-socials { display: flex; flex-direction: column; gap: 0.75rem; }

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  transition: border-color var(--transition), color var(--transition);
}
.social-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.social-link:hover { color: var(--accent); border-color: var(--accent); }

.capabilities-box {
  padding: 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.capabilities-title {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.capabilities-box ul { display: flex; flex-direction: column; gap: 0.5rem; }
.capabilities-box li {
  font-size: 0.78rem;
  color: var(--text-soft);
  padding-left: 1rem;
  position: relative;
}
.capabilities-box li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.footer p {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-maple {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.75;
}

/* ==========================================
   UTILITIES
   ========================================== */
.accent { color: var(--accent); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 900px) {
  .hero-content { flex-direction: column; gap: 2rem; }
  .headshot-wrap { width: auto; }
  .headshot-placeholder, .headshot-img { width: 160px; height: 160px; }
  .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1.5rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .hero { padding-top: calc(var(--nav-h) + 3rem); }

  .project-grid { grid-template-columns: 1fr; }
}
