/* ============================================================
   KEVIN LUCEY — style.css

   ============================================================ */

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

/* ── TOKENS ── */
:root {
  --bg:    #ffffff;
  --ink:   #111111;
  --mid:   #767676; 
  --rule:  #e8e8e8;
  --pad:   clamp(2.5rem, 6vw, 5rem);
  --nav-h: 52px;
}

/* ── UTILITIES ── */

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Shared elements styled as buttons */
.btn-reset {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

/* ── BASE ── */
html { -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ============================================================
   NAV
   ============================================================ */
nav {
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mid);
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }

/* ============================================================
   NAV DROPDOWN
   ============================================================ */
.nav-dropdown {
  position: relative;
}

/* Invisible bridge that fills the gap so hover doesn't break */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -10px;
  right: -10px;
  height: 18px;
}

.nav-dropdown__btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.15s;
}

.nav-dropdown__btn:hover,
.nav-dropdown__btn.active { color: var(--mid); }

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 14px);
  left: -20%;
  background: var(--bg);
  border: 1px solid var(--rule);
  list-style: none;
  padding: 0.6rem 0;
  min-width: 140px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown.open .nav-dropdown__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  
}

.nav-dropdown__menu li a {
  display: block;
  padding: .65rem 1.5rem;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-dropdown__menu li a:hover { color: var(--ink); background-color: var(--rule);}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 1.1rem var(--pad);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mid);
  text-align: center;
}

/* ============================================================
   ARCHIVE STRIP  (homepage + year pages)
   ============================================================ */
.archive-strip {
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  padding-left: var(--pad);
}

.archive-strip::-webkit-scrollbar { display: none; }

.archive-strip__label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  display: flex;
  align-items: center;
  padding-right: 2rem;
  border-right: 1px solid var(--rule);
  flex-shrink: 0;
  white-space: nowrap;
}

.archive-strip__years {
  display: flex;
  list-style: none;
}

.archive-strip__years a {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 1.25rem;
  font-size: 12px;
  font-weight: 300;
  text-decoration: none;
  color: var(--mid);
  border-right: 1px solid var(--rule);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.archive-strip__years a:hover,
.archive-strip__years a.active {
  color: var(--ink);
  background: #f6f6f6;
}

/* ============================================================
   HOMEPAGE — hero
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  height: calc(100vh - var(--nav-h));
  max-height: 680px;
  min-height: 400px;
}

.hero-cell {
  overflow: hidden;
}

.hero-cell + .hero-cell {
  border-left: 1px solid var(--rule);
}

.hero-cell img,
.hero-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Homepage — about + journal mid section ── */
.mid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--rule);
}

.about {
  padding: 2.75rem var(--pad);
  border-right: 1px solid var(--rule);
}

.section-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.25rem;
}

.about__text {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink);
}

.about__links {
  display: flex;
  gap: 1.75rem;
  margin-top: 1.75rem;
}

.text-link {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color 0.15s;
}

.text-link:hover { border-color: var(--ink); }

.journal-preview {
  padding: 2.75rem var(--pad);
}

.journal__post {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}

.journal__post:last-of-type {
  border-bottom: 1px solid var(--rule);
}

.journal__post-title {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.4;
  margin-bottom: 0.2rem;
  transition: color 0.15s;
}

.journal__post:hover .journal__post-title { color: var(--mid); }

.journal__post-date {
  font-size: 11px;
  color: var(--mid);
}

.journal__arrow {
  font-size: 13px;
  color: var(--mid);
  flex-shrink: 0;
  transition: transform 0.15s;
}

.journal__post:hover .journal__arrow { transform: translateX(3px); }

.journal__all {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mid);
  transition: color 0.15s;
}

.journal__all:hover { color: var(--ink); }

/* ── Homepage — contact ── */
.contact {
  border-bottom: 1px solid var(--rule);
  padding: 2.75rem var(--pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.contact__heading {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.contact__detail {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.9;
}

.contact__detail p {
  color: var(--ink);
}

.contact__detail a {
  color: var(--ink);
  text-decoration: none;
}

.contact__detail a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   YEAR PAGES — section headers, grids, lightbox
   ============================================================ */

/* ── Section headers ── */
.section-header {
  padding: 1rem var(--pad);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header__label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}

.section-header__count {
  display: none;
}

/* ── Grid wrapper — insets grids to match page margin ── */
.grid-wrap {
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--rule);
}

/* ── Paintings grid (3-across) ── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--bg);
}

.painting-card {
  background: var(--bg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 1px 0 0 0 var(--rule), 0 1px 0 0 var(--rule);
}

.grid-3 .painting-card:nth-child(3n) {
  box-shadow: 0 1px 0 0 var(--rule);
}

.painting-card__image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #ffffff;
}

.painting-card__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.painting-card__info {
  padding: 0.85rem 1rem 1rem;
  flex: 1;
}

.painting-card__title {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.painting-card__meta {
  font-size: 11px;
  color: var(--mid);
  line-height: 1.7;
}

/* ── Studies grid (6-across) ── */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--bg);
}

.study-card {
  background: var(--bg);
  cursor: pointer;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-shadow: 1px 0 0 0 var(--rule), 0 1px 0 0 var(--rule);
}

.study-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10, 10, 10, 0.93);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox__inner {
  display: grid;
  grid-template-columns: 1fr 260px;
  width: 90vw;
  height: 88vh;
  max-width: 1200px;
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
}

.lightbox__image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: #ffffff;
  overflow: hidden;
  height: 100%;
}

.lightbox__image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lightbox__panel {
  border-left: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.75rem;
}

.lightbox__close {
  align-self: flex-end;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.15s;
  padding: 0;
}

.lightbox__close:hover { color: var(--ink); }

.lightbox__title {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
}

.lightbox__year {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}

.lightbox__details {
  font-size: 12px;
  color: var(--mid);
  line-height: 1.85;
  white-space: pre-line;
}

.lightbox__nav {
  display: flex;
  gap: 1.25rem;
}

.lightbox__nav-btn {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.15s;
  padding: 0;
}

.lightbox__nav-btn:hover { color: var(--ink); }

/* ============================================================
   SHARED — page-level typography utilities
   Used by: CV, Curation, and any future text pages
   ============================================================ */
.page-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 13px;
  color: var(--mid);
}

/* ============================================================
   CURATION PAGE
   ============================================================ */
.curation {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--pad) 5rem;
}

.curation__intro {
  padding: 3rem 0 2.75rem;
  border-bottom: 1px solid var(--rule);
}

.cur-section {
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.cur-section__title {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

/* reuses .section-label for the date/venue line */

.cur-section__desc {
  font-size: 13px;
  line-height: 1.85;
  color: var(--mid);
  margin-top: 0.9rem;
  margin-bottom: 0;
}

.cur-section__desc + .cur-section__desc { margin-top: 0.75rem; }
.cur-section__desc strong { color: var(--ink); font-weight: 400; }
.cur-section__desc em { font-style: italic; }

.cur-hero {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: opacity 0.15s;
}

.cur-hero:hover { opacity: 0.92; }

.cur-view-all {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.15s;
}

.cur-view-all:hover { color: var(--ink); }

/* ── Photo viewer modal ── */
.photo-viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10, 10, 10, 0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
}

.photo-viewer.open { display: flex; }

.photo-viewer__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.photo-viewer__controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.photo-viewer__btn {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.15s;
  padding: 0;
}

.photo-viewer__btn:hover { color: #fff; }

.photo-viewer__counter {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.06em;
  min-width: 48px;
  text-align: center;
}

/* ============================================================
   CV PAGE
   ============================================================ */
.cv {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem var(--pad) 5rem;
}

.cv__location {
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.cv__section {
  margin-bottom: 2.75rem;
}

.cv__section-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0;
}

.cv__list {
  list-style: none;
  margin-top: 0;
}

.cv__item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.25rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.6;
}

.cv__year {
  color: var(--mid);
  font-size: 11px;
  padding-top: 2px;
  white-space: nowrap;
}

.cv__detail {
  color: var(--ink);
}

.cv__detail em {
  font-style: italic;
}

/* ============================================================
   JOURNAL INDEX
   ============================================================ */
.post-grid {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem var(--pad) 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: row;
  background: #f9f9f9;
  max-height: 180px;
  border-radius: 8px;
  border: #00000011 1px solid;
  overflow: hidden;
}

.post-card__image {
  width: 180px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--rule);
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card__image img { transform: scale(1.03); }

.post-card__body {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-card__date {
  font-size: 10px;
  color: var(--mid);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.post-card__title {
  font-size: 20px;
  font-weight: 300;
  line-height: 1.8;
  transition: color 0.15s;
}

.post-card:hover .post-card__title { color: var(--mid); }

/* ============================================================
   JOURNAL POST
   ============================================================ */
.post {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem var(--pad) 5rem;
}

.post__back {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mid);
  margin-bottom: 2.5rem;
  transition: color 0.15s;
}

.post__back:hover { color: var(--ink); }

.post__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.post__meta {
  font-size: 11px;
  color: var(--mid);
  letter-spacing: 0.04em;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.post__body p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.post__body p em { font-style: italic; }

.post__body h2 {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post__images {
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
}

.post__images-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.post__images-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 0rem;
  background: var(--bg);
  display: block;
  cursor: pointer;
  box-sizing: border-box;
}

.post-nav {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem var(--pad) 0;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.post-nav a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mid);
  transition: color 0.15s;
}

.post-nav a:hover { color: var(--ink); }

/* ============================================================
   FOCUS & ACCESSIBILITY
   ============================================================ */

/* Visible focus ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Remove focus ring for mouse/touch users (browsers that support :focus-visible) */
:focus:not(:focus-visible) {
  outline: none;
}

/* painting-card and study-card are now <button> elements — reset button defaults */
.painting-card,
.study-card {
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
}

.painting-card { padding: 0; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Homepage */
@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: 70vw;
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .hero-cell:first-child { display: none; }
  .hero-cell + .hero-cell {
    border-left: none;
    border-top: none;
  }
  .mid { grid-template-columns: 1fr; }
  .about {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .contact { grid-template-columns: 1fr; }
}

/* Year pages */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 .painting-card:nth-child(3n) { box-shadow: 1px 0 0 0 var(--rule), 0 1px 0 0 var(--rule); }
  .grid-3 .painting-card:nth-child(2n) { box-shadow: 0 1px 0 0 var(--rule); }
  .grid-6 { grid-template-columns: repeat(4, 1fr); }
  .lightbox__inner { grid-template-columns: 1fr; }
  .lightbox__panel { border-left: none; border-top: 1px solid var(--rule); }
}

@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .post__images-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card { flex-direction: column; max-height: none; }
  .post-card__image { width: 100%; aspect-ratio: 4 / 3; }
}
