/* ============================================================
   kflo.design -- Kevin Flores BIM Coordinator Portfolio
   Static site stylesheet (no Webflow wrapper)

   TABLE OF CONTENTS
   -----------------
    1. Variables & Reset .............. L21
    2. Body ........................... L26
    3. Nav ............................ L35
    4. Layout (wrap, section, head) ... L68
    5. Hero ........................... L95
    6. Stats strip .................... L169
    7. Cards & grid ................... L202
    8. About teaser ................... L277
    9. Process strip .................. L329
   10. Page headers (kf-ph) ........... L372
   11. About page ..................... L386
   12. Contact ........................ L429
   13. Footer ......................... L457
   14. Reveal animation ............... L470
   15. Project detail ................. L482
       - Hero image ................... L484
       - Header ....................... L486
       - Gallery ...................... L493
       - Content layout ............... L503
       - Prose ........................ L507
       - Outcome callout .............. L517
       - Sidebar ...................... L522
       - Prev/next nav ................ L529
   ============================================================ */

:root {
  --bg:      #F3EFE7;
  --bg-w:    #FFFFFF;
  --fg:      #1B2841;
  --fg-2:    #4A4A4A;
  --fg-3:    #8C8C8C;
  --red:     #BF5327;
  --border:  #E4E2DC;
  --nav-h:   64px;
  --max-w:   1160px;
  --pad:     clamp(20px, 5vw, 64px);
  --font:    'Inter', system-ui, -apple-system, sans-serif;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
ul { list-style: none; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
}

/* -- Nav ---------------------------------------------------- */
#kf-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(243,239,231,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
#kf-logo {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.03em;
}
#kf-nav-links {
  display: flex;
  gap: 32px;
}
#kf-nav-links a {
  font-size: 14px;
  color: var(--fg-2);
  transition: color 0.2s;
}
#kf-nav-links a:hover,
#kf-nav-links a.kf-active { color: var(--fg); }

/* -- Layout ------------------------------------------------- */
.kf-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.kf-section { padding: 80px 0; }
.kf-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.kf-section-head h2 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.kf-link-arrow {
  font-size: 13px;
  color: var(--fg-3);
  transition: color 0.2s;
}
.kf-link-arrow:hover { color: var(--fg); }

/* -- Hero --------------------------------------------------- */
#kf-hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: #050a0e;
}
#kf-point-cloud {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* legacy bg block kept for non-JS fallback — hidden when canvas present */
#kf-hero-bg {
  position: absolute;
  inset: 0;
  display: none;
}
#kf-hero-bg img {
  object-position: center 40%;
  transition: transform 10s ease-out;
}
#kf-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.12) 60%,
    rgba(0,0,0,0.0)  100%
  );
}
#kf-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) 72px;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  color: white;
}
.kf-eye {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 18px;
}
#kf-hero-content h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  max-width: 720px;
}
.kf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 2px;
  transition: all 0.25s var(--ease);
  letter-spacing: 0.03em;
}
.kf-btn-white {
  background: white;
  color: var(--fg);
}
.kf-btn-white:hover {
  background: var(--bg);
  transform: translateX(5px);
}

/* -- Stats strip ------------------------------------------- */
.kf-stats {
  background: var(--fg);
  padding: 40px 0;
}
.kf-stats .kf-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 680px) { .kf-stats .kf-wrap { grid-template-columns: repeat(2, 1fr); gap: 32px 0; } }
.kf-stat {
  padding: 0 24px;
  border-left: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}
.kf-stat:first-child { border-left: none; padding-left: 0; }
.kf-stat-num {
  display: block;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 300;
  color: white;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
  animation: kfStatIn 0.7s cubic-bezier(0.16,1,0.3,1) both;
  animation-play-state: paused;
}
/* JS adds .kf-visible to .kf-stats when it scrolls into view */
.kf-stats.kf-visible .kf-stat:nth-child(1) .kf-stat-num { animation-play-state: running; animation-delay: 0s; }
.kf-stats.kf-visible .kf-stat:nth-child(2) .kf-stat-num { animation-play-state: running; animation-delay: 0.15s; }
.kf-stats.kf-visible .kf-stat:nth-child(3) .kf-stat-num { animation-play-state: running; animation-delay: 0.30s; }
.kf-stats.kf-visible .kf-stat:nth-child(4) .kf-stat-num { animation-play-state: running; animation-delay: 0.45s; }
@keyframes kfStatIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kf-stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* -- Cards -------------------------------------------------- */
.kf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 680px) { .kf-grid { grid-template-columns: 1fr; } }

.kf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .kf-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .kf-grid-3 { grid-template-columns: 1fr; } }

.kf-card {
  background: var(--bg-w);
  border-radius: 3px;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.kf-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 56px rgba(0,0,0,0.12);
}
.kf-card a { display: block; }
.kf-card-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(90deg, #E2DED8 25%, #EDEAE4 50%, #E2DED8 75%);
  background-size: 200% 100%;
  animation: kfShimmer 1.8s ease-in-out infinite;
}
.kf-card-img.kf-img-rdy { animation: none; background: #D8D6D0; }
.kf-card-img img { transition: opacity 0.5s ease, transform 0.5s var(--ease); }
.kf-card:hover .kf-card-img img { transform: scale(1.05); }
.kf-tag {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: white;
  color: var(--fg);
  padding: 4px 8px;
  border-radius: 2px;
}
.kf-card-body { padding: 20px 20px 24px; }
.kf-card-body h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.kf-card-body p {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.55;
}
.kf-card-body .kf-card-meta {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 10px;
}

/* -- Feature card (wide) ----------------------------------- */
.kf-card-wide { grid-column: span 2; }
.kf-card-wide .kf-card-img { aspect-ratio: 21 / 9; }
@media (max-width: 680px) { .kf-card-wide { grid-column: span 1; } }

/* -- About teaser ------------------------------------------ */
.kf-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 680px) { .kf-about-grid { grid-template-columns: 1fr; gap: 36px; } }

.kf-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}
.kf-about-grid h2 {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.kf-about-grid p {
  font-size: 15px;
  color: var(--fg-2);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 480px;
}
.kf-btn-line {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  border-bottom: 1.5px solid var(--fg);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.kf-btn-line:hover { color: var(--red); border-color: var(--red); }

.kf-skills li {
  padding: 11px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--fg-2);
  transition: color 0.2s;
}
.kf-skills li:last-child { border-bottom: 1px solid var(--border); }
.kf-skills li:hover { color: var(--fg); }

/* -- Process strip ----------------------------------------- */
.kf-process {
  background: var(--fg);
  padding: 72px 0;
}
.kf-process-head { margin-bottom: 48px; }
.kf-process-head .kf-label { color: rgba(255,255,255,0.45); }
.kf-process-head h2 {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 300;
  color: white;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 560px;
}
.kf-process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 760px) { .kf-process-steps { grid-template-columns: repeat(2, 1fr); gap: 32px 0; } }
@media (max-width: 480px) { .kf-process-steps { grid-template-columns: 1fr; } }
.kf-step { padding: 0 28px 0 0; position: relative; }
.kf-step::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--red);
  margin-bottom: 18px;
}
.kf-step-num {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 10px;
}
.kf-step h3 { font-size: 14px; font-weight: 500; color: white; margin-bottom: 10px; letter-spacing: -0.01em; }
.kf-step p { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.6; }

/* -- Page headers ------------------------------------------ */
.kf-ph {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.kf-ph h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 12px;
}
.kf-ph-sub { font-size: 15px; color: var(--fg-2); }

/* -- About page -------------------------------------------- */
.kf-about-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 80px;
  padding: 64px 0 96px;
}
@media (max-width: 860px) { .kf-about-body { grid-template-columns: 1fr; gap: 48px; } }
.kf-prose p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--fg-2);
  margin-bottom: 22px;
  max-width: 560px;
}
.kf-prose p strong { color: var(--fg); font-weight: 500; }
.kf-prose h2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.kf-prose h2:first-child { margin-top: 0; }
.kf-sidebar h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 12px;
  margin-top: 36px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.kf-sidebar h3:first-child { margin-top: 0; }
.kf-sidebar li { font-size: 14px; color: var(--fg-2); padding: 9px 0; border-bottom: 1px solid var(--border); }
.kf-sidebar li:last-child { border-bottom: none; }

/* -- Contact ----------------------------------------------- */
.kf-contact-wrap {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 80px;
  min-height: 40vh;
}
.kf-contact-wrap h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 300;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.kf-contact-sub { font-size: 16px; color: var(--fg-2); margin-bottom: 48px; max-width: 480px; line-height: 1.6; }
.kf-contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  color: var(--fg);
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  max-width: 480px;
  transition: color 0.2s;
}
.kf-contact-link:first-of-type { border-top: 1px solid var(--border); }
.kf-contact-link:hover { color: var(--red); }
.kf-contact-link span { color: var(--fg-3); font-size: 18px; }

/* -- Footer ------------------------------------------------ */
#kf-footer { background: #1B2841; padding: 40px 0; }
#kf-footer .kf-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
#kf-footer .kf-fg { font-size: 13px; color: rgba(255,255,255,0.45); }
.kf-foot-links { display: flex; gap: 24px; }
.kf-foot-links a { font-size: 13px; color: rgba(255,255,255,0.45); transition: color 0.2s; }
.kf-foot-links a:hover { color: white; }

/* -- Shimmer keyframe -------------------------------------- */
@keyframes kfShimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

/* -- Hero entrance ----------------------------------------- */
.kf-eye  { opacity:0; animation: kfHeroIn 0.7s 0.10s var(--ease) forwards; }
#kf-hero-content h1   { opacity:0; animation: kfHeroIn 0.8s 0.25s var(--ease) forwards; }
#kf-hero-content .kf-btn { opacity:0; animation: kfHeroIn 0.7s 0.45s var(--ease) forwards; }
@keyframes kfHeroIn {
  from { opacity:0; transform: translateY(18px); }
  to   { opacity:1; transform: none; }
}

/* Point cloud canvas fades in once scene is ready */
#kf-point-cloud { opacity:0; transition: opacity 1.4s ease; }
#kf-point-cloud.kf-ready { opacity:1; }

/* -- Reveal ------------------------------------------------ */
.kf-r {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.kf-r.in { opacity: 1; transform: none; }
.kf-r:nth-child(2) { transition-delay: 0.08s; }
.kf-r:nth-child(3) { transition-delay: 0.16s; }
.kf-r:nth-child(4) { transition-delay: 0.24s; }
.kf-r:nth-child(5) { transition-delay: 0.32s; }
.kf-r:nth-child(6) { transition-delay: 0.40s; }
.kf-r:nth-child(7) { transition-delay: 0.48s; }
.kf-r:nth-child(8) { transition-delay: 0.56s; }

/* -- Project Detail ---------------------------------------- */
#kf-project-hero { width:100%; height:60vh; min-height:320px; overflow:hidden; margin-top:var(--nav-h); position:relative; }
#kf-project-hero img { width:100%; height:100%; object-fit:cover; object-position:center; }
.kf-project-header { padding:40px 0 32px; border-bottom:1px solid var(--border); }
.kf-back { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--fg-3); margin-bottom:24px; transition:color 0.2s; }
.kf-back:hover { color:var(--fg); }
.kf-project-header h1 { font-size:clamp(26px,4vw,48px); font-weight:400; line-height:1.12; margin:8px 0 16px; letter-spacing:-0.02em; }
.kf-project-meta { display:flex; flex-wrap:wrap; gap:6px 0; font-size:14px; color:var(--fg-2); }
.kf-project-meta span+span::before { content:'\00a0\00b7\00a0'; color:var(--fg-3); }

/* Project gallery strip */
.kf-gallery { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:32px 0; }
@media (max-width: 680px) { .kf-gallery { grid-template-columns: 1fr; } }
.kf-gallery-img {
  aspect-ratio:4/3; overflow:hidden; border-radius:2px;
  background: linear-gradient(90deg, #E2DED8 25%, #EDEAE4 50%, #E2DED8 75%);
  background-size: 200% 100%;
  animation: kfShimmer 1.8s ease-in-out infinite;
}
.kf-gallery-img.kf-img-rdy { animation: none; background: #D8D6D0; }
.kf-gallery-img img { transition: opacity 0.5s ease, transform 0.5s var(--ease); }
.kf-gallery-img:hover img { transform: scale(1.04); }
.kf-lb-btn { display:block; width:100%; height:100%; background:none; border:none; padding:0; cursor:zoom-in; }

/* Lightbox */
#kf-lb { display:flex; position:fixed; inset:0; background:rgba(0,0,0,.92); z-index:9999; align-items:center; justify-content:center; padding:24px; cursor:zoom-out; opacity:0; pointer-events:none; transition:opacity 0.25s ease; }
#kf-lb.open { opacity:1; pointer-events:auto; }
#kf-lb-img { max-width:92vw; max-height:90vh; width:auto; height:auto; object-fit:contain; border-radius:2px; cursor:default; box-shadow:0 8px 48px rgba(0,0,0,.6); transform:scale(0.94); opacity:0; transition:transform 0.3s cubic-bezier(0.16,1,0.3,1), opacity 0.25s ease; }
#kf-lb.open #kf-lb-img { transform:scale(1); opacity:1; }
#kf-lb-x { position:fixed; top:16px; right:20px; background:none; border:none; color:#fff; font-size:32px; line-height:1; cursor:pointer; opacity:.6; transition:opacity .15s; padding:4px 8px; }
#kf-lb-x:hover { opacity:1; }
.kf-gallery-wide { grid-template-columns: 2fr 1fr; }
@media (max-width: 680px) { .kf-gallery-wide { grid-template-columns: 1fr; } }
.kf-gallery-wide .kf-gallery-img:first-child { aspect-ratio: 16/9; }

/* Project content layout */
.kf-project-layout { display:grid; grid-template-columns:1fr 300px; gap:64px; padding:48px 0 80px; }
@media(max-width:820px) { .kf-project-layout { grid-template-columns:1fr; gap:40px; } }

/* Prose */
.kf-detail-prose h2 { font-size:11px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:var(--fg-3); margin:36px 0 14px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.kf-detail-prose h2:first-child { margin-top:0; }
.kf-detail-prose p { color:var(--fg-2); margin-bottom:18px; line-height:1.8; font-size:15px; max-width:560px; }
.kf-detail-prose strong { color:var(--fg); font-weight:500; }
.kf-detail-prose ul { margin-bottom:18px; }
.kf-detail-prose li { font-size:14px; color:var(--fg-2); padding:10px 0 10px 18px; border-bottom:1px solid var(--border); line-height:1.55; position:relative; }
.kf-detail-prose li:first-child { border-top:1px solid var(--border); }
.kf-detail-prose li::before { content:''; position:absolute; left:0; top:18px; width:5px; height:5px; background:var(--red); border-radius:50%; }

/* Outcome callout */
.kf-outcome { background:#F0EEE9; border-left:3px solid var(--red); padding:20px 24px; margin:28px 0; border-radius:0 2px 2px 0; }
.kf-outcome-label { font-size:10px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:var(--red); margin-bottom:8px; }
.kf-outcome p { font-size:14px; color:var(--fg-2); line-height:1.65; margin:0; max-width:none; }
.kf-team { font-size:13px; color:var(--fg); opacity:0.55; line-height:2; margin:0; }

/* Sidebar */
.kf-detail-sb-item { margin-bottom:24px; }
.kf-detail-sb-item h3 { font-size:10px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:var(--fg-3); margin-bottom:6px; }
.kf-detail-sb-item p { font-size:14px; color:var(--fg-2); line-height:1.5; }
.kf-detail-sb-item li { font-size:13px; color:var(--fg-2); padding:5px 0; border-bottom:1px solid var(--border); }
.kf-detail-sb-item li:first-child { border-top:1px solid var(--border); }

/* Prev/next nav */
.kf-proj-nav { display:grid; grid-template-columns:1fr 1fr; gap:2px; border-top:1px solid var(--border); margin-top:48px; }
@media (max-width: 540px) { .kf-proj-nav { grid-template-columns: 1fr; } }
.kf-proj-nav-item { padding:28px 24px; background:var(--bg-w); transition:background 0.2s; }
.kf-proj-nav-item:hover { background:#EEECEA; }
.kf-proj-nav-dir { font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--fg-3); margin-bottom:6px; }
.kf-proj-nav-title { font-size:15px; font-weight:500; color:var(--fg); }
.kf-proj-nav-item.next { text-align:right; }
