/* Shared stylesheet for danieldavies.co — edit once, applies to every page. */

:root {
    --primary-blue: #2563eb;
    --primary-blue-hover: #1d4ed8;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --green-100: #dcfce7;
    --green-800: #166534;
    --blue-100: #dbeafe;
    --blue-800: #1e40af;
    --purple-100: #ede9fe;
    --purple-800: #5b21b6;
    --amber-100: #fef3c7;
    --amber-800: #92400e;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--slate-700);
    background-color: white;
}
.nav-container {
    background: white;
    border-bottom: 1px solid var(--slate-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}
.nav-links a {
    text-decoration: none;
    color: var(--slate-700);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    position: relative;
}
.nav-links a:hover {
    color: var(--primary-blue);
}
.nav-links a.active {
    color: var(--primary-blue);
}
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--slate-700);
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 1rem;
}
.hero-section {
    margin-bottom: 4rem;
}
.hero-text {
    font-size: 1.125rem;
    color: var(--slate-600);
    max-width: 800px;
    line-height: 1.8;
}
.section {
    margin-bottom: 4rem;
}
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--slate-200);
}
.grid {
    display: grid;
    gap: 2rem;
}
.grid-cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.card {
    border: 1px solid var(--slate-200);
    border-radius: 0.5rem;
    padding: 1.5rem;
    background: white;
    transition: box-shadow 0.3s ease;
}
.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--slate-900);
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #dbeafe;
    color: #1e40af;
}
.card-text {
    color: var(--slate-600);
}
.update-item {
    border-left: 4px solid var(--primary-blue);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}
.update-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--slate-600);
    margin-bottom: 0.25rem;
}
.update-meta .separator {
    color: var(--slate-400);
}
.update-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 0.25rem;
}
.update-description {
    color: var(--slate-600);
}
.icon {
    width: 1rem;
    height: 1rem;
    display: inline-block;
    vertical-align: middle;
}
.footer {
    background-color: var(--slate-50);
    border-top: 1px solid var(--slate-200);
    margin-top: 4rem;
    padding: 2rem 0;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
    color: var(--slate-600);
}
.mb-4 {
    margin-bottom: 1rem;
}
.mb-6 {
    margin-bottom: 1.5rem;
}
.mb-8 {
    margin-bottom: 2rem;
}
.text-center {
    text-align: center;
}
.page-header {
    margin-bottom: 3rem;
}
.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 1rem;
}
.page-subtitle {
    font-size: 1.25rem;
    color: var(--slate-600);
}
.section-description {
    color: var(--slate-600);
    margin-bottom: 1.5rem;
}
.foundation-list {
    list-style: none;
    margin-bottom: 1.5rem;
}
.foundation-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.bullet-point {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--slate-400);
    flex-shrink: 0;
}
.foundation-text {
    color: var(--slate-700);
}
.subsection {
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.subsection-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 1rem;
}
.resource-item {
    margin-bottom: 1rem;
}
.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}
.resource-link:hover {
    color: var(--primary-blue-hover);
    text-decoration: underline;
}
.external-link-icon {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}
.indent {
    padding-left: 1.25rem;
}
.bio-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.bio-image-section {
    flex: 1;
    max-width: 400px;
}
.bio-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.bio-text-section {
    flex: 2;
}
.bio-paragraph {
    font-size: 1.125rem;
    color: var(--slate-700);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}
.bio-paragraph:last-child {
    margin-bottom: 0;
}
.bio-link {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}
.bio-link:hover {
    color: var(--primary-blue-hover);
    text-decoration: underline;
}
.italic {
    font-style: italic;
}
.contact-card {
    background-color: var(--slate-50);
    border-radius: 0.75rem;
    padding: 2rem;
}
.contact-section {
    margin-bottom: 2rem;
}
.contact-section:last-child {
    margin-bottom: 0;
}
.contact-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}
.contact-info {
    font-size: 1.125rem;
    color: var(--slate-700);
    line-height: 1.6;
}
.contact-info.department {
    color: var(--slate-600);
    margin-bottom: 0.5rem;
}
.email-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}
.email-link:hover {
    color: var(--primary-blue-hover);
    text-decoration: underline;
}
.email-icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.social-link {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}
.social-link:hover {
    color: var(--primary-blue-hover);
    text-decoration: underline;
}
.cv-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}
.cv-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--slate-300);
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--slate-700);
    background-color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}
.cv-button:hover {
    background-color: var(--slate-50);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.cv-button:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}
.button-icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}
.cv-instructions {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--slate-50);
    border-radius: 0.75rem;
    text-align: left;
}
.instructions-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 1rem;
}
.instructions-text {
    color: var(--slate-600);
    line-height: 1.6;
}
.resource-description {
    color: var(--slate-600);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    margin-left: 1.25rem;
}
.double-indent {
    padding-left: 2.5rem;
}
.publication-card {
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: white;
    transition: all 0.3s ease;
}
.publication-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}
.publication-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.publication-details {
    color: var(--slate-600);
    margin-bottom: 1rem;
}
.publication-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.publication-link:hover {
    color: var(--primary-blue-hover);
    text-decoration: underline;
}
.book-card {
    background: linear-gradient(135deg, var(--slate-50) 0%, white 100%);
    border: 2px solid var(--slate-200);
    padding: 2rem;
}
.book-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
.page-description {
    font-size: 1.125rem;
    color: var(--slate-600);
    line-height: 1.7;
}
.research-grid {
    display: grid;
    gap: 2rem;
}
.research-card {
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 2rem;
    background: white;
    transition: all 0.3s ease;
    position: relative;
}
.research-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}
.research-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.research-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--slate-900);
}
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.status-current {
    background-color: var(--green-100);
    color: var(--green-800);
}
.status-upcoming {
    background-color: var(--amber-100);
    color: var(--amber-800);
}
.status-completed {
    background-color: var(--slate-100);
    color: var(--slate-700);
}
.research-card-description {
    color: var(--slate-600);
    margin-bottom: 1.5rem;
}
.research-details {
    list-style: none;
    color: var(--slate-600);
    font-size: 0.9rem;
}
.research-details li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.research-details li:before {
    content: '•';
    color: var(--primary-blue);
    font-weight: bold;
}
.book-project {
    background: linear-gradient(135deg, var(--slate-50) 0%, white 100%);
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    padding: 2.5rem;
    margin-bottom: 3rem;
}
.book-description {
    font-size: 1.1rem;
    color: var(--slate-700);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.book-status {
    font-size: 0.9rem;
    color: var(--slate-600);
    font-weight: 500;
}
.interests-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.interest-item {
    padding: 1.5rem;
    background: var(--slate-50);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-blue);
}
.interest-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}
.interest-description {
    color: var(--slate-600);
    font-size: 0.9rem;
}
.resources-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.resource-card {
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 2rem;
    background: white;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}
.resource-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary-blue);
}
.resource-card-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--slate-100);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}
.resource-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 1rem;
}
.resource-card-description {
    color: var(--slate-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.resource-card-link {
    color: var(--primary-blue);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}
.resource-card:hover .resource-card-link {
    color: var(--primary-blue-hover);
}
.arrow-icon {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    transition: transform 0.3s ease;
}
.resource-card:hover .arrow-icon {
    transform: translateX(0.25rem);
}
.page-intro {
    margin-bottom: 3rem;
}
.intro-text {
    font-size: 1.125rem;
    color: var(--slate-600);
    line-height: 1.7;
}
.course-card {
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    background: white;
    transition: all 0.3s ease;
}
.course-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}
.course-header {
    margin-bottom: 1rem;
}
.course-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}
.course-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.category-graduate {
    background-color: var(--blue-100);
    color: var(--blue-800);
}
.category-senior-seminar {
    background-color: var(--purple-100);
    color: var(--purple-800);
}
.category-introduction {
    background-color: var(--green-100);
    color: var(--green-800);
}
.category-writing-seminar {
    background-color: var(--amber-100);
    color: var(--amber-800);
}
.course-description {
    color: var(--slate-600);
    line-height: 1.7;
    margin-top: 1rem;
}
.philosophy-section {
    background: linear-gradient(135deg, var(--slate-50) 0%, white 100%);
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    padding: 2.5rem;
    margin-bottom: 3rem;
}
.philosophy-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 1.5rem;
}
.philosophy-text {
    font-size: 1.1rem;
    color: var(--slate-700);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}
.philosophy-text:last-child {
    margin-bottom: 0;
}
.level-section {
    margin-bottom: 3rem;
}
.level-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--slate-200);
}
@media (max-width: 768px) {
.nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid var(--slate-200);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.nav-links.active {
    display: flex;
}
.mobile-menu-button {
    display: block;
}
}
@media (min-width: 480px) {
.cv-buttons {
    flex-direction: row;
    justify-content: center;
}
}
@media (min-width: 768px) {
.bio-content {
    flex-direction: row;
    gap: 3rem;
}
.research-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}
}

/* Book-title variants (previously conflicting per page) */
.book-project .book-title { font-size: 1.5rem; font-weight: 700; color: var(--slate-900); font-style: italic; margin-bottom: 1rem; }
.publication-card .book-title { font-size: 1.25rem; font-weight: 700; }

/* Page-width modifiers: <main class="container narrow"> etc. */
.container.narrow { max-width: 600px; }
.container.wide { max-width: 1200px; }
.container.center { text-align: center; }

/* Accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--slate-900); color: #fff; padding: .5rem 1rem; border-radius: .25rem; z-index: 200; }
.skip-link:focus { top: .5rem; }
:focus-visible { outline: 2px solid var(--primary-blue); outline-offset: 2px; }

/* Additions */
:root { --teal-100: #ccfbf1; --teal-800: #115e59; }
.category-survey { background-color: var(--teal-100); color: var(--teal-800); }
.publication-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.page-title + .section, h1.page-title { margin-top: 0; }
.hero-name { margin-bottom: 1rem; }
.template-code { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: .5rem; padding: 1rem; overflow-x: auto; font-size: .85rem; line-height: 1.5; margin: 1rem 0; }
.template-preview { border: 1px dashed var(--slate-200); border-radius: .5rem; padding: 1rem; margin: 1rem 0; }
.copy-button { background: var(--primary-blue); color: #fff; border: 0; border-radius: .375rem; padding: .5rem 1rem; font: inherit; cursor: pointer; }
.copy-button:hover { background: var(--primary-blue-hover); }
.template-preview { overflow-x: auto; }
.template-code { max-width: 100%; white-space: pre-wrap; word-break: break-word; }
