/* modern.css — KennyGutierrez.com redesign (light & airy) */

:root {
  --bg:          #f5f4f0;
  --surface:     #ffffff;
  --surface-2:   #edece8;
  --border:      rgba(0,0,0,0.08);
  --accent:      #4f5fd4;
  --accent-light: rgba(79,95,212,0.08);
  --text:        #1a1a24;
  --text-muted:  #56566b;
  --radius:      12px;
  --max-w:       1140px;
  --header-h:    68px;
  --ease:        cubic-bezier(0.4,0,0.2,1);
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-lg:   0 16px 48px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.06);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.75; }
img { display: block; max-width: 100%; }

/* ── Container ── */
.kg-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Header ── */
.kg-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(245,244,240,0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.kg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.kg-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.kg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.kg-brand-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.kg-nav {
  display: flex;
  gap: 4px;
  list-style: none;
}

.kg-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 8px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  text-decoration: none;
}

.kg-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
  opacity: 1;
}

.kg-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  line-height: 0;
}

/* ── Hero ── */
.kg-hero {
  position: relative;
  min-height: clamp(560px, 80vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.kg-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.kg-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* no full-bleed overlay — let the canyon photo breathe */
.kg-hero-gradient { display: none; }

.kg-hero-content {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: auto 0 40px;
  padding: 32px 36px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
}

.kg-hero .kg-container {
  display: flex;
  align-items: flex-end;
  min-height: inherit;
  padding-top: 32px;
}

.kg-hero-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

.kg-hero-heading {
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 24px;
}

.kg-hero-body {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 500px;
}

.kg-hero-body p + p { margin-top: 14px; }

/* ── Sections ── */
.kg-section {
  padding: 96px 0;
}

.kg-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.kg-section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 44px;
}

.kg-divider {
  height: 1px;
  background: var(--border);
}

/* ── Cards grid ── */
.kg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.kg-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.kg-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79,95,212,0.2);
  box-shadow: var(--shadow-lg);
}

.kg-card-img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}

.kg-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.kg-card-img-wrap a {
  display: block;
  width: 100%;
  height: 100%;
}

.kg-card:hover .kg-card-img-wrap img {
  transform: scale(1.05);
}

.kg-card-body {
  padding: 16px 20px 20px;
}

.kg-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.kg-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.kg-card-title a:hover {
  color: var(--accent);
  opacity: 1;
}

.kg-card-caption {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Article list (Blog) ── */
.kg-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.kg-article {
  display: flex;
  flex-direction: column;
  padding: 26px 28px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.kg-article:hover {
  transform: translateY(-3px);
  border-color: rgba(79,95,212,0.25);
  box-shadow: var(--shadow-md);
  opacity: 1;
}

.kg-article-date {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.kg-article-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.kg-article-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.kg-article-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s var(--ease);
}

.kg-article:hover .kg-article-link {
  gap: 10px;
}

/* ── Prose (Resume) ── */
.kg-prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
}

.kg-prose h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 56px;
  text-align: center;
}

.kg-prose h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 52px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.kg-prose h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.kg-prose h3 a { color: var(--accent); }
.kg-prose h3 a:hover { opacity: 0.75; }

.kg-prose p {
  margin-bottom: 10px;
  color: var(--text-muted);
}

.kg-prose p:has(> br:only-child),
.kg-prose p:empty { display: none; }

.kg-prose ul {
  list-style: none;
  margin-bottom: 12px;
}

.kg-prose ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 7px;
  font-size: 14px;
  color: var(--text-muted);
}

.kg-prose ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
  top: 3px;
}

/* ── Contact ── */
.kg-contact {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.kg-contact h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 40px;
}

.kg-contact p {
  color: var(--text-muted);
  margin-bottom: 10px;
  font-size: 16px;
}

.kg-contact a {
  color: var(--accent);
  font-weight: 500;
}

/* ── Footer ── */
.kg-footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  background: var(--surface);
}

.kg-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kg-footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.kg-footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.kg-footer-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.kg-footer-links a:hover {
  color: var(--text);
  opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .kg-menu-btn { display: flex; }

  .kg-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(245,244,240,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--border);
    gap: 0;
  }

  .kg-nav.open { display: flex; }

  .kg-nav a {
    padding: 14px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
  }

  .kg-nav li:last-child a { border-bottom: none; }

  .kg-footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .kg-section { padding: 72px 0; }
  .kg-hero-content { padding: 24px 22px; margin: auto 0 24px; max-width: 100%; }
}

@media (max-width: 560px) {
  .kg-cards { grid-template-columns: 1fr; }
  .kg-section { padding: 56px 0; }
}

/* ── Skip link ── */
.kg-skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.kg-skip:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

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

main:focus { outline: none; }

.kg-card:focus-within {
  border-color: rgba(79, 95, 212, 0.45);
  box-shadow: var(--shadow-md);
}

.kg-article:focus-visible {
  outline-offset: 4px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .kg-card:hover,
  .kg-article:hover {
    transform: none;
  }
  .kg-card:hover .kg-card-img-wrap img {
    transform: none;
  }
}
