/*
Theme Name: Fernando Polania
Theme URI: https://fernandopolania.com
Author: OpenAI for Fernando Polania
Description: A clean personal WordPress theme for projects, travel, learning, journal entries, and personal storytelling.
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: fernando-polania
*/

:root {
  --fp-bg: #f4efe7;
  --fp-surface: #fffaf3;
  --fp-text: #171717;
  --fp-muted: #68625b;
  --fp-charcoal: #121212;
  --fp-copper: #a65f38;
  --fp-line: rgba(23,23,23,.12);
  --fp-radius: 22px;
  --fp-max: 1180px;
  --fp-shadow: 0 16px 48px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--fp-bg);
  color: var(--fp-text);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.container { width: min(calc(100% - 40px), var(--fp-max)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(244,239,231,.88);
  border-bottom: 1px solid var(--fp-line);
}
.header-inner {
  min-height: 82px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.brand {
  text-decoration: none; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; font-size: .95rem;
}
.main-nav ul {
  list-style: none; display: flex; gap: 24px; padding: 0; margin: 0; align-items: center;
}
.main-nav a { text-decoration: none; font-weight: 650; font-size: .88rem; }
.main-nav a:hover { color: var(--fp-copper); }

.hero {
  min-height: 78vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px; align-items: center; padding: 64px 24px 60px 0;
}
.kicker { color: var(--fp-copper); text-transform: uppercase; letter-spacing: .15em; font-weight: 800; font-size: .78rem; }
.hero h1 {
  font-size: clamp(3rem, 6.4vw, 6rem); line-height: 1.02; margin: 16px 0 26px; letter-spacing: -.055em;
}
.hero p { font-size: 1.16rem; color: var(--fp-muted); max-width: 44ch; }
.hero-photo {
  border-radius: 34px; overflow: hidden; box-shadow: var(--fp-shadow);
  aspect-ratio: 4/5; background: #ddd;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 36%; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 20px; border-radius: 999px; text-decoration: none; font-weight: 750;
  border: 1px solid var(--fp-charcoal);
}
.button.primary { background: var(--fp-charcoal); color: white; }
.button.secondary { background: transparent; }
.button:hover { transform: translateY(-1px); }

.section { padding: 90px 0; }
.section.dark { background: var(--fp-charcoal); color: white; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 34px; }
.section h2 { font-size: clamp(2.1rem, 4vw, 4rem); line-height: 1; margin: 0; letter-spacing: -.04em; }
.section-intro { max-width: 620px; color: var(--fp-muted); margin-top: 16px; }
.dark .section-intro { color: rgba(255,255,255,.72); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: var(--fp-surface); border: 1px solid var(--fp-line); border-radius: var(--fp-radius);
  padding: 28px; min-height: 260px; text-decoration: none; display: flex; flex-direction: column;
  justify-content: space-between; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--fp-shadow); }
.card .num { color: var(--fp-copper); font-size: .85rem; font-weight: 850; letter-spacing: .12em; }
.card h3 { font-size: 1.7rem; margin: 30px 0 8px; }
.card p { color: var(--fp-muted); margin: 0; }
.card .arrow { font-size: 1.4rem; margin-top: 24px; }

.current-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.current-item { border-top: 1px solid rgba(255,255,255,.22); padding-top: 18px; }
.current-item strong { display: block; color: #d38c64; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card {
  background: var(--fp-surface); border-radius: var(--fp-radius); overflow: hidden;
  border: 1px solid var(--fp-line);
}
.post-card .inside { padding: 22px; }
.post-card h3 { margin: 4px 0 10px; }
.post-card a { text-decoration: none; }
.post-meta { color: var(--fp-copper); font-size: .85rem; font-weight: 750; }

.about-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-strip p { color: var(--fp-muted); font-size: 1.08rem; }

.page-hero { padding: 100px 0 50px; }
.page-hero h1 { font-size: clamp(3rem, 6vw, 6rem); line-height: .95; letter-spacing: -.05em; margin: 0 0 20px; }
.content-wrap { width: min(calc(100% - 40px), 820px); margin: 0 auto; padding: 20px 0 90px; }
.content-wrap h2, .content-wrap h3 { line-height: 1.2; }
.content-wrap p { font-size: 1.08rem; }

.site-footer { background: #0e0e0e; color: white; padding: 54px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner p { margin: 0; color: rgba(255,255,255,.62); }

.menu-toggle { display:none; border:0; background:transparent; font-size:1.4rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding: 45px 0 60px; }
  .hero-photo { order: -1; max-height: 620px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .current-grid, .posts-grid { grid-template-columns: 1fr 1fr; }
  .about-strip { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .container { width: min(calc(100% - 28px), var(--fp-max)); }
  .header-inner { min-height: 68px; }
  .menu-toggle { display:block; }
  .main-nav { display:none; position:absolute; left:0; right:0; top:68px; background:var(--fp-bg); border-bottom:1px solid var(--fp-line); padding:16px 20px 22px; }
  .main-nav.open { display:block; }
  .main-nav ul { flex-direction:column; align-items:flex-start; gap:14px; }
  .hero { min-height:auto; padding:24px 0 50px; }
  .hero h1 { font-size: clamp(2.65rem, 13vw, 4.2rem); }
  .hero-photo { border-radius: 24px; aspect-ratio: 4/5; }
  .section { padding: 68px 0; }
  .cards, .current-grid, .posts-grid { grid-template-columns: 1fr; }
  .card { min-height: 220px; }
}

/* Version 1.1: balanced gutters, keyboard focus, and a wrapping header. */
.header-inner { flex-wrap: wrap; padding-block: 16px; }
.main-nav > ul { flex-wrap: wrap; column-gap: 24px; row-gap: 4px; }
.main-nav a { display: block; padding-block: 8px; }
.main-nav .current-menu-item > a { color: var(--fp-copper); }
.main-nav li { position: relative; }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 180px; padding: 12px; background: var(--fp-bg); border: 1px solid var(--fp-line); }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: block; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--fp-copper); outline-offset: 5px; }
.menu-toggle { min-width: 44px; min-height: 44px; cursor: pointer; color: var(--fp-text); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 680px) {
  .header-inner { padding-block: 12px; }
  .main-nav { top: 100%; max-height: 75vh; overflow-y: auto; }
  .main-nav .sub-menu { display: block; position: static; border: 0; padding-block: 0; }
  .main-nav a { padding-block: 5px; }
  .hero > div { min-width: 0; }
  .brand { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}

