/*
  main.css — the single stylesheet for luisdavila7.github.io.
  Elegant minimalist theme: white/paper background, slate-navy accent,
  Space Grotesk + Inter typography. Shared by both pages; page-specific
  sections are clearly marked below (their selectors only ever match on
  their own page, so sharing one file is safe).
*/

/* ==========================================================================
   Variables, reset, base typography — shared
   ========================================================================== */
:root {
  --paper: #fafaf8;
  --surface: #ffffff;
  --ink: #14161a;
  --muted: #6b7280;
  --line: #e4e4e7;
  --accent: #33415c;
  --accent-soft: #eef1f5;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  min-width: 250px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.6;
  background-color: var(--paper);
  color: var(--ink);
}

ul {
  list-style: none;
}

a {
  color: var(--ink);
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ==========================================================================
   Shared components: nav links, buttons, mobile nav toggle, footer
   ========================================================================== */
.nav-list a,
.nav-link {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s ease-out;
}

.nav-list a:hover,
.nav-link:hover {
  color: var(--accent);
}

.btn {
  display: inline-block;
  padding: 1.1rem 2.6rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  transition: all 0.2s ease-out;
}

.btn-primary {
  background: var(--ink);
  color: var(--surface);
  border: 1px solid var(--ink);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: var(--accent-soft);
}

/* Mobile nav toggle (CSS-only checkbox hack). Visually hidden rather than
   display:none so it stays reachable/operable by keyboard (Tab + Space) —
   a plain display:none checkbox can't receive focus at all. */
.nav-toggle-checkbox {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nav-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.4rem;
  height: 2.4rem;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 4px;
}

.nav-toggle-checkbox:focus-visible ~ .nav-toggle-label {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.nav-toggle-label span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}

.nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(2) {
  opacity: 0;
}

.nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  text-align: center;
  font-weight: 400;
  padding: 3rem 1.5rem;
  background: var(--paper);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1.3rem;
}

.site-footer p {
  font-size: 1.3rem;
}

.site-version {
  font-size: 1.2rem;
  color: var(--muted);
}

.site-version a {
  color: var(--accent);
}

.site-version a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   index.html — top nav
   ========================================================================== */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  padding: 0 4rem;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease-out, background-color 0.2s ease-out;
}

.nav.is-scrolled {
  background: rgba(250, 250, 248, 0.97);
  box-shadow: 0 1px 16px rgba(20, 22, 26, 0.06);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--ink);
  padding: 1.8rem 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-list a {
  display: inline-block;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1.8rem 1.3rem;
}

/* Collapse the link list behind the hamburger toggle instead of letting
   it wrap across several lines (which used to overlap the hero below). */
@media (max-width: 61.25em) {
  .nav {
    padding: 0 2rem;
  }

  .nav-toggle-label {
    display: flex;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px -12px rgba(20, 22, 26, 0.12);
  }

  .nav-toggle-checkbox:checked ~ .nav-list {
    display: flex;
  }

  .nav-list a {
    padding: 1.4rem 2rem;
    text-align: center;
  }
}

/* ==========================================================================
   index.html — hero / welcome section
   ========================================================================== */
#welcome-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 92vh;
  padding: 10rem 2rem 6rem;
  text-align: center;
  background: var(--paper);
  overflow: hidden;
}

#welcome-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70rem;
  height: 70rem;
  background: radial-gradient(circle, rgba(51, 65, 92, 0.09) 0%, rgba(51, 65, 92, 0) 65%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 1.6rem;
}

#welcome-section h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 8rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

#welcome-profile {
  max-width: 640px;
  margin-top: 2.2rem;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 3.2rem;
}

.chip-caption {
  margin-top: 5.5rem;
  font-size: 1.3rem;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 720px;
  margin-top: 1.6rem;
}

.tech-chip {
  display: inline-block;
  padding: 0.7rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  transition: all 0.2s ease-out;
}

.tech-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 61.25em) {
  #welcome-section h1 {
    font-size: 6.4rem;
  }
}

@media (max-width: 28.75em) {
  #welcome-section {
    padding: 9rem 1.5rem 5rem;
  }

  #welcome-section::before {
    width: 44rem;
    height: 44rem;
  }

  #welcome-section h1 {
    font-size: 4.2rem;
  }

  .eyebrow {
    font-size: 1.1rem;
  }

  #welcome-profile {
    font-size: 1.6rem;
  }
}

/* ==========================================================================
   index.html — highlights
   ========================================================================== */
.highlights-section {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6rem 2rem;
}

.highlights-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  max-width: 1140px;
  margin: 0 auto;
}

.highlight-stat {
  display: flex;
  flex-direction: column;
  flex: 1 1 220px;
  max-width: 260px;
  text-align: center;
  padding: 0 1rem;
}

.highlight-number {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.8rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.highlight-label {
  font-size: 1.4rem;
  color: var(--muted);
  line-height: 1.5;
}

@media (min-width: 75em) {
  .highlight-stat + .highlight-stat {
    border-left: 1px solid var(--line);
    padding-left: 3rem;
  }
}

@media (max-width: 28.75em) {
  .highlights-section {
    padding: 4.5rem 1.5rem;
  }

  .highlight-number {
    font-size: 2.2rem;
  }

  .highlight-label {
    font-size: 1.3rem;
  }
}

/* ==========================================================================
   index.html — projects
   ========================================================================== */
.projects-section {
  text-align: center;
  padding: 8rem 2rem;
  background: var(--paper);
}

.projects-section-header {
  max-width: 700px;
  margin: 0 auto 4.5rem auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.2rem;
  color: var(--ink);
}

@media (max-width: 28.75em) {
  .projects-section-header {
    font-size: 2.4rem;
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto 5rem auto;
  text-align: left;
}

@media (max-width: 30.625em) {
  .projects-section {
    padding: 6rem 1.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px -12px rgba(20, 22, 26, 0.16);
}

.project-image {
  height: 18rem;
  width: 100%;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.3s ease-out;
}

.project:hover .project-image {
  filter: grayscale(0);
}

@media (max-width: 30.625em) {
  .project-image {
    height: 16rem;
  }
}

.project-title {
  font-size: 1.6rem;
  font-weight: 500;
  padding: 1.8rem 2rem;
  color: var(--ink);
}

.project:hover .project-title::after {
  content: '\2197';
  color: var(--accent);
  margin-left: 0.6rem;
}

.btn-show-all {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.btn-show-all:hover {
  border-color: var(--ink);
  background: var(--accent-soft);
}

.btn-show-all i {
  margin-left: 0.9rem;
  transition: transform 0.2s ease-out, color 0.2s ease-out;
}

.btn-show-all:hover i {
  transform: translateX(4px);
  color: var(--accent);
}

/* ==========================================================================
   index.html — contact
   ========================================================================== */
.contact-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 8rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.contact-section-header h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.6rem;
  color: var(--ink);
}

.contact-section-header p {
  margin-top: 1rem;
  font-size: 1.6rem;
  color: var(--muted);
}

@media (max-width: 28.75em) {
  .contact-section-header h2 {
    font-size: 2.6rem;
  }

  .contact-section-header p {
    font-size: 1.4rem;
  }
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  max-width: 900px;
  margin-top: 3.5rem;
}

.contact-details {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 2.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  transition: all 0.2s ease-out;
}

.contact-details:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

@media (max-width: 28.75em) {
  .contact-links a {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   curriculum.html — sidebar nav (.nav-sidebar — a distinct class from
   .nav above; both pages happen to reuse id="navbar" for their <nav>,
   but the two components are structurally different, so styling is
   driven by class, not id, to avoid any collision in this shared file)
   ========================================================================== */
.nav-sidebar {
  position: fixed;
  min-width: 300px;
  top: 0;
  left: 0;
  width: 340px;
  height: 100%;
  background-color: var(--paper);
  border-right: 1px solid var(--line);
  font-size: 1.5rem;
  overflow-y: auto;
}

.nav-sidebar header {
  margin: 3rem 2rem 1rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--ink);
}

.nav-sidebar ul {
  padding: 1rem 0 2rem 0;
}

.nav-sidebar li {
  position: relative;
  width: 100%;
}

.nav-sidebar a {
  display: block;
  padding: 0.9rem 2rem;
  color: var(--muted);
  cursor: pointer;
}

.nav-sidebar a:hover {
  color: var(--accent);
}

/* ==========================================================================
   curriculum.html — résumé content
   ========================================================================== */
#main-doc {
  margin-left: 340px;
  margin-right: 100px;
  padding: 3rem 3rem 3rem 4rem;
  margin-bottom: 6rem;
  max-width: 820px;
}

.main-section {
  margin-bottom: 4.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.main-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

/* Section labels (SKILLS, Work Experience, Education, ...) */
.main-section > header {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 1.6rem;
}

/* The #info section's header holds the full role headline, not a short
   label, so it gets the large display treatment instead. */
#info header {
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.2rem;
  color: var(--ink);
}

.main-section h1 {
  font-family: var(--font-body);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2.4rem;
}

.main-section h1:first-of-type {
  margin-top: 0;
}

.main-section h3 {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.2rem;
}

.main-section p,
.main-section li {
  font-size: 1.4rem;
  line-height: 1.7;
  color: var(--muted);
}

.main-section li {
  margin: 1rem 0 0 1.6rem;
}

/* Footer sits below #main-doc in normal flow; offset it past the fixed
   sidebar too */
.resume-footer {
  margin-left: 340px;
}

@media only screen and (max-width: 815px) {
  .nav-sidebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    height: auto;
    position: relative;
    width: 100%;
    padding: 0 2rem;
    border-right: none;
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.2s ease-out;
  }

  .nav-sidebar.is-scrolled {
    box-shadow: 0 1px 16px rgba(20, 22, 26, 0.06);
  }

  .nav-sidebar header {
    margin: 1.2rem 0;
  }

  .nav-sidebar .nav-toggle-label {
    display: flex;
  }

  /* Collapse the link list behind the hamburger toggle instead of
     stacking all 8 links inline above the résumé content.
     .sidebar-list is a sibling of the checkbox (both direct children of
     .nav-sidebar), so the sibling combinator below can target it — it
     would NOT work written as "~ .nav-sidebar ul", since .nav-sidebar is
     the checkbox's ancestor, not its sibling. */
  .sidebar-list {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 0 0 1rem;
  }

  .nav-toggle-checkbox:checked ~ .sidebar-list {
    display: flex;
  }

  #main-doc {
    margin: 2rem 1.5rem 6rem;
  }

  .resume-footer {
    margin-left: 0;
  }

  .main-section p,
  .main-section li {
    font-size: 1.3rem;
  }
}

@media only screen and (max-width: 400px) {
  #main-doc {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}
