/* === ARKA PLAN & GENEL === */

.ht-body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 10% 0%, #1a1223 0, #050309 55%);
  color: #3b2954;
  overflow-x: hidden;
}

/* hafif mor parıltı */
.ht-gradient-glow {
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle at 10% 0%, rgba(178,128,255,0.12) 0, transparent 50%),
    radial-gradient(circle at 90% 100%, rgba(110,80,200,0.2) 0, transparent 55%);
  pointer-events: none;
  z-index: -2;
}

/* toz parçacıkları (eski sayfa hissi) */
.ht-dust-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.11) 0.5px, transparent 1px),
    radial-gradient(circle, rgba(220,200,255,0.08) 0.7px, transparent 1.4px);
  background-size: 120px 120px, 200px 200px;
  mix-blend-mode: screen;
  opacity: 0.45;
  animation: dustDrift 40s linear infinite;
}

@keyframes dustDrift {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(20px, -40px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ana “kitap sayfası” kartı */
.ht-main {
  position: relative;
  max-width: 1100px;
  margin: 48px auto 64px;
  padding: 48px 40px 56px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,0.6) 0, transparent 52%),
    radial-gradient(circle at 100% 100%, rgba(210,190,255,0.7) 0, transparent 55%),
    #d9cce9;
  border-radius: 24px;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.6),
    0 0 0 1px rgba(0,0,0,0.35);
  border: 1px solid rgba(80,50,120,0.45);
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(70,50,110,0.04) 0,
      rgba(70,50,110,0.04) 1px,
      transparent 1px,
      transparent 24px
    );
}

/* sol yırtık kenar efekti */
.ht-main::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 22px;
  bottom: 24px;
  width: 18px;
  background:
    linear-gradient(180deg, rgba(30,15,55,0.75), rgba(15,8,35,0.95));
  filter: blur(4px);
  opacity: 0.7;
}

/* hero üst */
.ht-hero {
  position: relative;
  padding-bottom: 32px;
  border-bottom: 1px dashed rgba(60,40,90,0.4);
  margin-bottom: 28px;
  animation: heroFloat 1.4s ease-out forwards;
  opacity: 0;
  transform: translateY(18px);
}

@keyframes heroFloat {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ht-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(60,40,90,0.9);
}

.ht-hero-label,
.ht-hero-tag {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(90,60,140,0.4);
  background: rgba(250,245,255,0.25);
}

/* başlık */
.ht-hero-title {
  position: relative;
  font-size: 40px;
  margin: 4px 0 8px;
  color: #311d4a;
  letter-spacing: 1px;
}

.ht-hero-title-shadow {
  position: absolute;
  inset: 0;
  transform: translate(4px, 4px);
  color: rgba(110,80,170,0.2);
  z-index: -1;
  pointer-events: none;
}

/* typewriter */
.ht-hero-sub {
  font-size: 15px;
  max-width: 620px;
  color: rgba(55,35,85,0.95);
  margin: 0 0 12px;
  position: relative;
  padding-right: 10px;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid rgba(55,35,85,0.9);
}

.ht-hero-sub.ht-typed {
  animation: typewriter 4s steps(60, end) 0.2s forwards,
             caretBlink 0.9s step-end infinite;
}

@keyframes typewriter {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes caretBlink {
  0%, 100% { border-color: rgba(55,35,85,0.9); }
  50%      { border-color: transparent; }
}

.ht-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: rgba(50,30,80,0.85);
  margin-bottom: 14px;
}

.ht-hero-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 16px;

}

.ht-hero-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(70,50,110,0.8), transparent);
}

.ht-hero-glyph {
  font-size: 12px;
  color: rgba(70,50,110,0.9);
}

.ht-hero-intro {
  font-size: 16px;
  line-height: 1.7;
  color: #3b2954;
  max-width: 820px;
  margin: 0;
}

/* bölüm başlığı */
.ht-section {
  margin-top: 34px;
}

.ht-section-heading h2 {
  font-size: 24px;
  margin: 0 0 6px;
  color: #2d1c42;
}

.ht-section-heading p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(55,35,85,0.98);
}

/* parşömen scroll alanı (timeline) */
.ht-scroll-parchment {
  position: relative;
  padding: 22px 24px 26px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,0.6) 0, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(228,210,255,0.8) 0, transparent 50%),
    #e0d2f0;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.4),
    0 14px 30px rgba(0,0,0,0.25);
}

/* hafif kenar kararması */
.ht-scroll-parchment::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 40px rgba(130,90,170,0.38);
  pointer-events: none;
}

/* timeline kabuğu */
.ht-timeline-shell {
  position: relative;
  margin-top: 18px;
}

/* dikey çizgi */
.ht-timeline-spine {
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(70,50,110,0.1),
    rgba(70,50,110,0.9),
    rgba(70,50,110,0.1)
  );
  overflow: hidden;
}

.ht-timeline-spine::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.75) 50%,
    rgba(255,255,255,0) 100%
  );
  animation: spineGlow 6s linear infinite;
}

@keyframes spineGlow {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* timeline item */
.ht-timeline-item {
  display: flex;
  gap: 14px;
  margin-bottom: 26px;
  padding-left: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s ease-out,
    transform 0.7s ease-out,
    filter 0.4s ease-out;
  filter: blur(4px);
}

.ht-timeline-item.ht-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* sol orb */
.ht-timeline-orb {
  position: relative;
  width: 72px;
  flex-shrink: 0;
  padding-top: 6px;
}

.ht-era-label {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(60,40,90,0.9);
  margin-bottom: 6px;
}

.ht-era-dot {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #f9f0ff 0, #b28cff 65%, #4b2c7a 100%);
  box-shadow:
    0 0 0 2px rgba(240,230,255,0.85),
    0 0 16px rgba(150,110,230,0.9);
  animation: eraPulse 2.6s ease-in-out infinite;
}

.ht-timeline-item[data-era="dijital"] .ht-era-dot {
  box-shadow:
    0 0 0 2px rgba(230,250,255,0.9),
    0 0 22px rgba(120,200,255,0.95);
}

/* orb arkasındaki “halo” */
.ht-era-dot::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 1px dashed rgba(90,60,140,0.5);
  opacity: 0.7;
}

@keyframes eraPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

/* sağdaki kart */
.ht-timeline-card {
  flex: 1;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,0.8) 0, transparent 60%),
    #f2ebff;
  border-radius: 14px;
  padding: 14px 16px 14px;
  box-shadow:
    0 10px 22px rgba(0,0,0,0.16),
    inset 0 0 0 1px rgba(230,220,255,0.9);
  position: relative;
  overflow: hidden;
}

/* hafif kenar parlaması */
.ht-timeline-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.4),
    transparent 40%,
    transparent 60%,
    rgba(200,170,255,0.35)
  );
  mix-blend-mode: screen;
  opacity: 0.35;
  pointer-events: none;
}

.ht-timeline-card h3 {
  font-size: 18px;
  margin: 0 0 4px;
  color: #2b1a3f;
}

.ht-timeline-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(70,50,110,0.9);
}

.ht-timeline-card p {
  font-size: 14px;
  line-height: 1.7;
  color: #3b2954;
  margin: 0 0 6px;
}

/* Kapanış notu */
.ht-closing {
  margin-top: 40px;
}

.ht-closing-inner {
  position: relative;
  border-radius: 18px;
  padding: 18px 20px 18px 48px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,0.8) 0, transparent 55%),
    #e7ddf5;
  box-shadow:
    0 12px 26px rgba(0,0,0,0.2),
    inset 0 0 0 1px rgba(240,230,255,0.95);
}

.ht-closing-glyph {
  position: absolute;
  left: 16px;
  top: 16px;
  font-size: 18px;
  color: rgba(100,70,150,0.9);
}

.ht-closing p {
  font-size: 15px;
  line-height: 1.7;
  color: #3b2954;
  margin: 0;
}

/* KOD YAĞMURU + KÜRE (senin eski block, biraz cilalı) */

@keyframes codeRainScroll {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes coordSphereSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.code-sphere-wrap {
  margin: 48px 0 0;
  padding: 26px 18px 32px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(215,190,255,0.35) 0, transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(120,80,180,0.32) 0, transparent 60%),
    #cfc1ea;
  border: 1px solid rgba(80,50,120,0.35);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.35),
    inset 0 0 14px rgba(255,255,255,0.16);
}

.code-sphere-head {
  text-align: center;
  margin: 0 0 18px;
}

.code-sphere-head .badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(40,20,70,0.10);
  border:1px solid rgba(80,60,130,0.35);
  font-size:11px;
  letter-spacing:2px;
  text-transform:uppercase;
  color:#3b2954;
  margin-bottom:8px;
}

.badge-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  background:linear-gradient(135deg,#f6d365,#fda085);
}

.code-sphere-head h2 {
  font-size:24px;
  margin:4px 0 2px;
  color:#2d1c42;
  letter-spacing:0.4px;
}

.code-sphere-head p {
  margin:0;
  font-size:14px;
  text-transform:uppercase;
  letter-spacing:1.3px;
  color:rgba(50,30,80,0.9);
}

.code-sphere-inner {
  display:flex;
  flex-wrap:wrap;
  gap:24px;
  align-items:center;
  justify-content:center;
  margin-top:18px;
}

/* Kod yağmuru alanı */
.code-rain {
  flex: 2 1 260px;
  min-width:260px;
  max-width:420px;
  height:220px;
  border-radius:14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(30,10,60,0.75) 0, rgba(10,5,25,1) 60%),
    radial-gradient(circle at 100% 100%, rgba(120,70,190,0.40) 0, rgba(10,5,25,1) 65%);
  border:1px solid rgba(160,130,230,0.45);
  box-shadow:
    0 12px 28px rgba(0,0,0,0.55),
    inset 0 0 18px rgba(255,255,255,0.08);
  overflow:hidden;
  position:relative;
  padding:10px 12px;
}

.code-rain-columns {
  display:flex;
  gap:12px;
  height:100%;
}

.code-column {
  flex:1 1 0;
  overflow:hidden;
}

.code-column pre {
  margin:0;
  font-family:"Fira Code","Consolas",monospace;
  font-size:11px;
  line-height:1.45;
  color:rgba(230,220,255,0.9);
  animation: codeRainScroll 9s linear infinite;
  white-space:pre;
}

.code-column.col-2 pre { animation-duration: 11s; animation-delay:-2s; }
.code-column.col-3 pre { animation-duration: 13s; animation-delay:-4s; }

.code-key   { color:#b9a1ff; }
.code-num   { color:#9af0ff; }
.code-str   { color:#ffa3d7; }
.code-soft  { color:rgba(230,220,255,0.65); }

/* Dönen koordinat küresi */
.coord-sphere {
  flex: 1.3 1 220px;
  min-width:220px;
  display:flex;
  justify-content:center;
}

.coord-sphere-globe {
  position:relative;
  width:210px;
  height:210px;
  border-radius:50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.45), transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(70,30,120,0.95), #12051f 70%);
  border:1px solid rgba(230,210,255,0.7);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.55),
    0 0 22px rgba(170,120,255,0.45),
    inset 0 0 10px rgba(255,255,255,0.08);
  animation: coordSphereSpin 22s linear infinite;
  overflow:hidden;
}

.coord-sphere-dots {
  position:absolute;
  inset:18px;
  border-radius:50%;
  background-image:
    radial-gradient(circle, rgba(230,220,255,0.8) 0.8px, transparent 1px),
    radial-gradient(circle, rgba(160,140,230,0.75) 0.7px, transparent 1.4px);
  background-size: 14px 14px, 22px 22px;
  background-position: 0 0, 4px 4px;
  mix-blend-mode:screen;
  opacity:0.9;
}

.coord-line {
  position:absolute;
  inset:16px;
  border-radius:50%;
  border:1px solid rgba(220,210,255,0.18);
}

.coord-line.lat-1 { inset:34px 20px; }
.coord-line.lat-2 { inset:50px 20px; }
.coord-line.lat-3 { inset:20px 20px; }

.coord-line.lon-1 {
  inset:20px 34px;
  transform:rotate(18deg);
}

.coord-line.lon-2 {
  inset:20px 34px;
  transform:rotate(-18deg);
}

.coord-sphere-caption {
  text-align:center;
  font-size:11px;
  margin-top:6px;
  color:rgba(45,28,80,0.9);
  letter-spacing:0.9px;
  text-transform:uppercase;
}

/* Mobil uyum */
@media (max-width: 720px) {
  .ht-main {
    margin: 28px 10px 40px;
    padding: 32px 18px 40px;
  }

  .ht-hero-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .ht-hero-title {
    font-size: 30px;
  }

  .ht-hero-sub {
    white-space: normal;
  }

  .ht-timeline-spine {
    left: 10px;
  }

  .ht-timeline-item {
    padding-left: 4px;
  }

  .ht-timeline-orb {
    width: 64px;
  }

  .code-sphere-inner {
    flex-direction: column;
  }
}
