/* ════════════════════════════════════════════════
   Fernando Beato Portfolio — styles.css
   Shared across index.html and project.html
   ════════════════════════════════════════════════ */

/* ─── VARIABLES ─────────────────────────────────── */
:root {
  /* --bg:        #F7F6F3; */
  --bg:        #EBF1F7;
  --surface:   #FFFFFF;
  --border:    #E0DDD6;
  --text:      #1A1A1A;
  --muted:     #6B6860;
  --accent:    #1D4F7C;
  --accent-lt: #C4D8E8;
  --gold:      #B8860B;
  --radius:    6px;
  --max:       1100px;
  --font-head: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

/* ─── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── NAV ────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,246,243,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.nav-inner { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 58px; }
.nav-logo { font-family: var(--font-head); font-size: 1.1rem; color: var(--text); }
.nav-links { display: flex; gap: 1.8rem; list-style: none; font-size: 0.875rem; font-weight: 500; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* ─── SHARED LAYOUT ──────────────────────────────── */
.section { padding: 5rem 2rem; max-width: var(--max); margin: 0 auto; }
.section-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.75rem; }
.section-title { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; margin-bottom: 1.25rem; }
.divider { border: none; border-top: 1px solid var(--border); }

/* ─── BUTTONS ────────────────────────────────────── */
.btn { display: inline-block; padding: 0.65rem 1.4rem; border-radius: var(--radius); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.15s; border: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #163d61; text-decoration: none; }
.btn-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent-lt); text-decoration: none; }
.btn-white { background: #fff; color: var(--accent); }
.btn-white:hover { background: #EBF1F7; text-decoration: none; }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.4); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); text-decoration: none; }

/* ─── HERO ───────────────────────────────────────── */
#hero { padding: 7rem 4.5rem 5rem; max-width: var(--max); margin: 0 auto; }
.hero-tag { display: inline-block; background: var(--accent-lt); color: var(--accent); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 12px; border-radius: 100px; margin-bottom: 1.5rem; }
.hero-name { font-family: var(--font-head); font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.hero-role { font-family: var(--font-head); font-style: italic; font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: var(--muted); margin-bottom: 2rem; }
.hero-pitch { max-width: 920px; font-size: 1.05rem; color: #3A3A3A; line-height: 1.75; margin-bottom: 2.5rem; border-left: 3px solid var(--accent); padding-left: 1.25rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── STATS ──────────────────────────────────────── */
.stats-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); padding: 1.5rem 2rem; }
.stats-inner { max-width: var(--max); margin: 0 auto; display: flex; gap: 3rem; flex-wrap: wrap; }
.stat-number { font-family: var(--font-head); font-size: 1.8rem; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ─── PROJECT CARDS (index.html) ─────────────────── */
.projects-grid { display: grid; gap: 1rem; margin-top: 2.5rem; }
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.5rem;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.project-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); border-color: #c8c4bc; }
.project-card.wip { border-left: 3px solid var(--gold); }
.project-body { flex: 1; }
.project-company { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.3rem; }
.project-title { font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 0.5rem; }
.project-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.55; margin-bottom: 0.75rem; }
.project-outcome { font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.project-link { flex-shrink: 0; align-self: center; font-size: 0.8rem; font-weight: 600; color: var(--accent); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.project-link:hover { text-decoration: none; color: #163d61; }
.project-link::after { content: '→'; }
.wip-badge { display: inline-block; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; background: #FFF8EC; color: var(--gold); border: 1px solid #f0d88a; border-radius: 100px; padding: 2px 8px; margin-left: 0.5rem; vertical-align: middle; }

/* ─── SKILLS (index.html) ────────────────────────── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 2rem; }
.skill-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.skill-name { font-size: 0.9rem; font-weight: 500; }
.tools-label { margin-top: 2rem; font-size: 0.78rem; font-weight: 600; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.75rem; }
.tools-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tool-tag { background: var(--surface); border: 1px solid var(--border); border-radius: 100px; padding: 4px 14px; font-size: 0.8rem; }

/* ─── CONTACT & FOOTER ───────────────────────────── */
#contact { background: var(--accent); padding: 4rem 2rem; text-align: center; }
#contact .section-label { color: rgba(255,255,255); font-size: 0.95rem;}
#contact .section-title { color: #fff; margin-bottom: 0.75rem; }
#contact p { color: rgba(255,255,255,0.75); margin-bottom: 2rem; }
.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
footer { text-align: center; padding: 1.5rem; font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--border); }

/* ─── PROJECT DETAIL PAGE (project.html) ─────────── */
.page { max-width: var(--max); margin: 0 auto; padding: 4rem 4.5rem 6rem; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-bottom: 3rem; }
.back-link::before { content: '←'; }
.back-link:hover { color: var(--accent); text-decoration: none; }
.project-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.meta-item { font-size: 0.8rem; color: var(--muted); }
.meta-item strong { color: var(--text); font-weight: 600; }
.project-outcome { font-size: 1.05rem; font-weight: 600; color: var(--accent); border-left: 3px solid var(--accent); padding-left: 1rem; margin-bottom: 3rem; }
.narrative { margin-bottom: 3rem; }
.narrative p { font-size: 1rem; color: #2A2A2A; line-height: 1.85; margin-bottom: 1.4rem; }
.narrative p:last-child { margin-bottom: 0; }
.block { margin-bottom: 2.5rem; }
.block-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { background: var(--surface); border: 1px solid var(--border); border-radius: 100px; padding: 4px 14px; font-size: 0.8rem; }
.skill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag { background: var(--accent-lt); color: var(--accent); border-radius: 100px; padding: 4px 14px; font-size: 0.8rem; font-weight: 500; }
.timeline { border-left: 2px solid var(--border); padding-left: 1.5rem; display: flex; flex-direction: column; gap: 1.2rem; }
.tl-item { position: relative; }
.tl-item::before { content: ''; position: absolute; left: -1.75rem; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tl-date { font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-bottom: 0.2rem; }
.tl-event { font-size: 0.9rem; }
.prose { font-size: 0.95rem; color: #333; line-height: 1.75; }
.testimonial { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; }
.testimonial blockquote { font-family: var(--font-head); font-style: italic; font-size: 1.05rem; color: var(--text); margin-bottom: 0.75rem; line-height: 1.5; }
.testimonial cite { font-size: 0.8rem; color: var(--muted); }
.project-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.screenshots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.screenshot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.screenshot img { width: 100%; display: block; }
.project-nav { display: flex; justify-content: space-between; gap: 1rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.proj-nav-btn { font-size: 0.85rem; font-weight: 500; color: var(--muted); display: flex; flex-direction: column; gap: 2px; max-width: 45%; }
.proj-nav-btn.next { text-align: right; }
.proj-nav-btn span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.proj-nav-btn strong { color: var(--accent); font-size: 0.9rem; }
.proj-nav-btn:hover strong { text-decoration: underline; }
.not-found { text-align: center; padding: 6rem 2rem; color: var(--muted); }
.not-found h2 { font-family: var(--font-head); font-size: 1.8rem; margin-bottom: 1rem; }

/* ─── FADE-IN ─────────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .stats-inner { gap: 1.5rem; }
  /* .project-link { display: none; } */
  .project-nav { flex-direction: column; }
  .proj-nav-btn.next { text-align: left; }
}

/* ─── TIMELINE STEPPER ───────────────────────────── */
.tl-stepper { position: relative; display: flex; flex-direction: column; gap: 8px; }
.tl-line { position: absolute; left: 104px; top: 10px; bottom: 10px; width: 1.5px; background: var(--border); }
.tl-row { display: flex; align-items: flex-start; gap: 12px; position: relative; }
.tl-date-col { flex-shrink: 0; width: 92px; text-align: right; font-size: 0.75rem; font-weight: 500; color: var(--muted); padding-top: 10px; }
.tl-dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 12px; position: relative; z-index: 1; }
.tl-dot-ongoing { background: var(--gold); }
.tl-card { flex: 1; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.tl-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: none; border: none; cursor: pointer; text-align: left; gap: 8px; }
.tl-summary { font-size: 0.875rem; font-weight: 500; color: var(--text); flex: 1; }
.tl-chevron { font-size: 15px; color: var(--accent); flex-shrink: 0; }
.tl-chevron::after { content: '▾'; }
.tl-card.tl-open .tl-chevron::after { content: '▴'; }
.tl-detail { display: none; padding: 5px 14px 10px; font-size: 0.82rem; color: var(--muted); line-height: 1.6; border-top: 1px solid var(--border); }
.tl-card.tl-open .tl-detail { display: block; }