/* catazevedo.com
 *
 * Carried over from the ASP.NET site's wwwroot/css/site.css. That site also loaded
 * all of Bootstrap but used only its reset and four classes (container,
 * container-fluid, pb-3, text-danger). The "Base" section below reproduces the parts
 * of Bootstrap the pages relied on, so the look is unchanged without the 230 KB file.
 */

:root {
  --accent-yellow: #f5c255;
  --text-active: #181818;
  --text-muted: #aaaaaa;
  --text-body: #212529;
  --link: #0d6efd;
  --link-hover: #0a58ca;
}

/* ---- Base (formerly Bootstrap's reset) ---- */

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

html {
  font-size: 14px;
  scroll-behavior: smooth;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  font-family:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-body);
  background: #fff;
  -webkit-text-size-adjust: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1 {
  margin: 0 0 0.5rem;
  font-weight: 500;
  line-height: 1.2;
  font-size: calc(1.375rem + 1.5vw);
}

@media (min-width: 1200px) {
  h1 {
    font-size: 2.5rem;
  }
}

p {
  margin: 0 0 1rem;
}

/* Hover changes the variable, not the color property itself. So any link with its
   own color (white card titles, the yellow footer) keeps that color on hover; only
   plain links turn darker blue. This is how Bootstrap did it. Setting `color` in
   a:hover instead outranks rules like `.gallery-card { color: white }` and turned
   card titles blue on hover. */
a {
  --link-color: var(--link);
  color: var(--link-color);
}

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

/* Read by screen readers, invisible on screen: a heading for pages whose visible
   design already makes the title clear. No !important needed: no rule more specific
   than this class styles the headings that use it. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The visible title on a gallery page. */
.page-title {
  margin-bottom: 1rem;
}

img,
svg {
  vertical-align: middle;
}

/* width/height attributes on <img> reserve space before the file arrives; this
   keeps them from fixing the rendered size. */
img {
  max-width: 100%;
  height: auto;
}

/* <picture> wraps each <img> to offer AVIF and WebP. display: contents takes the
   wrapper out of layout, so CSS written for a bare <img> (".gallery-card img")
   still applies as before. */
picture {
  display: contents;
}

/* ---- Layout containers (formerly Bootstrap's .container / .container-fluid) ---- */

.container,
.container-fluid {
  width: 100%;
  padding-inline: 0.75rem;
  margin-inline: auto;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

.container {
  flex: 1 0 auto;
}

.site-main {
  padding-bottom: 1rem;
}

/* ---- Landing page ---- */

.landing-body {
  margin-bottom: 0;
}

.landing-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* The hero artwork, drawn like a CSS cover background but as an <img>, so the
   browser can pick a size from its srcset. */
.landing-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

/* White wash over the artwork, under the text. */
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.35);
}

.landing-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #1a1a1a;
  padding: 1.5rem;
}

.landing-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent-yellow);
  margin-bottom: 0.25rem;
}

.landing-subtitle {
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9c8347;
  margin-bottom: 2rem;
}

.btn-pill {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  background: var(--accent-yellow);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  margin-bottom: 2rem;
  transition: opacity 0.2s ease;
}

.btn-pill:hover {
  opacity: 0.85;
  color: #fff;
}

.landing-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.landing-socials a {
  color: #1a1a1a;
  transition: color 0.2s ease;
}

/* Hover: see "Hover states" at the end of the file. */

/* ---- Header and nav ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #eee;
  margin-bottom: 2rem;
}

.site-header-inner {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding: 1.5rem 1rem;
}

.brand-link {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-yellow);
  text-decoration: none;
}

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

.site-nav {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-left: 3rem;
}

.site-nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.site-nav-link:hover,
.site-nav-link.active {
  color: var(--text-active);
}

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

.site-footer {
  border-top: 1px solid #eee;
  margin-top: 3rem;
  padding: 2.5rem 1rem;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  justify-self: center;
}

.back-to-top {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.back-to-top:hover {
  color: var(--text-active);
}

.footer-credit {
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent-yellow);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-self: start;
}

.footer-socials a {
  color: var(--accent-yellow);
  transition: opacity 0.2s ease;
}

/* Hover: see "Hover states" at the end of the file. */

.footer-email {
  font-size: 0.9rem;
  color: var(--accent-yellow);
  text-decoration: none;
  justify-self: end;
  white-space: nowrap;
}

.footer-email:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .site-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-email {
    white-space: normal;
  }
}

/* ---- Hub: a row of project cards ---- */

.gallery-grid {
  display: flex;
  gap: 0.75rem;
  height: 600px;
}

.gallery-card {
  position: relative;
  display: block;
  height: 100%;
  flex: 1 1 0;
  overflow: hidden;
  color: white;
  text-decoration: none;
}

.gallery-card img {
  display: block;
  height: 100%;
  width: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transition: filter 0.3s ease;
}

/* Hover: see "Hover states" at the end of the file. */

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-card-title {
  font-size: 2rem;
  font-weight: 600;
}

/* ---- Leaf: masonry columns of images ---- */

.leaf-gallery {
  columns: 3 250px;
  column-gap: 1rem;
}

.leaf-gallery a {
  display: block;
  margin-bottom: 1rem;
  break-inside: avoid;
}

.leaf-gallery img {
  width: 100%;
  display: block;
}

/* ---- Image detail ---- */

.image-detail {
  display: flex;
  justify-content: center;
}

/* width and height both auto, so max-width and max-height scale the image
   down while keeping its proportions. */
.image-detail-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.image-detail-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
}

/* ---- About ---- */

.about-page {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3rem;
  padding: 2rem 0 4rem;
}

.about-photo-col {
  flex: 0 0 320px;
  text-align: center;
}

.about-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
}

.about-photo-caption {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.about-photo-caption a {
  color: inherit;
}

.about-content-col {
  flex: 1 1 420px;
  min-width: 280px;
}

.about-resume-btn {
  display: block;
  width: max-content;
  margin: 0 auto 2rem;
}

.about-greeting {
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.about-paragraph {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.about-contact {
  margin-bottom: 2rem;
  line-height: 1.7;
}

.about-contact a {
  color: var(--text-active);
  font-weight: 700;
}

.about-clients {
  text-align: center;
}

.about-clients-label {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.about-clients-list {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.8;
}

/* ---- 404 ---- */

.not-found {
  text-align: center;
  padding: 4rem 1rem;
}

/* ---- Hover states ----
   Kept together at the end on purpose. Each rule here is more specific than the
   plain rule for the same element (".footer-socials a:hover" beats
   ".footer-socials a"). With every hover rule after every plain one, specificity
   only rises through the file, so a plain rule further down can never be silently
   outranked by a hover rule above it. Biome's noDescendingSpecificity checks this. */

.landing-socials a:hover {
  color: var(--accent-yellow);
}

.footer-socials a:hover {
  opacity: 0.75;
}

.gallery-card:hover img {
  filter: brightness(0.5);
}
