* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

body {
    background: #080808;
    color: #fff;
}

h1 {
    font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
}

#header {
    width: 100%;
    height: 3vh;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.page-center {
    align-items: center;
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 20px;
}

#page-container {
    width: 100%;
    padding: 40px 20px;
    background: #1a1a1a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#page-container > div {
    width: 100%;
    max-width: 900px;
}

/* Fitness page specific */
#page-container.fitness > div {
    max-width: 100%;
}

.memorial-left > div {
    margin-bottom: 20px;
}

figure {
    text-align: center;
}

#resume-frame {
    width: 100%;
    height: 80vh;
    border-radius: 8px;
    display: block;
    border: none;
}

.resume-container {
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    min-height: 80vh;
}

@media (max-width: 768px) {
    #resume-frame {
        height: 60vh;
    }

    #resume-container {
        padding: 20px 10px;
    }
}

.quote {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 0.25;
}

blockquote {
    font-style: italic;
    justify-content: center;
    text-align: center;
    width: auto;
    color: #ccc;
    margin: 0px auto;
    border: 2px solid blueviolet;
    border-style: solid;
    padding: 16px;
    display: inline-block;
    border-radius: 8px;
}

/* CSS Animations */

.typed-out {
    overflow: hidden;
    border-right: .15em solid blueviolet;
    white-space: nowrap;
    font-size: 1.6rem;
    width: 0;
    margin: 0 auto;
    display: inline-block;
    max-width: fit-content;
    animation: 
        typing 10s steps(150, end) forwards,
        blink 1s infinite;
}

.container {
    display: block;
    text-align: center;
}

@keyframes typing {
    from {width: 0;}
    to {width: 100%}
}

.typed-out {
    max-width: fit-content;
}

@keyframes blink {
    from { border-color: transparent}
    to { border-color: blueviolet}
}

/* Bookshelf styles (moved from pages/blog.html) */
.page-title {
    text-align: center;
    margin: 28px 0 8px;
    font-size: 2rem;
}

.bookshelf {
    display: grid;
    grid-template-columns: repeat(2, 420px);
    gap: 32px;
    justify-content: center;
    padding: 32px 20px;
    max-width: 980px;
    margin: 0 auto;
}

.column {
    width: 420px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
}

.book-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    padding: 12px;
    border-radius: 8px;
}

.book-cover {
    width: 140px;
    height: 210px;
    object-fit: cover;
    background: #e8e8e8;
    border-radius: 4px;
}

.book-title {
    margin: 10px 0 4px;
    font-size: 1.05rem;
    text-align: center;
}

.book-author {
    margin: 0 0 8px;
    color: #ccc;
    font-size: 0.95rem;
}

.completed-text {
    font-size: 0.8rem;
    color: #aaa;
    text-align: center;
    margin: 4px 0;
    font-style: italic;
}

.progress-wrap {
    width: 100%;
}

.book-notes-button {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: blueviolet;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

progress {
    width: 100%;
    height: 16px;
    appearance: none;
    border-radius: 8px;
}

progress::-webkit-progress-bar {
    background: #1a2332;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

progress::-webkit-progress-value {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

progress::-moz-progress-bar {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

/* Memorial page styles for Sophie */
.memorial-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
    max-width: 1200px; /* let it grow on wide screens */
    margin: 0 auto;
}

.memorial-left,
.memorial-right {
    flex: 1 1 45%; /* allow both sides to expand evenly */
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

.memorial-bottom {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.memorial-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.memorial-section {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 16px;
}

.memorial-section h2 {
    margin-bottom: 8px;
}

.memorial-section p {
    margin-bottom: 1em;
}

.memorial-intro {
    margin-bottom: 32px;
    text-align: center;
}


.page-title + p {
    margin-bottom: 16px;
}

.memorial-section ul {
    padding-left: 24px;
}

/* CSS is little wonky here - need to find a fix for fitness page */

.fit-wrapper {
    display: flex;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 80vh;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    flex-wrap: nowrap;
    padding: 20px;
}

.fit-column {
    flex: 1 1 calc(33.333% - 14px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
}

.fit-column h2 {
    text-align: center;
    width: 100%;
}

.fitness-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.8rem;
    table-layout: fixed;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    overflow: hidden;
}

.fitness-table th {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: #fff;
    font-weight: 600;
    border: 2px solid #2a5aa8;
}

.fitness-table th,
.fitness-table td {
    border: 1px solid #555;
    padding: 10px 8px;
    text-align: center;
    font-size: 0.75rem;
    width: 20%;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
    max-height: 3em;
}

.fitness-table tbody tr {
    background-color: #0a0a0a;
    transition: background-color 0.2s ease;
}

.fitness-table tbody tr:hover {
    background-color: #1a1a1a;
}

/* Responsive column hiding for workout table */
/* Columns: Exercise(1), Muscle(2), Sets(3), Reps(4), Weight(5) */
@media (max-width: 1024px) {
    .fitness-table tbody tr td:nth-child(5),
    .fitness-table thead tr th:nth-child(5) {
        display: none;
    }
}

@media (max-width: 768px) {
    .fitness-table tbody tr td:nth-child(4),
    .fitness-table thead tr th:nth-child(4),
    .fitness-table tbody tr td:nth-child(5),
    .fitness-table thead tr th:nth-child(5) {
        display: none;
    }
}

@media (max-width: 480px) {
    .fitness-table tbody tr td:nth-child(3),
    .fitness-table thead tr th:nth-child(3),
    .fitness-table tbody tr td:nth-child(4),
    .fitness-table thead tr th:nth-child(4),
    .fitness-table tbody tr td:nth-child(5),
    .fitness-table thead tr th:nth-child(5) {
        display: none;
    }
}

.dashboard-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
}

.dashboard-actions a {
    text-decoration: none;
    width: 100%;
}

.progress-metric {
    margin-top: 12px;
    width: 100%;
}

#weekly-progress-metrics {
    background: linear-gradient(135deg, #0f1419, #1a1f2e);
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(74, 144, 226, 0.3);
}

.week-header {
    display: flex;
    justify-content: center;
    font-size: 0.85rem;
    color: #4a90e2;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(74, 144, 226, 0.3);
}

.metric-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.challenge-card {
    background: linear-gradient(135deg, #1a2332, #252d3e);
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 14px;
    margin-top: 16px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.challenge-card h3 {
    margin-bottom: 8px;
    color: #4a90e2;
    text-align: center;
}

#challenge-description {
    text-align: center;
    margin-bottom: 12px;
    color: #ddd;
}

.challenge-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 12px;
}

#challenge-emblem {
    font-size: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#challenge-progress {
    width: 100%;
    height: 12px;
    appearance: none;
    border-radius: 6px;
    background: #1a2332;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

#challenge-progress::-webkit-progress-bar {
    background: #1a2332;
    border-radius: 6px;
}

#challenge-progress::-webkit-progress-value {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    border-radius: 6px;
}

#challenge-progress::-moz-progress-bar {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    border-radius: 6px;
}

#challenge-completed {
    text-align: center;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 8px;
    font-style: italic;
}

@media (max-width: 1024px) {
    .fit-wrapper {
        width: 100%;
        min-height: auto;
    }

    .fit-column {
        flex: 1 1 100%;
    }
}


/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

.progress-label {
    float: right;
    font-size: 0.9rem;
    color: #ddd;
}

@media (max-width:800px) {
    .bookshelf {
        display: grid;
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 20px;
    }

    .column {
        max-width: 520px;
        width: 100%;
        flex: 1 1 auto;
    }
}

/* Toolbox styles */
.toolbox-search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    max-width: 600px;
}
.toolbox-search {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #404040;
    border-radius: 6px;
    background-color: #252525;
    color: #e0e0e0;
    transition: border-color 0.2s;
}
.toolbox-search::placeholder {
    color: #888;
}
.toolbox-search:focus {
    outline: none;
    border-color: #66b3ff;
    box-shadow: 0 0 8px rgba(102, 179, 255, 0.2);
}
.toolbox-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background-color: #252525;
    table-layout: fixed;
}
.toolbox-table thead {
    background-color: #0f0f0f;
    color: white;
}
.toolbox-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #404040;
}
.toolbox-table th:nth-child(1) { width: 40%; } /* Name column */
.toolbox-table th:nth-child(2) { width: 35%; } /* Category column */
.toolbox-table th:nth-child(3) { width: 25%; } /* Link column */
.toolbox-table td {
    padding: 1rem;
    border-bottom: 1px solid #404040;
    color: #e0e0e0;
}
.toolbox-table tbody tr:hover {
    background-color: #303030;
}
.tool-link {
    color: #66b3ff;
    text-decoration: none;
    font-weight: 500;
}
.tool-link:hover {
    text-decoration: underline;
}
.category-badge {
    display: inline-block;
    background-color: #1a3a4a;
    color: #66b3ff;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}