/* ruibordadagua.com — shared styles.
   Editorial look: Fraunces serif headings, sand & sea palette (Bordadágua = "water's edge").
   Always light, regardless of the visitor's system setting. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 600;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f6f0e7;
  --surface: #fffbf5;
  --ink: #1d2a2f;
  --ink-soft: #2c3d43;
  --muted: #5b6668;
  --line: #e3d9ca;
  --accent: #a64b27;
  --sea-pale: #e2ece9;
  --sea-mid: #bcd5d2;
  --sea-deep: #86b3b1;
  --ok: #2f8f5b;
  --serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

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

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

em {
  font-style: italic;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }
}

.skip-link {
  position: absolute;
  top: 12px;
  left: -9999px;
  z-index: 100;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.skip-link:focus {
  left: 16px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.lang:hover {
  color: var(--ink);
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

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

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

.btn-small {
  padding: 9px 18px;
  font-size: 14px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.link-arrow span {
  transition: transform 0.15s;
}

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

.link-arrow:hover span {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .link-arrow span {
    transition: none;
  }
}

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

.hero {
  padding: 88px 0 0;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 15px;
}

.hero-actions .availability {
  margin: 0;
}

.availability .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent);
}

.hero h1 {
  max-width: 15ch;
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 7vw, 5.2rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero h1 em,
.contact-card h2 em {
  color: var(--accent);
  font-weight: 400;
}

.lead {
  max-width: 34em;
  margin: 0 0 36px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.25rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 24px 48px;
  margin: 64px 0 0;
}

.facts dt {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.2;
}

.facts dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 640px) {
  .facts {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 48px;
  }
}

/* The shoreline: sand meets sea, a nod to "Bordadágua" */

.shore {
  display: block;
  width: 100%;
  height: 150px;
  margin-top: 56px;
}

.shore .w3 { fill: var(--sea-deep); opacity: 0.55; }
.shore .w2 { fill: var(--sea-mid); }
.shore .w1 { fill: var(--sea-pale); }

@media (max-width: 640px) {
  .shore {
    height: 80px;
    margin-top: 40px;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 96px 0;
}

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

.section.sea {
  background: var(--sea-pale);
  border-top: 0;
}

.section.sea + .section {
  border-top: 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-head h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-head h2 + p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

@media (max-width: 640px) {
  .section {
    padding: 72px 0;
  }
}

/* Services */

.services {
  display: grid;
  gap: 0 56px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .services {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service {
  padding: 30px 0 34px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
}

.service .num {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
}

.service h3 {
  margin: 6px 0 10px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.service p {
  max-width: 30em;
  margin: 0;
  color: var(--muted);
}

/* Work */

.work {
  display: grid;
  gap: 20px;
}

@media (min-width: 760px) {
  .work {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project {
  display: flex;
  flex-direction: column;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

@media (max-width: 480px) {
  .project {
    padding: 26px 22px;
  }
}

.project-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.project > p {
  margin: 0 0 22px;
  color: var(--muted);
}

.project-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.project-foot .built-with {
  color: var(--muted);
}

.project-foot .link-arrow {
  font-size: 14px;
}

.also {
  max-width: 46em;
  margin: 32px 0 0;
  color: var(--muted);
}

/* Experience */

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline .when {
  padding-top: 6px;
  color: var(--muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.timeline h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.3;
}

.timeline p {
  max-width: 44em;
  margin: 6px 0 0;
  color: var(--muted);
}

@media (max-width: 600px) {
  .timeline li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .timeline .when {
    padding-top: 0;
  }
}

/* About */

.about-grid {
  display: grid;
  gap: 48px;
}

@media (min-width: 880px) {
  .about-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 72px;
  }
}

.about-text .intro {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.about-text p {
  margin: 0 0 20px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.info {
  display: grid;
  gap: 26px;
  margin: 0;
  align-content: start;
}

.info dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.info dd {
  margin: 0;
}

.info ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info li + li {
  margin-top: 4px;
}

.info .note {
  color: var(--muted);
}

/* Contact */

.contact {
  padding: 72px 0 96px;
}

.contact-card {
  padding: clamp(40px, 7vw, 80px);
  border-radius: 32px;
  background: var(--ink);
  color: var(--bg);
}

.contact-card h2 {
  max-width: 14ch;
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 5.5vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.contact-card h2 em {
  color: color-mix(in srgb, var(--accent) 70%, var(--bg));
}

.contact-card p {
  max-width: 32em;
  margin: 0 0 36px;
  font-size: 18px;
  opacity: 0.78;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

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

.btn-light:hover {
  background: var(--surface);
  color: var(--ink);
}

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

.contact-card .link-arrow:hover {
  color: var(--bg);
  opacity: 0.8;
}

/* Footer */

.site-footer {
  padding: 0 0 48px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--ink);
}
