/*! modern-normalize v3.0.1 | MIT License | https://github.com/sindresorhus/modern-normalize */

/* ------------------------------------------------------------
   Modern Normalize
------------------------------------------------------------ */

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

html {
    font-family:
        system-ui,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif,
        "Apple Color Emoji",
        "Segoe UI Emoji";
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
}

body {
    margin: 0;
}

b,
strong {
    font-weight: bolder;
}

code,
kbd,
samp,
pre {
    font-family:
        ui-monospace,
        SFMono-Regular,
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;
    font-size: 1em;
}

small {
    font-size: 80%;
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

table {
    border-color: currentcolor;
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

legend {
    padding: 0;
}

progress {
    vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
    height: auto;
}

[type="search"] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

summary {
    display: list-item;
}

/* ------------------------------------------------------------
   Custom Styles
------------------------------------------------------------ */

/* ------------------------------------------------------------
   Tokens
------------------------------------------------------------ */
:root {
    --font-base: Arial, sans-serif;
    --color-text: #0c0f0a;
    --color-background: #fff;
    --color-border: #111;
    --color-link: #111;
    --color-link-hover: #ae1111;
    --color-muted: #888;
    --color-disabled: #aaa;
    --content-max-width: 760px;
    --notes-list-image-border-width: 1px;
    --notes-list-image-gap: 5px;
}

/* ------------------------------------------------------------
   Base
------------------------------------------------------------ */
html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: var(--font-base);
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-background);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: var(--color-link);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

a:hover {
    text-decoration: none;
    color: var(--color-link-hover);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------------------------------------
   Layout
------------------------------------------------------------ */
.site {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 1rem;
}

.site-header,
.site-main,
.site-footer {
    width: 100%;
}

.site-header {
    padding: 1rem;
}

.site-main {
    font-size: 1rem;
    padding: 0 0.5rem;
}

.site-footer {
    padding: 2rem 1rem;
    text-align: center;
}

/* ------------------------------------------------------------
   Shared Header And Nav
------------------------------------------------------------ */
.brand {
    display: flex;
    flex-direction: column;
}

.brand__logo {
    width: 100%;
}

.brand__logo-link {
    display: inline-block;
}

.brand__subtitle {
    margin: 0;
    color: var(--color-text);
}

.site-header--shared {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0;
    font-size: 0.8rem;
}

.brand--shared {
    order: 3;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    text-align: center;
}

.brand__logo--shared {
    max-width: 250px;
    margin: 0 auto;
}

.brand__subtitle--shared {
    font-size: 0.85rem;
    line-height: 1.3;
    text-align: center;
}

.site-nav--shared {
    order: 1;
    width: 100%;
    margin: 0;
}

.site-nav__list {
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__list--shared {
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.site-nav__item a {
    display: inline-block;
    text-decoration: none;
}

.site-nav__item--active a {
    font-weight: bold;
}

.site-nav__list--shared .site-nav__item a {
    color: var(--color-muted);
    display: block;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

.site-nav__list--shared .site-nav__item a:hover {
    color: var(--color-link-hover);
}

/* ------------------------------------------------------------
   Breadcrumbs
------------------------------------------------------------ */
.breadcrumbs {
    max-width: var(--content-max-width);
    margin: 0 auto 1rem;
    padding: 0;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumbs__item {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.breadcrumbs__item + .breadcrumbs__item::before {
    content: "/";
    margin-right: 0.35rem;
    color: var(--color-muted);
}

.breadcrumbs__item a {
    color: var(--color-muted);
    text-decoration: none;
}

.breadcrumbs__item a:hover {
    color: var(--color-link-hover);
}

.breadcrumbs__item[aria-current="page"] {
    color: var(--color-text);
}

/* ------------------------------------------------------------
   Hero
------------------------------------------------------------ */
.hero {
    width: 100%;
}

.hero__media {
    margin: 0 auto;
    max-width: 640px;
}

.hero__image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ------------------------------------------------------------
   Footer
------------------------------------------------------------ */
.copyright {
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

/* ------------------------------------------------------------
   Notes List
------------------------------------------------------------ */
.notes-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.notes-list__intro {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 0 1rem;
    text-align: left;
}

.notes-list__count {
    margin-top: 0;
    text-align: left;
}

.notes-list__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--notes-list-image-gap) - (var(--notes-list-image-border-width) * 2));
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.notes-list__link {
    display: block;
}

.notes-list__image {
    width: 100%;
    height: auto;
    border: var(--notes-list-image-border-width) solid var(--color-background);
    border-radius: 7px;
}

.notes-list__link:hover .notes-list__image,
.notes-list__link:focus-visible .notes-list__image {
    border-color: var(--color-muted);
}

.notes-list__pagination {
    width: fit-content;
    margin: 1.5rem auto 0;
}

.notes-list__pagination-link {
    display: inline-block;
    color: var(--color-link);
}

.notes-list__pagination-link:hover {
    color: var(--color-link-hover);
}

.notes-list__pagination-link--disabled {
    color: var(--color-disabled);
    pointer-events: none;
}

.notes-list__pagination-separator {
    display: inline-block;
    margin: 0 0.5rem;
}

/* ------------------------------------------------------------
   Note Detail
------------------------------------------------------------ */
.note-detail {
    text-align: center;
    padding: 1rem 0;
}

.note-detail__media {
    position: relative;
    display: inline-block; /* keeps overlay sized to the image */
    max-width: 100%;
}

.note-detail__image {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    border-radius: 7px;
}

.note-detail__image-nav-link {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 2;
    background: transparent;
    cursor: pointer;
}

.note-detail__image-nav-link--prev {
    left: 0;
}

.note-detail__image-nav-link--next {
    right: 0;
}

.note-detail__image-nav-link.disabled {
    cursor: default;
    pointer-events: none;
}

.note-detail__caption {
    text-align: center;
}

.note-detail__date {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-bottom: 0.25rem;
}

.note-detail__text {
    /*font-size: 1rem; */
}

.note-detail__nav {
    margin-top: 1rem;
}

.note-detail__nav-link {
    color: var(--color-link);
}

.note-detail__nav-link:hover {
    color: var(--color-link-hover);
}

.note-detail__nav-link--disabled {
    color: var(--color-disabled);
    pointer-events: none;
}

.note-detail__nav-separator {
    display: inline-block;
    margin: 0 0.5rem;
}

.note-detail__description {
    max-width: 480px;
    margin: 1rem auto;
    text-align: left;
}

.note-detail__description img {
    margin: 1rem auto;
}

.note-detail__description iframe {
    display: block;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 16 / 9;
    height: auto;
    margin: 0 auto;
}

/* ------------------------------------------------------------
   Misc
------------------------------------------------------------ */
.misc-list,
.misc-page {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0;
}

.misc-list__header,
.misc-page__header {
    margin-bottom: 2rem;
    text-align: center;
}

.misc-list__title,
.misc-page__title {
    margin: 0;
    /*font-size: 2rem;*/
    line-height: 1.2;
}

.misc-list__description,
.misc-page__description {
    margin: 0.5rem 0 0;
    color: var(--color-muted);
}

.misc-list__content,
.misc-page__content {
    /*font-size: 1rem;*/
}

.misc-list__content h1,
.misc-page__content h1 {
    margin: 1rem 0;
}

.misc-list__items {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.misc-list__items:empty {
    display: none;
}

.recipe-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    width: fit-content;
    margin: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.recipe-tabs__button {
    appearance: none;
    border: 1px solid transparent;
    border-bottom: 0;
    background: transparent;
    color: var(--color-muted);
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    font: inherit;
}

.recipe-tabs__button:hover {
    color: var(--color-link-hover);
}

.recipe-tabs__button.active {
    margin-bottom: -1px;
    border-color: var(--color-border);
    background: var(--color-background);
    color: var(--color-text);
    font-weight: bold;
}
