@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");

:root {
  --offwhite: #fefcf5;
  --deepblue: #3b3f7f;
  --accentred: #a63a14;
  --accentyellow: #e4cc69;
  --text-primary: #2a2a2a;
  --text-secondary: #6a6a6a;
}

* {
  box-sizing: border-box;
}

body, html {
  height: 100%;
}

html {
  font-size: 18px;
}

body {
  background: var(--offwhite);
  color: var(--text-primary);
  font-family: "Lato", sans-serif;
  padding: 1rem 4%;
  transition: background-color 2s ease-in-out;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: top;
  transition: opacity 2s ease-in-out;
  z-index: -1;
}

#background1 {
  opacity: 0;
}

#background2 {
  opacity: 0;
}

@media (min-width: 40rem) {
  body {
    padding: 4rem 8%;
  }
}

header {
  margin-bottom: 3rem;
}

.splash-page header {
  width: max-content;
  margin-left: -1rem;
  padding: 0 1rem 0.5rem;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  background: rgba(254, 252, 245, 0.3);
  animation: fadeIn 120ms ease;
}

@media (max-width: 48rem) {
  header {
    margin-bottom: 2rem;
  }
}

header h1 {
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

nav {
  font-size: 1.2rem;
  display: flex;
  gap: 1rem;
}

nav > a,
nav > span.current-page {
  padding: 0 0.75rem;
  display: inline-block;
  transition: color 0.2s;
  position: relative;
  cursor: pointer;
}

/* Remove left padding from first item to align with h1 */
nav > a:first-child,
nav > span.current-page:first-child {
  padding-left: 0;
}

/* Animated underline for nav links */
nav > a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--accentred);
  transition: width 0.3s ease, left 0.3s ease;
}

nav > a:hover::after {
  width: calc(100% - 1.5rem);
  left: 50%;
  transform: translateX(-50%);
}

/* Adjust underline for first item - align left instead of center */
nav > a:first-child::after {
  left: 0;
  transform: none;
}

nav > a:first-child:hover::after {
  width: calc(100% - 0.75rem);
  left: 0;
  transform: none;
}

/* Current page styling to match active category links */
span.current-page {
  font-weight: 700;
  color: var(--accentred);
  opacity: 1;
  cursor: default;
}

/* add underline to current page too */
span.current-page::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: calc(100% - 1.5rem);
  height: 1px;
  background: var(--accentred);
  transform: translateX(-50%);
}

/* Adjust underline for first item when it's current */
span.current-page:first-child::after {
  width: calc(100% - 0.75rem);
  left: 0;
  transform: none;
}

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

a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accentred);
  outline-offset: 2px;
}

.lightbox-nav > div {
  cursor: pointer;
}

.lightbox-nav > div:hover,
.lightbox-close:hover {
  color: var(--accentred);
}

h2 {
  font-weight: 400;
}

h2.artwork-category-h2 {
  text-align: center;
  font-style: italic;
}

[role="doc-subtitle"] {
  font-size: 1.5rem;
  color: #999;
  font-style: italic;
  display: none;
}

.category-links {
  margin-bottom: 1.5rem;
}

.category-links a {
  padding: 0 0.75rem;
  display: inline-block;
  transition: color 0.2s;
  position: relative;
}

.category-links a:first-child {
  padding-left: 0;
}

.category-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--accentred);
  transition: width 0.3s ease, left 0.3s ease;
}

.category-links a:hover::after,
.category-links a.active::after {
  width: calc(100% - 1.5rem);
  left: 50%;
  transform: translateX(-50%);
}

.category-links a:first-child:hover::after,
.category-links a:first-child.active::after {
  width: calc(100% - 0.75rem);
  left: 0;
  transform: none;
}

.category-links a.active {
  font-weight: 700;
  color: var(--accentred);
}

.year-links {
  margin-bottom: 3rem;
}

.year-links a {
  padding: 0 0.75rem;
  display: inline-block;
  transition: color 0.2s;
  position: relative;
  margin-right: 0.5rem;
}

.year-links a:first-child {
  padding-left: 0;
}

.year-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--accentred);
  transition: width 0.3s ease, left 0.3s ease;
}

.year-links a:hover::after,
.year-links a.active::after {
  width: calc(100% - 1.5rem);
  left: 50%;
  transform: translateX(-50%);
}

.year-links a:first-child:hover::after,
.year-links a:first-child.active::after {
  width: calc(100% - 0.75rem);
  left: 0;
  transform: none;
}

.year-links a.active {
  font-weight: 700;
  color: var(--accentred);
}

.gallery {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}

@media (max-width: 48rem) {
  .gallery {
    gap: 1.5rem;
  }
}

.series-wrapper {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

@media (max-width: 48rem) {
  .series-wrapper {
    gap: 1.5rem;
  }
}

.thumbnail {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.1s;
  opacity: 0;
  background: rgba(0,0,0,0.05);
}

.thumbnail:hover {
  transform: scale(1.02);
}

@media (min-width: 45rem) {
  .thumbnail {
    height: 10rem;
    width: auto;
  }
}

.lightbox {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(254, 252, 245, 0.98);
  backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
}

.lightbox-close {
  position: fixed;
  font-size: 3rem;
  right: 2rem;
  top: 1rem;
  line-height: 1;
  font-family: sans-serif;
  font-weight: 200;
  cursor: pointer;
  transition: transform 0.2s, color 0.2s;
}

.lightbox-close:hover {
  transform: scale(1.1);
}

.lightbox-img {
  max-height: 85%;
  max-width: 85%;
  width: auto !important;
  height: auto !important;
  margin: auto;
  cursor: default;
  animation: none !important;
  opacity: 1 !important;
}

.lightbox-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 800px;
  margin-bottom: 2rem;
  gap: 1rem;
}

.lightbox-metadata {
  flex: 1;
  text-align: center;
  padding: 0 1rem;
  min-width: 0;
  line-height: 1.5;
}

.lightbox-metadata cite {
  font-style: italic;
  font-size: 1.3rem;
}

.lightbox-metadata .artwork-details {
  font-size: 0.95rem;
  color: #666;
}

.lightbox-prev,
.lightbox-next {
  cursor: pointer;
}

@media (max-width: 48rem) {
  .lightbox-metadata {
    flex-basis: 100%;
    order: -1;
    padding: 0 0 0.5rem 0;
  }
  
  .lightbox-prev,
  .lightbox-next {
    flex: 1;
    font-size: 1.2rem;
  }
  
  .lightbox-prev {
    text-align: left;
  }
  
  .lightbox-next {
    text-align: right;
  }
}

h2:first-child {
  margin-top: 0;
}

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

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.fade-in {
  animation: fadeIn 2s;
  opacity: 1;
}

.fade-out {
  animation: fadeOut 100ms;
  opacity: 0;
}

.fade-short {
  animation: fadeIn 200ms;
  opacity: 1;
}

.text-block {
  max-width: 75rem;
  margin: 0 auto;
}

.about-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.bio-text {
  flex: 1;
  max-width: 42rem; /* Keeps text readable */
}

#portrait-image {
  width: 300px;
  flex-shrink: 0;
  object-fit: cover;
}

@media (max-width: 48rem) {
  .about-content {
    flex-direction: column;
  }
  
  #portrait-image {
    width: 100%;
    max-width: 400px;
  }
}

form {
  margin-top: 2rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(0,0,0,0.2);
  background: white;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--accentred);
  box-shadow: 0 0 0 3px rgba(166, 58, 20, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

input[type="submit"] {
  padding: 0.75rem 2rem;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  background-color: var(--deepblue);
  color: white;
  border-radius: 0.2rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

input[type="submit"]:hover {
  background-color: var(--accentred);
  transform: translateY(-2px);
}

input[type="submit"]:active {
  transform: translateY(0);
}

.success-message {
  padding: 1.5rem;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 0.2rem;
  color: #155724;
  margin-bottom: 2rem;
}

.error-message {
  padding: 1.5rem;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 0.2rem;
  color: #721c24;
  margin-bottom: 2rem;
}

.bio-text {
  max-width: 47rem;
}

.work-category-select {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

@media (max-width: 48rem) {
  .work-category-select {
    grid-template-columns: 1fr;
  }
}

.work-category-preview {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.work-category-preview:hover {
  transform: translateY(-5px);
}

.work-category-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  background-size: cover;
  background-position: center;
  transition: filter 0.5s ease, transform 0.5s ease;
}

.work-category-preview:hover::before {
  filter: blur(5px) brightness(110%);
  transform: scale(1.05);
}

.work-category-preview h2 {
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  text-align: center;
  color: var(--offwhite);
  font-weight: 600;
  margin: 0;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.long-series {
  flex-wrap: wrap;
}

.long-series img {
  min-width: 20%;
}


header h1, nav {
  text-shadow: 
    0 0 8px rgba(254, 252, 245, 0.8);
}
