:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --header: #fde0be;
  --ink: #343434;
  --muted: #8a8a8a;
  --line: #dedede;
  --line-strong: #bdbdbd;
  --accent: #171717;
  --accent-dark: #773828;
  --accent-cool: #2f6c70;
  --accent-soft: #e7eee9;
  --shadow: 0 18px 42px rgba(31, 38, 28, 0.09);
  --shadow-soft: 0 8px 22px rgba(31, 38, 28, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Gurmukhi MT", "Helvetica Neue", Arial, Helvetica, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-weight: 300;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

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

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

.topbar {
  position: static;
  z-index: 20;
  display: flex;
  min-height: 182px;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--header);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  width: min(960px, calc(100% - 32px));
  min-height: 0;
  margin: 0 auto;
}

.brand {
  display: block;
  transform: translateY(-3px);
  animation: fadeDown 520ms ease both;
}

.brand-main,
.brand strong,
.brand small,
.brand-site-link {
  display: block;
  line-height: 1.05;
}

.brand small {
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.38rem;
  font-weight: 300;
}

.brand strong {
  font-size: clamp(2rem, 4vw, 2.35rem);
  font-weight: 300;
  letter-spacing: -0.01em;
}

.brand-site-link {
  margin-top: 5px;
  color: #111;
  font-size: 1.16rem;
  font-weight: 300;
}

.brand-site-link:hover,
.brand-site-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.header-contact {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-style: normal;
  font-weight: 300;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transform: translateY(-2px);
}

.header-contact a {
  color: inherit;
}

.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--surface);
  padding: 30px 0 116px;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  color: var(--ink);
  font-size: 1.08rem;
  font-style: normal;
  font-weight: 300;
  line-height: 1.5;
  text-align: center;
}

.footer-contact a {
  color: inherit;
}

.admin-panel[hidden] {
  display: none;
}

.admin-panel {
  background: #f7f7f7;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 42px 0 128px;
}

.admin-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

[data-admin-content][hidden],
[data-login-panel][hidden] {
  display: none;
}

.admin-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-head h1,
.admin-head h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 300;
}

.admin-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0;
}

.admin-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-login,
.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-login {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 18px;
}

.admin-field {
  display: grid;
  gap: 7px;
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.admin-field span,
.admin-upload > span {
  color: var(--ink);
  font-size: 0.88rem;
}

.admin-field input,
.admin-field textarea,
.admin-upload {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}

.admin-field textarea {
  resize: vertical;
}

.admin-upload {
  display: grid;
  gap: 8px;
}

.admin-upload input {
  padding: 0;
}

.admin-upload small,
.admin-actions p,
.admin-post small,
.admin-empty {
  color: var(--muted);
  font-size: 0.86rem;
}

.admin-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}

.admin-preview span {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-form.is-editing {
  border-color: var(--accent-cool);
  box-shadow: 0 0 0 4px rgba(47, 108, 112, 0.1);
}

.admin-actions p {
  margin: 0;
}

.admin-actions p.is-error {
  color: #8d2d2d;
}

.admin-login p.is-error {
  color: #8d2d2d;
}

.admin-actions p.is-success {
  color: var(--accent-cool);
}

.admin-actions button,
.admin-post button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 13px;
}

.admin-actions .admin-secondary-action {
  margin-left: auto;
}

.admin-posts {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.admin-post {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px 14px;
}

.admin-post-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-post-actions .is-danger {
  color: #8d2d2d;
}

.admin-post strong,
.admin-post p {
  display: block;
  margin: 0;
}

.admin-post p {
  color: var(--muted);
  font-size: 0.9rem;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  animation: fadeDown 520ms 80ms ease both;
}

.topnav a {
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 300;
  padding: 9px 12px;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: var(--accent-soft);
  color: var(--ink);
  transform: translateY(-1px);
}

.page-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 128px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: end;
  gap: 28px;
  padding: 26px 0 28px;
  animation: fadeUp 620ms ease both;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 200;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  font-weight: 300;
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.4rem, 2.3vw, 2rem);
  font-weight: 300;
  line-height: 1.1;
}

.intro-note {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
}

.composer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.composer {
  padding: 22px;
  animation: fadeUp 620ms 80ms ease both;
}

.composer-heading,
.gallery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.upload-status,
.gallery-counter {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.upload-status.is-success {
  color: var(--accent-cool);
}

.upload-status.is-error {
  color: var(--accent-dark);
}

.upload-form {
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) minmax(220px, 1.15fr);
  gap: 16px;
  margin-top: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span,
.drop-zone strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 200;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  padding: 12px 13px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent-cool);
  box-shadow: 0 0 0 4px rgba(47, 108, 112, 0.14);
  transform: translateY(-1px);
}

.drop-zone {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcfa;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.drop-zone.is-active {
  border-color: var(--accent-cool);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-zone label {
  display: grid;
  gap: 6px;
  min-height: 94px;
  place-items: center;
  padding: 18px;
  text-align: center;
}

.drop-zone span {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 200;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible,
.page-button:hover,
.page-button:focus-visible,
.modal-close:hover,
.modal-close:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent-cool);
  color: var(--surface);
  box-shadow: 0 10px 20px rgba(47, 108, 112, 0.18);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #255a5d;
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--line-strong);
  background: #f0f2ec;
}

.gallery-section {
  margin-top: 0;
  animation: fadeUp 620ms 140ms ease both;
}

.gallery-head h1 {
  max-width: 720px;
  font-size: 1.18rem;
  font-weight: 300;
  line-height: 1.42;
}

.gallery-head {
  justify-content: flex-end;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 34px;
  min-height: 320px;
  margin-top: 18px;
}

.gallery-card {
  width: 100%;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 0 0 34px;
  text-align: left;
  box-shadow: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transform-origin: center bottom;
  opacity: 0;
  animation: cardIn 480ms ease both;
  animation-delay: calc(var(--i, 0) * 35ms);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.gallery-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.gallery-card:hover,
.gallery-card:focus-visible {
  border-color: transparent;
  box-shadow: none;
  transform: translateY(-2px);
}

.gallery-card:focus-visible,
.gallery-media:focus-visible,
.page-button:focus-visible,
.button:focus-visible,
.modal-close:focus-visible,
.topnav a:focus-visible {
  outline: 3px solid rgba(166, 85, 63, 0.26);
  outline-offset: 3px;
}

.gallery-preview {
  display: block;
}

.post-copy {
  display: grid;
  gap: 4px;
  padding: 0 0 14px;
}

.post-title,
.post-description {
  display: block;
}

.post-title {
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 300;
}

.post-description {
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 300;
  line-height: 1.42;
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
}

.gallery-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, #d7ddd1, #eef2eb);
  color: inherit;
  padding: 0;
  text-align: left;
}

.gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    filter 220ms ease,
    transform 420ms ease;
}

.gallery-media:hover img,
.gallery-media:focus-visible img {
  filter: saturate(1.03) contrast(1.01);
  transform: scale(1.025);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 26px;
}

.page-button {
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 300;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.page-button[aria-current="page"] {
  border-color: var(--accent-cool);
  background: var(--accent-cool);
  color: var(--surface);
}

.page-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.pagination-gap {
  color: var(--muted);
  padding: 0 4px;
}

.contact-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 38px;
  width: min(360px, calc(100% - 28px));
  padding: 12px 18px 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.contact-action {
  display: grid;
  gap: 8px;
  justify-items: center;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 300;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.contact-action:hover,
.contact-action:focus-visible {
  color: var(--accent-cool);
  transform: translateY(-2px);
}

.contact-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: currentColor;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.035);
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.15;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 20, 16, 0.58);
  animation: modalFade 180ms ease both;
}

.modal[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
  animation: modalIn 220ms ease both;
}

.modal.is-photo-modal .modal-panel {
  width: min(1120px, 100%);
  background: #fff;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  transition:
    border-color 180ms ease,
    transform 180ms ease;
}

.modal-copy {
  padding-right: 48px;
}

.modal.is-photo-modal .modal-copy {
  display: none;
}

.modal-copy p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.modal-gallery.is-single {
  grid-template-columns: 1fr;
  justify-items: center;
}

.modal-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--accent-soft);
}

.modal-gallery.is-single img {
  width: min(100%, 920px);
  max-height: calc(100vh - 96px);
  aspect-ratio: auto;
  object-fit: contain;
  background: #fff;
}

.detail-section {
  display: grid;
  gap: 24px;
  margin-top: 0;
  animation: fadeUp 620ms 140ms ease both;
}

.detail-back {
  width: fit-content;
  color: var(--accent-cool);
  font-size: 0.95rem;
  font-weight: 300;
}

.detail-back:hover,
.detail-back:focus-visible {
  color: var(--accent);
}

.detail-header {
  max-width: 880px;
}

.detail-header h1 {
  max-width: 980px;
  margin: 4px 0 0;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 200;
  line-height: 0.98;
}

.detail-header p:last-child {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.58;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.detail-thumb {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--accent-soft);
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    filter 220ms ease,
    transform 420ms ease;
}

.detail-thumb:hover img,
.detail-thumb:focus-visible img {
  filter: saturate(1.03) contrast(1.01);
  transform: scale(1.025);
}

.detail-media {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-media img {
  width: min(100%, 1040px);
  max-height: 76vh;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.detail-media figcaption {
  color: var(--muted);
  font-size: 0.95rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1120px) {
  .gallery-strip,
  .modal-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .gallery-strip,
  .modal-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    display: grid;
    gap: 24px;
    min-height: auto;
    padding: 34px 0;
  }

  .topnav {
    display: none;
  }

  .page-shell,
  .topbar-inner {
    width: min(100% - 24px, 1180px);
  }

  .header-contact {
    text-align: left;
    white-space: normal;
  }

  .footer-contact {
    display: grid;
    gap: 6px;
  }

  .admin-head,
  .admin-actions,
  .admin-post {
    display: grid;
  }

  .admin-login,
  .admin-form {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .admin-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-post-actions {
    justify-content: flex-start;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 22px;
  }

  .composer {
    padding: 16px;
  }

  .composer-heading,
  .gallery-head {
    display: grid;
  }

  .upload-status,
  .gallery-counter {
    text-align: left;
  }

  .upload-form {
    grid-template-columns: 1fr;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .gallery-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-dock {
    gap: 24px;
    bottom: 10px;
    width: min(330px, calc(100% - 20px));
    padding: 10px 14px 8px;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .modal-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .gallery-strip,
  .modal-gallery {
    grid-template-columns: 1fr;
  }
}

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