/* style.css */

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

/* ── GLOBAL LINK RESET ── */

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

body {
  width: 100%;
  height: 100%;
  background: #ffffff;
  color: #3e3e3e;
  font-family: 'Quattrocento Sans', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 25px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SKIP LINK ── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 12px 20px;
  background: #3e3e3e;
  color: #ffffff;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-decoration: none;
  z-index: 200;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ── HEADER ── */

.header {
  background: linear-gradient(to bottom, #ffffff 25%, rgba(255, 255, 255, 0) 100%);
  transition: opacity 0.45s ease;
}

.header.hidden {
  opacity: 0;
  pointer-events: none;
}

.page-wrap .header-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 24px;
}

/* Ensure the H1 keeps its original size and weight */
.page-wrap .header-main h1 {
  margin: 0;
  /* Force the font size to match your original h1 definition */
  font-size: 15px !important; 
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  font-weight: 400 !important;
  color: #3e3e3e !important;
}

/* Contact Row (Email + Icon) */
.page-wrap .contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Email Link Styling */
.page-wrap .contact-row .email {
  font-size: 13px; /* Match nav link size */
  letter-spacing: 0.08em;
  color: #3e3e3e;
  text-decoration: none; /* Override global 'a' if needed */
  transition: opacity 0.2s ease;
}

.page-wrap .contact-row .email:hover {
  opacity: 0.35;
}

/* Bio Line */
.page-wrap .bio-line {
  font-size: 14px;
  line-height: 26px;
  letter-spacing: 0.01em;
  color: #3e3e3e;
  margin: 0 0 48px 0;
}

/* Ensure Insta button aligns correctly */
.page-wrap .contact-row .insta-btn {
  vertical-align: middle;
  /* Ensure it doesn't inherit weird margins from global a tags */
  margin: 0;
  padding: 0;
}

/* ── HEADER (Base Desktop Styles) ── */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 21px 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  background: #ffffff;
}

/* ── NAV ── */

nav[aria-label="Site navigation"] ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 32px;
}

nav[aria-label="Site navigation"] ul li {
  display: inline-block;
}

nav[aria-label="Site navigation"] ul li a {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #3e3e3e;
  font-weight: 400;
  display: block;
  transition: opacity 0.2s ease;
}

nav[aria-label="Site navigation"] ul li a:hover {
  opacity: 0.35;
}

nav[aria-label="Site navigation"] ul li a[aria-current="page"] {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ── GALLERY ── */

main {
  padding-top: 60px;
}

.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-left: 0;
  list-style: none;
}

.gallery-item {
  width: 100%;
  max-width: 680px;
  padding: 0;
  margin: 0 auto 70px; /* CHANGED: Removed side padding, centered with auto margins */
}

.gallery-item:last-child {
  margin-bottom: 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.caption {
  margin-top: 14px;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.02em;
  color: #3e3e3e;
}

.caption .title {
  font-style: italic;
}

.caption .details {
  opacity: 0.55;
  margin-top: 2px;
}

/* ── INTERIOR PAGES ── */

.page-wrap {
  max-width: 680px; /* CHANGED: Increased from 620px to match gallery-item max-width */
  margin: 0 auto;
  padding: 60px 48px 100px; /* CHANGED: Added bottom padding (was 0px) */
}

.page-wrap h1 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 48px;
  color: #3e3e3e;
}

/* ── CV ── */

.cv-block {
  margin-bottom: 44px;
}

.cv-block h2 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  color: #3e3e3e;
  opacity: 0.45;
  margin-bottom: 14px;
}

.cv-block ul {
  list-style: none;
  padding-left: 0;
}

.cv-block ul li {
  font-size: 15px;
  line-height: 26px;
  letter-spacing: 0.01em;
  padding: 8px 0;
  border-bottom: 1px solid #efefef;
}

.cv-block ul li:first-child {
  border-top: 1px solid #efefef;
}

/* ── CONTACT ── */

address {
  font-style: normal;
  font-family: inherit;
}

.contact-block {
  font-size: 15px;
  line-height: 28px;
  letter-spacing: 0.01em;
}

.contact-block p {
  margin: 0;
}

.contact-block .gap {
  margin-top: 28px;
}

.contact-block a:hover {
  opacity: 0.35;
}

/* ── FOCUS STYLES ── */

a:focus-visible,
button:focus-visible {
  outline: 2px solid #3e3e3e;
  outline-offset: 3px;
  border-radius: 1px;
}

/* ── SOCIAL BUTTONS ── */

.insta-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  color: #3e3e3e;
  background: transparent;
  border: none;
  transition: opacity 0.2s ease;
}

.insta-btn:hover {
  opacity: 0.35;
}

.insta-btn:focus-visible {
  outline: 2px solid #3e3e3e;
  outline-offset: 3px;
  border-radius: 1px;
}

/* Publication links - match contact hover behavior */

.pub-link {
  transition: opacity 0.2s ease;
}

.pub-link:hover {
  opacity: 0.35;
}

.pub-link:focus-visible {
  outline: 2px solid #3e3e3e;
  outline-offset: 3px;
  border-radius: 1px;
}

/* ── FOOTER ── */

/* ─────────────────────────────
   TABLET  (max 900px)
───────────────────────────── */

@media (max-width: 900px) {
  header {
    padding: 18px 32px;
  }
  .gallery-item {
    max-width: 100%;
  }
  .gallery-item:last-child {
    margin-bottom: 0;
  }
  .page-wrap {
    padding: 55px 32px 80px; /* CHANGED: Added bottom padding */
    max-width: 100%;
  }
}

/* ─────────────────────────────
   MOBILE  (max 600px)
───────────────────────────── */

@media (max-width: 600px) {
  header {
    padding: 15px 20px;
  }
  main {
    padding-top: 55px;
  }
  .gallery-item {
    max-width: 100%;
    margin-bottom: 52px;
  }
  .gallery-item:last-child {
    margin-bottom: 0;
  }
  .page-wrap {
    padding: 50px 20px 60px; /* CHANGED: Added bottom padding */
    max-width: 100%;
  }
  .cv-block ul li {
    font-size: 14px;
    line-height: 24px;
  }
  .cv-block:last-child {
    margin-bottom: 0;
  }
  .contact-block {
    font-size: 14px;
  }
}

/* ── SCROLL TO TOP BUTTON ── */

#scrollTopBtn {
  /* Remove fixed positioning so it flows with the page */
  position: static; 

  /* Center it within its container */
  display: block;
  width: 100%;
  margin: 75px auto 0 auto; /* Top margin for spacing, auto for horizontal center */

  /* Remove button styling */
  background-color: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: auto;
  text-align: center;
}

#scrollTopBtn.scroll-top-cv {
  margin-top: 75px;
}

#scrollTopBtn span {
  font-size: 20px;
  color: #3e3e3e; /* Matches your site's text color */
  display: block;
}

#scrollTopBtn:hover {
  opacity: 0.6;
}

html {
  scroll-behavior: smooth;
}

@media (max-width: 600px) and (pointer: coarse) {
  body {
    overscroll-behavior-x: contain;
  }

  main {
    touch-action: pan-y;
  }
}