* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    color: #000;
}

::selection{
    background: #000;
    color:#fff;
}

body {
    font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    font-size: 40px;
}

/* white page (the homepage tints it on scroll, see initScrollTint in script.js) */
html {
    background-color: #fff;
}

/* sticky header: stays on top while scrolling, transparent (the page shows through).
   drawn in white with "difference" blending, so it inverts against what's behind it:
   black over white, white over black photos */
header{
    position: sticky;
    top: 0;
    z-index: 500;
    margin: 0;
    padding: 10px;
    background: transparent;
    mix-blend-mode: difference;
}
header,
header * {
    color: #fff;
}
header .box_btn {
    border-color: #fff;
    color: #fff;
}
header .box_btn:hover {
    background: #fff;
    color: #000;
}

/* burger icon for the MENU button, used on phones only */
.burger {
    display: none;
}

/* headings reached from the contents list stop below the sticky header */
h2, h4 {
    scroll-margin-top: 130px;
}

.wrapper {
    margin: 10px;
}

a:hover{
    opacity: 0.6;
}

h1 {
    font-size: 1.5em;
}

h2 {
    margin-top: 30px;
    font-size: 1.25em;
}

h3 {
    margin-top: 20px;
    font-size: 1.25em;
}

h4{
    font-size: 0.9em;
    margin-top:20px;
}

h5{
    font-size: 0.6em;
    margin-top:20px;
}

p{
    margin-top:10px;
}

.copyright, .inner .copyright {
    padding-top: 20px;
    font-size:0.4em;
}

.text div {
    margin: 5px 0;
}

.italic {
    font-style: italic;
}

ul {
    padding-left: 40px;
    padding-right: 40px;
    list-style-type: "_ ";
}

ul li {
    margin: 10px 0;
}

#exhibitions ul li{
    margin: 30px 0;   
}

s {
    text-decoration: line-through;
}

#languageSwitcher {
    background-color: transparent;
    border: 3px solid black;
    border-radius: 0;
    padding: 8px 14px;
    font-size: 0.6em;
    font-family: inherit;
    font-weight: 700;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;      
}

.new_header{
    display: flex;                 /* Use flexbox for layout */
    justify-content: space-between; /* Space between title and switcher */
    align-items: center; 
}
  
/* links: one style everywhere. external links get an arrow (see below) */
.outside_link, .video_link {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: rgba(0,0,0,0.35);
}

.outside_link:hover, .video_link:hover {
    opacity: 1;
    text-decoration-color: currentColor;
}

/* arrow after any link that leaves the website (text links only, not images) */
a[href^="http"]:not([href*="mikhailkorotkov.com"]):not(:has(img))::after {
    content: "\2197";
    display: inline-block;
    margin-inline-start: 0.15em;
    font-size: 0.8em;
    font-weight: 400;
    text-decoration: none;
}
.rtl a[href^="http"]:not([href*="mikhailkorotkov.com"]):not(:has(img))::after {
    content: "\2196";
}

.inner_link {
    font-weight: bold;
}

.inner_link::selection{
    color:#fff;
    background:#FF0AAD;
}

.inner_link:hover {
    text-decoration: underline;
}

.no_print {
    font-style: normal;
}

/* header buttons: SHOP + MENU, same square style as the language switch */
.header_buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}
.box_btn {
    font-family: inherit;
    font-size: 0.6em;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    padding: 8px 14px;
    border: 3px solid #000;
    background: transparent;
    color: #000;
    cursor: pointer;
    display: inline-block;
}
.box_btn:hover {
    opacity: 1;
    background: #000;
    color: #fff;
}

/* full-screen menu */
body.menu_open {
    overflow: hidden;
}
.site_menu {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #000;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.site_menu[hidden] {
    display: none;
}
.site_menu * {
    color: #fff;
}
.site_menu option {
    color: #000;
}
.site_menu .menu_name {
    font-size: 1.5em;
    font-weight: 700;
}
.site_menu .box_btn,
.site_menu #languageSwitcher {
    border-color: #fff;
}
.site_menu .box_btn:hover {
    background: #fff;
    color: #000;
}
.menu_main {
    list-style: none;
    padding: 0;
    margin: 60px 0 0;
}
.menu_main li {
    margin: 0;
}
.menu_main a {
    display: inline-block;
    font-size: 2.4em;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}
.site_menu a:hover {
    opacity: 1;
    background: #fff;
    color: #000;
}
.menu_contact {
    margin-top: auto;
    padding-top: 60px;
}
.menu_label {
    font-size: 0.5em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 6px;
}
.menu_contact ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 30px;
    font-size: 0.7em;
}
.menu_contact li {
    margin: 0;
}

.desc{
    font-style: italic;
    font-size: 0.7em;
}

.inner p{
    margin-top:10px;
    margin-bottom:10px;
    font-size: 0.5em;
}

.inner .text{
    max-width: 900px;
    margin-bottom:20px;
}



/* captions under photos: same size as the description text, not the 40px body size */
.pictures{
    font-size: 0.5em;
    display:flex;
    flex-wrap: wrap;
      justify-content: left;
      gap: 10px;			
}

.pictures section > div {
    margin-top: 8px;
    max-width: 900px;
}

.pictures img {
    object-fit: cover;
    max-width: 900px;
    height: auto;
    vertical-align: middle;
    border-radius: 5px;
}

#toc{
    font-size:16px;
    margin:20px 0;
}

#toc li {
    font-weight: bold;
}

#scrollToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 0;
    background-color: #000;
    color: #fff !important;
    border: 3px solid #000;
    font-family: inherit;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
}

#scrollToTop:hover {
    background-color: #fff;
    color: #000 !important;
}

.rtl #scrollToTop {
    left:20px;
    right:auto;
}

.show_as_list{
    list-style-type: none;
    padding:0;
}

/* collaborations: one dense block of names separated by slashes.
   names never break inside; lines break only after a slash */
.show_as_list li{
    display: inline;
    margin: 0;
    white-space: nowrap;
}

.show_as_list li:not(:last-child)::after {
    content: " /";
}

.rtl .pictures{
    justify-content: right;
}

.blue{
    color:blue;
}
.bold{
    font-weight:bold;
}
.cover_img{
    border-radius:5px;
    width:100%;
    display: block;
}
.grid_display{
    display: grid;
    /* grid-template-columns: repeat(4, 1fr); */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px; 
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    box-sizing: border-box; 
    overflow-x: hidden; 
}

.grid_display li {
    padding: 10px; 
    text-align: center;
    border-radius: 5px;
}
.hover_link:hover {
    opacity: 1;
}
.hover_link img {
    transition: transform 0.3s ease;
}
.hover_link:hover img {
    transform: translateY(-3px);
    cursor: pointer;
}

/* homepage project covers show in black and white; hovering brings the colour back.
   only on devices with a mouse: phones and tablets always see colour */
@media (hover: hover) {
    .cover_img {
        filter: grayscale(1);
        transition: filter 0.4s ease, transform 0.3s ease;
    }
    .hover_link:hover .cover_img {
        filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hover_link img { transition: none; }
    .hover_link:hover img { transform: none; }
}

.two_row .pictures img{
    max-width:600px !important;
}



/* index: compact table of contents so projects show on the first screen */
#toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    padding: 0;
}
#toc li {
    margin: 0;
    list-style-position: inside;
}

/* CV lists (exhibitions, awards, event photography): year in its own column */
.year_group {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0 20px;
    padding: 20px 0;
    border-top: 1px solid rgba(0,0,0,0.15);
}
.year_group:first-child {
    border-top: none;
}
.year_group .year {
    font-weight: 700;
    line-height: 1.3;
    padding-top: 10px;
}
.year_group ul {
    padding: 0;
    padding-inline-start: 1.1em;
}
.year_group ul li:first-child {
    margin-top: 10px !important;
}
#exhibitions .year_group ul li {
    margin: 0 0 30px 0;
}
#exhibitions .year_group ul li:last-child,
#awards .year_group ul li:last-child {
    margin-bottom: 0;
}


/* commissions page (/ep) */
.big_title {
    margin-top: 30px;
    font-size: 2.4em;
    line-height: 0.95;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}
.commissions_intro {
    margin: 20px 0;
}
/* the contents list only matters once there are 2+ categories */
.commissions #toc ul:has(> li:only-child) {
    display: none;
}
.commission_stats {
    font-size: 0.6em;
    margin: 10px 0 20px;
}
.shoot_tags {
    font-size: 0.55em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

@media (max-width: 767px) {
    .pictures {
        font-size: 0.9em;
    }
    /* phones: SHOP moves into the menu, MENU becomes a burger icon */
    header .shop_link {
        display: none;
    }
    header #menuButton {
        border: none;
        background: transparent;
        padding: 8px 0 8px 8px;
    }
    .rtl header #menuButton {
        padding: 8px 8px 8px 0;
    }
    header #menuButton .menu_text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    header #menuButton .burger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 30px;
    }
    header #menuButton .burger i {
        display: block;
        height: 3px;
        background: currentColor;
    }
    h2, h4 {
        scroll-margin-top: 115px;
    }
    #scrollToTop {
        width: 42px;
        height: 42px;
        font-size: 22px;
        bottom: 14px;
        right: 14px;
    }
    .rtl #scrollToTop {
        left: 14px;
        right: auto;
    }
    #languageSwitcher {
        font-size: 1em;
        padding: 5px 10px;
        border-width: 2.5px;
    }
    .commission_stats {
        font-size: 0.85em;
    }
    .shoot_tags {
        font-size: 0.75em;
    }

    .year_group {
        grid-template-columns: 1fr;
        padding: 14px 0;
    }
    .year_group .year {
        padding-top: 0;
    }

    ul {
        padding-left: 17px;
    }

    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }
    h4{
        font-size: 1.2em;
    }
    h5{
        font-size: 0.9em;
    }
    .box_btn {
        font-size: 0.85em;
        padding: 5px 10px;
        border-width: 2.5px;
    }
    .header_buttons {
        gap: 6px;
    }
    .menu_main {
        margin-top: 40px;
    }
    .menu_main a {
        font-size: 2.6em;
    }
    .site_menu .menu_name {
        font-size: 2em;
    }
    .menu_contact ul {
        display: block;
        font-size: 1.1em;
        line-height: 1.7;
    }
    .inner p{
        font-size: 0.9em;
    }
    .desc{
        font-size: 0.9em;
    }
    .pictures img {
          object-fit: cover;
          max-width: 100%;
    }
    .two_row .pictures img {
        max-width: 100% !important;
    }
    .copyright, .inner .copyright {
        font-size:0.8em;
    }
    .grid_display{
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
}

@media print {
    .no_print {
        display: none !important;
    }
}