/* ============================
   GLOBAL STYLES
   ============================ */



body {
    font-family: "Atkinson Hyperlegible", sans-serif;
    background: #f7f7f7;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #111111;
}

html {
    scroll-behavior: smooth;
}

h1, h2 {
    font-family: "Atkinson Hyperlegible", sans-serif;
    color: #111111;
    font-weight: 700;
}

/* Ensure Plotly charts inherit the site font */
.plot-container.plotly * {
    font-family: "Atkinson Hyperlegible", sans-serif !important;
}

.main-nav {
    position: sticky;
    top: 0;
    display: flex;
    gap: 18px;
    padding: 12px 7.5%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #e5e5e5;
    z-index: 30;
}

.main-nav a {
    color: #111111;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.main-nav a:hover {
    color: #000000;
    border-color: #999;
}

.main-nav a.active {
    color: #000000;
    border-color: #000000;
}

.page-title-wrap {
    text-align: center;
    margin: 10px 0 50px;
}

.page-title {
    position: relative;
    display: inline-block;
    padding: 10px 22px;
    color: #111;
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: "Atkinson Hyperlegible", sans-serif;
    background: transparent;
    box-shadow: none;
}

.page-title:hover {
    letter-spacing: 0.12em;
}

.page-subtitle {
    margin: 2px 0 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.05em;
    font-family: "Atkinson Hyperlegible", sans-serif;
}

.page-title::before,
.page-title::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 88px;
    height: 2px;
    background: #f7c741;
}

.page-title::before {
    left: -90px;
}

.page-title::after {
    right: -90px;
}

.anime-strip {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 18px 0 66px;
    mask-image: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
    background: #f7f7f7;
}

.anime-track {
    display: flex;
    gap: 14px;
    width: max-content;
    animation: anime-scroll 60s linear infinite;
}

.anime-track img {
    height: 180px;
    width: 240px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    filter: saturate(1.08);
}

@keyframes anime-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.icon-field {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 16px;
    padding: 16px 12%;
    background: #ffffff;
}

.icon-dot {
    background: #f7f7f7;
    border: 1px solid #e6e6e6;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: diagonal-drift 8s ease-in-out infinite;
    box-shadow: 0 6px 12px rgba(0,0,0,0.06);
}

.icon-dot img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.icon-dot:nth-child(3n) { animation-delay: 0.7s; }
.icon-dot:nth-child(4n) { animation-delay: 1.1s; }
.icon-dot:nth-child(5n) { animation-delay: 1.5s; }
.icon-dot:nth-child(6n) { animation-delay: 1.9s; }

@keyframes diagonal-drift {
    0% { transform: translate(-10px, -10px) scale(1); }
    50% { transform: translate(10px, 10px) scale(1.03); }
    100% { transform: translate(-10px, -10px) scale(1); }
}

.section-nav {
    position: sticky;
    top: 0;
    display: flex;
    gap: 16px;
    padding: 10px 7.5%;
    background: #ffffff;
    border-bottom: 1px solid #e3e3e3;
    z-index: 31;
}

.section-nav a {
    color: #111111;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 1.05rem;
    transition: background 0.2s, color 0.2s;
}

.section-nav a:hover {
    background: #f7c741;
    text-decoration: underline;
    color: #000000;
}

.footer-center {
    text-align: center;
    margin: 60px 0 80px;
}

.footer-center a {
    display: inline-block;
    margin-bottom: 10px;
    color: #111111;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: underline;
    transition: color 0.2s ease, transform 0.2s ease, letter-spacing 0.2s ease;
}

.footer-center a:hover {
    color: #f7c741;
    letter-spacing: 0.08em;
    text-decoration: underline;
    transform: translateY(-2px);
}

.footer-center p {
    margin: 0;
    font-size: 1.05rem;
    color: #111111;
}

.container {
    width: 88%;
    max-width: 1200px;
    margin: 40px auto 32px;
    padding: 0 18px;
}

#calendar-section {
    text-align: center;
}

.title-center {
    text-align: center;
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 32px auto 0;
}

.container.title-center {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

.text-style {
    margin: 1em 18% 1em 20%;
    font-size: 25px;
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 500;
    text-align: left;
}

.stat-highlight {
    display: inline-block;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    font-weight: 700;
    font-style: italic;
    color: #111111;
    box-shadow: none;
    text-decoration: none;
    text-decoration-color: #111111;
    text-decoration-thickness: 2px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, letter-spacing 0.15s ease;
}

.stat-highlight:hover {
    transform: scale(1.02);
    box-shadow: none;
    letter-spacing: 0.3px;
    text-decoration: none;
    color: #f7c741;
    text-decoration-color: #f7c741;
    text-decoration-thickness: 2px;
}

.section-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f7c741 0%, #f7c741 100%);
    border: 1px solid #e3e3e3;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
    width: 320px;
    max-width: 80vw;
    margin: 70px auto 0;
    font-size: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
}

.section-title:hover {
    transform: scaleX(1.04) scaleY(1.02);
    padding: 10px 20px;
    box-shadow: 0 12px 22px rgba(0,0,0,0.08);
    letter-spacing: 0.5px;
}


/* ============================
   GRID CALENDAR
   ============================ */

#calendar {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.timeline-panel {
    background: #ffffff;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid #e3e3e3;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.controls-copy {
    color: #111111;
    font-weight: 600;
}

.controls-copy span {
    display: block;
    color: #4c4c4c;
    font-weight: 400;
    font-size: 0.95rem;
    margin-top: 4px;
}

.control-buttons {
    display: flex;
    gap: 8px;
}

.view-toggle {
    border: 1px solid #dcdcdc;
    background: #f4f4f4;
    color: #111111;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.view-toggle:hover {
    transform: translateY(-1px);
    border-color: #bdbdbd;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.view-toggle.active {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

.timeline-scroll {
    overflow-x: auto;
    padding-bottom: 12px;
    position: relative;
    border-radius: 12px;
    overflow-y: hidden;
}

.timeline-scroll.vertical-mode {
    max-height: 75vh;
    overflow-y: auto;
}

.timeline-grid {
    display: grid;
    gap: 10px;
    align-items: stretch;
    width: max-content;
    min-width: 100%;
}

.timeline-grid-horizontal .photo-cell,
.timeline-grid-vertical .photo-cell {
    min-height: 140px;
}

.calendar-corner {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111111;
}

.calendar-header {
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
    padding: 6px 0;
    color: #111111;
}

.date-header,
.day-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    justify-content: center;
    background: #f2f2f2;
    border-radius: 10px;
    padding: 8px;
    border: 1px solid #e3e3e3;
}

.date-header span,
.day-label span {
    font-weight: 500;
    color: #4d4d4d;
    font-size: 0.85rem;
}

.time-label {
    font-size: 0.95rem;
    color: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    font-weight: 700;
}


/* cell for each grid position */
.photo-cell {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid transparent;
    cursor: pointer;
    background: #fafafa;
    min-height: 160px;
    height: 160px;
    aspect-ratio: 1 / 1;
    transition: transform 0.2s, box-shadow 0.3s;
}

.photo-cell img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.photo-cell:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.photo-cell.empty {
    cursor: default;
    background: transparent;
    border-style: dashed;
    border-color: #d0d0d0;
}

.timeline-grid-horizontal .calendar-header {
    position: sticky;
    top: 0;
    background: #f7f7f7;
    z-index: 1;
}

.timeline-grid-vertical .calendar-header.sticky-top {
    position: sticky;
    top: 0;
    background: #f7f7f7;
    z-index: 1;
}

.timeline-grid .sticky-col {
    position: sticky;
    left: 0;
    background: #f7f7f7;
    background: linear-gradient(90deg, #f7f7f7 0%, #f7f7f7 75%, rgba(247, 247, 247, 0));
    z-index: 10;
    border-radius: 12px;
}

.timeline-grid-horizontal .sticky-col {
    min-width: 95px;
    max-width: 110px;
    padding: 8px 6px;
    box-shadow: 10px 0 16px rgba(0, 0, 0, 0.35);
}

.timeline-grid-vertical .sticky-col {
    box-shadow: 10px 0 16px rgba(0, 0, 0, 0.18);
}


/* dark strip for time + location */
.photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 4px 6px;
    font-size: 12px;
    opacity: 0;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.photo-cell:hover .photo-info {
    opacity: 1;
}

.photo-info .food-line {
    font-weight: 700;
    color: #ffe7b8;
}



/* ============================
   MODAL
   ============================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.modal-content {
    max-width: 800px;
    width: 80%;
    background: #ffffff;
    color: #111111;
    border-radius: 12px;
    padding: 32px 40px 36px 26px;
    text-align: left;
    border: 1px solid #e3e3e3;
    box-shadow: 0 16px 36px rgba(0,0,0,0.16);
    display: flex;
    flex-direction: row;
    gap: 18px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-image-wrap {
    flex: 0 0 320px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-img {
    width: 100%;
    max-width: 320px;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    margin: 0;
    border-radius: 10px;
}

#modal-title {
    margin: 0 0 10px;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 800;
}

#modal-text {
    font-size: 1.2rem;
    line-height: 1.35;
    margin: 0;
    color: #111111;
}

#modal-text .modal-line {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 12px 0;
}

#modal-text .modal-label {
    min-width: 150px;
    font-weight: 800;
    color: #111111;
    font-size: 1em;
}

#modal-text .modal-value {
    color: #333333;
    font-size: 1em;
}

#modal-text .modal-line:last-child {
    margin-bottom: 4px;
}

.modal-info {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 700px) {
    .modal-content {
        flex-direction: column;
        align-items: center;
        text-align: left;
    }

    .modal-image-wrap {
        width: 100%;
        flex: 0 0 auto;
    }

    #modal-title {
        font-size: 2rem;
    }

    #modal-text {
        font-size: 2.4rem;
    }
}


/* ============================
   VISUALIZATION AREA
   ============================ */
.viz-section {
    margin-top: 60px;
}

.chart {
    margin-top: 40px;
}

.viz-summary-card {
    margin: 16px 0 4px;
}

.stat-card {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e3e3e3;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

.stat-label {
    font-size: 0.95rem;
    color: #4c4c4c;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111111;
    line-height: 1.2;
}

.stat-sub {
    font-size: 0.9rem;
    color: #4c4c4c;
}

.chart-note {
    margin-top: 8px;
    color: #4c4c4c;
    font-size: 0.9rem;
}

.outlier-box {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px dashed #d3d3d3;
    color: #111111;
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
}

.outlier-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f3f3;
    border: 1px solid #e0e0e0;
    font-size: 0.9rem;
    color: #111111;
}

.location-explorer-section {
    margin-top: 60px;
}

.location-panel {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.location-list {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    width: fit-content;
    min-width: 160px;
    max-width: 220px;
}

.location-feed {
    flex: 1 1 340px;
    max-width: 640px;
    background: #ffffff;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #e3e3e3;
    min-height: 320px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.location-placeholder {
    color: #555555;
    margin: 0;
}

.location-btn {
    border: 1px solid #e0e0e0;
    background: #f6f6f6;
    color: #111111;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.location-btn:hover {
    background: #ececec;
    border-color: #c7c7c7;
    transform: translateX(2px);
}

.location-btn.active {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

.location-feed h3 {
    margin-top: 0;
}

.location-entries {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}

.location-entry {
    display: flex;
    gap: 14px;
    align-items: center;
    border-radius: 12px;
    background: #f9f9f9;
    padding: 10px;
    border: 1px solid #e3e3e3;
}

.location-entry img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
}

.location-entry-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.location-entry-details span {
    font-size: 0.9rem;
    color: #4d4d4d;
}

.location-entry-details strong {
    font-size: 1rem;
    color: #111111;
}

.location-entry .food-line {
    font-weight: 700;
    color: #111111;
}


/* ============================
   NARRATIVE
   ============================ */
.narrative {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    margin-top: 70px;
    border: 1px solid #e3e3e3;
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
