/* Inner pages (work / about / contact). Load AFTER ../style.css */
body[data-page="work"] .site-nav a[href$="work.html"],
body[data-page="about"] .site-nav a[href$="about.html"],
body[data-page="contact"] .site-nav a[href$="contact.html"],
body[data-page="work"] .mobile-menu a[href$="work.html"],
body[data-page="about"] .mobile-menu a[href$="about.html"],
body[data-page="contact"] .mobile-menu a[href$="contact.html"] {
  color: var(--accent);
}

body[data-page="contact"] .pg-in {
  text-align: center;
}
body[data-page="contact"] .pg-hero h1 {
  text-align: center;
}
body[data-page="contact"] .pg-sub {
  margin-inline: auto;
}
body[data-page="contact"] .form {
  margin-inline: auto;
}
body[data-page="contact"] .form-row {
  flex-direction: column;
  gap: 0.75rem;
}

.pg-hero,
.pg-sec {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 7rem) clamp(1rem, 4.2vw, 5rem);
}
.pg-hero {
  background:
    radial-gradient(
      ellipse at 50% 100%,
      rgba(5, 24, 42, 0.55),
      transparent 60%
    ),
    linear-gradient(135deg, #0b445e 0%, #0c3c5d 48%, #030c2e 100%);
}
.pg-sec {
  background: linear-gradient(160deg, #052230 0%, #0c3c5d 100%);
}
.pg-sec.alt {
  background: linear-gradient(200deg, #0c3c5d 0%, #030c2e 100%);
}
.pg-hero::before,
.pg-sec::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("Photos/TextureWebsiteV2.png") center / cover no-repeat;
  mix-blend-mode: soft-light;
  opacity: 0.28;
  pointer-events: none;
}
.pg-in {
  max-width: 1400px;
  margin: 0 auto;
}

.pg-label {
  margin: 0 0 0.75rem;
  font-size: clamp(0.75rem, 0.9vw, 1rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.pg-hero h1,
.pg-sec h2.pg-title {
  text-align: left;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 1.05;
  margin: 0;
}
.pg-hero h1 {
  font-size: clamp(2.2rem, 6vw, 6.5rem);
}
.pg-hero h1 .soft,
.pg-title .soft {
  color: var(--shape);
}
.pg-sec h2.pg-title {
  font-size: clamp(1.7rem, 3.4vw, 4rem);
}
.pg-sub {
  max-width: 34em;
  margin: 1rem 0 0;
  font-size: clamp(1rem, 1.2vw, 1.4rem);
  font-weight: 300;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.86);
}
.pg-head {
  margin-bottom: clamp(1.75rem, 3vw, 3.5rem);
}

/* pill buttons */
.pg-btn {
  display: inline-flex;
  align-items: center;
  height: clamp(44px, 3.6vw, 68px);
  padding: 0 clamp(1.2rem, 1.8vw, 2.1rem);
  border: 0;
  border-radius: 999px;
  background: var(--shape);
  color: var(--white);
  font: 600 clamp(0.85rem, 1vw, 1.3rem) inherit;
  font-family: inherit;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}
.pg-btn:hover {
  background: #0a80a8;
  transform: translateY(-2px);
}
.pg-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* image placeholders: black until photos are added */
.ph {
  background: #000;
  overflow: hidden;
  border-radius: 6px;
}
.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* work cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(1rem, 2vw, 2rem);
}
.card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
}
.card .ph {
  aspect-ratio: 4 / 3;
  filter: drop-shadow(0 1rem 1.5rem rgba(0, 0, 0, 0.35));
}
.card-title {
  margin: 0;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1rem, 1.2vw, 1.4rem);
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}
.tag {
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: var(--btn-bg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* about */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
}
.split .ph {
  aspect-ratio: 1/ 1;
}
.about-copy {
  font-size: clamp(1rem, 1.15vw, 1.35rem);
  font-weight: 300;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.86);
  max-width: 30em;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.1rem 0.5rem 0.5rem;
  border-radius: 999px;
  background: var(--btn-bg);
  font-weight: 600;
}
.chip .ph {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
}
.chips.soft .chip {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 400;
}
.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 4rem);
}
.col h3 {
  margin: 0 0 1rem;
  font-size: clamp(0.75rem, 0.85vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-weight: 300;
  font-size: clamp(1rem, 1.1vw, 1.25rem);
}
.col .num {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 900;
  font-size: clamp(2rem, 3.4vw, 4rem);
  line-height: 1;
  color: var(--white);
}
.col p {
  margin: 0;
  font-weight: 300;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.86);
}
.cta {
  text-align: center;
}
.cta h2.pg-title {
  text-align: center;
}
.cta .pg-sub {
  margin-inline: auto;
}
.cta .pg-btn {
  margin-top: 1.75rem;
}

/* contact */
.form {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.field label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.field input,
.field textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font: 400 1rem inherit;
  font-family: inherit;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}
.field textarea {
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.field input:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}
.form-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
#contact__status {
  margin: 0;
  font-weight: 300;
}

@media (max-width: 800px) {
  .split,
  .cols {
    grid-template-columns: 1fr;
  }
  .split .ph {
    order: -1;
    aspect-ratio: 4 / 3;
  }
}

/* interior (gallery) pages */
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1.1rem 0.5rem 0.8rem;
  border-radius: 999px;
  background: var(--btn-bg);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}
.back:hover {
  background: #16314a;
}
.back svg {
  width: 1.1rem;
  height: 1.1rem;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 2vw, 2rem);
}
.photo {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  color: inherit;
  filter: drop-shadow(0 1rem 1.5rem rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease;
}
.photo:hover {
  transform: translateY(-4px);
}
.photo .tag {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
}
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 2rem);
  padding: 1rem;
  background: rgba(3, 12, 46, 0.94);
}
#lightbox.active {
  display: flex;
}
.lb-wrap {
  position: relative;
  width: min(100%, 1100px);
  aspect-ratio: 4 / 3;
  max-height: 85vh;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
}
.lb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.18s ease;
}
.lb-wrap .tag {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
}
.lb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: clamp(2.5rem, 3.5vw, 3.5rem);
  aspect-ratio: 1;
  border: 2px solid var(--shape);
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.lb-btn:hover {
  background: var(--shape);
}
.lb-btn svg {
  width: 50%;
  height: 50%;
}
.lb-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}
@media (max-width: 800px) {
  #lightbox {
    flex-wrap: wrap;
    align-content: center;
  }
  .lb-wrap {
    order: -1;
    width: 100%;
  }
}

/* about: certifications */
.cert {
  text-align: center;
  padding-bottom: clamp(2rem, 3vw, 5rem);
}
.cert .pg-title {
  text-align: center;
  margin-bottom: clamp(1.75rem, 3vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 5rem);
}
.cert-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
}
.cert-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 150px;
  max-width: 40vw;
  opacity: 0.8;
  cursor: default;
  transition: 400ms cubic-bezier(0.19, 1, 0.22, 1);
}
.cert-item:hover {
  opacity: 1;
}
.cert-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 22%;
  background: transparent;
}
.cert-icon img {
  object-fit: contain;
}
.cert-item span {
  margin-top: 8px;
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-6px);
  transition: 400ms cubic-bezier(0.19, 1, 0.22, 1);
}
.cert-item:hover span {
  opacity: 1;
  transform: translateY(0);
}
.cert-also {
  margin: clamp(2.5rem, 4vw, 4rem) 0 1.5rem;
}
.cert-row.small {
  gap: 20px;
}
.cert-item.sm {
  width: auto;
  min-width: 60px;
  max-width: none;
  opacity: 0.7;
}
.cert-item.sm:hover {
  opacity: 1;
}
.cert-item.sm .cert-icon {
  width: 60px;
}
.cert-item.sm span {
  opacity: 1;
  transform: none;
  color: rgba(255, 255, 255, 0.8);
}
@media (hover: none) {
  .cert-item span {
    opacity: 1;
    transform: none;
  }
}

/* about: typewriter heading */
.about__who {
  min-height: 1.1em;
}
.tw-cursor {
  display: inline-block;
  height: 0.85em;
  margin-left: 0.05em;
  vertical-align: -0.05em;
  border-right: 0.05em solid var(--accent);
  animation: tw-blink 1s steps(1) infinite;
}
@keyframes tw-blink {
  50% {
    border-color: transparent;
  }
}

/* about: centered sections (specific enough to beat .pg-sec h2.pg-title) */
.pg-sec .pg-in.center,
.pg-sec .pg-in.cert {
  text-align: center;
}
.pg-sec .pg-in.center h2.pg-title,
.pg-sec .pg-in.cert h2.pg-title {
  text-align: center;
}
.pg-in.center .pg-sub {
  margin-inline: auto;
}
.pg-in.center .col ul {
  align-items: center;
}
.pg-in.center .col p {
  margin-inline: auto;
  max-width: 28em;
}

body[data-page="contact"] .field label {
  text-align: left;
}
body[data-page="contact"] .form-row {
  align-items: flex-start;
}
body[data-page="contact"] #contact__status {
  text-align: left;
}

/* ===== Add to the BOTTOM of subpages.css (replaces the earlier additions file) ===== */

/* --- black radial gradient over previews (Work page thumbnails + gallery photos) --- */
.card .ph {
  position: relative;
}
.card .ph::after,
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 45%,
    rgba(0, 0, 0, 0.75) 100%
  );
  transition: opacity 0.3s ease;
}
.card:hover .ph::after,
.photo:hover::after {
  opacity: 0.35;
}
.photo .tag {
  z-index: 1;
}

/* --- hover lift: box rises and its shadow deepens --- */
.card,
.photo {
  transition:
    transform 0.3s cubic-bezier(0.19, 1, 0.22, 1),
    filter 0.3s ease;
}
.card .ph {
  transition: filter 0.3s ease;
}
.card:hover,
.photo:hover {
  transform: translateY(-8px);
}
.card:hover .ph,
.photo:hover {
  filter: drop-shadow(0 1.5rem 2rem rgba(0, 0, 0, 0.55));
}
@media (prefers-reduced-motion: reduce) {
  .card,
  .photo {
    transition: none;
  }
  .card:hover,
  .photo:hover {
    transform: none;
  }
}

/* --- lightbox: frame shrink-wraps each image, so there are no black borders --- */
.lb-wrap {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  max-width: min(1100px, 100%);
  max-height: none;
  aspect-ratio: auto;
  background: transparent;
}
.lb-wrap img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}
/* black box only while a photo file is missing (placeholder) */
.lb-wrap.empty {
  width: min(100%, 1100px);
  aspect-ratio: 4 / 3;
  max-height: 85vh;
  background: #000;
}
.lb-wrap.empty img {
  display: none;
}
@media (max-width: 800px) {
  .lb-wrap {
    width: auto;
  }
  .lb-wrap.empty {
    width: 100%;
  }
}

.photo img {
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.photo:hover img {
  transform: scale(1.08);
}
@media (prefers-reduced-motion: reduce) {
  .photo img {
    transition: none;
  }
  .photo:hover img {
    transform: none;
  }
}

.pg-in.center .resume-link {
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
