/* ==========================================================================
   Oliver Ledesma — Portfolio
   Design system: "Product Blueprint" — a drafting-sheet aesthetic that
   treats the site itself like a spec document: hairline grids, registration
   marks, leader lines from mono labels to serif headlines, and a recurring
   "convergence" motif (three disciplines becoming one line).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #101b2d;
  --ink-soft: #182642;
  --paper: #edeae0;
  --paper-dim: #e2decf;
  --line-blue: #2e4c74;
  --line-blue-soft: rgba(46, 76, 116, 0.28);
  --amber: #e2a034;
  --amber-deep: #b97c1f;
  --charcoal: #1b1d1f;
  --sage: #5c7a6e;
  --paper-on-ink: #d9d4c4;

  --display: 'Fraunces', Georgia, serif;
  --body: 'IBM Plex Sans', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;

  --max: 1180px;
  --gutter: clamp(24px, 5vw, 72px);
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

::selection { background: var(--amber); color: var(--ink); }

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

/* ---------- Layout shell ---------- */

.sheet {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.frame {
  position: relative;
  border-top: 1px solid var(--line-blue-soft);
  border-bottom: 1px solid var(--line-blue-soft);
}

.reg-mark {
  position: absolute;
  width: 16px;
  height: 16px;
  color: var(--line-blue);
  opacity: 0.55;
  pointer-events: none;
}
.reg-mark svg { width: 100%; height: 100%; }
.reg-mark.tl { top: 10px; left: 10px; }
.reg-mark.tr { top: 10px; right: 10px; }
.reg-mark.bl { bottom: 10px; left: 10px; }
.reg-mark.br { bottom: 10px; right: 10px; }

.reg-tag {
  position: absolute;
  top: 12px;
  right: 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--line-blue);
  opacity: 0.6;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 234, 224, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-blue-soft);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-mark {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.nav-mark .dot { color: var(--amber-deep); }

.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  padding-bottom: 3px;
  color: var(--ink);
  opacity: 0.72;
  transition: opacity 0.15s ease;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--amber-deep);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-blue-soft);
  border-radius: 4px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}

@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    padding: 18px var(--gutter) 26px;
    border-bottom: 1px solid var(--line-blue-soft);
    display: none;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-block; }
}

/* ---------- Eyebrow / section labels ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--amber-deep);
}
.eyebrow.blue { color: var(--line-blue); }
.eyebrow.blue::before { background: var(--line-blue); }

.section-head {
  max-width: 700px;
  margin-bottom: 48px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.12;
}
.section-head .lede {
  margin-top: 16px;
  font-size: 18px;
  color: var(--line-blue);
  max-width: 60ch;
}

section { padding: 88px 0; position: relative; }
section.tight { padding: 56px 0; }
section.on-ink {
  background: var(--ink);
  color: var(--paper-on-ink);
}
section.on-ink h1, section.on-ink h2, section.on-ink h3, section.on-ink h4 {
  color: var(--paper);
}
section.on-ink .eyebrow { color: var(--amber); }
section.on-ink .eyebrow::before { background: var(--amber); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--amber-deep);
  color: var(--paper);
}
.btn-primary:hover { background: var(--ink); color: var(--paper); }

.btn-ghost {
  border-color: var(--line-blue-soft);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

.on-ink .btn-ghost { color: var(--paper); border-color: rgba(237,234,224,0.3); }
.on-ink .btn-ghost:hover { border-color: var(--paper); }

.cta-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 40px;
}

.hero .kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.06;
  max-width: 16ch;
}
.hero h1 em { font-style: italic; color: var(--line-blue); }

.hero .sub {
  margin-top: 26px;
  font-size: 19px;
  color: var(--line-blue);
  max-width: 56ch;
}

.hero .cta-row { margin-top: 36px; }

/* ---------- Convergence diagram (signature element) ---------- */

.converge-wrap {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px dashed var(--line-blue-soft);
}

.converge-caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--line-blue);
  opacity: 0.7;
  margin-bottom: 10px;
}

.converge-svg { width: 100%; height: auto; display: block; }
.converge-svg .path-line {
  fill: none;
  stroke-width: 2;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw 1.4s ease forwards;
}
.converge-svg .path-commercial { stroke: var(--sage); animation-delay: 0.05s; }
.converge-svg .path-technical { stroke: var(--line-blue); animation-delay: 0.2s; }
.converge-svg .path-product { stroke: var(--amber-deep); animation-delay: 0.35s; }
.converge-svg .path-result { stroke: var(--ink); stroke-width: 3; animation-delay: 0.75s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.converge-svg text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  fill: var(--charcoal);
}
.converge-svg .label-result { font-weight: 600; fill: var(--ink); }
.converge-svg circle.node { fill: var(--paper); stroke-width: 2; }

@media (prefers-reduced-motion: reduce) {
  .converge-svg .path-line { animation: none; stroke-dashoffset: 0; }
}

/* ---------- Pillars ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-blue-soft);
  border: 1px solid var(--line-blue-soft);
}
.pillar {
  background: var(--paper);
  padding: 32px 24px;
}
.pillar .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber-deep);
  margin-bottom: 18px;
}
.pillar h3 { font-size: 20px; margin-bottom: 10px; }
.pillar p { font-size: 14.5px; color: var(--line-blue); margin: 0; }

@media (max-width: 900px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ---------- Cards (projects) ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--line-blue-soft);
  padding: 30px 26px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 16px;
}
.card h3 { font-size: 21px; margin-bottom: 12px; color: var(--ink); }
.card p { font-size: 14.5px; color: var(--charcoal); flex-grow: 1; }
.card .foot {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--line-blue);
}
.on-ink .card h3,
.on-ink .card p,
.on-ink .card .foot { color: inherit; }
.on-ink .card h3 { color: var(--ink); }
.on-ink .card p { color: var(--charcoal); }
.on-ink .card .foot { color: var(--line-blue); }

/* ---------- Timeline / path (About page) ---------- */

.path {
  position: relative;
  padding-left: 36px;
  border-left: 1px solid var(--line-blue-soft);
}
.path-item { position: relative; padding-bottom: 56px; }
.path-item:last-child { padding-bottom: 0; }
.path-item::before {
  content: '';
  position: absolute;
  left: -41px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--amber-deep);
}
.path-item .tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 8px;
}
.path-item h3 { font-size: 23px; margin-bottom: 12px; }
.path-item p { max-width: 62ch; }
.path-item ul {
  columns: 2;
  gap: 32px;
  margin: 14px 0 0;
  padding-left: 18px;
  font-size: 14.5px;
  color: var(--line-blue);
}
@media (max-width: 640px) { .path-item ul { columns: 1; } }

/* ---------- Steps (How I Work) ---------- */

.steps { display: flex; flex-direction: column; }
.step {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  padding: 34px 0;
  border-top: 1px solid var(--line-blue-soft);
}
.step:last-child { border-bottom: 1px solid var(--line-blue-soft); }
.step .step-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--amber-deep);
  padding-top: 4px;
}
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step ul { margin: 12px 0 0; padding-left: 18px; font-size: 14.5px; color: var(--line-blue); }
.step ul li { margin-bottom: 4px; }

/* ---------- IDEA framework blocks ---------- */

.idea-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .idea-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .idea-grid { grid-template-columns: 1fr; } }

.idea-block {
  border: 1px solid var(--line-blue-soft);
  padding: 28px 22px;
  background: var(--paper);
}
.idea-letter {
  font-family: var(--display);
  font-size: 44px;
  color: var(--amber-deep);
  line-height: 1;
  margin-bottom: 14px;
}
.idea-block h3 { font-size: 17px; margin-bottom: 12px; }
.idea-block ul { margin: 0; padding-left: 16px; font-size: 14px; color: var(--line-blue); }
.idea-block ul li { margin-bottom: 5px; }

/* ---------- Skills ---------- */

.skill-groups {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-blue-soft);
  border: 1px solid var(--line-blue-soft);
}
@media (max-width: 900px) { .skill-groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .skill-groups { grid-template-columns: 1fr; } }

.skill-group { background: var(--paper); padding: 30px 24px; }
.skill-group h3 {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-blue-soft);
}
.skill-group ul { list-style: none; margin: 0; padding: 0; }
.skill-group li {
  font-size: 14.5px;
  padding: 7px 0;
  color: var(--charcoal);
}

/* ---------- Quote / philosophy block ---------- */

.philosophy {
  max-width: 760px;
}
.philosophy .lines { margin: 30px 0; }
.philosophy .lines p {
  font-family: var(--display);
  font-style: italic;
  font-size: 20px;
  color: var(--line-blue);
  margin: 0 0 10px;
}
.questions {
  counter-reset: q;
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
}
.questions li {
  counter-increment: q;
  position: relative;
  padding: 18px 0 18px 48px;
  border-top: 1px solid var(--line-blue-soft);
  font-family: var(--display);
  font-size: 19px;
  color: var(--ink);
}
.questions li:last-child { border-bottom: 1px solid var(--line-blue-soft); }
.questions li::before {
  content: counter(q, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--amber-deep);
}

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--ink);
  color: var(--paper-on-ink);
  padding: 56px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(237,234,224,0.14);
}
.footer-brand .mark {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--paper);
  margin-bottom: 10px;
}
.footer-brand p { max-width: 40ch; font-size: 14px; color: var(--paper-on-ink); }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-links div { font-family: var(--mono); font-size: 12px; }
.footer-links h4 {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 400;
}
.footer-links a {
  display: block;
  color: var(--paper-on-ink);
  padding: 5px 0;
  opacity: 0.85;
}
.footer-links a:hover { opacity: 1; color: var(--amber); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: rgba(217,212,196,0.55);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Contact page specifics ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  border: 1px solid var(--line-blue-soft);
  padding: 32px;
}
.contact-card .row {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--line-blue-soft);
  font-size: 15px;
}
.contact-card .row:first-child { border-top: none; }
.contact-card .row span.k {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--line-blue);
}

/* ---------- Utility ---------- */

.mt-lg { margin-top: 64px; }
.center { text-align: center; }
.max-prose { max-width: 68ch; }
