/* Yetenekler: yatay katman şeması — ÖNİZLEME. Sitenin kendi dosyalarına dokunmaz. */

#stack {
  padding-bottom: 22px;
  scroll-margin-top: 90px;
}

.layers-card {
  padding: 40px;
}

.layers-title {
  margin: 0 0 34px;
}

.layers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr) 96px minmax(0, 1fr);
  align-items: stretch;
}

/* ─── Katman kutusu ─── */
.lyr {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 268px;
  padding: 24px 22px 22px;
  border: 1px solid #e6e9ee;
  border-radius: 22px;
  background: #f8f9fb;
  transition: border-color .3s ease, background .3s ease, transform .3s ease, box-shadow .3s ease;
}

.lyr:hover {
  border-color: #d4d9e1;
  background: #fff;
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(29, 37, 50, 0.08);
}

.lyr.is-focus {
  border-color: rgba(49, 86, 232, 0.3);
  background: linear-gradient(160deg, rgba(49, 86, 232, 0.08), #fff 65%);
  box-shadow: 0 16px 38px rgba(49, 86, 232, 0.1);
}

.lyr.is-focus:hover {
  box-shadow: 0 22px 48px rgba(49, 86, 232, 0.15);
}

.lyr-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.lyr-no {
  color: #3156e8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

.lyr-tag {
  color: var(--premium-ink, #14181f);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.6px;
}

.lyr-desc {
  margin: 6px 0 22px;
  color: #8a929e;
  font-size: 13px;
}

.lyr-badge {
  position: absolute;
  top: -10px;
  right: 18px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #3156e8;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.3px;
  box-shadow: 0 6px 14px rgba(49, 86, 232, 0.3);
}

.lyr-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.lyr-items li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border: 1px solid #e3e6eb;
  border-radius: 15px;
  background: #fff;
}

.lyr-items .stack-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid #edf0f3;
  border-radius: 12px;
}

.lyr-items .stack-icon svg { width: 21px; height: 21px; }
.lyr-items .stack-icon.firebase svg { width: 18px; height: 18px; }
.lyr-items .stack-icon.go .stack-logo { width: 31px; height: 21px; }
.lyr-items .stack-icon.postgresql .stack-logo { width: 26px; height: 26px; }

/* Logolar sakin hâlde gri, kutunun üstüne gelince kendi rengine bürünür. */
.lyr-items .stack-icon { filter: grayscale(1); opacity: .75; transition: filter .3s ease, opacity .3s ease; }
.lyr:hover .lyr-items .stack-icon,
.lyr.is-focus .lyr-items .stack-icon { filter: none; opacity: 1; }
@media (hover: none) {
  .lyr-items .stack-icon { filter: none; opacity: 1; }
}
.lyr-items .stack-icon.flutter { color: #42a5f5 !important; }
.lyr-items .stack-icon.dart { color: #0175c2 !important; }
.lyr-items .stack-icon.firebase { color: #f59e0b !important; }
.lyr-items .stack-icon.restapi { color: #0ea5c6 !important; }

.lyr-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--premium-ink, #14181f);
  font-size: 14px;
  font-weight: 700;
}

.lyr-name small {
  color: #8a929e;
  font-size: 11.5px;
  font-weight: 500;
}

/* ─── Bağlantı: istek sağa, yanıt sola akar ─── */
.lyr-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.lyr-proto {
  color: #8a929e;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
  white-space: nowrap;
}

.lyr-wire {
  position: relative;
  width: 100%;
  height: 8px;
}

.lyr-wire::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1.5px dashed #c3cad4;
}

.pk {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
}

.pk-req {
  background: #3156e8;
  box-shadow: 0 0 0 3px rgba(49, 86, 232, 0.15);
  animation: pk-right 2s cubic-bezier(.5, 0, .5, 1) infinite;
}

.pk-res {
  background: #22a06b;
  box-shadow: 0 0 0 3px rgba(34, 160, 107, 0.15);
  animation: pk-left 2s cubic-bezier(.5, 0, .5, 1) infinite 1s;
}

.lyr-link:nth-of-type(4) .pk-req { animation-delay: .5s; }
.lyr-link:nth-of-type(4) .pk-res { animation-delay: 1.5s; }

@keyframes pk-right {
  0% { left: -4px; opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { left: calc(100% - 4px); opacity: 0; }
}

@keyframes pk-left {
  0% { left: calc(100% - 4px); opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { left: -4px; opacity: 0; }
}

/* ─── İletişim: tek başına, tam genişlik ─── */
.contact-row {
  grid-template-columns: 1fr !important;
}

.contact-row .contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  grid-template-rows: auto 1fr;
  column-gap: 40px;
  align-items: start;
  min-height: 0;
  padding: 40px;
}

.contact-row .contact-card .card-label { grid-column: 1; }
.contact-row .contact-card .card-title { grid-column: 1; max-width: 420px; }

.contact-row .contact-card .stack-list {
  display: grid;
  grid-column: 2;
  grid-row: 1 / 3;
  grid-template-columns: 1fr 1fr;
  align-self: center;
  margin: 0 !important;
  padding: 0;
}

/* ─── Tablet ve telefon: katmanlar alt alta, akış dikey ─── */
@media (max-width: 900px) {
  .layers-card { padding: 28px 22px; }
  .layers-title { margin-bottom: 26px; }

  .layers { grid-template-columns: 1fr; }

  .lyr { min-height: 0; }
  .lyr:hover { transform: none; }

  .lyr-link {
    flex-direction: row;
    justify-content: flex-start;
    height: 58px;
    padding-left: 40px;
    gap: 16px;
  }

  .lyr-wire {
    order: -1;
    width: 8px;
    height: 100%;
  }

  .lyr-wire::before {
    top: 0;
    bottom: 0;
    left: 50%;
    right: auto;
    border-top: 0;
    border-left: 1.5px dashed #c3cad4;
  }

  .pk { top: auto; left: 0; margin-top: 0; }
  .pk-req { animation-name: pk-down; }
  .pk-res { animation-name: pk-up; }

  .contact-row .contact-card {
    grid-template-columns: 1fr;
    padding: 28px 22px;
  }

  .contact-row .contact-card .stack-list {
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: 1fr;
    padding-top: 26px;
  }
}

@keyframes pk-down {
  0% { top: -4px; opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { top: calc(100% - 4px); opacity: 0; }
}

@keyframes pk-up {
  0% { top: calc(100% - 4px); opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { top: -4px; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pk { display: none; }
}

/* ─── Araçlar şeridi: her katmanı kapsayan Git · GitHub · Docker ─── */
.tools-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr) 96px minmax(0, 1fr);
  height: 30px;
}

.tools-links i {
  position: relative;
  justify-self: center;
  width: 8px;
}

.tools-links i::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1.5px dashed #c3cad4;
}

/* Şeritten katmanlara doğru yavaşça yükselen küçük noktalar. */
.tools-links i::after {
  content: "";
  position: absolute;
  left: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9aa3b2;
  animation: pk-up 2.6s cubic-bezier(.5, 0, .5, 1) infinite;
}

.tools-links i:nth-child(3)::after { animation-delay: .5s; }
.tools-links i:nth-child(5)::after { animation-delay: 1s; }

.tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 18px 16px 24px;
  border: 1px solid #e6e9ee;
  border-radius: 20px;
  background: #f8f9fb;
  transition: border-color .3s ease, background .3s ease;
}

.tools:hover {
  border-color: #d4d9e1;
  background: #fff;
}

.tools-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tools-head .lyr-desc {
  margin: 0;
}

.tools-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tools-items li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 8px;
  border: 1px solid #e3e6eb;
  border-radius: 15px;
  background: #fff;
}

.tools-items .stack-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid #edf0f3;
  border-radius: 12px;
  filter: grayscale(1);
  opacity: .75;
  transition: filter .3s ease, opacity .3s ease;
}

.tools:hover .tools-items .stack-icon { filter: none; opacity: 1; }
.tools-items .stack-icon.git { color: #f05032 !important; }
.tools-items .stack-icon.github { color: #181717 !important; }
.tools-items .stack-icon.docker { color: #2496ed !important; }

@media (hover: none) {
  .tools-items .stack-icon { filter: none; opacity: 1; }
}

@media (max-width: 900px) {
  .tools-links { display: none; }

  .tools {
    flex-direction: column;
    align-items: stretch;
    margin-top: 22px;
    padding: 20px;
  }

  .tools-items { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .tools-links i::after { display: none; }
}

/* Yetenekler ve iletişim kartı alt alta aynı hizada okunsun:
   beyaz kartın kenarı belirgin olsun, koyu kartın gölgesi yanlara taşmasın. */
.layers-card {
  background: #fff;
  border-color: rgba(20, 24, 31, 0.12);
}

@media (max-width: 900px) {
  #stack {
    padding-bottom: 32px;
  }

  .contact-row .contact-card,
  .contact-row .contact-card:hover {
    box-shadow: 0 26px 48px -18px rgba(23, 32, 45, 0.45);
  }
}

.lyr-items .stack-icon.sqlserver { color: #cc2927 !important; }

.lyr-items .stack-icon.nodejs { color: #5fa04e !important; }
