body {
    background-color: rgb(219, 219, 219);
}

body.loading {
    overflow: hidden;
}

#loader {
    position: fixed;
    inset: 0;
    background: rgb(219, 219, 219);
    z-index: 9999;
    overflow: hidden;
}

#loader.reveal {
    transform: translateX(100%);
    transition: transform 0.7s cubic-bezier(0.55, 0, 1, 0.45);
}

#loader__bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #FF3B30;
    transition: width 0.3s ease, background 0.15s ease;
}

#loader__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: min(4rem, 8vw);
    font-weight: 700;
    letter-spacing: 0.18em;
    padding-left: 0.18em; /* balance trailing letter-spacing so text stays centered */
    color: #000;
    z-index: 2;
    white-space: nowrap;
}

@media screen and (max-width: 600px) {
    #loader__text {
        font-size: 8.5vw;
        letter-spacing: 0.06em;
        padding-left: 0.06em;
    }
}

html {
    font-family: Arial, Helvetica, sans-serif;
    color: #000000;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 .5rem 0;
    line-height: 1.2;
    color: inherit;
}

h1 {
    font-size: 6.25rem;
    font-weight: 700;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

h3 {
    font-size: 1.375rem;
    font-weight: 700;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

h5 {
    font-size: 1rem;
    font-weight: 600;
}

h6 {
    font-size: .875rem;
    font-weight: 600;
}

p {
    margin: 0 0 1rem 0;
    color: inherit;
}

.italic {
    font-style: italic;
}

.left-nav {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgb(0, 0, 0);
    z-index: 1000;
    box-sizing: border-box;
    padding: 0.5rem 0;
}

/* The visible vertical text line */
.left-nav__label {
    color: inherit;
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
    transform-origin: center;
    /* Fallback: rotate horizontal text to vertical */
    transform: rotate(-90deg);
    -webkit-font-smoothing: antialiased;
}


/* Column-span utility classes (use in HTML: e.g. class="feed-item col-4") */
.col-1 {
    grid-column: span 1;
}

.col-2 {
    grid-column: span 2;
}

.col-3 {
    grid-column: span 3;
}

.col-4 {
    grid-column: span 4;
}

.col-5 {
    grid-column: span 5;
}

.col-6 {
    grid-column: span 6;
}

.col-7 {
    grid-column: span 7;
}

.col-8 {
    grid-column: span 8;
}

.col-9 {
    grid-column: span 9;
}

.col-10 {
    grid-column: span 10;
}

.col-11 {
    grid-column: span 11;
}

.col-12 {
    grid-column: span 12;
}

/* Optional breakpoint: on wider viewports, make items default to a two-column layout */
@media (min-width: 900px) {
    .feed-item {
        grid-column: span 12;
        margin: 0;
    }
}

html,
body {
    height: 100%;
}

.feed {
    margin: 12px 24px 12px 108px;
    /* Account for left nav width */
    display: flex;
    align-items: flex-start;
    gap: 24px;
    box-sizing: border-box;
}

/* Explicit masonry columns so items can be placed per-column on desktop */
.feed__col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Pin About Me to the top of the rightmost column on desktop.
   It sits last in the DOM (so it flows to the bottom on mobile),
   and order:-1 lifts it to the top of this column on desktop. */
.feed__col--right #section-1 {
    order: -1;
}

.feed-1 {
    margin: 12px 24px 12px 108px;
    /* Account for left nav width */
    column-count: 1;
    column-gap: 24px;
    box-sizing: border-box;
}
@media screen and (max-width: 900px) {

    .feed {
        display: block;
    }

    /* Collapse the columns so every tile flows in one stream in DOM order;
       About Me is last in the DOM, so it lands at the bottom. */
    .feed__col {
        display: contents;
    }
}

/* center content inside feed items */
.feed-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.feed-item {
    position: relative;
}

.feed-item .title,
.feed-item .preview {
    width: 100%;
}

.feed-item .title {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    font-size: 2rem;
    transform: translateY(-50%);
    z-index: 2;
}

/* masonry items */
.feed-item {
    display: inline-block;
    width: 100%;
    background: #fff;
    color: #111;
    margin: 12px 0;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* title + preview styling */
.feed-item .title {
    font-weight: 700;
    margin-bottom: 8px;
}
/* hide titles by default; reveal and double size on section hover */
.feed-item .title {
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}

[id^="section-"]:hover .title {
    opacity: 1;
    pointer-events: auto;
}
.feed-item .preview {
    width: 100%;
    overflow: hidden;
}

[id^="section-"] .preview img,
[id^="section-"] .preview video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* overlay: colored layer that appears on hover, title remains above (title z-index:2) */
[id^="section-"] {
    position: relative;
    overflow: hidden;
}

[id^="section-"]::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1; /* sits above media (z=0) and below .title (z=2) */
    pointer-events: none;
    background-color: transparent;
    transition: background-color .3s ease, opacity .3s ease;
    opacity: 0;
}

[id^="section-"]:hover::after {
    opacity: 1;
    background-color: hsla(var(--overlay-h, 210), 85%, 85%, 0.85);
    margin: 12px;
}

/* Assign varied hues per section so each hover produces a different color */
#section-1  { --overlay-h: 12; }
#section-2  { --overlay-h: 42; }
#section-3  { --overlay-h: 72; }
#section-4  { --overlay-h: 102; }
#section-5  { --overlay-h: 132; }
#section-6  { --overlay-h: 162; }
#section-7  { --overlay-h: 192; }
#section-8  { --overlay-h: 222; }
#section-9  { --overlay-h: 252; }
#section-10 { --overlay-h: 282; }
#section-11 { --overlay-h: 312; }
#section-12 { --overlay-h: 342; }
#section-13 { --overlay-h: 18; }
#section-14 { --overlay-h: 198; }
#section-15 { --overlay-h: 240; }
#section-16 { --overlay-h: 330; }
#section-17 { --overlay-h: 90; }
#section-2 .preview video,
#section-3 .preview video,
#section-4 .preview video,
#section-5 .preview video,
#section-6 .preview video,
#section-7 .preview video,
#section-8 .preview video,
#section-9 .preview video,
#section-10 .preview video,
#section-11 .preview video,
#section-12 .preview video,
#section-13 .preview video,
#section-14 .preview video,
#section-15 .preview video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
#section-5{
    background-color: rgb(189, 189, 189);
}
a{
    color: inherit;
    text-decoration: none;
}
.left-nav__badge {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #000;
}
/* move left nav icons to bottom */
.left-nav {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem 0;
}

.left-nav__label {
    margin-top: 47vh;
    transform-origin: center;
    transform: rotate(-90deg);
}

.left-nav__icons {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    padding-bottom: 0.75rem;
}

/* give icons the same hover background effect as the top badge */
.left-nav__icons .left-nav__link,
.left-nav__badge {
    background-color: transparent;
    border-radius: 8px;
    transition: background-color .25s ease;
}

.left-nav__icons .left-nav__link:hover,
.left-nav__icons .left-nav__link:focus {
    background-color: var(--badge-color, rgba(0, 0, 0, 0.06));
}

.left-nav__badge:hover,
.left-nav__badge:focus {
    background-color: rgba(0, 0, 0, 0.06);
}

.left-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: inherit;
    position: relative;
}

.left-nav__icons .left-nav__link::after {
    content: attr(aria-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: rgb(219, 219, 219);
    background-color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.left-nav__icons .left-nav__link:hover::after,
.left-nav__icons .left-nav__link:focus::after {
    opacity: 1;
}
article {
    padding: 24px;
    margin-bottom: 24px;
    padding-top: 72px;
}
article p { 
    max-width: 40vw;
    font-size: 2rem;
    background-color: rgba(219, 219, 219, 0.6);
    z-index: 2;
    position: relative;
}
article video,
article img { 
    max-width: 45vw;
    position: fixed;
    top: 5vw;
    right: 24px;
    z-index: 1;
}

.photo-grid img {
    position: static !important;
    max-width: 100% !important;
    top: auto !important;
    right: auto !important;
    z-index: auto !important;
    height: auto !important;
    object-fit: contain !important;
}
article h1 { 
    font-size: 8rem;
    position: relative;
    margin-bottom: 1rem;
    font-style: italic;
    z-index: 2;
}
@media screen and (max-width: 900px) {

    article h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-style: italic;
    z-index: 2;
    }
article video,
article img { 
    max-width: 90vw;
    position: fixed;
    top: 5vw;
    z-index: 1;
}
article p { 
    max-width: 800px;
    font-size: 1.4rem;
}
article iframe { 
    max-width: 90vw !important;
}
.photo-grid {
    max-width: 90vw !important;
}
.photos-preview {
    display: none !important;
}
}