/* ------------------------------------------------------------------
   pedrofuent.es — stylesheet
   Hand-written, mobile-first. No preprocessor, no framework.
   Palette in OKLCH, anchored on the deep teal-blue (#348cb2) the
   site has used for years. One distinctive move: a soft "stage-light"
   teal atmosphere from above and below.
------------------------------------------------------------------ */

:root {
  --bg-base:     oklch(18%   0.038 230);
  --bg-deep:     oklch(13%   0.030 230);
  --surface:     oklch(22%   0.040 230);
  --surface-2:   oklch(26%   0.045 230);
  --fg:          oklch(96%   0.012 90);
  --fg-strong:   oklch(99%   0.005 90);
  --muted:       oklch(72%   0.025 230);
  --muted-soft:  oklch(58%   0.030 230);
  --rule:        oklch(34%   0.040 230);
  --rule-soft:   oklch(28%   0.038 230);
  --accent:      oklch(78%   0.130 215);
  --accent-deep: oklch(60%   0.130 220);

  --measure: 44rem;

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont,
               'Segoe UI', system-ui, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%,
      color-mix(in oklch, var(--accent) 18%, transparent) 0%, transparent 65%),
    radial-gradient(ellipse 70% 40% at 50% 100%,
      color-mix(in oklch, var(--accent-deep) 12%, transparent) 0%, transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga", "kern";
  min-height: 100vh;
}
::selection { background: var(--accent); color: var(--bg-deep); }

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(4rem, 11vw, 7rem) clamp(1.5rem, 5vw, 2.5rem) var(--space-12);
  text-align: center;
}

/* ----- HEADER ----- */
header { margin-bottom: clamp(3rem, 7vw, 5rem); }

h1.name {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 200;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--fg-strong);
  margin: 0 0 0.6rem;
}

.role {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--muted);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
}
.role::before, .role::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: var(--rule);
}

.bio {
  margin: 2.5rem 0 0;
  font-size: 1em;
  line-height: 1.7;
  color: var(--fg);
  text-align: center;
}
.bio a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  padding-bottom: 1px;
  transition: border-color 180ms ease, color 180ms ease;
}
.bio a:hover, .bio a:focus-visible {
  border-color: var(--accent);
  color: var(--fg-strong);
  outline: none;
}

/* ----- SECTION HEAD ----- */
section.projects {
  margin-top: clamp(3.5rem, 7vw, 5rem);
  text-align: left;
}
.section-head {
  text-align: center;
  margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
}
.section-head h2 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--muted);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
}
.section-head h2::before, .section-head h2::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: var(--rule);
}
.section-sub {
  font-size: 0.92rem;
  color: var(--muted-soft);
  margin: 0.4rem 0 0;
  font-style: italic;
}

/* ----- PROJECT CARDS ----- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.project-grid > li {
  display: flex;
}

.project {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 0.55rem;
  padding: 1.15rem 1.2rem 1rem;
  background: color-mix(in oklch, var(--surface) 70%, transparent);
  border: 1px solid var(--rule-soft);
  border-radius: 10px;
  backdrop-filter: blur(2px);
  transition: border-color 200ms ease, transform 200ms ease, background 200ms ease;
  width: 100%;
}
.project:hover, .project:focus-within {
  border-color: color-mix(in oklch, var(--accent) 60%, var(--rule));
  background: color-mix(in oklch, var(--surface-2) 80%, transparent);
  transform: translateY(-1px);
}

.project-title {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
  line-height: 1.25;
  margin: 0;
  color: var(--fg-strong);
}
.project-title a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  transition: color 180ms ease;
}
.project-title a .ext {
  font-size: 0.78em;
  color: var(--muted-soft);
  transition: color 180ms ease, transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-title a:hover, .project-title a:focus-visible {
  color: var(--accent);
  outline: none;
}
.project-title a:hover .ext, .project-title a:focus-visible .ext {
  color: var(--accent);
  transform: translate(2px, -2px);
}
.project-title a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.project-desc {
  margin: 0;
  color: var(--fg);
  font-size: 0.92rem;
  line-height: 1.5;
  font-weight: 300;
}

.project-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.lang .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1px color-mix(in oklch, currentColor 20%, transparent);
}
.kind {
  color: var(--muted-soft);
}
.project-meta .sep {
  color: var(--rule);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  border-top: 1px solid var(--rule-soft);
  padding-top: 0.7rem;
  margin-top: 0.2rem;
}
.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}
.project-links a:hover, .project-links a:focus-visible {
  color: var(--accent);
  outline: none;
}
.project-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.project-links svg {
  width: 13px; height: 13px;
  fill: currentColor;
  opacity: 0.85;
}

.more-link {
  display: block;
  text-align: center;
  margin: 1.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 180ms ease;
}
.more-link:hover, .more-link:focus-visible {
  color: var(--accent);
  outline: none;
}
.more-link .arrow {
  display: inline-block;
  transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.more-link:hover .arrow,
.more-link:focus-visible .arrow {
  transform: translateX(3px);
}

/* ----- SOCIAL ROW ----- */
.social-row {
  margin-top: clamp(3.5rem, 7vw, 5rem);
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.social-row a {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--muted);
  border-radius: 50%;
  border: 1px solid var(--rule-soft);
  transition: color 180ms ease, border-color 180ms ease,
              background 180ms ease, transform 180ms ease;
}
.social-row a:hover, .social-row a:focus-visible {
  color: var(--accent);
  border-color: color-mix(in oklch, var(--accent) 60%, var(--rule));
  background: color-mix(in oklch, var(--accent) 8%, transparent);
  transform: translateY(-2px);
  outline: none;
}
.social-row a:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 25%, transparent);
}
.social-row svg {
  width: 15px; height: 15px;
  fill: currentColor;
}

/* ----- FOOTER ----- */
footer {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--muted-soft);
  font-size: 0.78rem;
  text-align: center;
}
footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 1px;
}
footer a:hover, footer a:focus-visible {
  color: var(--fg);
  outline: none;
}

/* ----- ACCESSIBILITY ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}
