/* Portfolio layout: sidebar + main, design tokens, section chrome */

:root {
  --bg: #F4EBD0;
  --ink: #2A241F;
  --accent: #D4AF37;
  --muted: #6B705C;
  --sidebar-width: 280px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --dot-grid: radial-gradient(rgba(42, 36, 31, 0.07) 1px, transparent 1px);
}

html {
  scroll-behavior: smooth;
}

body.site {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image: var(--dot-grid);
  background-size: 12px 12px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ——— Mobile top bar ——— */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid rgba(42, 36, 31, 0.12);
  position: sticky;
  top: 0;
  z-index: 30;
}

@media (min-width: 993px) {
  .mobile-header {
    display: none;
  }
}

.mobile-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
}

.menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(42, 36, 31, 0.2);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.menu-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.menu-button .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 3px 0;
  border-radius: 1px;
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(42, 36, 31, 0.35);
  z-index: 35;
  cursor: pointer;
}

.menu-toggle:checked ~ .site-shell .nav-backdrop {
  display: block;
}

@media (min-width: 993px) {
  .nav-backdrop {
    display: none !important;
  }
}

/* ——— Shell ——— */
.site-shell {
  display: flex;
  min-height: 100vh;
}

/* ——— Sidebar ——— */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid rgba(42, 36, 31, 0.1);
  padding: 2rem 1.5rem 2rem;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  transition: transform 0.25s ease;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: calc(100vh - 4rem);
}

.sidebar-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}

.sidebar-tagline {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.sidebar-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(212, 175, 55, 0.45);
  align-self: flex-start;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.45rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.sidebar-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sidebar-leadership {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(42, 36, 31, 0.12);
}

.sidebar-leadership strong {
  color: var(--ink);
  font-weight: 600;
}

.sidebar-social {
  margin-top: auto;
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
}

.sidebar-social a {
  color: var(--muted);
  font-size: 1.35rem;
  text-decoration: none;
}

.sidebar-social a:hover,
.sidebar-social a:focus-visible {
  color: var(--accent);
}

@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
  }

  .menu-toggle:checked ~ .site-shell .sidebar {
    transform: translateX(0);
  }
}

/* ——— Main ——— */
.main-content {
  flex: 1;
  min-width: 0;
  max-width: 860px;
  padding: 2.5rem 1.75rem 4rem;
  margin: 0 auto;
}

@media (min-width: 993px) {
  .main-content {
    padding: 3rem 2.5rem 5rem;
  }
}

.section-block {
  margin-bottom: 3.5rem;
}

.section-block h1,
.section-block h2 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.section-block h1 {
  font-size: 2rem;
  letter-spacing: 0.03em;
}

.section-block h2 {
  font-size: 1.65rem;
  letter-spacing: 0.04em;
}

.section-kicker {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.hero-line {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 36em;
}

.hero-sparkline {
  display: block;
  margin: 1rem 0 0;
  max-width: 280px;
  height: auto;
  opacity: 0.85;
}

.about-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 700px) {
  .about-grid {
    grid-template-columns: minmax(200px, 280px) 1fr;
  }
}

.about-photo-wrap {
  margin: 0;
}

.about-photo-wrap img {
  width: 100%;
  max-width: 280px;
  border-radius: 8px;
  border: 1px solid rgba(42, 36, 31, 0.12);
}

/* When the sidebar shows the headshot, hide the duplicate in About and use one full-width column so body text matches the Skills chart width. */
@media (min-width: 993px) {
  .about-photo-wrap {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-line {
    max-width: none;
  }
}

.about-body p {
  margin: 0 0 1rem;
  text-align: left;
}

.main-content a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(212, 175, 55, 0.45);
  text-underline-offset: 3px;
}

.main-content a:hover,
.main-content a:focus-visible {
  color: var(--ink);
  text-decoration-color: var(--accent);
}

#skills {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 700px) {
  ul.bar-graph {
    min-width: 540px;
  }
}

/* Include padding in bar height so 100% bars don’t extend past the top grid line */
.bar-graph li {
  box-sizing: border-box;
}

/* Top tier: 100% of the column reads past the “Know-it-all” dashed line (border + flex rounding); cap height */
.bar-graph .bar--knowitall {
  height: 97% !important;
  align-self: flex-end;
}

/* Bar chart: more width per bar + calmer labels (axis was ~25% of row) */
.bar-graph .bar-graph-axis {
  flex: 1 1 17%;
  min-width: 6.75rem;
}

.bar-graph > li:not(.bar-graph-axis) {
  flex: 1 1 10.5%;
  max-width: none;
  margin-right: 0.65%;
}

.bar-graph > li:not(.bar-graph-axis):last-child {
  margin-right: 0;
}

.bar-graph .bar .description {
  font-size: 0.65rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  padding: 0 4px 4px;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 100%;
  box-sizing: border-box;
}

/* Skills bar chart label contrast */
.bar-graph .bar.current .description {
  color: var(--bg);
  opacity: 1;
}

.bar-graph .bar.offnon .description {
  color: var(--ink);
  opacity: 1;
}

.bar-graph .bar.beenawhile .description {
  color: var(--bg);
  opacity: 1;
}

.bar-graph .bar.longwhile .description {
  color: var(--bg);
  opacity: 1;
}

.legend {
  overflow: hidden;
  padding-top: 1rem;
}

.legend li {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Timeline text on dark cards */
.timeline .content h4 {
  font-family: var(--font-display);
  color: var(--bg);
  margin: 0.5rem 0 0.25rem;
}

.timeline .content > p {
  color: rgba(244, 235, 208, 0.9);
  margin: 0.25rem 0;
  text-align: left;
}

.timeline .content ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0 0;
  text-align: left;
}

.timeline .content li {
  color: rgba(244, 235, 208, 0.95);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.35rem;
}

.content--soft {
  background-color: rgba(107, 112, 92, 0.18) !important;
}

.content--soft h4,
.content--soft > p {
  color: var(--ink) !important;
}

.content--soft li {
  color: var(--ink) !important;
}

.content--accent {
  background-color: var(--muted) !important;
}

.content--accent h4,
.content--accent > p,
.content--accent li {
  color: var(--bg) !important;
}

/* Project cards */
.project-grid {
  display: grid;
  gap: 1.25rem;
}

.project-card {
  padding: 1.35rem 1.5rem;
  border: 1px solid rgba(42, 36, 31, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.35);
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.project-card p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--ink);
  text-align: left;
}

.project-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(107, 112, 92, 0.2);
  color: var(--ink);
}

/* Contact */
.contact-form .w3-input {
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(42, 36, 31, 0.25);
  color: var(--ink);
}

.contact-form .w3-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-form button[type="submit"] {
  background: var(--accent) !important;
  color: var(--ink) !important;
  font-weight: 600;
  letter-spacing: 0.1em;
  border: none;
  padding: 0.75rem 1.5rem !important;
}

.contact-form button[type="submit"]:hover {
  filter: brightness(1.05);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid rgba(42, 36, 31, 0.1);
}

.site-footer a {
  color: var(--muted);
  font-weight: 400;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

hr.section-rule {
  border: 0;
  border-top: 1px solid rgba(42, 36, 31, 0.12);
  margin: 2rem 0;
}
