/*
 * site.css — Daniel Christian Sanchez · Portfolio
 * Light, corporate-warm palette (Curbd Studios DNA)
 */

:root {
  --bg:        #FDFBF8;
  --surface:   #FFFFFF;
  --surface-2: #F5F1EC;
  --line:      #E8E0D6;
  --line-2:    #D4C9BB;

  --ink:       #1A1410;
  --ink2:      #3D3229;
  --ink3:      #6B5D52;
  --ink4:      #8A7D72;
  --ink5:      #B0A69C;

  --accent:      #8B6F4E;
  --accent-dark: #6E5638;
  --accent-soft: #F5EDE4;

  --status-live:   #5A9E91;
  --status-review: #C4873A;
  --status-gated:  #8B6F4E;

  --shadow-soft: 0 1px 2px rgba(26,20,16,0.04), 0 2px 8px rgba(26,20,16,0.03);
  --shadow-card: 0 1px 2px rgba(9,9,11,0.04), 0 2px 8px rgba(9,9,11,0.03);
  --shadow-lift: 0 20px 40px -15px rgba(26,20,16,0.10);
  --shadow-hover: 0 30px 60px -20px rgba(9,9,11,0.10);
  --accent-ring: rgba(139,111,78,0.12);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-swift: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ═══════════════════════════════════════════════════════════
   MESH GRADIENT — slow-floating warm blobs (Curbd signature)
   ═══════════════════════════════════════════════════════════ */
.mesh-bg { position: relative; overflow: hidden; }
.mesh-bg::before,
.mesh-bg::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
}
.mesh-bg::before {
  width: 620px; height: 620px;
  top: -18%; right: -12%;
  background: radial-gradient(circle, rgba(139,111,78,0.22) 0%, rgba(139,111,78,0.08) 40%, transparent 70%);
  animation: meshBlob1 14s ease-in-out infinite;
}
.mesh-bg::after {
  width: 520px; height: 520px;
  bottom: -22%; left: -8%;
  background: radial-gradient(circle, rgba(90,158,145,0.16) 0%, rgba(90,158,145,0.06) 40%, transparent 70%);
  animation: meshBlob2 18s ease-in-out infinite;
}
.mesh-bg > * { position: relative; z-index: 1; }

@keyframes meshBlob1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-120px, 90px) scale(1.12); }
  50% { transform: translate(80px, -70px) scale(0.92); }
  75% { transform: translate(-60px, -110px) scale(1.08); }
}
@keyframes meshBlob2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(110px, -80px) scale(1.1); }
  50% { transform: translate(-80px, 120px) scale(0.9); }
  75% { transform: translate(140px, 60px) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .mesh-bg::before, .mesh-bg::after { animation: none; }
}

/* Pulse dot — soft breathing on live status indicators */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Satoshi', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* Layout */
.container { max-width: 1120px; margin: 0 auto; padding-left: clamp(1.5rem, 5vw, 4rem); padding-right: clamp(1.5rem, 5vw, 4rem); }
.zone { padding-top: clamp(3.5rem, 7vw, 6rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }

/* Eyebrow label */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

/* Headings */
.h-display {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(42px, 7.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0;
}
.h-section {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 0.75rem;
}
.h-card {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.lead {
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.6;
  color: var(--ink2);
  max-width: 58ch;
  margin: 0;
}

/* Nav */
.nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(253,251,248,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232,224,214,0.7);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 60px;
}
.nav-brand {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.nav-links {
  display: none;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
}
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a { color: var(--ink3); transition: color 0.3s var(--ease); }
.nav-links a:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: 'Satoshi', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: 9999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.4s var(--ease),
              background 0.4s var(--ease),
              box-shadow 0.4s var(--ease),
              color 0.4s var(--ease),
              border-color 0.4s var(--ease);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 2px rgba(9,9,11,0.15);
}
.btn-primary:hover {
  background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 6px 16px -4px var(--accent-ring);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--ink);
  box-shadow: var(--shadow-card);
}
.btn-arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* HERO */
.hero {
  position: relative;
  padding-top: clamp(7rem, 14vw, 10rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1fr auto; gap: 4rem; align-items: center; }
}
.hero-text { max-width: 720px; }
.hero-tagline {
  margin: 1.25rem 0 1.5rem;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.4;
  color: var(--ink2);
  max-width: 34ch;
  font-weight: 500;
}
.hero-sub {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink3);
  max-width: 56ch;
  margin: 0 0 2rem;
}
.hero-sub strong { color: var(--ink2); font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-avatar {
  width: clamp(140px, 18vw, 200px);
  height: clamp(140px, 18vw, 200px);
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  flex-shrink: 0;
}
.hero-avatar img { display: none; }
.hero-avatar.has-photo {
  background-size: 175% auto;
  background-position: 50% 20%;
  background-repeat: no-repeat;
}
.hero-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink5);
  text-align: center;
  letter-spacing: 0.08em;
  padding: 1rem;
}

/* PROJECTS */
.section-header {
  display: flex;
  flex-direction: column;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-header .lead { margin-top: 0.5rem; }

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-soft);
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.project-title-group { display: flex; flex-direction: column; gap: 0.4rem; }

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink3);
}
.project-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0;
}
.project-status.live .dot { background: var(--status-live); animation: pulse-dot 2.4s var(--ease) infinite; }
.project-status.review .dot { background: var(--status-review); animation: pulse-dot 2.4s var(--ease) infinite; }
.project-status.gated .dot { background: var(--status-gated); }

.project-desc {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.55;
  color: var(--ink2);
  margin: 0;
  max-width: 60ch;
}

.project-hook {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink3);
  margin: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  max-width: 70ch;
}
.project-hook strong { color: var(--ink2); font-weight: 600; }

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink2);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.25rem;
  transition: gap 0.3s var(--ease);
}
.project-link:hover { gap: 0.7rem; color: var(--accent-dark); }
.project-link.disabled {
  color: var(--ink4);
  pointer-events: none;
  opacity: 0.9;
}
.project-link.disabled::before {
  content: '◴';
  margin-right: 0.45rem;
  color: var(--status-review);
  font-size: 13px;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (min-width: 800px) { .about-grid { grid-template-columns: 1fr 1.4fr; } }
.about-aside {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.about-body p { font-size: 16.5px; line-height: 1.75; color: var(--ink2); margin: 0 0 1.25rem; max-width: 64ch; }
.about-body p strong { color: var(--ink); font-weight: 600; }
.about-body p:last-child { margin-bottom: 0; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
}
.stat-num {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink3);
  margin-top: 0.5rem;
}

/* CONTACT */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow-soft);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 700px) { .contact-grid { grid-template-columns: 1fr auto; } }
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.5rem;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--ink2);
  transition: color 0.3s var(--ease);
}
.contact-link:hover { color: var(--accent); }
.contact-link .arrow { color: var(--ink4); transition: transform 0.3s var(--ease), color 0.3s var(--ease); }
.contact-link:hover .arrow { transform: translate(2px, -2px); color: var(--accent); }
.contact-ctas { display: flex; flex-direction: column; gap: 0.6rem; min-width: 200px; }
.contact-ctas .btn { justify-content: center; }

/* FOOTER */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--ink4);
}
.footer-inner a { color: var(--ink4); transition: color 0.3s var(--ease); }
.footer-inner a:hover { color: var(--ink); }

/* Fade-up — visible by default; JS adds .js-animate-ready to hide-then-reveal */
.fade-up { opacity: 1; transform: none; }
.js-animate-ready .fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.js-animate-ready .fade-up.in { opacity: 1; transform: translateY(0); }
.d-1 { transition-delay: 0.06s; }
.d-2 { transition-delay: 0.16s; }
.d-3 { transition-delay: 0.28s; }
.d-4 { transition-delay: 0.42s; }

/* Responsive cleanup */
@media (max-width: 899px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-avatar { order: -1; }
}
@media (max-width: 600px) {
  .about-stats { grid-template-columns: 1fr 1fr; }
  .hero-ctas { width: 100%; }
  .hero-ctas .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
