/* ============================================
   Brennan Kenneth Brown - CV/Resume
   Maximalist design with Fraunces variable font
   Inspired by LaTeX and Tufte.css
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES & VARIABLES
   ============================================ */

:root {
    /* Fraunces Variable Font Settings */
    --font-fraunces: "Fraunces", serif;
    
    /* Font weights (300-900) */
    --weight-light: 300;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;
    --weight-black: 900;
    
    /* Optical sizes (9-144) */
    --opsz-small: 9;
    --opsz-medium: 72;
    --opsz-large: 144;
    
    /* Softness (0-100) - "wetness" or "inkiness" */
    --soft-sharp: 0;
    --soft-medium: 50;
    --soft-full: 100;
    
    /* Wonky (0-1) - manual substitution of wonky characters */
    --wonk-off: 0;
    --wonk-on: 1;
    
    /* Color Palette - Inspired by academic papers and Tufte */
    /* Gruvbox color palette */
    --gruvbox-dark0: #282828;
    --gruvbox-dark1: #3c3836;
    --gruvbox-dark2: #504945;
    --gruvbox-dark3: #665c54;
    --gruvbox-dark4: #7c6f64;
    --gruvbox-light0: #fbf1c7;
    --gruvbox-light1: #ebdbb2;
    --gruvbox-light2: #d5c4a1;
    --gruvbox-light3: #bdae93;
    --gruvbox-light4: #a89984;
    --gruvbox-bright-red: #cc241d;
    --gruvbox-bright-green: #98971a;
    --gruvbox-bright-yellow: #d79921;
    --gruvbox-bright-blue: #458588;
    --gruvbox-bright-purple: #b16286;
    --gruvbox-bright-aqua: #689d6a;
    --gruvbox-bright-orange: #d65d0e;
    --gruvbox-neutral-red: #fb4934;
    --gruvbox-neutral-green: #b8bb26;
    --gruvbox-neutral-yellow: #fabd2f;
    --gruvbox-neutral-blue: #83a598;
    --gruvbox-neutral-purple: #d3869b;
    --gruvbox-neutral-aqua: #8ec07c;
    --gruvbox-neutral-orange: #fe8019;
    --gruvbox-faded-red: #9d0006;
    --gruvbox-faded-green: #79740e;
    --gruvbox-faded-yellow: #b57614;
    --gruvbox-faded-blue: #076678;
    --gruvbox-faded-purple: #8f3f71;
    --gruvbox-faded-aqua: #427b58;
    --gruvbox-faded-orange: #af3a03;

    /* ROYGBIV section colors */
    --color-red: #cc241d;
    --color-orange: #d65d0e;
    --color-yellow: #d79921;
    --color-green: #98971a;
    --color-blue: #458588;
    --color-indigo: #b16286;
    --color-violet: #8f3f71;

    /* Base colors */
    --color-bg: #f5f0e6;
    --color-text: #282828;
    --color-text-light: #665c54;
    --color-accent: #458588;
    --color-accent-light: #83a598;
    --color-border: #bdae93;
    --color-border-light: #d5c4a1;
    --color-link: #076678;
    --color-link-hover: #0d3a6b;
    --color-link-visited: #5a3a8a;
    
    /* Social media brand colors */
    --color-github: #181717;
    --color-linkedin: #0A66C2;
    --color-medium: #000000;
    --color-bluesky: #1185FE;
    --color-mastodon: #6364FF;
    --color-amazon: #FF9900;
    --color-patreon: #FF424D;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Typography scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    /* Line heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Container widths */
    --container-narrow: 40rem;
    --container-medium: 55rem;
    --container-wide: 65rem;
    --container-full: 80rem;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-fraunces);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    font-style: normal;
    font-variation-settings: "SOFT" var(--soft-sharp), "WONK" var(--wonk-on);
    background: linear-gradient(135deg, 
        rgba(255, 245, 240, 0.7) 0%,    /* Light red */
        rgba(255, 243, 230, 0.7) 16.66%, /* Light orange */
        rgba(255, 250, 220, 0.7) 33.33%, /* Light yellow */
        rgba(240, 255, 240, 0.7) 50%,    /* Light green */
        rgba(230, 245, 255, 0.7) 66.66%, /* Light blue */
        rgba(245, 235, 255, 0.7) 83.33%, /* Light indigo */
        rgba(240, 230, 250, 0.7) 100%    /* Light violet */
    );
    color: var(--color-text);
    line-height: var(--leading-relaxed);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ============================================
   TYPOGRAPHY - Fraunces Variable Font
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-optical-sizing: auto;
    line-height: var(--leading-tight);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--text-5xl);
    font-weight: var(--weight-black);
    font-variation-settings: "SOFT" var(--soft-sharp), "WONK" var(--wonk-on);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--text-3xl);
    font-weight: var(--weight-extrabold);
    font-variation-settings: "SOFT" var(--soft-medium), "WONK" var(--wonk-off);
}

h3 {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    font-variation-settings: "SOFT" var(--soft-sharp), "WONK" var(--wonk-off);
}

h4 {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
}

h5 {
    font-size: var(--text-lg);
    font-weight: var(--weight-medium);
}

p {
    margin-bottom: var(--space-md);
    font-weight: var(--weight-regular);
}

strong, b {
    font-weight: var(--weight-bold);
}

em, i {
    font-style: italic;
    font-variation-settings: "SOFT" var(--soft-medium), "WONK" var(--wonk-off);
}

/* ============================================
   LINKS
   ============================================ */

a {
    color: var(--color-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--color-link-hover);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

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

a:active {
    color: var(--color-accent);
    transform: translateY(1px);
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.cv-container {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
    position: relative;
}

.container {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

section {
    margin-bottom: var(--space-3xl);
    page-break-inside: avoid;
}

/* ============================================
   HEADER
   ============================================ */

.cv-header {
    text-align: center;
    padding: var(--space-3xl) 0;
}

.name {
    font-size: var(--text-5xl);
    font-weight: var(--weight-black);
    font-variation-settings: "SOFT" var(--soft-sharp), "WONK" var(--wonk-on);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.03em;
}

.tagline {
    font-size: var(--text-xl);
    font-weight: var(--weight-medium);
    font-variation-settings: "SOFT" var(--soft-medium), "WONK" var(--wonk-off);
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    font-size: var(--text-sm);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.contact-item i {
    color: var(--color-accent);
}

/* Social Accounts */
.social-accounts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--color-border-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link i {
    font-size: var(--text-lg);
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-link.github:hover { background-color: var(--color-github); color: white; }
.social-link.linkedin:hover { background-color: var(--color-linkedin); color: white; }
.social-link.medium:hover { background-color: var(--color-medium); color: white; }
.social-link.bluesky:hover { background-color: var(--color-bluesky); color: white; }
.social-link.mastodon:hover { background-color: var(--color-mastodon); color: white; }
.social-link.amazon:hover { background-color: var(--color-amazon); color: white; }
.social-link.patreon:hover { background-color: var(--color-patreon); color: white; }
.social-link.berryhouse:hover { background-color: #8B4513; color: white; }
.social-link.fireweed:hover { background-color: #DC143C; color: white; }
.social-link.writeclub:hover { background-color: #4B0082; color: white; }
.social-link.goodreads:hover { background-color: #553B08; color: white; }
.social-link.gumroad:hover { background-color: #FF90E8; color: white; }

/* ============================================
   SECTION TITLES - ROYGBIV Colors
   ============================================ */

.section-title {
    font-size: var(--text-3xl);
    font-weight: var(--weight-extrabold);
    font-variation-settings: "SOFT" var(--soft-sharp), "WONK" var(--wonk-on);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* ROYGBIV Section Colors */
.roles .section-title {
    color: var(--color-red);
    border-bottom: 2px solid var(--color-red);
}

.summary .section-title {
    color: var(--color-orange);
    border-bottom: 2px solid var(--color-orange);
}

.skills .section-title {
    color: var(--color-yellow);
    border-bottom: 2px solid var(--color-yellow);
}

.experience .section-title {
    color: var(--color-green);
    border-bottom: 2px solid var(--color-green);
}

.education .section-title {
    color: var(--color-blue);
    border-bottom: 2px solid var(--color-blue);
}

.publications .section-title {
    color: var(--color-indigo);
    border-bottom: 2px solid var(--color-indigo);
}

.projects .section-title {
    color: var(--color-violet);
    border-bottom: 2px solid var(--color-violet);
}

/* Loop back to Red for remaining sections */
.press .section-title {
    color: var(--color-red);
    border-bottom: 2px solid var(--color-red);
}

.testimonials .section-title {
    color: var(--color-orange);
    border-bottom: 2px solid var(--color-orange);
}

.volunteering .section-title {
    color: var(--color-yellow);
    border-bottom: 2px solid var(--color-yellow);
}

.values .section-title {
    color: var(--color-green);
    border-bottom: 2px solid var(--color-green);
}

.section-title i {
    font-size: var(--text-2xl);
}

.category-title {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    font-variation-settings: "SOFT" var(--soft-medium), "WONK" var(--wonk-off);
    color: var(--color-accent-light);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.subsection-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Subheader colors matching parent sections */
.roles .subsection-title,
.roles .category-title {
    color: var(--color-red);
}

.summary .subsection-title,
.summary .category-title {
    color: var(--color-orange);
}

.skills .subsection-title,
.skills .category-title {
    color: var(--color-yellow);
}

.experience .subsection-title,
.experience .category-title {
    color: var(--color-green);
}

.education .subsection-title,
.education .category-title {
    color: var(--color-blue);
}

.publications .subsection-title,
.publications .category-title {
    color: var(--color-indigo);
}

.projects .subsection-title,
.projects .category-title {
    color: var(--color-violet);
}

/* Loop back to Red for remaining sections */
.press .subsection-title,
.press .category-title {
    color: var(--color-red);
}

.testimonials .subsection-title,
.testimonials .category-title {
    color: var(--color-orange);
}

.volunteering .subsection-title,
.volunteering .category-title {
    color: var(--color-yellow);
}

.values .subsection-title,
.values .category-title {
    color: var(--color-green);
}

/* ============================================
   PDF DOWNLOAD SECTION
   ============================================ */

.pdf-download {
  text-align: center;
  padding-top: 2rem;
  margin: 0;
}

.pdf-download-button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(220, 53, 69, 0.12);
  border: 2px solid transparent;
}

.pdf-download-button:hover {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.25);
  color: white;
  text-decoration: none;
}

.pdf-download-button i {
  font-size: 0.8rem;
}

/* ============================================
   ROLES SECTION
   ============================================ */

.roles-content {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    max-width: var(--container-medium);
    margin: 0 auto;
}

.roles-intro {
    font-size: var(--text-xl);
    font-weight: var(--weight-medium);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.role-item {
    padding: var(--space-xl);
    background-color: #fafafa;
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
    transition: all 0.3s ease;
}

.role-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: var(--color-accent-light);
}

.role-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-accent);
}

.role-item p {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    margin-bottom: 0;
}

.roles-contact {
    text-align: center;
    font-size: var(--text-lg);
    font-weight: var(--weight-medium);
    font-variation-settings: "SOFT" var(--soft-medium), "WONK" var(--wonk-off);
    color: var(--color-accent);
}


/* ============================================
   SUMMARY SECTION
   ============================================ */

.summary-content {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    max-width: var(--container-medium);
    margin: 0 auto;
}

.intro-text {
    font-size: var(--text-xl);
    font-weight: var(--weight-medium);
    font-variation-settings: "SOFT" var(--soft-medium), "WONK" var(--wonk-off);
    line-height: var(--leading-relaxed);
}

.disability-note {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background-color: #f9f9f9;
    border-left: 4px solid var(--color-accent);
    font-size: var(--text-base);
    font-style: italic;
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */

.job {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border-light);
}

.job:last-child {
    border-bottom: none;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.job-title {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    font-variation-settings: "SOFT" var(--soft-sharp), "WONK" var(--wonk-off);
    color: var(--color-text);
}

.company {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--color-accent-light);
}

.company a {
    color: var(--color-accent-light);
    text-decoration: none;
}

.company a:hover {
    text-decoration: underline;
}

.job-meta {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    font-size: var(--text-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.job-meta i {
    margin-right: var(--space-xs);
}

.achievements {
    list-style-position: outside;
    margin-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.achievements li {
    margin-bottom: var(--space-sm);
    line-height: var(--leading-relaxed);
}

.sub-achievements {
    margin-left: var(--space-lg);
    margin-top: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.sub-achievements li {
    margin-bottom: var(--space-xs);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    list-style-type: circle;
}

/* Two-column jobs for compact entries */
.two-column-jobs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.job.compact {
    border-bottom: none;
    padding-bottom: 0;
}

.job.compact .achievements li {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-xs);
}

.job.compact .achievements {
    margin-left: var(--space-md);
}

/* Tech Stack Tags */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.badge-mit, .badge-unlicense {
    background-color: #28a745;
    color: white;
    font-weight: var(--weight-semibold);
}

/* ============================================
   EDUCATION SECTION
   ============================================ */

.degree {
    margin-bottom: var(--space-2xl);
}

.degree-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.degree-title {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
}

.institution {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--color-accent-light);
}

.degree-meta {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    font-size: var(--text-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.gpa {
    font-weight: var(--weight-semibold);
    color: var(--color-accent);
}

.course-list {
    list-style-position: outside;
    margin-left: var(--space-lg);
}

.course-list li {
    margin-bottom: var(--space-sm);
}

/* ============================================
   PUBLICATIONS SECTION
   ============================================ */

.publication-category {
    margin-bottom: var(--space-2xl);
}

.publication {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
}

.publication:last-child {
    border-bottom: none;
}

.pub-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-sm);
}

.pub-title a {
    color: var(--color-text);
    text-decoration: none;
}

.pub-title a:hover {
    color: var(--color-link);
    text-decoration: underline;
}

.pub-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: var(--text-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

.pub-meta i {
    margin-right: var(--space-xs);
}

.pub-description {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text-light);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.section-intro {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-xl);
    max-width: var(--container-medium);
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
    padding: var(--space-xl);
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-item i {
    font-size: var(--text-2xl);
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}

.stat-number {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    color: var(--color-text);
    margin-bottom: var(--space-xs);
    font-variation-settings: "SOFT" var(--soft-medium), "WONK" var(--wonk-off);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    font-weight: var(--weight-medium);
}

.project-description {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-sm);
    color: var(--color-text-light);
}

.project-stats .stat {
    font-size: var(--text-xs);
    color: var(--color-text-light);
    background: var(--color-background-light);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    align-items: center;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    align-items: center;
}

.stat-item {
    text-align: center;
}

.stat-item i {
    font-size: var(--text-2xl);
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
    display: block;
}

.stat-number {
    display: block;
    font-size: var(--text-3xl);
    font-weight: var(--weight-extrabold);
    font-variation-settings: "SOFT" var(--soft-sharp), "WONK" var(--wonk-on);
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-light);
}

.project-category {
    margin-bottom: var(--space-2xl);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.project {
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background-color: #fafafa;
    border-left: 3px solid var(--color-accent-light);
    transition: all 0.3s ease;
}

.project:hover {
    background-color: #f5f5f5;
    border-left-color: var(--color-accent);
    transform: translateX(4px);
}

.project-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-sm);
}

.project-title a {
    color: var(--color-text);
    text-decoration: none;
}

.project-title a:hover {
    color: var(--color-link);
    text-decoration: underline;
}

.project-description {
    font-size: var(--text-base);
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
    line-height: var(--leading-relaxed);
}

/* ============================================
   SKILLS SECTION
   ============================================ */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.skill-category {
    padding: var(--space-lg);
    background-color: #fafafa;
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
}

.skill-category-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-accent);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background-color: var(--color-accent-light);
    color: white;
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-download-button:hover {
    background-color: var(--color-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 36, 29, 0.3);
}

.pdf-download-button:visited {
    color: white;
}

.skill-tag i {
    font-size: var(--text-base);
}

.certifications {
    padding: var(--space-lg);
    background-color: #f9f9f9;
    border-radius: 8px;
}

/* ============================================
   PRESS SECTION
   ============================================ */

.press-item {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border-light);
}

.press-item:last-child {
    border-bottom: none;
}

.press-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-sm);
}

.press-title a {
    color: var(--color-text);
    text-decoration: none;
}

.press-title a:hover {
    color: var(--color-link);
    text-decoration: underline;
}

.press-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    font-size: var(--text-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.press-meta i {
    margin-right: var(--space-xs);
}

.press-description {
    margin-bottom: var(--space-md);
    line-height: var(--leading-relaxed);
}

.press-quote {
    padding: var(--space-lg);
    margin: var(--space-md) 0;
    background-color: #f9f9f9;
    border-left: 4px solid var(--color-red);
    font-style: italic;
    font-variation-settings: "SOFT" var(--soft-medium), "WONK" var(--wonk-off);
    line-height: var(--leading-relaxed);
    position: relative;
}

.press-quote::before {
    content: '"';
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--color-red);
    opacity: 0.15;
    font-weight: bold;
    line-height: 1;
    z-index: 0;
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.testimonial {
    padding: var(--space-xl);
    background-color: #fafafa;
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
    transition: all 0.3s ease;
}

.testimonial:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.testimonial-header {
    margin-bottom: var(--space-md);
}

.testimonial-author {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-xs);
}

.testimonial-rating {
    color: #FFD700;
    margin-bottom: var(--space-xs);
}

.testimonial-date,
.testimonial-role {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    display: block;
    margin-top: var(--space-xs);
}

.testimonial-quote {
    font-style: italic;
    font-variation-settings: "SOFT" var(--soft-medium), "WONK" var(--wonk-off);
    line-height: var(--leading-relaxed);
    position: relative;
    border-left: 3px solid var(--color-accent-light);
    padding-left: var(--space-md);
}

.testimonial-quote::before {
    content: '"';
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--color-orange);
    opacity: 0.15;
    font-weight: bold;
    line-height: 1;
    z-index: 0;
}

/* ============================================
   VOLUNTEERING SECTION
   ============================================ */

.volunteer-item {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
}

.volunteer-item:last-child {
    border-bottom: none;
}

.volunteer-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.volunteer-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
}

.volunteer-org {
    font-size: var(--text-lg);
    font-weight: var(--weight-medium);
    color: var(--color-accent-light);
}

.volunteer-org a {
    color: var(--color-accent-light);
    text-decoration: none;
}

.volunteer-org a:hover {
    text-decoration: underline;
}

.volunteer-meta {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

.volunteer-description {
    line-height: var(--leading-relaxed);
}

.volunteer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

/* ============================================
   VALUES SECTION
   ============================================ */

.values-intro {
    margin-bottom: var(--space-2xl);
}

.values-quote {
    font-size: var(--text-xl);
    font-style: italic;
    font-variation-settings: "SOFT" var(--soft-full), "WONK" var(--wonk-off);
    line-height: var(--leading-relaxed);
    padding: var(--space-xl);
    background-color: #f9f9f9;
    border-left: 4px solid var(--color-accent);
    text-align: center;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.value-item {
    padding: var(--space-xl);
    background-color: #fafafa;
    border-radius: 8px;
    border-top: 4px solid var(--color-accent);
}

.value-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    font-variation-settings: "SOFT" var(--soft-sharp), "WONK" var(--wonk-on);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-accent);
}

.value-list {
    list-style-position: outside;
    margin-left: var(--space-lg);
}

.value-list li {
    margin-bottom: var(--space-md);
    line-height: var(--leading-relaxed);
}

.values-footer {
    text-align: center;
    padding: var(--space-xl);
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border-radius: 8px;
    font-size: var(--text-lg);
}

.values-footer p {
    margin-bottom: var(--space-sm);
}

/* ============================================
   FOOTER
   ============================================ */

.cv-footer {
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 3px solid var(--color-accent);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-light);
}

.footer-text {
    margin-bottom: var(--space-sm);
    font-weight: var(--weight-medium);
}

.footer-note {
    font-style: italic;
    font-variation-settings: "SOFT" var(--soft-medium), "WONK" var(--wonk-off);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 2rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
        --space-xl: 2rem;
        --space-lg: 1.5rem;
        --space-md: 1rem;
        --space-sm: 0.75rem;
    }
    
    /* Ensure viewport compliance */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .cv-container {
        padding: var(--space-md) var(--space-sm);
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Header adjustments */
    .cv-header {
        padding: var(--space-lg) 0;
        text-align: center;
    }
    
    .name {
        font-size: var(--text-4xl);
        line-height: 1.2;
        word-wrap: break-word;
    }
    
    .tagline {
        font-size: var(--text-lg);
        line-height: 1.3;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
        text-align: center;
    }
    
    .contact-item {
        width: 100%;
        justify-content: center;
    }
    
    .social-accounts {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-sm);
    }
    
    .social-link {
        width: 2rem;
        height: 2rem;
    }
    
    /* Section spacing */
    section {
        margin-bottom: var(--space-xl);
        padding: 0;
    }
    
    .section-title {
        font-size: var(--text-2xl);
        text-align: center;
        margin-bottom: var(--space-md);
    }
    
    .section-intro {
        text-align: center;
        font-size: var(--text-base);
        margin-bottom: var(--space-lg);
    }
    
    /* Single column layouts */
    .two-column-jobs,
    .skills-grid,
    .values-grid,
    .testimonial-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .project-stats {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    /* Job and education entries */
    .job-header,
    .degree-header,
    .volunteer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    
    .job-title,
    .degree-title,
    .volunteer-title {
        font-size: var(--text-lg);
        line-height: 1.3;
    }
    
    .job-company,
    .degree-school,
    .volunteer-org {
        font-size: var(--text-base);
    }
    
    .job-dates,
    .degree-dates,
    .volunteer-dates {
        font-size: var(--text-sm);
    }
    
    /* Skills */
    .skill-category {
        margin-bottom: var(--space-lg);
    }
    
    .skill-category-title {
        font-size: var(--text-lg);
        text-align: center;
        margin-bottom: var(--space-md);
    }
    
    .skill-tags {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-xs);
    }
    
    .skill-tag {
        font-size: var(--text-sm);
        padding: 0.25rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Projects */
    .project {
        margin-bottom: var(--space-lg);
    }
    
    .project-title {
        font-size: var(--text-lg);
        line-height: 1.3;
    }
    
    .project-description {
        font-size: var(--text-base);
        line-height: 1.5;
    }
    
    .tech-stack {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-xs);
    }
    
    .tech-tag {
        font-size: var(--text-sm);
        padding: 0.25rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Publications */
    .publication {
        margin-bottom: var(--space-lg);
    }
    
    .publication-title {
        font-size: var(--text-lg);
        line-height: 1.3;
    }
    
    .publication-meta {
        font-size: var(--text-sm);
        line-height: 1.4;
    }
    
    /* Testimonials and quotes */
    .testimonial-quote,
    .press-quote {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .quote-text {
        font-size: var(--text-base);
        line-height: 1.5;
    }
    
    .quote-source {
        font-size: var(--text-sm);
        margin-top: var(--space-sm);
    }
    
    /* PDF Download */
    .pdf-download {
        text-align: center;
        padding: var(--space-md);
    }
    
    .pdf-download-button {
        max-width: 300px;
        font-size: var(--text-base);
    }
    
    /* Footer */
    .cv-footer {
        text-align: center;
        padding: var(--space-lg) var(--space-md);
    }
    
    .footer-text,
    .footer-note {
        font-size: var(--text-sm);
        line-height: 1.4;
    }
    
    .footer-note {
        text-align: center;
    }
    
    /* Values section */
    .values-content {
        text-align: center;
    }
    
    .values-list {
        text-align: left;
        font-size: var(--text-base);
    }
    
    .values-footer {
        text-align: center;
        margin-top: var(--space-lg);
    }
    
    /* Ensure no horizontal overflow */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    img, table, pre {
        max-width: 100%;
        overflow-x: auto;
    }
    
    table {
        display: block;
        white-space: nowrap;
    }
    
    pre {
        white-space: pre-wrap;
        word-wrap: break-word;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: var(--container-medium);
    }
}

/* ============================================
   SCROLLING PROGRESS BAR
   ============================================ */

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--color-red) 0%, 
        var(--color-orange) 16.66%, 
        var(--color-yellow) 33.33%, 
        var(--color-green) 50%, 
        var(--color-blue) 66.66%, 
        var(--color-indigo) 83.33%, 
        var(--color-violet) 100%);
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease-out;
    border-radius: 0 2px 2px 0;
    pointer-events: none;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    body {
        background-color: white;
        font-size: 9pt;
        line-height: 1.25;
        color: #000;
        font-family: "Fraunces", serif;
        font-weight: 400;
    }
    
    .container {
        max-width: 100%;
        padding: 0.25in;
        margin: 0;
    }
    
    .cv-header {
        page-break-after: avoid;
        text-align: center;
        border-bottom: 2pt solid #8B4513;
        padding-bottom: 0.2in;
        margin-bottom: 0.2in;
    }
    
    .name {
        font-size: 18pt;
        font-weight: 900;
        margin-bottom: 0.1in;
    }
    
    .tagline {
        font-size: 10pt;
        font-weight: 500;
        margin-bottom: 0.1in;
    }
    
    .contact-info {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.12in;
        font-size: 8pt;
        margin-bottom: 0.1in;
    }
    
    .social-accounts {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
        margin-bottom: 0.2in;
    }
    
    .section-title {
        font-size: 12pt;
        font-weight: 800;
        color: #8B4513;
        border-bottom: 1pt solid #D2691E;
        padding-bottom: 0.05in;
        margin-bottom: 0.12in;
        page-break-after: avoid;
    }
    
    .job,
    .publication,
    .project,
    .testimonial,
    .volunteer-item {
        page-break-inside: avoid;
        margin-bottom: 0.12in;
        padding-bottom: 0.12in;
        border-bottom: 0;
    }
    
    .job-header,
    .degree-header,
    .volunteer-header {
        display: block;
        margin-bottom: 0.05in;
    }
    
    .job-title,
    .degree-title,
    .volunteer-title {
        font-size: 10pt;
        font-weight: 700;
    }
    
    .company,
    .institution,
    .volunteer-org {
        font-size: 9pt;
        font-weight: 600;
        color: #8B4513;
    }
    
    .job-meta,
    .degree-meta,
    .volunteer-meta {
        font-size: 8pt;
        color: #666;
        margin-bottom: 0.05in;
    }
    
    .achievements,
    .course-list,
    .value-list {
        margin-left: 0.18in;
        margin-bottom: 0.05in;
    }
    
    .achievements li,
    .course-list li,
    .value-list li {
        margin-bottom: 0.02in;
        font-size: 8pt;
    }

    .sub-achievements {
        margin-top: 0.02in;
        margin-bottom: 0.02in;
    }

    .sub-achievements li {
        margin-bottom: 0.015in;
    }
    
    .tech-stack,
    .tech-tags,
    .skill-tags {
        display: none;
    }
    
    .projects-grid,
    .skills-grid,
    .values-grid,
    .testimonial-grid,
    .roles-grid {
        display: block;
    }
    
    .project,
    .skill-category,
    .value-item,
    .testimonial,
    .role-item {
        margin-bottom: 0.08in;
        padding: 0;
        border: 0;
    }
    
    .project-title,
    .skill-category-title,
    .value-title,
    .testimonial-author,
    .role-title {
        font-size: 9pt;
        font-weight: 600;
        margin-bottom: 0.02in;
    }
    
    .project-description,
    .role-item p {
        font-size: 8pt;
        margin-bottom: 0;
    }
    
    .testimonial-quote {
        font-size: 8pt;
        font-style: italic;
        border-left: 2pt solid #D2691E;
        padding-left: 0.1in;
        margin: 0.05in 0;
    }
    
    .press-quote {
        font-size: 8pt;
        font-style: italic;
        border-left: 2pt solid #D2691E;
        padding-left: 0.1in;
        margin: 0.05in 0;
    }
    
    .disability-note,
    .values-quote,
    .roles-contact {
        font-style: italic;
        font-size: 8pt;
        padding: 0.08in;
        background-color: #f5f5f5;
        border-left: 2pt solid #8B4513;
    }
    
    a {
        color: #000;
        text-decoration: none;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 8pt;
        color: #666;
        text-decoration: none;
    }
    
    a[href^="mailto:"]:after {
        content: " (" attr(href) ")";
        font-size: 8pt;
        color: #666;
    }
    
    .cv-footer {
        margin-top: 0.5in;
        padding-top: 0.25in;
        border-top: 2pt solid #8B4513;
        text-align: center;
        font-size: 8pt;
        color: #666;
    }
    
    .intro-text {
        font-size: 9pt;
        font-weight: 500;
        margin-bottom: 0.12in;
    }
    
    .summary-content p,
    .volunteer-description,
    .press-description {
        font-size: 9pt;
        margin-bottom: 0.08in;
    }

    .two-column-jobs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.18in;
    }
    
    /* Hide icons in print */
    i {
        display: none;
    }
    
    /* Ensure proper page breaks */
    .cv-header,
    .section-title,
    .job,
    .degree,
    .publication,
    .project-category,
    .testimonial,
    .volunteer-item {
        page-break-inside: avoid;
    }
    
    /* Two-column layout for skills in print */
    .skills-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.15in;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

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

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
