:root {
    /* W&M Theme Colors */
    --wm-green: #0d4630;
    --wm-gold: #B99B5B;
    --bg: #ffffff;
    --surface: #f5f5f5;
    --text: #1a1a1a;
    --muted: #666666;
    --border: #d0d0d0;

    /* Layout */
    --radius: 3px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --focus-ring: 0 0 0 2px rgba(17, 87, 64, 0.15);

    /* Typography */
    --font-body: 'Aleo', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
    --line-height-base: 1.7;
    --line-height-heading: 1.2;
}

body {
    font-family: var(--font-body);
    background-color: var(--wm-green);
    margin: 0;
    padding: 0;
    color: var(--text);
    font-size: 15px;
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 20px;
    background-color: var(--bg);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
}

header {
    border-bottom: 2px solid var(--wm-green);
    margin-bottom: 0;
    padding: 30px 20px;
    background-color: var(--bg);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-text h1 {
    font-size: 2.5em;
    margin: 0;
    color: var(--wm-green);
    line-height: var(--line-height-heading);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-text p {
    margin: 5px 0 0;
    font-size: 0.95em;
    color: var(--muted);
}

.header-photo img {
    height: auto;
    width: min(240px, 35vw);
    border: 2px solid var(--wm-gold);
    box-shadow: var(--shadow-sm);
}

.contact-info {
    margin-top: 10px;
    font-size: 0.9em;
}

.contact-info a {
    color: var(--wm-green);
    text-decoration: none;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.contact-info a:hover {
    color: var(--wm-gold);
    text-decoration: underline;
}

.contact-info a:focus {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 3px;
}

nav {
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    padding: 0 20px;
    overflow-x: auto;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-start;
    white-space: nowrap;
}

nav li {
    margin-right: 22px;
}

nav a {
    display: block;
    padding: 14px 0;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14.5px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

nav a:hover {
    color: var(--wm-green);
    border-bottom: 2px solid var(--wm-gold);
}

nav a.active {
    color: var(--wm-green);
    border-bottom: 2px solid var(--wm-green);
}

nav a:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

main {
    padding: 0 20px 20px;
}

.resume-container {
  display: flex;
  gap: 30px;              /* this is your gutter */
  align-items: flex-start;
}

.vita-hero {
  display: grid;
  grid-template-columns: 1fr 260px; /* left content + right image */
  column-gap: 20px;
  align-items: start;
}

.vita-thumb {
  width: 260px;       /* or keep 200px if you prefer */
  max-width: 100%;
  height: auto;
  display: block;
  justify-self: end;
}

.vita-columns{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.vita-index .vita-columns ul {
  margin: 0;
  padding-left: 1.25em;
  list-style: disc;
  list-style-position: outside;
  min-width: 0;
}

.vita-columns li {
  margin: 0 0 8px 0;  /* a bit more breathing room */
}

.vita-columns li a {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.vita-index {
    font-size: 0.9em;
    background-color: var(--surface);
    padding: 20px;
    width: 100%;                 /* critical */
    max-width: 100%;             /* defensive */
    box-sizing: border-box;      /* critical */
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.vita-index h2 {
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--wm-gold);
  font-size: 1.35em;
  color: var(--wm-green);
}

.vita-index p {
  margin: 12px 0 16px;   /* match the feel of other sections */
}

.vita-index img {
  display: block;
  max-width: 200px;      /* keep your sizing intent */
  height: auto;
  margin: 0 0 16px 20px; /* similar to your inline margin */
}

/* Make sure the list grid starts below the float */
.vita-columns {
  clear: none;
  margin-top: 8px;
}

/* Standardize list indentation for all resume-section lists */
.resume-section ul,
.resume-section ol {
  padding-left: 1.25em;
}

.vita-index ul li {
    margin-bottom: 8px;
}

.vita-index ul li a {
    color: var(--wm-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

.vita-index ul li a:hover {
    color: var(--wm-gold);
    text-decoration: underline;
}

.vita-index-container {
  width: 100%;
  min-width: 320px;
  padding-right: 0;       /* REMOVE extra gutter */
  box-sizing: border-box;
}

.resume-content {
  width: 100%;
  padding-left: 0;        /* REMOVE extra gutter */
  overflow: visible;   
}

.resume-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.resume-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--wm-gold);
}

.resume-section h4 {
    color: var(--wm-green);
    margin-top: 25px;
}

.resume-section ol,
.resume-section ul {
    line-height: 1.8;
}

.resume-section li {
    margin-bottom: 12px;
}

main a {
    color: inherit;
    text-decoration: underline;
}

h2 {
    font-size: 1.75em;
    color: var(--wm-green);
    border-bottom: 2px solid var(--wm-gold);
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 25px;
    line-height: var(--line-height-heading);
    font-weight: 600;
}

h3 {
    font-size: 1.35em;
    color: var(--wm-green);
    line-height: var(--line-height-heading);
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

h4 {
    font-size: 1.1em;
    color: var(--text);
    line-height: var(--line-height-heading);
    font-weight: 600;
}

.column-container {
    display: flex;
    align-items: stretch;
}

.column {
    width: 50%;
    padding: 0 10px;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

table th {
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

/* Hero and CTA Sections */
.hero-section {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
    border-radius: var(--radius);
    margin-bottom: 40px;
}

.hero-subtitle {
    font-size: 1.2em;
    color: var(--wm-gold);
    font-weight: 600;
    margin: 10px 0 20px;
}

.cta-section {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--surface);
    border-radius: var(--radius);
    margin-top: 40px;
}

/* Card System with Variety */
.card {
    background-color: #fafafa;
    border: 1px solid var(--border);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
    text-decoration: none;
    display: block;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: var(--wm-gold);
}

.card:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

.card-title {
    font-size: 1.2em;
    color: var(--wm-green);
    margin: 0 0 12px;
    line-height: var(--line-height-heading);
    font-weight: 600;
}

.card-description {
    color: var(--muted);
    margin: 0 0 15px;
    line-height: 1.6;
    font-size: 14px;
}

.card-link {
    color: var(--wm-green);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.card-link:hover {
    color: var(--wm-gold);
}

.card-link::after {
    content: ' →';
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.card:hover .card-link::after {
    transform: translateX(4px);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

/* Card Variations */
.card-green {
    background-color: #f0f5f3;
    border-left: 4px solid var(--wm-green);
}

.card-accent {
    background-color: #fefaf3;
    border-left: 4px solid var(--wm-gold);
}

.card-featured {
    background: linear-gradient(135deg, #f0f5f3 0%, #fefaf3 100%);
    border: 2px solid var(--wm-green);
}

/* Content Blocks */
.content-block {
    background-color: var(--surface);
    padding: 30px;
    margin: 40px 0;
    border-left: 4px solid var(--wm-green);
}

.content-block h3 {
    margin-top: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.stat-box {
    text-align: center;
    padding: 25px;
    background-color: white;
    border: 2px solid var(--border);
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--wm-green);
    line-height: 1;
}

.stat-label {
    font-size: 0.9em;
    color: var(--muted);
    margin-top: 8px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 0;
    }

    header {
        padding: 15px;
    }

    .header-main {
        flex-direction: column;
        text-align: center;
    }

    .header-photo {
        margin-top: 15px;
        order: -1;
    }

    nav {
        padding: 0 15px;
    }

    nav ul {
        flex-direction: column;
    }

    nav li {
        margin-right: 0;
        margin-bottom: 5px;
    }

    nav a {
        padding: 12px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    main {
        padding: 0 15px 15px;
    }

    .resume-container {
        flex-direction: column;
    }

    .vita-index-container,
    .resume-content {
        width: 100%;
        padding: 0;
    }

    .vita-index-container {
        position: static;
    }

    .column-container {
        flex-direction: column;
    }

    .column {
        width: 100%;
        padding: 0;
    }

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

    .resume-container {
        gap: 15px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--border);
        border-radius: var(--radius);
    }
}

@media (max-width: 390px) {
    .header-text h1 {
        font-size: 1.6em;
    }

    h2 {
        font-size: 1.4em;
    }

    .card {
        padding: 16px;
    }
}
