/* ==========================================================================
   DANIEL CEJAS (DC) — IDENTIDAD ARQUITECTÓNICA PERSONAL (2015 → 2026)
   Estética: Estudio de arquitectura contemporánea · Blanco papel + Grafito + Verde DC
   Separada deliberadamente del universo visual oscuro de Clan Futuro.
   ========================================================================== */

:root {
  --bg: #fafaf7;
  --bg-alt: #f2f4ed;
  --surface: #ffffff;
  --surface-tint: #eef5e3;
  --ink: #1a211b;
  --ink-soft: #4a554c;
  --ink-muted: #6c776e;
  --green: #4e9a16;
  --green-dark: #3a770e;
  --green-light: #e5f1d4;
  --sage: #c9dda6;
  --line: #dde4d6;
  --line-strong: #c3cfba;
  --shadow-sm: 0 1px 2px rgba(26, 33, 27, 0.04);
  --shadow-md: 0 10px 30px rgba(26, 33, 27, 0.06);
  --radius: 10px;
  --radius-sm: 6px;
  --font-display: "Bahnschrift", "DIN Alternate", "Segoe UI Variable Display", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", "Courier New", monospace;
  --maxw: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(78, 154, 22, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(78, 154, 22, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

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

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

a:hover {
  text-decoration: underline;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}

.skip:focus {
  left: 16px;
  top: 16px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

.section.no-border {
  border-top: 0;
}

.section-alt {
  background: rgba(242, 244, 237, 0.78);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: 44px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-dark);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--green-dark);
}

.nav a[aria-current="page"] {
  font-weight: 600;
}

.nav a.btn-primary,
.nav a.btn-primary:hover {
  color: #ffffff;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.btn:hover {
  text-decoration: none;
  border-color: var(--green);
  color: var(--green-dark);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #ffffff;
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.btn-dark:hover {
  background: #2b352d;
  border-color: #2b352d;
  color: #ffffff;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.86rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--green);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0 0 14px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.25rem, 4.8vw, 3.65rem);
  font-weight: 700;
}

h1 em,
h2 em {
  font-style: normal;
  color: var(--green);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
}

h3 {
  font-size: 1.28rem;
  font-weight: 700;
}

p {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.lead {
  font-size: 1.14rem;
  line-height: 1.6;
  color: var(--ink);
  max-width: 64ch;
}

.micro {
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 20px; }
.mt-lg { margin-top: 32px; }
.mb-lg { margin-bottom: 42px; }
.status-msg { margin: 10px 0 0; }
.cv-main { padding-top: 34px; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 68px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  gap: 44px;
  align-items: start;
}

.blueprint-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.blueprint-card::after {
  content: "DC // ARCH";
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.spec-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
}

.spec-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.spec-val {
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

/* ---------- Metrics Strip ---------- */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 38px;
}

.metric-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
}

.metric-num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.1;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Grids & Cards ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-head p {
  max-width: 52ch;
  margin: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card.accent {
  border-top: 3px solid var(--green);
}

.card-index {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--green-dark);
  text-transform: uppercase;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--green-dark);
  border: 1px solid #d5e6be;
}

.tag.neutral {
  background: var(--bg-alt);
  color: var(--ink-soft);
  border-color: var(--line);
}

.limit-note {
  font-size: 0.84rem;
  color: var(--ink-muted);
  border-left: 2px solid var(--sage);
  padding-left: 10px;
  margin: 4px 0 0;
}

/* ---------- Timeline ---------- */
.timeline {
  display: grid;
  gap: 18px;
  position: relative;
  padding-left: 22px;
  border-left: 2px solid var(--line-strong);
}

.timeline-item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--bg);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.timeline-item h3 {
  font-size: 1.12rem;
  margin-bottom: 6px;
}

.timeline-item p {
  margin: 0;
  font-size: 0.94rem;
}

/* ---------- Principles Quote Banner ---------- */
.quote-band {
  background: var(--ink);
  color: #f4f7f1;
  border-radius: var(--radius);
  padding: 36px 38px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 28px;
  align-items: center;
}

.quote-band h2,
.quote-band p {
  color: #f4f7f1;
}

.quote-band p {
  color: #cfd8c9;
  margin: 0;
}

.quote-band .eyebrow {
  color: #a9db74;
}

.quote-band .eyebrow::before {
  background: #8fd14f;
}

/* ---------- Forms ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: start;
}

.form-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.form-box label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.form-box input,
.form-box select,
.form-box textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.form-box select {
  height: 44px;
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a594c' d='M2.2 4.2 6 8l3.8-3.8-.9-.9L6 6.2 3.1 3.3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
}

.form-box input:focus,
.form-box select:focus,
.form-box textarea:focus {
  outline: 2px solid rgba(78, 154, 22, 0.25);
  border-color: var(--green);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 34px 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink-soft);
}

/* ---------- CV Page Specific ---------- */
.cv-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 28px;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
  background: var(--green);
  color: #ffffff;
}

.cv-sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  border-radius: var(--radius);
  padding: 42px 46px;
  box-shadow: var(--shadow-md);
}

.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.cv-brand-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cv-brand-head img {
  width: 58px;
  height: 48px;
  object-fit: contain;
}

.cv-header h1 {
  font-size: 2.15rem;
  margin-bottom: 4px;
}

.cv-role {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--green-dark);
  margin: 0;
}

.cv-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: right;
  font-size: 0.88rem;
  color: var(--ink-soft);
  display: grid;
  gap: 4px;
}

.cv-block {
  margin-bottom: 28px;
}

.cv-block:last-child {
  margin-bottom: 0;
}

.cv-block-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 14px;
}

.cv-entry {
  margin-bottom: 18px;
}

.cv-entry:last-child {
  margin-bottom: 0;
}

.cv-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.cv-entry-head h3 {
  font-size: 1.08rem;
  margin: 0;
}

.cv-entry-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.cv-entry-org {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-dark);
  margin: 0 0 6px;
}

.cv-bullets {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.cv-bullets li {
  margin-bottom: 5px;
}

.cv-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cv-callout {
  background: var(--surface-tint);
  border-left: 3px solid var(--green);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 24px;
}

[data-lang-block="en"],
[data-lang-inline="en"] {
  display: none;
}

body.lang-en [data-lang-block="es"],
body.lang-en [data-lang-inline="es"] {
  display: none;
}

body.lang-en [data-lang-block="en"] {
  display: block;
}

body.lang-en [data-lang-inline="en"] {
  display: inline;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .contact-grid,
  .quote-band,
  .grid-3,
  .cv-two-col {
    grid-template-columns: 1fr;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cv-header {
    flex-direction: column;
  }

  .cv-contact {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .grid-2,
  .metrics-strip {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 54px 0;
  }

  .hero {
    padding: 46px 0 44px;
  }

  .cv-sheet {
    padding: 24px 20px;
  }

  .nav {
    gap: 14px;
  }
}

/* ---------- Print Stylesheet (A4 Clean PDF Export for /cv/) ---------- */
@media print {
  @page {
    size: A4;
    margin: 12mm 14mm;
  }

  body {
    background: #ffffff !important;
    background-image: none !important;
    font-size: 10pt;
    line-height: 1.42;
    color: #111111;
  }

  .site-header,
  .site-footer,
  .cv-toolbar,
  .no-print {
    display: none !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .section {
    padding: 0;
    border: 0;
  }

  .cv-sheet {
    border: 0;
    border-top: 3px solid #4e9a16;
    box-shadow: none;
    padding: 10px 0 0;
    border-radius: 0;
  }

  .cv-header {
    padding-bottom: 12px;
    margin-bottom: 16px;
  }

  .cv-header h1 {
    font-size: 18pt;
  }

  .cv-block {
    margin-bottom: 14px;
    page-break-inside: avoid;
  }

  .cv-entry {
    margin-bottom: 10px;
    page-break-inside: avoid;
  }

  .cv-callout {
    background: #f4f8ee !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 10px 12px;
    margin-bottom: 14px;
  }

  .tag {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  a {
    color: #111111;
    text-decoration: none;
  }
}
