/* ── Variables ──────────────────────────────────────────────────── */
:root {
  --bg:          #0b0b0b;
  --bg-card:     #111111;
  --bg-card-alt: #161616;
  --text:        #e0e0e0;
  --text-dim:    #888888;
  --text-faint:  #444444;
  --accent:      #e8961e;
  --accent-glow: rgba(232, 150, 30, 0.10);
  --accent-tint: rgba(232, 150, 30, 0.06);
  --border:      #1d1d1d;
  --border-mid:  #2a2a2a;
  --nav-h:       60px;
  /* Set by JS on mousemove */
  --mx: 50vw;
  --my: 50vh;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100dvh;
}

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

/* ── Ambient cursor warm glow ───────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    700px circle at var(--mx) var(--my),
    rgba(232, 150, 30, 0.055) 0%,
    transparent 60%
  );
  transition: background 0.12s ease;
}

/* ── Nav ────────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

#nav.scrolled {
  background: rgba(11, 11, 11, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-color: var(--border);
}

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

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 7px 18px !important;
  border: 1px solid var(--border-mid) !important;
  border-radius: 6px;
  color: var(--text) !important;
  transition: border-color 0.2s, background 0.2s !important;
}
.nav-cta:hover {
  background: var(--bg-card);
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* ── Hero ───────────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 48px) 36px 100px;
  z-index: 1;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(68px, 13vw, 152px);
  line-height: 0.88;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 32px;
  user-select: none;
}

.name-word { display: block; }

/* Blinking block cursor */
.cursor {
  display: inline-block;
  width: 0.065em;
  height: 0.82em;
  background: var(--accent);
  margin-left: 0.04em;
  vertical-align: -0.04em;
  animation: blink 1.15s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-rule {
  width: 44px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(0.875rem, 1.5vw, 1.1rem);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-tagline {
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  color: var(--text-dim);
  max-width: 420px;
  margin-bottom: 44px;
  font-style: italic;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #0b0b0b;
}
.btn-primary:hover {
  background: #f5aa3a;
  box-shadow: 0 8px 24px rgba(232, 150, 30, 0.28);
}

.btn-ghost {
  border: 1px solid var(--border-mid);
  color: var(--text-dim);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: bob 2.8s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0);   }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ── Section Scaffolding ────────────────────────────────────────── */
section { position: relative; z-index: 1; }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px 36px;
}

.section-header { margin-bottom: 60px; }

.section-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text);
}

/* ── Projects Grid ──────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ── Project Card ───────────────────────────────────────────────── */
.project-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-5px);
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(232, 150, 30, 0.07);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Image area */
.card-img-wrap {
  position: relative;
  height: 195px;
  overflow: hidden;
  background: #0d0d0d;
  flex-shrink: 0;
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(75%) brightness(0.55);
  transition: filter 0.45s ease, transform 0.45s ease;
}
.project-card:hover .card-img-wrap img {
  filter: grayscale(5%) brightness(0.82);
  transform: scale(1.05);
}

/* Status badge */
.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.st-live    { background: rgba(34, 197, 94, 0.18);  color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.st-wip     { background: rgba(232, 150, 30, 0.18); color: #f0a030; border: 1px solid rgba(232, 150, 30, 0.3); }
.st-concept { background: rgba(148, 163, 184, 0.13); color: #8899aa; border: 1px solid rgba(148, 163, 184, 0.2); }

/* Card body */
.card-body {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text);
  transition: color 0.2s;
}
.project-card:hover .card-title { color: var(--accent); }

.card-arrow {
  font-size: 1rem;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.project-card:hover .card-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.card-desc {
  font-size: 0.8125rem;
  color: var(--text-dim);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  background: var(--accent-tint);
  color: var(--text-faint);
  border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.project-card:hover .tag {
  background: var(--accent-glow);
  color: var(--text-dim);
  border-color: rgba(232, 150, 30, 0.2);
}

/* ── Contact ────────────────────────────────────────────────────── */
#contact { border-top: 1px solid var(--border); }

.contact-intro {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 36px;
  max-width: 400px;
  font-style: italic;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  max-width: 520px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.contact-link:hover {
  background: var(--bg-card);
  border-color: var(--border);
}

.cl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.cl-icon svg {
  width: 17px;
  height: 17px;
  color: var(--text-faint);
  transition: color 0.2s;
}
.contact-link:hover .cl-icon {
  background: var(--accent-glow);
  border-color: rgba(232, 150, 30, 0.3);
}
.contact-link:hover .cl-icon svg { color: var(--accent); }

.cl-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  width: 68px;
  flex-shrink: 0;
}

.cl-value {
  flex: 1;
  font-size: 0.9375rem;
  color: var(--text);
  transition: color 0.2s;
}
.contact-link:hover .cl-value { color: var(--text); }

.cl-arrow {
  font-size: 1rem;
  color: var(--text-faint);
  transition: color 0.2s, transform 0.2s;
}
.contact-link:hover .cl-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ── Footer ─────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 36px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.footer-copy {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ── Fade-in Animations ─────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 640px) {
  .nav-inner    { padding: 0 20px; }
  .section-inner { padding: 80px 20px; }
  #hero          { padding: calc(var(--nav-h) + 36px) 20px 88px; }
  .projects-grid { grid-template-columns: 1fr; }
  .scroll-cue    { display: none; }
  .hero-ctas     { flex-direction: column; align-items: flex-start; }
  .cl-label      { display: none; }
  .contact-link  { gap: 14px; padding: 16px; }
  /* hide nav text links on very small screens, keep contact CTA */
  .nav-links > a:not(.nav-cta) { display: none; }
}
