/* Simple CSS reset */
/* 1. Use an intuitive box-sizing model for all elements */
*,
*::before,
*::after {
  box-sizing: border-box;
}
/* 2. Remove default margins and paddings */
* {
  margin: 0;
  padding: 0;
}
/* 3. Allow fluid heights and establish comfortable line rendering */
html,
body {
  height: 100%;
}
body {
  -webkit-font-smoothing: antialiased;
}
/* 4. Make images and media responsive and fluid */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
/* 6. Avoid text overflow layout breaks */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}
/* Simple CSS site */
:root {
  --color-text: rgba(255, 255, 255, 0.87);
  --color-headings: #addae0;
  /* Accesibility check: webaim.org */
}
html {
  background: #000 url("assets/bg-nazghul.webp") top center / 100% auto no-repeat;
}
body {
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  color: var(--color-text);
  padding: 20px;
}
header,
main,
footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  margin-bottom: 20px;
}
main {
  padding: 0;
}
#hero p {
  font-size: 1.2rem;
  font-style: italic;
  margin-left: auto;
}
section {
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}
h1,
h2,
h3 {
  color: var(--color-headings);
}
h2 {
  margin-bottom: 1rem;
}
/* Footer */
footer {
  font-size: 0.8rem;
  text-align: center;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.5);
}
footer span {
  color: var(--color-headings);
}
footer a {
  color: #ff7f50;
  text-decoration: none;
}
footer a:hover {
  color: #fff;
}
/* Our Work */
/* Our Work */
#work > p {
  margin-bottom: 1rem;
}
#work ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(25.625rem, 100%), 1fr));
  gap: 1rem;
  margin-top: 2rem;
  list-style: none;
}
#work li + li {
  margin-top: 1rem;
}
#work li > a {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: #333;
  text-decoration: none;
}
/* Work images */
.work-image {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 0.625rem;
}
.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}
#work a:hover .work-image img,
#work a:focus-visible .work-image img {
  transform: scale(1.4);
}
#work a:hover .work-image,
#work a:focus-visible .work-image {
  border-color: var(--color-logo);
}
#work h3 {
  color: var(--color-blue);
  font-weight: 500;
  line-height: 1.1;
}
#work a:hover h3,
#work a:focus-visible h3 {
  text-decoration: underline;
}
#work a:focus-visible {
  outline-offset: 2px;
}
#work li h3 {
  color: var(--color-headings);
}
#work li a {
  color: var(--color-headings);
}
#work li a {
  color: var(--color-text);
}
/* Footer */
/* Footer */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #fff;
  font-size: 0.8rem;
}
footer p {
  color: var(--color-blue-primary);
}
footer ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}
footer a {
  color: inherit;
  text-decoration: none;
}
footer a:hover,
footer a:focus-visible {
  color: var(--color-blue-primary);
  text-decoration: underline;
}
footer p.social-links {
  display: flex;
  justify-content: center;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  width: 100%;
}
footer p.social-links a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
footer p.social-links a.icon-ig {
  color: #e4405f;
}
footer p.social-links a.icon-in {
  color: #0a66c2;
}
footer p.social-links a.icon-art {
  color: #13aff0;
}
footer p.social-links a:hover,
footer p.social-links a:focus-visible {
  color: #fff;
}
footer p.social-links svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Menu */
/* Header */
header {
  background: none;
  padding: 0;
  flex-wrap: wrap;
  display: flex;
  align-items: center;
}
header svg {
  display: block;
  width: auto;
  height: 150px;
  fill: none;
  stroke: currentColor;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
header svg circle {
  fill: currentColor;
  stroke: none;
}
header svg:hover,
header h1:hover,
header svg:focus-visible,
header h1:focus-visible {
  color: var(--color-headings);
}
header svg {
  transition: color 0.2s ease;
}
#site-logo {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: inherit;
  text-decoration: none;
}
#site-logo h1 {
  font-style: italic;
  color: #fff;
}
#site-logo h1 span {
  display: block;
  font-size: 0.6em;
  font-weight: 400;
  color: var(--color-headings);
}
#site-logo:hover svg,
#site-logo:focus-visible svg,
#site-logo:hover h1,
#site-logo:focus-visible h1 {
  color: var(--color-headings);
}
#site-logo:hover span,
#site-logo:focus-visible span {
  color: #fff;
}
/* Menu */
/* Menu */
#menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
  margin-left: auto;
  padding: 0.625rem;
  background: none;
  border: 0;
  cursor: pointer;
  order: 1;
}
#menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--color-headings);
  text-shadow: 0 1px 4px #000;
}
#menu-toggle:hover span,
#menu-toggle[aria-expanded="true"] span {
  background-color: var(--color-text);
}
#menu-toggle:focus-visible {
  outline: 2px solid var(--color-headings);
  outline-offset: 2px;
}
#main-menu {
  display: none;
  width: 100%;
  order: 2;
}
#main-menu ul {
  list-style: none;
}
#main-menu ul li a {
  color: var(--color-headings);
  text-decoration: none;
  /* Readable against brighter bg */
}
#main-menu ul li a:hover,
#main-menu ul li a:focus-visible {
  color: #fff;
  text-decoration: underline;
}
#main-menu.open {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex-basis: 100%;
  margin-left: 0;
  width: auto;
  margin: 0;
  text-align: right;
}
#main-menu.open ul {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1875rem;
  margin-top: 0.625rem;
}
/* Dialog & Creations gallery */
#gallery-dialog {
  width: fit-content;
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
  padding: 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: #fff;
  color: #222;
  /* --- ANIMATION ADDITION: Setup transitions --- */
  transition: opacity 0.3s ease, transform 0.3s ease, display 0.3s ease allow-discrete, overlay 0.3s ease allow-discrete;
}
/* Closed state */
#gallery-dialog {
  opacity: 0;
  transform: scale(0.95);
}
#gallery-dialog::backdrop {
  background: rgba(0, 0, 0, 0);
  /* Fully transparent */
  backdrop-filter: blur(0px);
  /* No blur */
  /* Animation */
  transition: background 0.3s ease, backdrop-filter 0.3s ease, display 0.3s ease allow-discrete, overlay 0.3s ease allow-discrete;
}
/* Open state */
#gallery-dialog[open] {
  opacity: 1;
  transform: scale(1);
  /* Full size when open */
}
#gallery-dialog[open]::backdrop {
  background: rgba(0, 0, 0, 0.6);
  /* Your original 60% dark backdrop */
  backdrop-filter: blur(4px);
  /* Your original blur */
}
/* Where to animate from on entry - for the browser */
@starting-style {
  #gallery-dialog[open] {
    opacity: 0;
    transform: scale(0.95);
  }
  #gallery-dialog[open]::backdrop {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
  }
}
#gallery-dialog h3 {
  /* margin: 0 3rem .10rem 0; */
  font-size: 1rem;
}
#gallery-dialog img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  margin: 0 auto;
}
#gallery-dialog button {
  position: absolute;
  z-index: 3;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font: inherit;
  cursor: pointer;
  user-select: none;
  background-color: #fff;
  border: none;
}
#gallery-dialog button:not(:disabled):hover,
#gallery-dialog button:not(:disabled):active,
#gallery-dialog button:not(:disabled):focus-visible {
  color: red;
  transform: scale(1.2);
  border-color: red;
}
#gallery-dialog button #dialog-previous,
#gallery-dialog button #dialog-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
#gallery-dialog button #dialog-previous {
  left: 0.5rem;
}
#gallery-dialog button #dialog-next {
  right: 0.5rem;
}
#gallery-dialog button img {
  margin-top: 1rem;
  touch-action: pan-y;
}
/* Gallery */
#gallery-dialog h3,
#gallery-dialog p {
  display: inline;
  margin: 0;
  color: white;
}
#gallery-dialog p {
  margin: 0 3rem 1rem 0;
}
/* Injects the hyphen automatically after the H3 */
#gallery-dialog h3::after {
  content: "-";
  margin: 0 10px;
}
/* Buttons */
#gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, 100px);
  grid-auto-rows: 100px;
  gap: 8px;
  grid-auto-flow: dense;
}
#gallery a {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: solid 3px #fff;
  border-radius: 0.625rem;
}
#gallery img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 5px;
  transition: transform 0.3s ease;
}
#gallery a:hover,
#gallery a:active,
#gallery a:focus-visible {
  border-color: var(--color-logo);
}
#gallery a:hover img,
#gallery a:active img,
#gallery a:focus-visible img {
  transform: scale(1.3);
}
#gallery a.double {
  grid-column: span 2;
  grid-row: span 2;
}
#gallery-dialog .gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem 1rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.65) 65%, transparent);
  animation: gallery-caption-fade 10s forwards;
}
@keyframes gallery-caption-fade {
  0%,
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
#gallery-dialog .gallery-caption:hover {
  animation: none;
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  #gallery-dialog .gallery-caption {
    animation: none;
  }
}
#gallery-dialog .gallery-image {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: auto;
}
/* Gallery image wrapper for caption overlay */
#gallery-dialog .gallery-image-wrapper {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: auto;
}
#gallery-dialog .gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: auto;
}
/* Positioning the navigation buttons */
#gallery-dialog #dialog-previous,
#gallery-dialog #dialog-next {
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}
#gallery-dialog #dialog-previous {
  left: -1rem;
  right: auto;
}
#gallery-dialog #dialog-next {
  right: -1rem;
  left: auto;
}
#gallery a {
  border-color: #000;
}
#gallery a:hover {
  border-color: var(--color-headings);
}
#milestones {
  position: relative;
}
#milestones::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/nazghul/assets/nazghul-round.webp") right top / auto 250px no-repeat;
  mask-image: linear-gradient(to right, transparent 20%, black 90%);
  opacity: 0.7;
  pointer-events: none;
}
#milestones > * {
  position: relative;
  z-index: 1;
}
#milestones h3 small {
  font-style: italic;
  font-weight: normal;
}
#milestones h3 small::before {
  content: ":";
  margin: 0 10px;
}
#milestones h3 small time {
  font-style: inherit;
}
#milestones ol {
  list-style: none;
  padding: 0;
}
#milestones ol li {
  margin-top: 1rem;
}
#milestones ol p {
  margin-top: 0.5rem;
}
