/*
Theme Name:   Lorenzo Solís
Theme URI:    https://lorenzosolis.com
Description:  GeneratePress child theme for lorenzosolis.com. Grey ground, white bento cards, a pill nav and one blue accent. Built for the core block editor.
Author:       Lorenzo Solís
Template:     generatepress
Version:      1.0.0
Requires at least: 6.3
Text Domain:  lorenzosolis
*/

/* ==========================================================================
   1. Tokens (tokens.css, unchanged)
   ========================================================================== */

:root, [data-theme="light"] {
  --palette-blue: #1f5eff;
  --palette-cloud: #f4f5f7;
  --palette-ink: #111318;
  --ground: var(--palette-cloud);
  --surface: #ffffff;
  --surface-sunken: #e9ecf1;
  --ink: var(--palette-ink);
  --muted: #5d6470;
  --line: #e3e6eb;
  --accent: var(--palette-blue);
  --on-accent: #ffffff;
  --accent-soft: #e4ecff;
  --focus: var(--palette-blue);
  --shadow-card: 0 1px 2px rgba(17, 19, 24, 0.04), 0 8px 24px rgba(17, 19, 24, 0.06);
}
:root {
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --font-jakarta: "Plus Jakarta Sans", system-ui, sans-serif;
}

/* Derived values used below. The type sizes follow the README and the
   reference image (display 52, experience heading 28, card headings 22). */
:root {
  --accent-hover: color-mix(in srgb, var(--accent) 92%, #000);
  --page-gutter: var(--space-6);
  --display-size: clamp(32px, 2.6vw + 22px, 52px);
}

/* ==========================================================================
   2. Base
   ========================================================================== */

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-jakarta);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-jakarta);
}

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

.entry-content a:not(.wp-block-button__link):hover,
.site-info a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ==========================================================================
   3. Header: name left, pill menu right
   ========================================================================== */

.site-header {
  background: transparent;
}

.site-header .inside-header {
  padding: var(--space-4) var(--page-gutter) var(--space-6);
}

.site-header .main-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.site-header .main-title a,
.site-header .main-title a:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-header .main-navigation,
.site-header .main-navigation .inside-navigation {
  background: transparent;
}

@media (min-width: 900px) {
  .site-header .main-navigation .main-nav > ul {
    gap: var(--space-1);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: 6px 6px 6px 12px;
    box-shadow: var(--shadow-card);
  }
}

.site-header .main-navigation .main-nav ul li a {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  background: transparent;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
}

.site-header .main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
.site-header .main-navigation .main-nav ul li:not([class*="current-menu-"]):focus-within > a {
  color: var(--ink);
  background: transparent;
}

.site-header .main-navigation .main-nav ul li[class*="current-menu-"] > a {
  color: var(--ink);
  font-weight: 600;
  background: transparent;
}

/* "Get in touch": add the class menu-cta to the menu item
   (Appearance → Menus → Screen Options → CSS Classes). */
.site-header .main-navigation .main-nav ul li.menu-cta > a {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  padding: 10px 20px;
  margin-left: var(--space-1);
}

.site-header .main-navigation .main-nav ul li.menu-cta:hover > a,
.site-header .main-navigation .main-nav ul li.menu-cta > a:focus-visible {
  background: var(--accent-hover);
  color: var(--on-accent);
}

/* ==========================================================================
   4. Homepage frame: no white content box, page gutter only
   ========================================================================== */

/* Padding, not margin: GeneratePress resets #main margins on mobile. */
.home.page .site-content {
  padding: 0 var(--page-gutter);
}

.home.page .site-main {
  margin: 0;
}

.home.page .inside-article {
  background: transparent;
  padding: 0;
}

.home.page .entry-content {
  margin: 0;
}

/* ==========================================================================
   5. Bento grid
   ========================================================================== */

/* Outer Group (class: bento) stacks the rows with the grid gutter. */
.entry-content .bento {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.entry-content .bento > * {
  margin: 0;
}

/* Columns blocks (class: bento-row) become a 12-column grid. */
.entry-content .wp-block-columns.bento-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
}

.entry-content .bento-row > .wp-block-column {
  margin: 0;
  min-width: 0;
}

@media (min-width: 900px) {
  .entry-content .hero-row > .wp-block-column:first-child { grid-column: span 7; }
  .entry-content .hero-row > .wp-block-column:last-child  { grid-column: span 5; }
  .entry-content .facts-row > .wp-block-column            { grid-column: span 4; }
}

/* ==========================================================================
   6. Cards
   ========================================================================== */

.entry-content .card {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
  margin: 0;
  padding: var(--space-4);
  background: var(--surface);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s ease;
}

.entry-content .card:hover {
  box-shadow: var(--shadow-card);
}

.entry-content .card > * {
  margin: 0;
}

.entry-content .card h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.entry-content .card h3 {
  color: var(--ink);
}

/* Small label above a heading: Experience, Now, Judge, Professor. */
.entry-content .label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
}

/* Category or status chip. */
.entry-content .chip {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

/* ---------- Hero (class: card hero) ---------- */

.entry-content .hero {
  min-height: 440px;
}

/* The H1: small, visible, accent. Carries the SEO keyword. */
.entry-content .hero h1 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--accent);
}

/* The big statement is a paragraph, not a heading. */
.entry-content .hero .statement {
  font-size: var(--display-size);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: var(--space-2) 0 var(--space-3);
}

.entry-content .hero .lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: var(--space-4);
}

.entry-content .hero .wp-block-buttons {
  margin-top: auto;
}

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

.entry-content .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.entry-content .wp-block-button {
  margin: 0;
}

/* a.wp-block-button__link plus the wrapper outranks GeneratePress's
   a.wp-block-button__link:not(.has-background) Customizer colours. */
.entry-content .wp-block-button a.wp-block-button__link {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.entry-content .wp-block-button a.wp-block-button__link:hover,
.entry-content .wp-block-button a.wp-block-button__link:focus-visible {
  background: var(--accent-hover);
  color: var(--on-accent);
}

/* Secondary button: add the class btn-alt to the Button block. */
.entry-content .wp-block-button.btn-alt a.wp-block-button__link {
  background: var(--surface-sunken);
  color: var(--ink);
}

.entry-content .wp-block-button.btn-alt a.wp-block-button__link:hover,
.entry-content .wp-block-button.btn-alt a.wp-block-button__link:focus-visible {
  background: color-mix(in srgb, var(--surface-sunken) 92%, #000);
  color: var(--ink);
}

/* ---------- Photo (class: card photo) ---------- */

.entry-content .photo {
  background: var(--accent-soft);
  align-items: center;
  justify-content: center;
}

.entry-content .photo .wp-block-image {
  margin: 0;
}

.entry-content .photo img {
  display: block;
  width: 320px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

/* ---------- Experience (class: card experience) ---------- */

.entry-content .experience h2 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: var(--space-1) 0 var(--space-3);
}

/* Logo grid (class: logos) with one tile Group per company (class: logo). */
.entry-content .logos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-2);
}

.entry-content .logos > * {
  margin: 0;
}

.entry-content .logo {
  display: grid;
  place-items: center;
  align-content: center;
  height: 96px;
  box-sizing: border-box;
  padding: var(--space-2);
  background: var(--ground);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--muted);
}

.entry-content .logo > * {
  margin: 0;
}

/* Placeholder wordmark until the logo file is in place. */
.entry-content .logo p {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.entry-content .logo p.logo-sub {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  margin-top: 4px;
}

/* Real logo files: Image block inside the tile, 28 to 32px tall. */
.entry-content .logo .wp-block-image {
  margin: 0;
}

.entry-content .logo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 30px;
  object-fit: contain;
}

/* Square marks (EF) need more height to read at the same weight. */
.entry-content .logo .is-tall img {
  height: 44px;
}

/* All-caps wordmarks (Privilee) read heavier, so they sit smaller. */
.entry-content .logo .is-wide img {
  height: 16px;
}

/* Compact marks (Just Eat, bwin) need more height to match. */
.entry-content .logo .is-large img {
  height: 38px;
}

/* ---------- Credentials (class: card fact) ---------- */

.entry-content .fact {
  gap: var(--space-2);
}

.entry-content .fact .badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-1);
  overflow: hidden;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.entry-content .fact .badge img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Badge as an Image block: the organisation's mark on ground. */
.entry-content .fact figure.badge {
  background: var(--ground);
}

/* App-icon style marks (Privilee) fill the whole badge. */
.entry-content .fact figure.badge.is-full img {
  width: 44px;
  height: 44px;
  object-fit: cover;
}

.entry-content .fact h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.entry-content .fact p:not(.label):not(.badge) {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Writing (class: card writing) ---------- */

.entry-content .writing {
  padding: var(--space-3) var(--space-4) var(--space-2);
}

.entry-content .writing-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
}

.entry-content .writing-head > * {
  margin: 0;
}

.entry-content .writing-head a {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.entry-content .writing .wp-block-query {
  margin: 0;
}

.entry-content .writing .wp-block-post-template {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry-content .writing .wp-block-post {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.entry-content .writing .wp-block-post > * {
  margin: 0;
}

.entry-content .writing .wp-block-post-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.entry-content .writing .wp-block-post-title a {
  color: var(--ink);
  text-decoration: none;
}

.entry-content .writing .wp-block-post-title a:hover {
  color: var(--accent);
}

/* Category as a chip; one chip per article. */
.entry-content .writing .wp-block-post-terms {
  flex: none;
  font-size: 13px;
}

.entry-content .writing .wp-block-post-terms a {
  display: inline-block;
  font-weight: 600;
  line-height: 1.3;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
}

.entry-content .writing .wp-block-post-terms a:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--accent-soft) 92%, var(--accent));
}

.entry-content .writing .wp-block-post-terms a ~ a,
.entry-content .writing .wp-block-post-terms__separator {
  display: none;
}

/* ---------- Inner-page cards (classes: results, career) ---------- */

/* Same card surface, used on About and other inner pages. */
.entry-content .results,
.entry-content .career {
  gap: var(--space-2);
}

.entry-content .results h3,
.entry-content .career h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.entry-content .results p:not(.label):not(.chip),
.entry-content .career p:not(.label):not(.chip) {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

/* ==========================================================================
   7. Footer: copyright left, links right (Footer Bar widget)
   ========================================================================== */

.site-footer .site-info {
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .inside-site-info {
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-6) var(--page-gutter);
}

.site-footer .copyright-bar {
  order: 1;
  text-align: left;
}

.site-footer .footer-bar {
  order: 2;
}

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

.site-footer .footer-bar .widget {
  margin: 0;
  padding: 0;
}

.site-footer .footer-bar ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Beats GeneratePress's 10px link margins in widget-areas.css. */
.site-footer .footer-bar .widget_nav_menu li {
  margin: 0;
  padding: 0;
}

.site-footer .footer-bar a {
  font-weight: 600;
  color: var(--ink);
}

/* ==========================================================================
   8. Responsive
   ========================================================================== */

@media (max-width: 899px) {
  :root {
    --page-gutter: var(--space-3);
  }

  /* Header: name left, toggle right. */
  .site-header .inside-header {
    padding-bottom: var(--space-4);
  }

  .site-header .mobile-menu-control-wrapper .menu-toggle {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-card);
    color: var(--ink);
    font-weight: 600;
    line-height: 1.3;
    padding: 10px 18px;
  }

  /* GeneratePress tints the open menu with an ID selector. */
  .site-header #site-navigation.toggled {
    background: transparent;
  }

  .site-header .main-navigation.toggled .main-nav > ul {
    margin-top: var(--space-2);
    padding: var(--space-1);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
  }

  .site-header .main-navigation .main-nav ul li a {
    padding: 12px 16px;
  }

  .site-header .main-navigation .main-nav ul li.menu-cta > a {
    display: inline-block;
    margin: var(--space-1) 0 var(--space-1) var(--space-1);
  }

  /* Hero and credentials stack to one column. */
  .entry-content .wp-block-columns.bento-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-content .hero {
    min-height: 0;
  }

  .entry-content .photo {
    padding: var(--space-6) var(--space-4);
  }

  /* Logos: 3 columns, then 2. */
  .entry-content .logos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer .inside-site-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer .footer-bar {
    order: 1;
  }

  .site-footer .copyright-bar {
    order: 2;
  }
}

@media (max-width: 599px) {
  :root {
    --page-gutter: var(--space-2);
  }

  .entry-content .card {
    padding: var(--space-3);
  }

  .entry-content .writing {
    padding: var(--space-2) var(--space-3) var(--space-1);
  }

  .entry-content .logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-content .logo {
    height: 80px;
  }

  .entry-content .hero .lede {
    font-size: 17px;
  }

  .entry-content .experience h2 {
    font-size: 24px;
  }

  .entry-content .writing .wp-block-post {
    align-items: flex-start;
    gap: var(--space-2);
  }

  .entry-content .writing .wp-block-post-title {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry-content .card,
  .entry-content .wp-block-button__link {
    transition: none;
  }
}
