/* ── Portfolio Site Styles — Augusto Bastos ── */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&family=Roboto:wght@400;700&display=swap');
@import 'tokens.css';

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', var(--font);
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-light); }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-logo { font-family: 'Lato', var(--font); font-weight: 900; font-size: 1.1rem; color: var(--green); }

.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--green); }

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font);
  transition: all 0.2s;
}
.theme-toggle:hover { border-color: var(--green); color: var(--green); }

/* ── Shared section wrapper ── */
.section-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--section-pad-y) var(--section-pad-x);
}

.section-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--green);
  margin-bottom: 10px; display: block;
}

.section-title {
  font-family: 'Lato', var(--font);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900; color: var(--text);
  margin-bottom: 8px; letter-spacing: -0.5px;
}

.section-sub {
  font-size: 1rem; color: var(--text-muted);
  margin-bottom: 40px; line-height: 1.65; max-width: 620px;
}

/* ── Hero ── */
#hero {
  display: flex; align-items: center;
  padding: 120px 0 90px;
}

.hero-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 32px;
}

/* split: text left, proof panel right */
.hero-split {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 52px;
  align-items: center;
  width: 100%;
}

.hero-name {
  font-family: 'Lato', var(--font);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--text);
  line-height: 1;
  margin: 8px 0 6px;
}

.hero-name span { color: var(--green); }

.hero-role {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 18px;
}
[data-theme="dark"] .hero-role { color: var(--green-light); }

.hero-tagline {
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 28px;
}

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

/* proof panel */
.hero-proof {
  display: flex; flex-direction: column; gap: 12px;
}
.proof-item {
  display: flex; align-items: baseline; gap: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.proof-item strong {
  font-family: 'Lato', var(--font);
  font-size: 1.4rem; font-weight: 900;
  color: var(--green); line-height: 1;
  min-width: 56px;
}
.proof-item span {
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.3;
}

.btn-primary {
  background: var(--green); color: white;
  padding: 13px 26px; border-radius: var(--radius);
  font-weight: 700; font-size: 0.95rem;
  transition: background 0.2s; display: inline-block;
}
.btn-primary:hover { background: var(--green-dark); color: white; }

.btn-outline {
  border: 1.5px solid var(--border); color: var(--text);
  padding: 13px 26px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.2s; display: inline-block;
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }

/* ── Projects ── */
#projects { background: var(--bg-alt); }

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: var(--projects-gap);
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--thumb-width) 1fr;
  grid-template-rows: var(--card-height);
  align-items: stretch;
  height: var(--card-height);
  transition: border-color 0.2s;
}
.project-body { overflow: hidden; min-height: 0; }
.project-card:hover { border-color: var(--green); }

.project-card.flagship {
  border: 2px solid var(--green);
  box-shadow: 0 4px 24px rgba(45,140,106,0.12);
}

/* Thumbnail column — same box size for all, contain so nothing is cropped,
   per-card bg matches the thumbnail's own background so letterbox disappears */
.project-img {
  width: 100%; height: 100%;
  min-height: 0;
  object-fit: contain;
  padding: var(--thumb-pad);
  display: block;
  border-right: 1px solid var(--border);
}
.project-img.bg-light { background: var(--thumb-bg-light); }
.project-img.bg-green { background: var(--thumb-bg-green); }
.project-img.bg-navy  { background: var(--thumb-bg-navy); }

/* fill the whole box (no letterbox) — for square thumbs with full backgrounds */
.project-img.fit-cover { object-fit: cover; padding: 0; object-position: center; }
/* keep image centered when using contain */
.project-img.fit-center { object-position: center center; }

.project-img-placeholder {
  width: 100%; height: 100%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: monospace; font-size: 0.75rem;
  color: var(--green); padding: 28px; line-height: 2;
  white-space: pre; font-weight: 700;
  border-right: 1px solid var(--border);
}


.project-body { padding: 28px 32px; display: flex; flex-direction: column; }

/* Sub-apps inside Lucky Cat */
.sub-apps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}
.sub-app {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.sub-app img { width: 100%; height: 90px; object-fit: cover; object-position: top; display: block; }
.sub-app-label {
  display: block; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--green); padding: 4px 8px;
  background: var(--surface);
}

/* Live links */
.project-links { display: flex; gap: 10px; margin-top: auto; padding-top: 16px; flex-wrap: wrap; }

.btn-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.8rem; font-weight: 700;
  padding: 7px 16px; border-radius: 6px;
  border: 1.5px solid var(--green); color: var(--green);
  transition: all 0.2s; text-decoration: none;
}
.btn-link:hover { background: var(--green); color: white; }
.btn-link.primary { background: var(--green); color: white; }
.btn-link.primary:hover { background: var(--green-dark); color: white; }

.project-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 6px; margin-bottom: 10px;
  background: var(--green-muted); color: var(--green-dark);
  border: 1px solid var(--border);
}
[data-theme="dark"] .project-tag {
  background: rgba(45,140,106,0.15); color: var(--green-light);
  border-color: rgba(45,140,106,0.3);
}

.project-stats {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 10px;
}
.project-stats span {
  font-size: 0.72rem; font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
  background: var(--green); color: white;
}

.project-title {
  font-family: 'Lato', var(--font);
  font-size: 1.25rem; font-weight: 900;
  color: var(--text); margin-bottom: 8px;
}

.project-desc {
  font-size: 0.88rem; color: var(--text-muted);
  line-height: 1.65; margin-bottom: 10px; flex: 1;
}

.project-stack { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 10px; }

.stack-pill {
  font-size: 0.75rem; font-weight: 600;
  padding: 3px 9px; border-radius: 5px;
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.skill-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.875rem; font-weight: 600;
  color: var(--text-muted); text-align: center;
  transition: all 0.2s;
}
.skill-card:hover { border-color: var(--green); color: var(--green); background: var(--surface); }

/* ── About ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }

.about-text { font-size: 1rem; color: var(--text-muted); line-height: 1.8; }
.about-text p + p { margin-top: 18px; }

.about-facts { display: flex; flex-direction: column; gap: 12px; }

.about-fact {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
}
.about-fact strong {
  display: block; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--green); margin-bottom: 3px;
}
.about-fact span { font-size: 0.9rem; color: var(--text-muted); }

/* ── Contact ── */
#contact { text-align: center; }
.contact-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

/* ── Footer ── */
footer {
  text-align: center; padding: 28px 32px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-faint);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .hero-inner, .section-inner { padding-left: 20px; padding-right: 20px; }
  .hero-split { grid-template-columns: 1fr; gap: 32px; }
  #hero { padding: 96px 0 64px; }
  .project-card { grid-template-columns: 1fr; }
  .project-img { height: 200px; }
  .project-img-placeholder { height: 140px; white-space: normal; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}
