/* ═══════════════════════════════════════════════
   Agustín Muzi — Portfolio
   Style: retro editorial, crema + naranja + negro
   ═══════════════════════════════════════════════ */

/* ─── VARIABLES ─── */
:root {
  --bg:           #F2EBD9;
  --ink:          #1A1408;
  --orange:       #E85D20;
  --muted:        #8A7A60;
  --light:        #E0D8C4;
  --orange-soft:  #FEF0E8;
  --border-color: #1A1408;
  --border:       2px solid var(--border-color);
  --text-sec:     #5A4E38;   /* secondary text on light surfaces */
  --subtle:       #C8BC9E;   /* very subtle labels / dates */
  --surface-dark: #1A1408;   /* always-dark surface (bento-dark, footer) */
}

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

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

body {
  font-family: 'Space Mono', monospace;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: 'Space Mono', monospace;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* ─── UTILITY: section header ─── */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.section-num {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
}

/* ─── UTILITY: buttons ─── */
.btn-primary {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 20px;
  background: var(--orange);
  color: var(--bg);
  border: var(--border);
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--ink);
}

.btn-ghost {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 20px;
  background: transparent;
  color: var(--ink);
  border: var(--border);
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  display: inline-block;
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ─── NAVBAR ─── */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Discrete language toggle in navbar */
.nav-lang {
  display: flex;
  align-items: center;
  gap: 3px;
}

.nav-lang-btn {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.nav-lang-btn.active {
  color: var(--ink);
  font-weight: 700;
}

.nav-lang-sep {
  font-size: 10px;
  color: var(--muted);
  line-height: 1;
}

.nav-logo {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.nav-links a:hover {
  color: var(--orange);
}

.nav-cta {
  font-size: 11px;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  background: var(--orange);
  color: var(--bg);
  padding: 8px 18px;
  border: var(--border);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  display: inline-block;
}

.nav-cta:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ─── HERO ─── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: var(--border);
}

.hero-left {
  padding: 2.5rem 1.5rem;
  border-right: var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.hero-right {
  background: var(--orange);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

/* Left column */
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  font-family: 'Space Mono', monospace;
}

.hero-headline {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--ink);
}

.hero-headline em {
  font-style: italic;
  color: var(--orange);
}

.hero-sub {
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.8;
  margin-top: 1rem;
  font-family: 'Space Mono', monospace;
}

.hero-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Right column */
.hero-r-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #F2C9A8;
  margin-bottom: 0.5rem;
  font-family: 'Space Mono', monospace;
}

.hero-r-name {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--bg);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-r-title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F2C9A8;
  margin-bottom: 1rem;
  font-family: 'Space Mono', monospace;
}

.hero-r-desc {
  font-size: 12px;
  color: #F2DEC8;
  line-height: 1.8;
  font-family: 'Space Mono', monospace;
}

.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--bg);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: 'Space Mono', monospace;
}

.avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #A8D870;
  flex-shrink: 0;
}

/* Hero responsive */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-left {
    border-right: none;
    border-bottom: var(--border);
  }

  .hero-headline {
    font-size: 28px;
  }
}

/* ─── STATS BAR ─── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: var(--border);
}

.stat {
  padding: 1rem 1.5rem;
  border-right: var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat:last-child {
  border-right: none;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--orange);
}

.stat-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
}

/* ─── SECTION WRAPPER ─── */
.section {
  padding: 1.5rem;
  border-bottom: var(--border);
}

/* ─── PROJECTS — BENTO GRID ─── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: var(--border);
}

.bento-card {
  padding: 1.25rem;
  border-right: var(--border);
  border-bottom: var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

/* Cards at the visual right edge of the grid: no right border */
.bento-no-right {
  border-right: none;
}

.bento-wide {
  grid-column: span 2;
}

.bento-orange {
  background: var(--orange);
}

.bento-dark {
  background: var(--surface-dark);
}

.bento-no-bottom {
  border-bottom: none;
}

/* Card tag (status pill) */
.card-tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1.5px solid var(--light);
  padding: 3px 8px;
  display: inline-block;
  margin-bottom: 10px;
  font-family: 'Space Mono', monospace;
}

.card-tag-white {
  color: #F2C9A8;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Card title */
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.card-title em {
  font-style: italic;
  color: var(--orange);
}

.card-title-white {
  color: var(--bg);
}

.card-title-white em {
  color: var(--bg);
}

.card-title-italic {
  font-style: italic;
  font-size: 15px;
}

/* Card description */
.card-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 6px;
  font-family: 'Space Mono', monospace;
}

.card-desc-white {
  color: #F2C9A8;
}

/* Card arrow */
.card-arrow {
  font-size: 18px;
  color: var(--orange);
  margin-top: auto;
  padding-top: 10px;
  display: block;
}

.card-arrow-white {
  color: var(--bg);
}

.card-arrow-muted {
  color: var(--muted);
}

/* Bento responsive */
@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-wide {
    grid-column: span 1;
  }

  .bento-card:nth-child(3n) {
    border-right: var(--border);
  }

  .bento-card {
    border-right: none;
  }

  .bento-no-bottom {
    border-bottom: var(--border);
  }

  .bento-card:last-child {
    border-bottom: none;
  }
}

/* ─── EDUCATION & STACK ─── */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: var(--border);
}

.edu-col {
  padding: 1.25rem;
  border-right: var(--border);
}

.edu-col-right {
  border-right: none;
}

.edu-col-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  padding-bottom: 8px;
  border-bottom: var(--border);
  font-family: 'Space Mono', monospace;
}

.edu-item {
  padding: 0.75rem 0;
  border-bottom: 1.5px solid var(--light);
}

.edu-item:last-of-type {
  border-bottom: none;
}

.edu-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
  gap: 0.5rem;
}

.edu-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  font-family: 'Space Mono', monospace;
}

.edu-date {
  font-size: 10px;
  color: var(--subtle);
  font-family: 'Space Mono', monospace;
  white-space: nowrap;
}

.edu-subtitle {
  font-size: 11px;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  line-height: 1.5;
}

/* Pills */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.pill {
  font-size: 10px;
  color: var(--text-sec);
  border: 1.5px solid var(--light);
  padding: 4px 10px;
  font-family: 'Space Mono', monospace;
}

.pill-learning {
  color: var(--orange);
  border-color: var(--orange);
  background: var(--orange-soft);
}

.pill-soft {
  color: var(--muted);
  border-color: var(--muted);
}

/* CV download button */
.btn-cv-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  border: 2px solid var(--orange);
  padding: 8px 14px;
  margin-top: 1rem;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  text-decoration: none;
}

.btn-cv-download:hover {
  background: var(--orange);
  color: var(--bg);
}

/* Education responsive */
@media (max-width: 768px) {
  .edu-grid {
    grid-template-columns: 1fr;
  }

  .edu-col {
    border-right: none;
    border-bottom: var(--border);
  }

  .edu-col-right {
    border-bottom: none;
  }
}

/* ─── CONTACT ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: var(--border);
}

.contact-left {
  padding: 1.5rem;
  border-right: var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-right {
  padding: 1.5rem;
}

.contact-headline {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.contact-headline em {
  font-style: italic;
  color: var(--orange);
}

.contact-body {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  font-family: 'Space Mono', monospace;
}

.contact-left .btn-primary {
  align-self: flex-start;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1.5px solid var(--light);
  text-decoration: none;
  color: inherit;
}

.contact-link:first-child {
  border-top: 1.5px solid var(--light);
}

.contact-link:hover .contact-link-value {
  color: var(--orange);
}

.contact-link:hover .contact-link-arrow {
  color: var(--ink);
}

.contact-link-platform {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  width: 64px;
  font-family: 'Space Mono', monospace;
  flex-shrink: 0;
}

.contact-link-value {
  font-size: 11px;
  color: var(--text-sec);
  font-family: 'Space Mono', monospace;
  flex: 1;
}

.contact-link-arrow {
  font-size: 14px;
  color: var(--orange);
}

/* Contact responsive */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-left {
    border-right: none;
    border-bottom: var(--border);
  }
}

/* ─── FOOTER ─── */
.footer {
  background: var(--surface-dark);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: var(--border);
}

.footer-left {
  font-size: 10px;
  color: var(--text-sec);
  letter-spacing: 0.04em;
  font-family: 'Space Mono', monospace;
}

.footer-right {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .navbar {
    padding: 0.875rem 1rem;
  }

  .nav-links {
    display: none;
  }

  .nav-logo {
    font-size: 12px;
  }

  .nav-left {
    gap: 0.75rem;
  }
}

/* ─── DARK MODE ─── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #1A1408;
    --ink:          #F2EBD9;
    --muted:        #A89880;
    --light:        #3A3020;
    --orange-soft:  #2A1208;
    --border-color: #3A3020;
    --text-sec:     #A89880;
    --subtle:       #6A5E48;
    --surface-dark: #0E0A04;
  }

  /* hero-right elements that use var(--bg): keep cream on orange */
  .hero-r-name,
  .avail-badge {
    color: #F2EBD9;
  }

  /* bento cards on dark/orange backgrounds: keep titles cream */
  .card-title-white,
  .card-title-white em {
    color: #F2EBD9;
  }
}
