*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Lato", sans-serif;
    background: #F9F4F0;
    min-height: 100vh;
    margin: 0;
    padding-bottom: 1rem;
    overflow-x: hidden;
}

/* Typography */
h1 {
    font-family: "Playfair Display", serif;
    font-size: 3.75rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}
h2 {
    font-family: "Lato", sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0;
}
h3 {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: 1.875rem;
    margin: 0;
}
h4 {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}
h5 {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
}
p {
    font-family: "Lato", sans-serif;
    margin: 0;
}
.mb-4 {
    margin-bottom: 1rem;
}

/* Navigation Dock */
.dock-container {
    position: fixed;
    top: 1rem;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}
.dock {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: white;
    border-radius: 9999px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    padding: 0.5rem 1rem;
    pointer-events: all;
}
.dock-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    color: inherit;
    text-decoration: none;
    transition: width 0.2s ease;
    position: relative;
}
.dock-icon:hover {
    width: 4rem;
}
.dock-icon i {
    font-size: 1.25rem;
}
.dock-separator {
    width: 1px;
    height: 2rem;
    background: #babbbf;
    margin: 0 0.25rem;
}
.dock-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.dock-icon:hover::after {
    opacity: 1;
}

/* Home Section */
.home-container {
    margin-left: clamp(1rem, 10vw, 15rem);
    margin-right: clamp(1rem, 10vw, 15rem);
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    height: clamp(400px, 50vh, 700px);
    gap: clamp(0rem, 4vw, 2rem);
}
#bio-container {
    width: 60%;
    max-width: 500px;
    text-align: left;
}
#image-container {
    height: 60%;
}
#headshot {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* Shared */
.title-header {
    align-self: flex-start;
    margin-bottom: 1rem;
    text-align: left;
}
/* About Section */
.about-container {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    margin-bottom: 5%;
}

.about-container p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1rem;
}
/* Education Section */
.education-container {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    margin-bottom: 5%;
}
.education-timeline {
    margin-left: 15%;
}

/* Experience Section */
.experience-container {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    margin-bottom: 5%;
}
.experience-timeline {
    margin-left: 15%;
}
.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}
.timeline-item {
    display: flex;
    flex-direction: row;
}
.timeline-opposite {
    width: 150px;
    min-width: 150px;
    text-align: right;
    padding-right: 1rem;
    padding-top: 2px;
}
.timeline-separator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #bdbdbd;
    margin-top: 6px;
    flex-shrink: 0;
}
.timeline-connector {
    width: 2px;
    background: #bdbdbd;
    flex-grow: 1;
    min-height: 150px;
}
.timeline-content {
    padding-left: 1rem;
    padding-bottom: 2rem;
    text-align: left;
}

/* Hobbies Section (homepage + dedicated page) */
.hobbies-container {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    margin-bottom: 5%;
}
.hobbies-page-container {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    padding-top: 6rem;
    padding-bottom: 2rem;
}
.hobby-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    width: 100%;
    margin-bottom: 1rem;
}
.hobby-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.hobby-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.hobby-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}
.see-all-link {
    font-family: "Playfair Display", serif;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    align-self: flex-end;
}
.see-all-link:hover {
    text-decoration: underline;
}
.back-link {
    font-family: "Lato", sans-serif;
    color: #333;
    text-decoration: none;
    margin-bottom: 1.5rem;
    display: inline-block;
}
.back-link:hover {
    text-decoration: underline;
}

/* Map Page */
.map-page-container {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    padding-top: 6rem;
    padding-bottom: 2rem;
}
#map {
    height: 600px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 2rem;
}
.country-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    width: 100%;
}
.country-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.country-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.city-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.city-list li {
    font-family: "Lato", sans-serif;
    color: #555;
    font-size: 0.95rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.city-list li:last-child {
    border-bottom: none;
}

/* Timeline Page */
.timeline-page-container {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    padding-top: 6rem;
    padding-bottom: 2rem;
}
.post-form {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}
.post-form-row {
    display: flex;
    gap: 1rem;
}
.post-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    text-align: left;
}
.post-form-group label {
    font-family: "Lato", sans-serif;
    font-size: 0.85rem;
    color: #555;
}
.post-form-group input,
.post-form-group textarea {
    font-family: "Lato", sans-serif;
    font-size: 1rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    background: #fff;
    resize: vertical;
}
.post-form-group input:focus,
.post-form-group textarea:focus {
    outline: none;
    border-color: #b8a99a;
}
.post-submit-btn {
    font-family: "Lato", sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    align-self: flex-start;
    background: #2b2b2b;
    color: #fff;
    border: none;
    border-radius: 9999px;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.post-submit-btn:hover {
    background: #000;
}
.post-form-error {
    font-family: "Lato", sans-serif;
    font-size: 0.85rem;
    color: #b91c1c;
    margin: 0;
}
.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.post-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: left;
}
.post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    gap: 1rem;
}
.post-card-name {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: 1.1rem;
}
.post-card-date {
    font-family: "Lato", sans-serif;
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}
.post-card-content {
    font-family: "Lato", sans-serif;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}