/* ============================================
   Valentyn Metyk — Artist Portfolio
   ============================================ */

/* Fonts are loaded via <link> in each page's <head> (preconnect + stylesheet)
   for faster first paint — the old CSS @import was render-blocking. */

/* --- Custom Properties --- */
:root {
  /* Primary — from the sky */
  --color-deep-blue: #002f7f;
  --color-mid-blue: #3f639f;
  --color-sky-blue: #5880be;
  --color-lavender: #8c8bab;
  --color-periwinkle: #7b7fae;
  --color-pale-sky: #bcc4d7;
  --color-cloud: #dcdbe3;

  /* Warm — from the figures and ground */
  --color-ochre: #a79831;
  --color-dark-gold: #7d7103;
  --color-earth: #433602;
  --color-olive: #6d6f0a;

  /* Neutrals */
  --color-bg: #faf9f7;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --color-border: #e0e0e0;
  --color-black: #000000;
  --color-white: #ffffff;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --max-width: 1300px;
  --section-padding: 80px;
  --grid-gap: 30px;
  --grid-gap-lg: 40px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

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

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 30px;
}

/* --- Header / Nav --- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-bg);
  transition: background 0.3s, color 0.3s;
}

.site-header.nav-transparent {
  background: transparent;
}

.site-header.nav-transparent .site-logo a,
.site-header.nav-transparent .nav-link {
  color: var(--color-white);
}

.site-header.nav-transparent .nav-link::after {
  background: var(--color-white);
}

.site-header.nav-transparent .nav-cta {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--color-white);
  border: 1px solid rgba(255,255,255,0.35);
}

.site-header.nav-transparent .nav-cta:hover {
  background: rgba(255,255,255,0.25);
  opacity: 1;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo a {
  display: block;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 35px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-white);
  background: var(--color-black);
  padding: 12px 28px;
  border-radius: 999px;
  transition: opacity 0.3s;
}

.nav-cta:hover {
  opacity: 0.8;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 110;
  background: none;
  border: none;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-text);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 30px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 400;
  color: var(--color-white);
  line-height: 1.1;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}

.hero-headline em {
  font-style: italic;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 10px rgba(0,0,0,0.3);
}

.hero-cta {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-white);
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 18px 44px;
  border-radius: 12px;
  transition: background 0.3s;
}

.hero-cta:hover {
  background: rgba(0,0,0,0.9);
}

/* --- Section --- */
.section {
  padding: var(--section-padding) 0;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 50px;
}

/* --- Page Heading (for inner pages) --- */
.page-heading {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  padding-top: 130px;
  padding-bottom: 50px;
}

/* --- Artwork Grid --- */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}

.artwork-card {
  cursor: pointer;
}

.artwork-card-image {
  position: relative;
  height: 400px;
  overflow: hidden;
}

.artwork-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.artwork-card:hover .artwork-card-image img {
  transform: scale(1.02);
}

.artwork-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  opacity: 0;
  transition: opacity 0.3s;
}

.artwork-card:hover .artwork-badge {
  opacity: 1;
}

.artwork-badge--sold {
  background: var(--color-text-muted);
}

.artwork-card-info {
  padding: 16px 0;
  text-align: center;
}

.artwork-card-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.artwork-card-meta {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 300;
}

/* --- Exhibition Grid --- */
.exhibition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap-lg);
}

.exhibition-card {
  cursor: pointer;
}

.exhibition-card-image {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.exhibition-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.exhibition-card:hover .exhibition-card-image img {
  transform: scale(1.02);
}

.exhibition-card-info {
  padding: 20px 0;
}

.exhibition-card-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.exhibition-card-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 300;
  line-height: 1.5;
}

/* --- Buttons --- */
.btn-outline {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 50px auto 0;
  padding: 16px 30px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  border: 1px solid var(--color-black);
  color: var(--color-text);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.btn-outline:hover {
  background: var(--color-black);
  color: var(--color-white);
}

/* --- Contact Form --- */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 30px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 0;
  font-size: 0.9rem;
  font-weight: 300;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  transition: border-color 0.3s;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 20px;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: var(--color-text);
}

.btn-submit {
  display: inline-block;
  padding: 14px 50px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--color-black);
  color: var(--color-white);
  border: 1px solid var(--color-black);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.btn-submit:hover {
  background: transparent;
  color: var(--color-text);
}

/* --- Footer --- */
.site-footer {
  padding: 50px 0 40px;
  text-align: center;
  background: rgba(0, 47, 127, 0.03);
}

.footer-social {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 25px;
}

.footer-social a {
  position: relative;
  padding: 4px 0;
}

.footer-social a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: width 0.3s;
}

.footer-social a:hover::after {
  width: 100%;
}

.footer-divider {
  width: 60px;
  height: 1px;
  background: var(--color-border);
  margin: 0 auto 25px;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 300;
}

.footer-copy span {
  display: block;
  margin-top: 5px;
  font-size: 0.7rem;
}

/* --- About Page --- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-bio-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.about-bio-role {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 25px;
}

.about-bio-text {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--color-text);
  font-weight: 300;
}

.about-portrait {
  position: sticky;
  top: 100px;
}

.about-portrait img {
  width: 100%;
  height: auto;
}

/* CV Section */
.cv-section {
  padding: var(--section-padding) 0;
}

.cv-category {
  margin-bottom: 40px;
}

.cv-category-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.cv-entry {
  display: flex;
  gap: 30px;
  padding: 8px 0;
}

.cv-year {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text-muted);
  min-width: 50px;
}

.cv-detail {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.5;
}

/* Artist Statement */
.artist-statement {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--section-padding) 0;
}

.artist-statement .section-heading {
  margin-bottom: 30px;
}

.artist-statement p {
  font-size: 0.95rem;
  line-height: 1.9;
  font-weight: 300;
  margin-bottom: 20px;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .artwork-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
  }

  .nav-center,
  .nav-right {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    align-items: center;
    justify-content: center;
    gap: 25px;
    z-index: 105;
  }

  .nav-center.is-open,
  .nav-right.is-open {
    display: flex;
  }

  .nav-center {
    position: fixed;
    left: 0;
    transform: none;
  }

  /* nav-right becomes a transparent bottom band so it no longer covers
     the nav-center links overlay (they share the screen when open). */
  .nav-right {
    top: auto;
    bottom: 0;
    height: auto;
    background: transparent;
    padding-bottom: 48px;
    z-index: 106;
  }

  /* Keep the open menu readable even under the transparent hero header. */
  .site-header.nav-transparent .nav-link {
    color: var(--color-text);
  }

  .site-header.nav-transparent .nav-cta {
    background: var(--color-black);
    color: var(--color-white);
    border: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .nav-link {
    font-size: 18px;
  }

  .nav-cta {
    font-size: 16px;
    padding: 14px 32px;
  }

  .hamburger {
    display: flex;
  }

  .site-logo {
    font-size: 19px;
  }

  .artwork-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-portrait {
    position: static;
    order: -1;
  }

  .artwork-card-image {
    height: 280px;
  }

  .exhibition-card-image {
    height: 380px;
  }
}

@media (max-width: 480px) {
  .artwork-grid {
    grid-template-columns: 1fr;
  }

  .page-heading {
    font-size: 1.5rem;
    padding-top: 110px;
  }
}

/* --- Contact form status message --- */
.form-status {
  margin-top: 16px;
  min-height: 1.2em;
  font-size: 0.95rem;
}

.form-status.is-success {
  color: var(--color-olive);
}

.form-status.is-error {
  color: #b00020;
}

/* --- Language switcher --- */
.nav-right {
  gap: 18px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.lang-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 6px;
  border-radius: 5px;
  transition: color 0.2s, background 0.2s;
}

.lang-btn:hover {
  color: var(--color-text);
}

.lang-btn.active {
  color: var(--color-text);
  font-weight: 700;
}

/* Divider between the two buttons */
.lang-btn + .lang-btn {
  border-left: 1px solid var(--color-border);
  border-radius: 0;
  padding-left: 9px;
  margin-left: 3px;
}

/* Over the transparent hero header */
.site-header.nav-transparent .lang-btn {
  color: rgba(255, 255, 255, 0.65);
}

.site-header.nav-transparent .lang-btn:hover,
.site-header.nav-transparent .lang-btn.active {
  color: var(--color-white);
}

.site-header.nav-transparent .lang-btn + .lang-btn {
  border-left-color: rgba(255, 255, 255, 0.35);
}

/* On small screens the switcher sits inside the cream menu overlay, so it
   needs dark text even though the hero header is otherwise transparent.
   Declared last so it wins over the "white over hero" rules above. */
@media (max-width: 768px) {
  .site-header.nav-transparent .lang-btn {
    color: var(--color-text-muted);
  }
  .site-header.nav-transparent .lang-btn:hover,
  .site-header.nav-transparent .lang-btn.active {
    color: var(--color-text);
  }
  .site-header.nav-transparent .lang-btn + .lang-btn {
    border-left-color: var(--color-border);
  }
}
