/* Davit Davtyan v3 — Cinematic Noir Immersive */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

:root {
  --void: #060606;
  --surface: #0e0e0e;
  --surface-up: #161616;
  --text: #f0eeeb;
  --text-dim: #8a8884;
  --text-faint: #4a4846;
  --line: rgba(240, 238, 235, 0.08);
  --line-bright: rgba(240, 238, 235, 0.18);
  --glow: rgba(240, 238, 235, 0.04);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--void);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection {
  background: var(--text);
  color: var(--void);
}

/* ── Header ── */
.v3-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  mix-blend-mode: difference;
  color: #fff;
}

.v3-logo {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.v3-nav {
  display: flex;
  gap: clamp(20px, 3vw, 36px);
  list-style: none;
}

.v3-nav a {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.v3-nav a:hover,
.v3-nav a.active { opacity: 1; }

.v3-menu {
  display: none;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Hero (fullscreen cinematic) ── */
.v3-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

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

.v3-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: heroZoom 20s var(--ease) forwards;
}

@keyframes heroZoom {
  to { transform: scale(1); }
}

.v3-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--void) 0%, transparent 50%),
    linear-gradient(to right, rgba(6,6,6,0.6) 0%, transparent 60%);
}

.v3-hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(32px, 6vh, 80px) clamp(20px, 4vw, 48px);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.v3-hero-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.v3-hero h1 {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
  max-width: 800px;
}

.v3-hero h1 em {
  font-style: italic;
  color: var(--text-dim);
}

.v3-hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: clamp(32px, 5vh, 60px);
  gap: 24px;
  flex-wrap: wrap;
}

.v3-hero-tagline {
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  font-weight: 300;
  color: var(--text-dim);
  max-width: 400px;
  line-height: 1.7;
}

.v3-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-bright);
  transition: gap 0.4s var(--ease), border-color 0.3s;
}

.v3-hero-cta:hover {
  gap: 20px;
  border-color: var(--text);
}

.v3-scroll-hint {
  position: absolute;
  bottom: 32px;
  right: clamp(20px, 4vw, 48px);
  z-index: 2;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  writing-mode: vertical-rl;
}

/* ── Section label ── */
.v3-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.v3-section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.1;
}

/* ── Works showcase (stacked full-bleed rows) ── */
.v3-works {
  padding: clamp(80px, 12vh, 140px) 0 0;
}

.v3-works-header {
  padding: 0 clamp(20px, 4vw, 48px);
  max-width: 1400px;
  margin: 0 auto 60px;
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.v3-work-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
  border-top: 1px solid var(--line);
}

.v3-work-row:nth-child(even) .v3-work-img { order: 2; }
.v3-work-row:nth-child(even) .v3-work-info { order: 1; }

.v3-work-img {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  min-height: 400px;
}

.v3-work-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease), filter 0.6s;
  filter: brightness(0.92);
}

.v3-work-row:hover .v3-work-img img {
  transform: scale(1.03);
  filter: brightness(1);
}

.v3-work-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 6vw, 80px);
  background: var(--surface);
}

.v3-work-num {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  margin-bottom: 24px;
}

.v3-work-info h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  margin-bottom: 16px;
  line-height: 1.15;
}

.v3-work-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.8;
}

.v3-work-link {
  margin-top: 32px;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s;
}

.v3-work-row:hover .v3-work-link { color: var(--text); }

/* ── Statement band ── */
.v3-band {
  padding: clamp(80px, 12vh, 140px) clamp(20px, 4vw, 48px);
  max-width: 1400px;
  margin: 0 auto;
}

.v3-band-text {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-dim);
  font-weight: 300;
  text-align: left;
}

.v3-band-text p {
  margin: 0 0 20px;
}

.v3-band-text p:last-child {
  margin-bottom: 0;
}

/* ── Page header ── */
.v3-page-head {
  padding: calc(var(--header-h) + clamp(60px, 10vh, 100px)) clamp(20px, 4vw, 48px) clamp(40px, 6vh, 60px);
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

/* ── Portfolio filters ── */
.v3-filters {
  display: flex;
  gap: 4px;
  padding: 24px clamp(20px, 4vw, 48px);
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.v3-filter {
  padding: 10px 20px;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid transparent;
  transition: all 0.3s;
}

.v3-filter:hover,
.v3-filter.active {
  color: var(--text);
  border-color: var(--line-bright);
}

/* ── Portfolio grid (masonry columns) ── */
.v3-masonry {
  columns: 3;
  column-gap: 4px;
  padding: 0 0 clamp(80px, 10vh, 120px);
}

.v3-masonry-item {
  break-inside: avoid;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.v3-masonry-item a { display: block; }

.v3-masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.7s var(--ease), filter 0.5s;
  filter: brightness(0.88);
}

.v3-masonry-item:hover img {
  transform: scale(1.02);
  filter: brightness(1);
}

.v3-masonry-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px;
  background: linear-gradient(to top, rgba(6,6,6,0.9), transparent);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
}

.v3-masonry-item:hover .v3-masonry-caption {
  transform: translateY(0);
}

.v3-masonry-caption h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.v3-masonry-caption span {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ── Painting detail ── */
.v3-detail {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
}

.v3-detail-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  cursor: zoom-in;
}

.v3-detail-hero img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
}

.v3-detail-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  padding: 32px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
  background: var(--void);
}

.v3-detail-bar h1 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
}

.v3-detail-specs {
  display: flex;
  gap: 32px;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 300;
}

.v3-detail-specs span {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.v3-detail-actions {
  text-align: right;
}

.v3-detail-actions a {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 12px 24px;
  border: 1px solid var(--line-bright);
  transition: all 0.3s;
}

.v3-detail-actions a:hover {
  background: var(--text);
  color: var(--void);
  border-color: var(--text);
}

.v3-detail-text {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px) clamp(48px, 6vh, 72px);
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-dim);
  font-weight: 300;
}

.v3-detail-text p {
  margin: 0 0 1.2em;
}

.v3-detail-text p:last-child {
  margin-bottom: 0;
}

.v3-related {
  padding: clamp(60px, 8vh, 80px) clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
}

.v3-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  max-width: 1400px;
  margin: 24px auto 0;
}

.v3-related-grid a {
  display: block;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 4/5;
}

.v3-related-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
  transition: filter 0.4s, transform 0.6s var(--ease);
}

.v3-related-grid a:hover img {
  filter: brightness(1);
  transform: scale(1.03);
}

/* ── About ── */
.v3-about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  padding: clamp(60px, 8vh, 100px) clamp(20px, 4vw, 48px);
  max-width: 1400px;
  margin: 0 auto;
}

.v3-about-text {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-dim);
  font-weight: 300;
}

.v3-about-text p { margin-bottom: 20px; }

.v3-about-side {
  border-left: 1px solid var(--line);
  padding-left: clamp(32px, 4vw, 48px);
}

.v3-about-side h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.v3-about-side p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.v3-about-side a {
  color: var(--text);
  border-bottom: 1px solid var(--line-bright);
  transition: border-color 0.3s;
}

.v3-about-side a:hover { border-color: var(--text); }

.v3-about-statement {
  padding: 0 clamp(20px, 4vw, 48px) clamp(60px, 8vh, 80px);
  max-width: 1400px;
  margin: 0 auto;
}

.v3-exhibitions {
  padding: clamp(60px, 8vh, 80px) clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
  max-width: 1400px;
  margin: 0 auto;
}

.v3-exhibitions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  margin-top: 40px;
}

.v3-exhibitions h3 {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.v3-exhibitions li {
  list-style: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  gap: 16px;
}

.v3-exhibitions li time {
  font-size: 0.75rem;
  color: var(--text-faint);
  min-width: 40px;
  font-variant-numeric: tabular-nums;
}

/* ── Events ── */
.v3-events {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(60px, 8vh, 100px) clamp(20px, 4vw, 48px);
}

.v3-event {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
}

.v3-event-year {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--text-faint);
  line-height: 1;
}

.v3-event h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.v3-event p {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.v3-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line-bright);
  color: var(--text-dim);
}

/* ── Contact ── */
.v3-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--header-h));
  border-top: 1px solid var(--line);
}

.v3-contact-left {
  padding: clamp(60px, 8vh, 100px) clamp(20px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
}

.v3-contact-left h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 16px 0 32px;
}

.v3-contact-links {
  list-style: none;
  margin-top: 40px;
}

.v3-contact-links li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--text-dim);
}

.v3-contact-links a { color: var(--text); }

.v3-contact-right {
  padding: clamp(60px, 8vh, 100px) clamp(20px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.v3-field { margin-bottom: 28px; }

.v3-field label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.v3-field input,
.v3-field textarea {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
}

.v3-field input:focus,
.v3-field textarea:focus { border-color: var(--text-dim); }

.v3-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.v3-submit {
  margin-top: 16px;
  padding: 14px 32px;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--text);
  color: var(--void);
  transition: opacity 0.3s;
}

.v3-submit:hover { opacity: 0.85; }

.v3-alert {
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  border: 1px solid;
}

.v3-alert-success {
  border-color: rgba(100, 180, 120, 0.3);
  color: #7ec99a;
}

.v3-alert-error {
  border-color: rgba(200, 100, 80, 0.3);
  color: #d49080;
}

/* ── Footer ── */
.v3-footer {
  padding: 24px clamp(20px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

.v3-footer-links {
  display: flex;
  gap: 24px;
}

.v3-footer-links a {
  transition: color 0.3s;
}

.v3-footer-links a:hover { color: var(--text); }

/* ── Lightbox ── */
.v3-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(6, 6, 6, 0.96);
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}

.v3-lightbox.open { display: flex; }

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

/* ── Fade in ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .v3-work-row { grid-template-columns: 1fr; min-height: auto; }
  .v3-work-row:nth-child(even) .v3-work-img { order: 0; }
  .v3-work-row:nth-child(even) .v3-work-info { order: 0; }
  .v3-work-img { min-height: 50vh; }
  .v3-masonry { columns: 2; }
  .v3-about { grid-template-columns: 1fr; }
  .v3-about-side { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 40px; }
  .v3-exhibitions-grid { grid-template-columns: 1fr; }
  .v3-contact { grid-template-columns: 1fr; }
  .v3-contact-left { border-right: none; border-bottom: 1px solid var(--line); }
  .v3-detail-bar { grid-template-columns: 1fr; text-align: center; }
  .v3-detail-specs { justify-content: center; }
  .v3-detail-actions { text-align: center; }
  .v3-related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .v3-menu { display: block; }
  .v3-nav {
    display: none;
    position: fixed;
    top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    background: var(--void);
    mix-blend-mode: normal;
    color: var(--text);
  }
  .v3-nav.open { display: flex; }
  .v3-nav a { font-size: 0.85rem; opacity: 1; }
  .v3-header { mix-blend-mode: normal; color: var(--text); }
  .v3-masonry { columns: 1; }
  .v3-detail-specs { flex-direction: column; gap: 16px; align-items: center; }
  .v3-field-row { grid-template-columns: 1fr; }
  .v3-related-grid { grid-template-columns: 1fr; }
  .v3-scroll-hint { display: none; }
}
