/* Inessa Ruzh - Artist Portfolio */
/* Matching WordPress "hideo" theme by Anders Noren */

/* ── Variables ── */
:root {
  --color-bg: #ECE7E1;
  --color-text: #15151C;
  --color-muted: #555;
  --color-border: #d4cfc9;
  --color-white: #fff;
  --font-sans: 'Cormorant Garamond', ui-serif, Georgia, serif;
  --body-margin: clamp(24px, 4.166vw, 32px);
  --border-radius: clamp(12px, 3.125vw, 24px);
  --max-width: 1200px;
  --sidebar-width: 260px;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Body ── */
body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(16px, 1rem + 0.2vw, 20px);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ── Site Layout (Sidebar + Content) ── */
.site-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.5rem;
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
}

.sidebar .logo {
  display: block;
  line-height: 0;
  margin-bottom: 2.5rem;
}

.sidebar .logo img {
  height: 120px;
  width: auto;
  transition: opacity 0.2s;
}

.sidebar .logo:hover img {
  opacity: 0.7;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 100%;
}

.sidebar-nav a {
  font-family: var(--font-sans);
  font-size: clamp(1.15rem, 1rem + 0.4vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 0.4rem 0;
  transition: opacity 0.2s;
  text-align: center;
}

.sidebar-nav a:hover {
  opacity: 0.55;
}

/* ── Site Content ── */
.site-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Mobile Header (hidden on desktop) ── */
.mobile-header {
  display: none;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.8rem); }
h3 { font-size: clamp(1.1rem, 0.9rem + 1vw, 1.5rem); }

/* ── Main Content ── */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--body-margin);
  width: 100%;
}

/* ── Secondary Nav (Homepage only) ── */
.secondary-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem var(--body-margin);
}

.secondary-nav a {
  font-size: 0.9em;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: opacity 0.2s;
}

.secondary-nav a:hover {
  opacity: 0.55;
}

/* ── Gallery Grid (Homepage) ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  margin-bottom: clamp(3rem, 5vw, 6rem);
}

.gallery-item {
  display: block;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--border-radius);
  transition: opacity 0.25s ease;
}

.gallery-item:hover img {
  opacity: 0.85;
}

.gallery-item .title {
  display: block;
  margin-top: 0.7em;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.85rem + 0.7vw, 1.35rem);
  font-weight: 400;
  text-align: center;
}

/* ── Biography Section ── */
#biography {
  display: grid;
  grid-template-columns: clamp(280px, 35%, 420px) 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.bio-photo {
  width: 100%;
  border-radius: var(--border-radius);
}

.bio-content h2 {
  margin-bottom: 0.6em;
}

.bio-content p {
  margin-bottom: 1em;
  line-height: 1.75;
}

/* ── Contacts Section ── */
#contacts {
  text-align: center;
  padding: clamp(1rem, 2vw, 1.5rem) 0;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

#contacts h2 {
  margin-bottom: 0.8em;
}

#contacts p {
  color: var(--color-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ── Lightbox ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  cursor: pointer;
  justify-content: center;
  align-items: center;
}

#lightbox.active {
  display: flex;
}

#lightbox img {
  max-width: 82vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 3rem;
  cursor: pointer;
  padding: 1rem;
  transition: color 0.2s;
  line-height: 1;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ── Footer ── */
footer {
  padding: clamp(2rem, 4vw, 3rem) var(--body-margin);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-row {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.copyright {
  color: var(--color-muted);
  font-size: 0.85em;
  white-space: nowrap;
}

.copyright a {
  text-decoration: none;
}

.copyright a:hover {
  opacity: 0.6;
}

.theme-credit {
  color: var(--color-muted);
  font-size: 0.85em;
  white-space: nowrap;
}

.theme-credit a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.theme-credit a:hover {
  opacity: 0.6;
}

/* ── Social Links ── */
.social-links {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  list-style: none;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: opacity 0.2s;
  padding: 0.33em;
}

.social-links a:hover {
  opacity: 0.55;
}

.social-links svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ── Cosmos Gallery Widget ── */
.cosmos-widget {
  position: fixed;
  bottom: var(--body-margin);
  left: var(--body-margin);
  z-index: 50;
}

.cosmos-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.2rem;
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: 100px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.85em;
}

.cosmos-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.cosmos-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.cosmos-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.cosmos-text strong {
  font-size: 0.9em;
  font-weight: 700;
}

.cosmos-text small {
  font-size: 0.72em;
  opacity: 0.75;
}

.cosmos-arrow {
  font-size: 1.1rem;
  opacity: 0.6;
}

/* ── Mobile Navigation ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--color-bg);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-sans);
  font-size: 1.8rem;
  transition: opacity 0.2s;
}

.mobile-menu a:hover {
  opacity: 0.55;
}

.mobile-menu-close {
  position: absolute;
  top: var(--body-margin);
  right: var(--body-margin);
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--color-text);
  line-height: 1;
}

/* ── Post Single Page ── */
.post-single {
  max-width: 800px;
  margin: 0 auto;
}

.post-single header {
  text-align: center;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.post-single header h1 {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
}

.post-cover {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.post-cover img {
  width: 100%;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: opacity 0.2s;
}

.post-cover img:hover {
  opacity: 0.88;
}

.post-categories {
  margin-bottom: 0.6rem;
}

.post-categories a {
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-muted);
  font-variant: small-caps;
  transition: opacity 0.2s;
}

.post-categories a:hover {
  opacity: 0.55;
}

.post-categories a + a::before {
  content: ", ";
}

.post-description {
  max-width: 600px;
  margin: 0 auto clamp(2rem, 4vw, 4rem);
  text-align: center;
  line-height: 1.75;
  font-size: clamp(15px, 0.9rem + 0.2vw, 18px);
  color: var(--color-muted);
}

.post-description p {
  margin-bottom: 1em;
}

.post-description p:last-child {
  margin-bottom: 0;
}

.post-downloads {
  display: flex;
  gap: 1rem;
  margin-bottom: clamp(2rem, 4vw, 4rem);
  flex-wrap: wrap;
  justify-content: center;
}

.download-btn {
  display: inline-block;
  padding: 0.7em 2em;
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: 100px;
  font-size: 0.9em;
  font-weight: 700;
  transition: opacity 0.2s;
}

.download-btn:hover {
  opacity: 0.8;
}

.post-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 20px);
  margin-bottom: clamp(10px, 1.5vw, 20px);
}

.post-gallery figure {
  flex: 0 1 calc(50% - clamp(10px, 1.5vw, 20px));
}

.post-gallery--1 figure { flex: 0 1 100%; }
.post-gallery--2 figure { flex: 0 1 calc(50% - clamp(10px, 1.5vw, 20px)); }
.post-gallery--3 figure { flex: 0 1 calc(33.333% - clamp(10px, 1.5vw, 20px)); }

.post-gallery img {
  width: 100%;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: opacity 0.2s;
}

.post-gallery img:hover {
  opacity: 0.88;
}

.gallery-separator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
}

.gallery-separator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-border);
}

/* ── Category Listing ── */
.category-listing header {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.category-listing header h1 {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
}

/* ── Responsive ── */

/* Tablet: sidebar narrows, gallery goes 1-col */
@media (max-width: 968px) {
  :root {
    --sidebar-width: 210px;
  }

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

  #biography {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .bio-photo {
    max-width: 400px;
    margin: 0 auto;
  }
}

/* Mobile: sidebar hidden, hamburger menu */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--body-margin);
    border-bottom: 1px solid var(--color-border);
  }

  .mobile-header .logo {
    display: block;
    line-height: 0;
  }

  .mobile-header .logo img {
    height: 36px;
    width: auto;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
  }

  .menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s, opacity 0.3s;
  }

  .secondary-nav {
    justify-content: center;
  }

  .footer-row {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .cosmos-text {
    display: none;
  }

  .cosmos-link {
    padding: 0.75rem;
  }

  .cosmos-arrow {
    display: none;
  }
}

@media (max-width: 600px) {
  .post-gallery figure {
    flex: 0 1 100%;
  }
}

