/*
Theme Name: mikhailtheme
*/
:root {
    --paper: #FFFFFF;
    --ink: #0A0A0A;
    --ink-soft: #7A7A7A;
    --line: #D9D9D9;
    --accent: #A6421D;
  }
  ::selection {
    background: var(--accent);
    color: #fff;
}

  * { box-sizing: border-box; }
  html {
	scroll-behavior: smooth;
  }

  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
  }

  h1, h2, h3, .display {
    /* font-family: 'Space Grotesk', sans-serif; */
    font-family: var(--main-font);
    font-weight: 500;
    margin: 0;
    letter-spacing: -0.01em;
  }






/* --- Стили попапа --- */
.popup-overlay {
  display: none; /* Изначально скрыт */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px); /* Легкое размытие заднего фона */
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

/* Класс, который JS будет добавлять для показа попапа */
.popup-overlay.is-active {
  display: flex;
}

.popup-content {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  text-align: center;
}

.font-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.font-option-btn {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

/* Стили для выбранного шрифта в списке */
.font-option-btn.active {
  border-color: #007bff;
  background: #f0f7ff;
  font-weight: bold;
}

.popup-close-btn {
  margin-top: 10px;
  background: #333;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}









  a { color: inherit; text-decoration: none; }

  .wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
  }

  .shell {
    display: grid;
    grid-template-columns: 220px 1fr;
  }

  aside.side-nav {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 40px 0 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--line);
  }

  .side-nav .name {
    font-family: var(--main-font);
    font-size: 16px;
    line-height: 1.3;
  }

  .side-nav .name span {
    display: block;
    color: var(--ink-soft);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    margin-top: 4px;
  }

  .side-nav nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .side-nav nav a {
    font-size: 14px;
    color: var(--ink-soft);
    transition: color 0.15s;
  }

  .side-nav nav a:hover, .side-nav nav a.active{
	color: var(--accent);
	}

  .side-nav .meta {
    font-size: 12px;
    color: var(--ink-soft);
  }
  .language_switcher_wrapper {
  }
  .language_switcher_item {
    text-decoration: none;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
  }
  .language_switcher_item.active {
    color: var(--accent);
    text-decoration: underline;
  }

  main { min-width: 0; }

  .hero {
    padding: 90px 56px 80px;
    border-bottom: 1px solid var(--line);
  }

  .hero .eyebrow {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
    margin-bottom: 28px;
  }

  .hero h1 {
    font-size: clamp(40px, 6vw, 88px);
    line-height: 0.98;
    max-width: 15ch;
  }

  .hero p {
    max-width: 46ch;
    font-size: 17px;
    color: var(--ink-soft);
    margin-top: 28px;
  }

  .hero .portrait {
    margin-top: 56px;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #EFEFEF;
  }

  .hero .portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(1) contrast(1.05);
  }

  .section-head {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 56px 56px 32px;
    border-bottom: 1px solid var(--line);
  }

  .section-head .index-num {
    font-family: var(--main-font);
    font-size: 14px;
    color: var(--ink-soft);
  }

  .section-head h2 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  .index-list { border-bottom: 1px solid var(--line); }

  .row {
    display: grid;
    grid-template-columns: 56px 1fr 140px 96px;
    align-items: center;
    gap: 24px;
    padding: 28px 56px;
    border-top: 1px solid var(--line);
    transition: background 0.15s;
  }

  .row:hover { background: #F7F7F7; }

  .row .n {
    font-family: var(--main-font);
    font-size: 13px;
    color: var(--ink-soft);
  }

  .row .title-block h3 {
    font-size: clamp(20px, 2.4vw, 30px);
    font-weight: 500;
  }

  .row .title-block .desc {
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: 6px;
    max-width: 60ch;
  }

  .row .title-block .file-link {
    display: inline-block;
    font-size: 12px;
    color: var(--ink);
    margin-top: 8px;
    border-bottom: 1px solid var(--ink);
  }

  .row .year {
    font-size: 13px;
    color: var(--ink-soft);
    text-align: right;
  }

  .row .thumb {
    width: 96px;
    height: 72px;
    background: #EFEFEF;
    overflow: hidden;
  }

  .row .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(1) contrast(1.05);
  }

  .row .thumb .placeholder-text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--ink-soft);
    text-align: center;
    padding: 4px;
  }

  .about {
    padding: 80px 56px;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 64px;
  }

  .about h2 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
  }

  .about p {
    font-size: 20px;
    line-height: 1.5;
    max-width: 56ch;
  }

  .about .skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 32px;
  }

  .about .skills span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
  }

  footer {
    padding: 80px 56px 56px;
  }

  footer h2 {
    font-size: clamp(32px, 4vw, 52px);
    max-width: 14ch;
  }

  footer .contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    margin-top: 40px;
  }

  footer .contact-links a {
    font-size: 14px;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
  }

  footer .fine-print {
    margin-top: 80px;
    font-size: 12px;
    color: var(--ink-soft);
  }







  .row {
  }
  .has_accordeon {
  }
  .n {
  }
  .title-block {
  }
  .desc {
  }
  .year {
  }
  .thumb {
  }
  .accordeon {

  }
  .accordeon_inner {
  }
  .accordeon_inner_wrapper {
  }
  .accordeon_img {
    width: 100%;
    max-height: 720px;
    height: auto;       
    aspect-ratio: 16 / 9; 
    object-fit: cover;
    object-object-position: center; 
  }
  .accordeon {
    height: 0;
    overflow: hidden;
    transition: height 0.4s ease;
}


.accordeon.open {
    max-height: 1000px;
}

.has_accordeon {
    cursor: pointer;
}
.accordeon_inner {
  padding: 30px 30px;
}

.accordeon_img_wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.accordeon_img {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.accordeon_img_wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.accordeon_img {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
}
.accordeon_img_wrapper {
}
.accrodeon_img_item_wrapper {
}
.accordeon_img {
}
.accordeon_inner_text {
  margin: 0;
  margin-top: 12px;
  line-height: 1;
  font-size: 14px;
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: .3s;
  z-index: 9999;
  padding: 40px;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
}








  @media (max-width: 900px) {
    #wpadminbar {
      display: none !important;
    }
    .shell { 
      grid-template-columns: 1fr; 
      position: relative;
    }

    aside.side-nav {
      position: fixed;
      height: auto;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      padding: 10px 24px;
      border-right: none;
      border-bottom: 1px solid var(--line);
      border-top: 1px solid var(--line);
      background-color: var(--paper);
      flex-direction: column;
      align-items: start;
      gap: 12px;
      top: auto;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 999;
    }
    .language_switcher_wrapper {
      margin: 0 auto;
    }
    .change_color_btn {
      display: none;
    }
    .logo {
      display: none;
    }
    .hero {
      padding: 15px 56px 80px;
      border-bottom: 1px solid var(--line);
  }
    .side-nav nav {
      flex-direction: row;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: center;
    }
    .side-nav nav a {
      line-height: 1;
    }
    .side-nav .meta { display: none; }

    .hero, .section-head, .about, footer { padding-left: 24px; padding-right: 24px; }

    .row {
      grid-template-columns: 1fr;
      padding: 24px;
      gap: 12px;
    }

    .row .thumb { width: 100%; height: 160px; order: -1; }
    .row .year { text-align: left; }

    .about { grid-template-columns: 1fr; }
  }
