:root {
  /* V1 PALETTE */
  --bg-paper: #F9F7F2;
  --ink-black: #222222;
  --retro-orange: #E76F51;
  --retro-gold: #E9C46A;
  --retro-teal: #2A9D8F;
  --retro-navy: #264653;

  /* V1 STYLE VARIABLES */
  --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  --border-thick: 2px solid var(--ink-black);
  --shadow-hard: 4px 4px 0px 0px var(--ink-black);
}

* { box-sizing: border-box; }

body {
  background-color: var(--bg-paper);
  color: var(--ink-black);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* --- NAVIGATION --- */
nav.main-nav {
  border-bottom: var(--border-thick);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-black);
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-black);
  margin-left: 2rem;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  padding-bottom: 5px;
}

.nav-links a:hover {
  color: var(--retro-orange);
  border-bottom: 3px solid var(--retro-teal);
}

/* --- HERO SECTION --- */
.hero {
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 2rem;
}

h1.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.highlight {
  padding: 0 0.25em;
  display: inline-block;
  position: relative;
  z-index: 1;
}

.highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--retro-gold);
  transform: rotate(-1.5deg);
  z-index: -1;
}

.sub-hero {
  font-size: 1.25rem;
  color: #555;
  max-width: 600px;
  margin-bottom: 3rem;
}

.hero-links {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 1.5rem;
  row-gap: 0.4rem;
  justify-content: start;
  margin: 0 0 .5rem 0;
}

.hero-links-row {
  display: contents;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--retro-teal);
  text-decoration: none;
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.hero-links a svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.hero-links a:hover {
  color: var(--retro-orange);
  text-decoration: underline;
}

.hero-location {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: #666;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.resume-toolbar {
  display: flex;
  justify-content: flex-end;
  max-width: 900px;
  margin: 1rem auto 0 auto;
  padding: 0 2rem;
}

.resume-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--retro-teal);
  background: #fff;
  border: 2px solid var(--retro-teal);
  border-radius: 6px;
  cursor: pointer;
}

.resume-print-btn svg {
  width: 1rem;
  height: 1rem;
}

.resume-print-btn:hover {
  color: #fff;
  background: var(--retro-teal);
}

/* --- RESUME (tight, hierarchical typography) --- */
.resume {
  line-height: 1.3;
}

.resume .hero {
  margin: 1.5rem auto 1rem auto;
}

.resume .hero--split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.resume .hero-aside {
  flex-shrink: 0;
  text-align: right;
  padding-top: 0.3rem;
}

.resume h1.hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: 0.2rem;
}

.resume .sub-hero {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 0;
  max-width: 460px;
}

.resume .hero-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  margin: 0 0 0.4rem 0;
}

.resume .hero-links a {
  font-size: 0.78rem;
}

.resume .hero-location {
  font-size: 0.78rem;
  margin-bottom: 0;
  text-align: right;
}

.resume .content-section {
  margin: 1.1rem auto;
}

.resume .content-section h2 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-black);
  border-bottom: 1.5px solid var(--ink-black);
  padding-bottom: 0.25rem;
  margin-bottom: 0.6rem;
}

.resume .content-section h3 {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.resume .content-section p {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.resume ul {
  margin: 0.35rem 0;
  padding-left: 1.1rem;
}

.resume li {
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.resume li::marker {
  color: #999;
}

/* Skills: compact label/value rows instead of bordered cards */
.skills-list {
  display: grid;
  grid-template-columns: 15rem 1fr;
  column-gap: 1.25rem;
  row-gap: 0.3rem;
  margin: 0;
}

.skills-list dt {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.skills-list dd {
  margin: 0;
  font-size: 0.85rem;
  color: #333;
}

/* Experience: left rail (companies/roles/dates) + right column (BuzzFeed impact bullets) */
.experience-grid {
  display: grid;
  grid-template-columns: 15rem 1fr;
  column-gap: 1.25rem;
}

.experience-item {
  margin-bottom: 0.6rem;
}

.experience-item:last-child {
  margin-bottom: 0;
}

.experience-item-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
  margin: 0 0 0.15rem 0;
}

.experience-right p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.experience-left .resume-job-head {
  display: block;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.25rem;
}

.experience-left .resume-job-tenure {
  display: block;
  margin-top: 0.05rem;
}

.experience-left .resume-role {
  display: block;
  margin-bottom: 0.3rem;
}

.experience-left .resume-role-dates {
  display: block;
  margin-top: 0.05rem;
}

.resume-job {
  margin-bottom: 1.1rem;
}

.resume-job-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 0.3rem;
  margin-bottom: 0.4rem;
}

.resume-job-company {
  font-size: 1rem;
  font-weight: 700;
}

.resume-job-tenure {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #666;
  white-space: nowrap;
}

.resume-role {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.resume-role-title {
  font-weight: 400;
  font-size: 0.85rem;
}

.resume-role-dates {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #666;
  white-space: nowrap;
}

.resume-job ul li {
  font-size: 0.8rem;
}

/* Education: single-line rows */
.resume-edu {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}

.resume-edu-school {
  font-weight: 700;
}

.resume-edu-dates {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #666;
  white-space: nowrap;
}

/* Personal Projects */
.resume .project-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.project-list li {
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.resume-projects-link {
  margin: -0.3rem 0 0.6rem 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.resume-projects-link a {
  color: var(--retro-teal);
  text-decoration: none;
}

.resume-projects-link a:hover {
  color: var(--retro-orange);
  text-decoration: underline;
}

.resume-projects-note {
  margin: 0.4rem 0 0 0;
  font-size: 0.78rem;
  color: #666;
}

.resume-projects-note a {
  color: var(--retro-teal);
}

.resume-projects-note a:hover {
  color: var(--retro-orange);
}

@media (max-width: 600px) {
  .resume-toolbar {
    display: none;
  }

  .resume-role,
  .resume-job-head,
  .resume-edu {
    flex-direction: column;
    gap: 0.15rem;
  }

  .skills-list {
    grid-template-columns: 1fr;
  }

  .experience-grid {
    grid-template-columns: 1fr;
    row-gap: 0.5rem;
  }

  .resume .hero--split {
    flex-direction: column;
    gap: 0.75rem;
  }

  .resume .hero-aside {
    text-align: left;
    padding-top: 0;
  }

  .resume .hero-links {
    align-items: flex-start;
  }

  .resume .hero-location {
    text-align: left;
  }
}

/* --- THE GRID (Bento Box Style) --- */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto 4rem auto;
  padding: 0 2rem;
}

.card {
  background: #fff;
  border: var(--border-thick);
  padding: 2rem;
  box-shadow: var(--shadow-hard);
  transition: all 0.1s ease;
  text-decoration: none;
  color: var(--ink-black);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

a.card:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px 0px var(--ink-black);
  background-color: var(--retro-gold);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.card p {
  font-size: 1rem;
  color: #666;
  margin: 0;
}

/* --- CONTENT SECTIONS --- */
.content-section {
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.content-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.content-section h3 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.content-section p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 1rem;
}

.content-section a {
  color: var(--retro-teal);
  text-decoration: none;
  font-weight: 500;
}

.content-section a:hover {
  color: var(--retro-orange);
  text-decoration: underline;
}

/* --- FOOTER --- */
footer.main-footer {
  background-color: var(--ink-black);
  color: var(--bg-paper);
  padding: 2rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border-top: var(--border-thick);
  text-align: center;
}

footer.main-footer p {
  margin: 0;
}

footer.main-footer a {
  color: var(--bg-paper);
  text-decoration: none;
}

footer.main-footer a:hover {
  color: var(--retro-gold);
}

/* --- BLOG STYLES --- */
.blog-entry {
  background: #fff;
  border: var(--border-thick);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-hard);
}

.blog-entry h1, .blog-entry h2 {
  margin-top: 0;
}

.blog-entry img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
}

.blog-entry blockquote {
  border-left: 4px solid var(--retro-teal);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  background: #f3fbfa;
  color: #333;
}

.blog-entry table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.blog-entry th,
.blog-entry td {
  border: 2px solid #e5e5e5;
  padding: 0.75rem 1rem;
  text-align: left;
}

.blog-entry th {
  background: var(--retro-teal);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-entry tr:nth-child(even) {
  background: #fdfdfd;
}

.blog-entry ul.task-list {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.blog-entry .task-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.blog-entry .task-list-item input[type="checkbox"] {
  accent-color: var(--retro-teal);
  margin-top: 0.3rem;
}

.breadcrumbs {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 2rem;
}

.breadcrumbs a {
  color: var(--retro-teal);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--retro-orange);
}

.entry-list {
  list-style: none;
  padding: 0;
}

.entry-list li {
  margin-bottom: 1rem;
}

.entry-list a {
  color: var(--retro-teal);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
}

.entry-list a:hover {
  color: var(--retro-orange);
}

/* --- CODE HIGHLIGHTING --- */
pre {
  background: var(--retro-navy);
  color: var(--retro-gold);
  padding: .5rem;
  border: var(--border-thick);
  border-radius: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
}

code {
  font-family: var(--font-mono);
  background: #f4f4f4;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre code {
  background: transparent;
  padding: 0;
}

/* --- PHOTOGRAPHY GRID --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.photo-item {
  border: var(--border-thick);
  box-shadow: var(--shadow-hard);
  transition: all 0.2s ease;
  overflow: hidden;
  background: #fff;
}

.photo-item:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px 0px var(--ink-black);
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-caption {
  padding: 1rem;
  font-size: 0.9rem;
  color: #666;
}

/* Mobile Tweaks */
@media (max-width: 600px) {
  h1.hero-title {
    font-size: 2.5rem;
  }

  nav.main-nav {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
  }

  .nav-links a {
    margin-left: 0;
    margin-right: 1.5rem;
  }

  .content-section,
  .hero,
  .grid-container {
    padding: 0 1rem;
  }

  .grid-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card {
    padding: 1.5rem;
  }

  .blog-entry {
    padding: 1.5rem;
  }

  .photo-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  /* Make health table mobile-friendly */
  table {
    font-size: 0.85rem;
  }

  table th,
  table td {
    padding: 0.5rem !important;
  }

  /* Hide description column on mobile */
  table th:nth-child(2),
  table td:nth-child(2) {
    display: none;
  }
}

/* --- PRINT --- */
@page {
  size: letter;
  margin: 0.5in;
}

@media print {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  nav.main-nav,
  footer.main-footer,
  .breadcrumbs,
  .no-print {
    display: none;
  }

  html {
    font-size: 14.25px;
  }

  body {
    background: #fff;
    padding: 0;
  }

  .resume .hero {
    margin: 0 auto 0.35rem auto;
  }

  .resume .sub-hero {
    margin-bottom: 0.25rem;
  }

  .resume .hero-links {
    row-gap: 0.15rem;
    margin-bottom: 0.25rem;
  }

  .resume .content-section {
    margin: 0.22rem auto;
    break-inside: avoid;
  }

  .resume .content-section h2 {
    margin-bottom: 0.25rem;
  }

  .resume-job,
  .resume-edu {
    break-inside: avoid;
  }

  .resume-job {
    margin-bottom: 0.45rem;
  }

  .resume-job-head {
    padding-bottom: 0.15rem;
    margin-bottom: 0.2rem;
  }

  .resume-role {
    margin-bottom: 0.1rem;
  }

  .experience-left .resume-role {
    margin-bottom: 0.2rem;
  }

  .experience-item {
    margin-bottom: 0.3rem;
    break-inside: avoid;
  }

  .experience-right p {
    line-height: 1.24;
  }

  .resume-edu {
    margin-bottom: 0.2rem;
  }

  .skills-list {
    break-inside: avoid;
    row-gap: 0.15rem;
  }

  .resume .project-list li {
    margin-bottom: 0.18rem;
    break-inside: avoid;
  }

  .resume-projects-note {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  /* Reset the mobile single-column layout so print stays compact and
     fits on one page regardless of the device viewport width. */
  .resume .hero--split {
    flex-direction: row;
  }

  .resume .hero-aside {
    text-align: right;
  }

  .resume .hero-links {
    align-items: flex-end;
  }

  .resume .hero-location {
    text-align: right;
  }

  .resume-job-head,
  .resume-role,
  .resume-edu {
    flex-direction: row;
  }

  .skills-list {
    grid-template-columns: 15rem 1fr;
  }

  .experience-grid {
    grid-template-columns: 15rem 1fr;
  }
}
