/* ---------------------------------------------------------------------------
   Portfolio — Arnau Barrachina Carbonell
   Dark azulado + acento carmesí · Playfair Display + Inter.
--------------------------------------------------------------------------- */

:root {
  --bg: #0f1115;
  --surface: #1a1d24;
  --surface-2: #20242d;
  --border: #2a2e37;
  --border-soft: #23272f;
  --text: #ffffff;
  --muted: #9ca3af;
  --accent: #e11d48;
  --work: #10b981;
  --free: #0ea5e9;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* atmósfera: halo carmesí muy tenue arriba, da profundidad */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(680px 380px at 78% -6%, rgba(225, 29, 72, 0.1), transparent 70%);
}
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  position: relative;
  z-index: 1;
}

/* ── Barra superior ─────────────────────────────────────────────────────── */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 28px 0; gap: 16px; }
.mark { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.01em; }
.mark .dot { color: var(--accent); }
.topbar nav { display: flex; gap: 22px; align-items: center; font-size: 0.9rem; }
.topbar nav a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.topbar nav a:hover { color: var(--text); }

.lang-toggle {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.lang-toggle:hover { color: var(--text); border-color: var(--accent); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
  margin: clamp(48px, 8vh, 88px) 0 clamp(64px, 10vh, 120px);
}
.subtitle { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.22em; margin-bottom: 18px; }
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.05; letter-spacing: -0.01em; margin-bottom: 22px; }
.hero h1 .em { font-style: italic; font-weight: 600; color: var(--accent); }
.hero .lead { color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 46ch; margin-bottom: 30px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 12px 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); border-color: #3a3f4a; }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: #c81a40; }

.photo {
  justify-self: end;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}
.photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 50% at 50% 25%, rgba(225, 29, 72, 0.1), transparent 70%);
}

/* ── Secciones ──────────────────────────────────────────────────────────── */
.section { margin-bottom: clamp(56px, 9vh, 104px); }
.section-title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin-bottom: 28px; display: flex; align-items: center; gap: 14px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }

.about-grid { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: clamp(28px, 4vw, 48px); align-items: start; }
.about p { color: var(--muted); font-size: 1.08rem; }
.about p strong { color: var(--text); font-weight: 600; }
.about p + p { margin-top: 16px; }

.stack { display: grid; gap: 14px; }
.status { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; }
.status .head { display: flex; align-items: center; gap: 10px; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.work { background: var(--work); box-shadow: 0 0 10px rgba(16, 185, 129, 0.6); }
.dot.free { background: var(--free); box-shadow: 0 0 10px rgba(14, 165, 233, 0.6); }
.status h3 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; margin-bottom: 4px; }
.status .note { color: var(--muted); font-size: 0.9rem; }

/* ── Proyectos ──────────────────────────────────────────────────────────── */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 30px; transition: transform 0.2s ease, border-color 0.2s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); border-color: var(--accent); }
.card .eyebrow { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 14px; }
.card h3 { font-family: var(--serif); font-weight: 700; font-size: 1.7rem; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 0.98rem; flex: 1; }
.tags { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.tag { font-size: 0.74rem; background: var(--surface-2); border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; color: var(--muted); }
.card-links { display: flex; gap: 12px; margin-top: 20px; }
.card.soon { border-style: dashed; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-style: italic; min-height: 200px; }

footer { border-top: 1px solid var(--border); padding: 28px 0 48px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 880px) {
  .hero, .about-grid, .projects { grid-template-columns: 1fr; }
  .photo { justify-self: start; max-width: 300px; }
  .topbar nav a[href^='#'] { display: none; }
}
