/* ============ Haus Temür — hand-drawn living CV ============ */

:root {
  color-scheme: light;
  --paper: #f7f0e1;
  --paper-deep: #efe4cd;
  --ink: #4a3728;
  --ink-soft: #6b5643;
  --terracotta: #c96f4a;
  --terracotta-deep: #a85535;
  --sage: #8fa07a;
  --sage-deep: #6e815c;
  --mustard: #d9a441;
  --blue: #7d98a1;
  --blue-deep: #5f7a85;
  --rose: #c98a8a;
  --cream: #fbf7ec;
  --shadow: rgba(74, 55, 40, .18);
  --hand: 'Caveat', cursive;
  --body: 'Karla', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

/* paper grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.29 0 0 0 0 0.22 0 0 0 0 0.16 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------- top bar ---------- */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 26px;
  pointer-events: none;
}
#topbar .brand { pointer-events: auto; line-height: 1; }
.brand-name {
  font-family: var(--hand);
  font-size: 2rem;
  font-weight: 700;
  display: block;
}
.brand-sub {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lang { pointer-events: auto; display: flex; gap: 6px; }
.lang button {
  font-family: var(--body);
  font-weight: 800;
  font-size: .85rem;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 12px 14px 13px 12px / 14px 12px 14px 13px;
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--shadow);
  transition: transform .15s;
}
.lang button:hover { transform: rotate(-2deg) scale(1.06); }
.lang button.active { background: var(--mustard); }

/* ---------- progress ---------- */
#progress {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 6px;
  z-index: 100;
  background: rgba(74,55,40,.12);
}
#progress-fill {
  height: 100%;
  width: 0%;
  background: var(--terracotta);
  border-radius: 0 4px 4px 0;
}

#scroll-hint {
  position: fixed;
  bottom: 26px; right: 30px;
  z-index: 99;
  font-family: var(--hand);
  font-size: 1.5rem;
  color: var(--ink-soft);
  animation: hintbob 1.6s ease-in-out infinite;
  transition: opacity .4s;
}
#scroll-hint.gone { opacity: 0; pointer-events: none; }
@keyframes hintbob { 50% { transform: translateX(8px); } }

/* ---------- world / rooms ---------- */
#viewport { height: 100vh; overflow: hidden; }
#world {
  display: flex;
  height: 100vh;
  width: max-content;
}

.room {
  position: relative;
  width: 100vw;
  min-width: 980px;
  height: 100vh;
  flex-shrink: 0;
  overflow: hidden;
}
.room::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(circle at 50% 8%, rgba(255, 233, 168, .45), transparent 62%);
  opacity: 0;
  transition: opacity .5s ease;
}
.room.lit::after { opacity: 1; }
.room.lit .lamp-toggle .glow { opacity: .9; }
.room-inner { position: absolute; inset: 0; }
svg.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* sketch stroke helpers used inside scenes */
.scene .s {
  stroke: var(--ink);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.scene .s2 { stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; fill: none; }
.scene text { font-family: var(--hand); fill: var(--ink); }
.scene .tlabel { font-size: 26px; font-weight: 700; }

/* cute bouncy welcome text above the entry door */
@keyframes welcomeBounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}
.welcome-bounce {
  transform-box: fill-box;
  transform-origin: center;
  animation: welcomeBounce 1.7s ease-in-out infinite;
}

/* room copy blocks (HTML text over the scene) */
.room-copy {
  position: absolute;
  z-index: 5;
  max-width: 420px;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 18px 22px 20px 24px / 24px 18px 26px 20px;
  box-shadow: 4px 5px 0 var(--shadow);
  padding: 22px 26px;
}
.room-copy.tl { top: 14vh; left: 6vw; }
.room-copy.tr { top: 14vh; right: 6vw; }
.room-copy.bl { bottom: 16vh; left: 6vw; }
.room-copy.br { bottom: 16vh; right: 6vw; }
/* salon card needs extra clearance from the sofa + side lamp */
#room-salon .room-copy.tl { top: 5vh; }
#room-studio .room-copy.tr { top: 6vh; }
/* entry card sits in the open wall area between door & lamp, clear of all objects */
#room-entry .room-copy { top: 15vh; left: 36.5vw; max-width: 370px; }
.room-copy h2 {
  font-family: var(--hand);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--terracotta-deep);
  margin-bottom: 8px;
  line-height: 1;
}
.room-copy .kicker {
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sage-deep);
  display: block;
  margin-bottom: 6px;
}
.room-copy p { font-size: .95rem; line-height: 1.55; }
.room-copy p + p { margin-top: 8px; }
.room-copy ul { margin: 8px 0 0 18px; font-size: .92rem; line-height: 1.6; }
.room-copy .pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
/* instructional hint pointing at a real hotspot elsewhere in the scene — deliberately NOT
   button-styled, so it never reads as a clickable control itself */
.room-copy .hint-text {
  margin-top: 12px;
  font-size: .84rem;
  font-style: italic;
  color: var(--ink-soft);
}
.pill {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  padding: 4px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--shadow);
  color: inherit;
  text-decoration: none;
}
a.pill { cursor: pointer; transition: transform .15s; }
a.pill:hover { transform: translateY(-1px); filter: brightness(1.05); }
.pill.alt { background: var(--sage); color: var(--cream); }
.pill.warm { background: var(--mustard); }

/* hotspots inside scenes */
.hotspot { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hotspot:hover { filter: brightness(1.08); }
.hotspot .glow { transition: opacity .25s ease; opacity: 0; pointer-events: none; }
.hotspot:hover .glow, .hotspot:focus .glow { opacity: 0.45; }
.scene text.hint-tag {
  font-family: var(--hand);
  font-size: 22px;
  fill: var(--terracotta-deep);
}

/* clickable link buttons */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 800;
  font-size: .88rem;
  color: var(--cream);
  background: var(--terracotta);
  border: 2.5px solid var(--ink);
  border-radius: 14px 16px 15px 14px / 16px 14px 16px 15px;
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 9px 16px;
  margin: 10px 8px 0 0;
  text-decoration: none;
  transition: transform .15s;
}
.btn:hover { transform: rotate(-1.5deg) translateY(-2px); }
.btn.ghost { background: var(--paper); color: var(--ink); }

/* ---------- avatar ---------- */
#avatar {
  position: fixed;
  bottom: 5vh;
  left: 8vw;
  width: 110px;
  height: 185px;
  z-index: 60;
  pointer-events: none;
  transition: transform .3s;
}
#avatar.flip { transform: scaleX(-1); }
.avatar-svg { width: 100%; height: 100%; overflow: visible; }
.avatar-svg .skin { fill: #ecc9a3; stroke: var(--ink); stroke-width: 3; }
.avatar-svg .hair { fill: #57493c; stroke: var(--ink); stroke-width: 2.5; }
.avatar-svg .shirt { fill: var(--blue); stroke: var(--ink); stroke-width: 3; }
.avatar-svg .pants { stroke: #5a4a63; stroke-width: 13; fill: none; stroke-linecap: round; }
.avatar-svg .shoe { stroke: var(--ink); stroke-width: 6; fill: none; stroke-linecap: round; }
.avatar-svg .arm { stroke: var(--blue-deep); stroke-width: 10; fill: none; stroke-linecap: round; }
.avatar-svg .glass { stroke: var(--ink); stroke-width: 2.5; fill: rgba(255,255,255,.35); }
.avatar-svg .line { stroke: var(--ink); stroke-width: 2.5; fill: none; stroke-linecap: round; }
.leg, .arm { transform-box: fill-box; }
.leg { transform-origin: top center; }
.arm { transform-origin: top center; }

/* ---------- modal ---------- */
#modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(74, 55, 40, .45);
  padding: 20px;
  transition: opacity .2s ease;
}
#modal-backdrop[hidden] {
  display: none !important;
}
#modal-backdrop:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
}
#modal {
  position: relative;
  max-width: 560px;
  width: 100%;
  max-height: 82vh;
  overflow: hidden;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 22px 26px 24px 28px / 28px 22px 30px 24px;
  box-shadow: 6px 7px 0 var(--shadow);
  display: flex;
  flex-direction: column;
  /* transition: transform .2s ease, opacity .2s ease; GSAP ile çakışmaması için kaldırıldı */
}
#modal-body {
  overflow-y: auto;
  padding: 30px 34px;
}
#modal h3 {
  font-family: var(--hand);
  font-size: 2.2rem;
  color: var(--terracotta-deep);
  line-height: 1;
  margin-bottom: 10px;
}
#modal p { font-size: .97rem; line-height: 1.6; white-space: pre-wrap; }
#modal .tech {
  margin-top: 12px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--sage-deep);
}
#modal-close {
  position: absolute;
  top: 6px; right: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-family: var(--body);
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  z-index: 1;
}
#modal-close:hover { color: var(--terracotta); transform: rotate(90deg); }

/* ---------- topbar actions ---------- */
.topbar-right {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-cv-btn {
  font-family: var(--body);
  font-weight: 800;
  font-size: .85rem;
  color: var(--cream);
  background: var(--terracotta);
  border: 2px solid var(--ink);
  border-radius: 12px 14px 13px 12px / 14px 12px 14px 13px;
  padding: 6px 14px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--shadow);
  transition: transform .15s;
}
.topbar-cv-btn:hover {
  transform: rotate(2deg) scale(1.06);
}
.topbar-cv-btn.ghost {
  background: var(--paper);
  color: var(--ink);
}
.topbar-cv-btn.ghost:hover {
  transform: rotate(-2deg) scale(1.06);
}

/* ---------- quick jump menu ---------- */
#quick-menu {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 99;
  font-family: var(--body);
}
#quick-menu-toggle {
  font-family: var(--body);
  font-weight: 800;
  font-size: .9rem;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 12px 14px 13px 12px / 14px 12px 14px 13px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 2px 3px 0 var(--shadow);
  transition: transform .15s;
}
#quick-menu-toggle:hover {
  transform: rotate(-2deg) scale(1.04);
}
#quick-menu-dropdown {
  position: absolute;
  bottom: 50px;
  left: 0;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 5px 0 var(--shadow);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
}
#quick-menu-dropdown[hidden] {
  display: none !important;
}
#quick-menu-dropdown button {
  font-family: var(--body);
  font-weight: 600;
  font-size: .85rem;
  color: var(--ink);
  background: none;
  border: none;
  text-align: left;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s;
}
#quick-menu-dropdown button:hover {
  background: var(--paper-deep);
  color: var(--terracotta-deep);
}

/* ---------- mobile: vertical house ----------
   Desktop keeps full-viewport rooms with slice-cropped scenes; a phone's portrait
   aspect (~0.46) vs the scene's 1000:700 (1.43) would crop ~2/3 of every room away
   (hotspots included). So on mobile each scene gets a container whose aspect EXACTLY
   matches the viewBox (100vw × 70vw) — zero crop, every clickable object visible —
   and the info card flows below the scene instead of overlaying it. */
@media (max-width: 860px), (pointer: coarse) and (orientation: portrait) {
  #viewport { height: auto; overflow: visible; }
  /* padding clears the fixed (possibly two-row) header */
  #world { display: block; height: auto; width: 100%; padding-top: 96px; }
  .room { width: 100%; min-width: 0; height: auto; min-height: 0; }
  .room-inner { position: relative; height: 70vw; }
  /* cards flow under their scene — neutralize every desktop positioning variant */
  .room-copy,
  .room-copy.tl, .room-copy.tr, .room-copy.bl, .room-copy.br,
  #room-entry .room-copy, #room-salon .room-copy.tl, #room-studio .room-copy.tr {
    position: static;
    top: auto; right: auto; bottom: auto; left: auto;
    transform: none;
    max-width: none;
    width: auto;
    margin: 14px 4vw 34px;
    padding: 18px 20px;
  }
  .room-copy h2 { font-size: 1.9rem; }
  #avatar { display: none; }
  #scroll-hint { right: auto; left: 50%; transform: translateX(-50%); }
  @keyframes hintbob { 50% { transform: translate(-50%, 8px); } }
  /* compact wrapping header with a paper backdrop so it stays readable over content */
  #topbar {
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 10px 14px;
    background: rgba(247, 240, 225, .93);
    border-bottom: 2px solid rgba(74, 55, 40, .15);
  }
  .brand-name { font-size: 1.35rem; }
  .brand-sub { font-size: .66rem; }
  .topbar-cv-btn { font-size: .72rem; padding: 5px 10px; }
  .lang button { font-size: .75rem; padding: 5px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  #scroll-hint { animation: none; }
  .welcome-bounce { animation: none; }
}

/* ---------- creative animations ---------- */

/* 1. Corkboard Pano Post-Its */
.postit-note {
  transition: transform 0.2s ease, filter 0.2s ease;
  transform-box: fill-box;
  transform-origin: center;
  cursor: pointer;
}
.postit-note:hover {
  transform: scale(1.06) rotate(0deg) !important;
  filter: brightness(1.1);
  z-index: 10;
}

/* 2. DNA Eyepiece Animation (Microscope in Lab) */
.dna-strand-1 {
  animation: dnaSlide1 2.5s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.dna-strand-2 {
  animation: dnaSlide2 2.5s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes dnaSlide1 {
  0% { transform: translateX(-15px); }
  100% { transform: translateX(15px); }
}
@keyframes dnaSlide2 {
  0% { transform: translateX(15px); }
  100% { transform: translateX(-15px); }
}

.hotspot:hover .dna-strand-1 {
  stroke: #8fa07a;
  transform: translateX(0) !important;
  animation-play-state: paused;
}
.hotspot:hover .dna-strand-2 {
  stroke: #8fa07a;
  transform: translateX(0) !important;
  animation-play-state: paused;
}
.hotspot:hover .dna-status {
  opacity: 0;
}
.hotspot:hover .dna-ok {
  opacity: 1;
}


/* 4. CI/CD Terminal Loop (Office Monitor) */
.term-cursor {
  animation: termBlink 1s infinite;
}
@keyframes termBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes termLine1 {
  0%, 100% { opacity: 0; }
  10%, 90% { opacity: 1; }
}
@keyframes termLine2 {
  0%, 20%, 100% { opacity: 0; }
  30%, 90% { opacity: 1; }
}
@keyframes termLine3 {
  0%, 50%, 100% { opacity: 0; }
  60%, 90% { opacity: 1; }
}
.term-line-1 { animation: termLine1 8s infinite; }
.term-line-2 { animation: termLine2 8s infinite; }
.term-line-3 { animation: termLine3 8s infinite; }

/* 5. CD Rotation (Music Room) */
.cd-rotate {
  animation: cdSpin 10s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes cdSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


