/* Mechanical accents: bolt + nut silhouettes as corner ornaments */
.mechanical-frame {
  position: relative;
}
.mechanical-frame::before,
.mechanical-frame::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  opacity: 0.35;
  background: no-repeat center / contain;
  pointer-events: none;
}
.mechanical-frame::before {
  top: -6px;
  left: -6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23c9956c' d='M16 2l4 2v4h4l2 4-2 4h-4v4l-4 2-4-2v-4H8l-2-4 2-4h4V4z'/%3E%3C/svg%3E");
}
.mechanical-frame::after {
  bottom: -6px;
  right: -6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='6' fill='none' stroke='%23c9956c' stroke-width='2'/%3E%3Cpath stroke='%23c9956c' stroke-width='2' d='M16 4v4M16 24v4M4 16h4M24 16h4'/%3E%3C/svg%3E");
}

/* Mobil: nav yatay kaydırma; bağlantılar kırılmaz (whitespace-nowrap). */
@media (max-width: 639px) {
  .site-header-inner {
    row-gap: 0.375rem;
  }
  .site-nav {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .site-header .nav-link::after {
    bottom: 0.28rem;
    left: 0.4rem;
    right: 0.4rem;
  }
}

/* Site header: steel + brass (ana tema), alt çizgide hafif “sweep” */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(
    168deg,
    rgba(15, 23, 42, 0.94) 0%,
    rgba(23, 32, 51, 0.9) 42%,
    rgba(15, 23, 42, 0.95) 100%
  );
  border-bottom: 1px solid rgba(201, 149, 108, 0.18);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(212, 165, 116, 0.14);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(201, 149, 108, 0.15) 18%,
    rgba(212, 165, 116, 0.85) 50%,
    rgba(201, 149, 108, 0.15) 82%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: siteHeaderBrassSweep 9s ease-in-out infinite;
}

@keyframes siteHeaderBrassSweep {
  0%,
  100% {
    background-position: 0% 50%;
    opacity: 0.75;
  }
  50% {
    background-position: 100% 50%;
    opacity: 1;
  }
}

.logo-badge {
  animation: logoBrassGlow 4.5s ease-in-out infinite;
}
@keyframes logoBrassGlow {
  0%,
  100% {
    box-shadow: 0 0 18px -6px rgba(201, 149, 108, 0.35);
    border-color: rgba(201, 149, 108, 0.45);
  }
  50% {
    box-shadow: 0 0 26px -4px rgba(212, 165, 116, 0.55);
    border-color: rgba(212, 165, 116, 0.65);
  }
}

/* Navbar: decorative gears beside brand name (mobilde de görünür; boyut aşağıda küçültülür) */
.nav-brand-gears {
  display: inline-flex;
  align-items: center;
  color: rgb(212 165 116);
  opacity: 0.92;
}
.nav-brand-gear {
  flex-shrink: 0;
  display: block;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 5px rgba(201, 149, 108, 0.45));
}
.nav-brand-gear--1 {
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  animation: navBrandGearCw 36s linear infinite;
}
.nav-brand-gear--2 {
  position: relative;
  z-index: 1;
  width: 3.35rem;
  height: 3.35rem;
  animation: navBrandGearCcw 28s linear infinite;
}
.nav-brand-gear--3 {
  width: 2.6rem;
  height: 2.6rem;
  margin-left: -0.45rem;
  animation: navBrandGearCw 46s linear infinite;
}
@keyframes navBrandGearCw {
  to {
    transform: rotate(360deg);
  }
}
@keyframes navBrandGearCcw {
  to {
    transform: rotate(-360deg);
  }
}
@media (max-width: 639px) {
  .nav-brand-gears {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(201, 149, 108, 0.35));
  }
  .nav-brand-gear--1 {
    width: 1.65rem;
    height: 1.65rem;
    margin-right: -0.32rem;
  }
  .nav-brand-gear--2 {
    width: 2rem;
    height: 2rem;
  }
  .nav-brand-gear--3 {
    width: 1.55rem;
    height: 1.55rem;
    margin-left: -0.28rem;
  }
}

/* Nav links: brass hover + alt çizgi */
.site-header .nav-link {
  position: relative;
  transition:
    color 0.22s ease,
    background-color 0.22s ease,
    transform 0.2s ease;
}
.site-header .nav-link:hover {
  color: rgb(228 200 166);
  background-color: rgba(201, 149, 108, 0.1);
  transform: translateY(-1px);
}
.site-header .nav-link:active {
  transform: translateY(0);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    rgba(201, 149, 108, 0),
    rgba(212, 165, 116, 0.95),
    rgba(201, 149, 108, 0)
  );
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

/* Scroll-triggered sections */
.js-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* About pills */
.focus-pill {
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.2s ease;
}
.focus-pill:hover {
  border-color: rgba(201, 149, 108, 0.55);
  background-color: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.skill-tag {
  transition: border-color 0.2s ease, color 0.2s ease;
}
.skill-tag:hover {
  border-color: rgba(201, 149, 108, 0.4);
  color: rgb(228 200 166);
}

/* Map container: mobile-friendly height */
#visit-map {
  min-height: min(52vh, 420px);
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
@media (max-width: 639px) {
  #visit-map {
    min-height: min(58vh, 340px);
  }
}

/* Leaflet: keşif popup + tooltip (site teması) */
.kmap-popup-wrap .leaflet-popup-content-wrapper {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  border: 1px solid rgba(201, 149, 108, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  padding: 0;
}
.kmap-popup-wrap .leaflet-popup-content {
  margin: 10px 12px 12px;
  line-height: 1.45;
}
.kmap-popup-wrap .leaflet-popup-tip {
  background: #0f172a;
  border: 1px solid rgba(201, 149, 108, 0.25);
  box-shadow: none;
}
.kmap-popup__img {
  margin: -2px -4px 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.kmap-popup__img img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  vertical-align: middle;
}
.kmap-popup__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}
.kmap-popup__meta,
.kmap-popup__dates,
.kmap-popup__coords {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-family: ui-monospace, "IBM Plex Mono", monospace;
  color: #94a3b8;
}
.kmap-popup__coords {
  margin-bottom: 0;
  opacity: 0.85;
}
.kmap-popup__label {
  color: #e5cfa8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.65rem;
  margin-right: 4px;
}

.kmap-tooltip {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(201, 149, 108, 0.35) !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-family: ui-monospace, "IBM Plex Mono", monospace !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35) !important;
}
.kmap-tooltip::before {
  border-top-color: rgba(15, 23, 42, 0.92) !important;
}

.photo-card a.photo-card__link,
.photo-card a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.photo-card img {
  transition: transform 0.35s ease, filter 0.35s ease;
}
.photo-card:hover img,
.photo-card:focus-within img {
  transform: scale(1.02);
  filter: brightness(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .site-header::after {
    animation: none;
    background-position: 50% 50%;
    opacity: 0.55;
  }
  .logo-badge {
    animation: none;
    box-shadow: 0 0 16px -6px rgba(201, 149, 108, 0.35);
  }
  .site-header .nav-link:hover {
    transform: none;
  }
  .nav-link::after {
    transition: none;
    transform: none;
    opacity: 0;
  }
  .nav-link:hover::after,
  .nav-link:focus-visible::after {
    opacity: 0.35;
    transform: scaleX(0.4);
  }
  .js-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .focus-pill:hover,
  .skill-tag:hover {
    transform: none;
  }
  .photo-card:hover img,
  .photo-card:focus-within img {
    transform: none;
    filter: none;
  }
  .nav-brand-gear--1,
  .nav-brand-gear--2,
  .nav-brand-gear--3 {
    animation: none;
  }
  .photo-card img {
    transition: none;
  }
}
