/* Ferdi Şen — FerdiGPT theme */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: #212121; color: #ececec;
}
a { color: inherit; }

.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: 260px; background: #171717; padding: 12px; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar .brand-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px 14px; font-weight: 800; font-size: 1.02rem; }
.sidebar .brand-row .dot { width: 10px; height: 10px; border-radius: 50%; background: #10a37f; display: inline-block; }
.sidebar .new-chat {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #3a3a3a;
  border-radius: 10px; font-size: 0.85rem; font-weight: 500; margin-bottom: 16px; cursor: pointer; text-decoration: none; color: #ececec;
}
.sidebar .section-label { font-size: 0.72rem; color: #8e8e8e; padding: 8px 12px 4px; }
.sidebar .chat-item {
  display: block; padding: 9px 12px; border-radius: 8px; font-size: 0.85rem; color: #d8d8d8; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none;
}
.sidebar .chat-item:hover, .sidebar .chat-item.active { background: #2a2a2a; }
.topbar-lang { display: flex; gap: 4px; padding: 3px; background: #171717; border-radius: 8px; border: 1px solid #3a3a3a; }
.topbar-lang a {
  font-size: 0.72rem; font-weight: 700; padding: 5px 10px; border-radius: 6px;
  color: #b3b3b3; text-decoration: none; transition: background .15s ease, color .15s ease;
}
.topbar-lang a:hover { color: #ececec; }
.topbar-lang a.active { background: #10a37f; color: #fff; }
.sidebar .profile { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 8px; text-decoration: none; }
.sidebar .profile:hover { background: #2a2a2a; cursor: pointer; }
.sidebar .profile img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.sidebar .profile span { font-size: 0.85rem; font-weight: 500; }

/* Main */
.main { flex: 1; display: flex; flex-direction: column; position: relative; min-width: 0; }
.topbar2 { padding: 14px 24px; font-size: 0.9rem; color: #ececec; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.topbar2 .menu-toggle { display: none; background: none; border: none; color: #ececec; font-size: 1.2rem; cursor: pointer; }
.chat-area { flex: 1; padding: 10px 0 160px; }
.intro-hidden { visibility: hidden; }
.msg-row { max-width: 760px; margin: 0 auto; padding: 18px 24px; display: flex; gap: 16px; }
.msg-row.user { justify-content: flex-end; }
.msg-row.user .bubble { background: #2f2f2f; border-radius: 20px; padding: 12px 18px; max-width: 70%; font-size: 0.95rem; }
.avatar-bot { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg,#10a37f,#1a7f64) url('/ferdi-photo.jpg') center/cover no-repeat; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; overflow: hidden; }
.bot-content { font-size: 0.98rem; line-height: 1.75; max-width: 680px; }
.bot-content strong { color: #fff; }
.bot-content h2 { font-size: 1.2rem; margin: 22px 0 8px; color: #fff; }
.bot-content ul { padding-left: 20px; }
.bot-content li { margin-bottom: 6px; }
.bot-content .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.bot-content .chip {
  border: 1px solid #3a3a3a; border-radius: 999px; padding: 7px 14px; font-size: 0.82rem; cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.bot-content .chip:hover { background: #2a2a2a; border-color: #565656; }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: #8e8e8e; animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: 0.25; } 40% { opacity: 1; } }

/* Intro hero heading (ChatGPT-style empty state) */
.intro-heading {
  position: fixed; left: 260px; right: 0; top: 42%; transform: translateY(-50%);
  text-align: center; font-size: 1.7rem; font-weight: 600; color: #ececec;
  opacity: 0; transition: opacity .4s ease; z-index: 16; pointer-events: none; padding: 0 24px;
}
.intro-heading.show { opacity: 1; }

/* Composer */
.composer-wrap { position: fixed; bottom: 0; left: 260px; right: 0; padding: 16px 24px 24px; background: linear-gradient(transparent, #212121 40%); z-index: 15; transition: top .5s ease, bottom .5s ease, transform .5s ease, background .3s ease; }
.composer-wrap.center-mode { top: 50%; bottom: auto; transform: translateY(-50%); background: none; }
.suggestions.intro-fade { opacity: 0; height: 0; margin: 0; overflow: hidden; pointer-events: none; }
.composer {
  max-width: 760px; margin: 0 auto; background: #2f2f2f; border-radius: 26px; padding: 14px 18px;
  display: flex; align-items: center; gap: 10px; border: 1px solid #3a3a3a;
}
.composer input { flex: 1; background: transparent; border: none; outline: none; color: #ececec; font-size: 0.95rem; }
.composer input::placeholder { color: #8e8e8e; }
.composer .send {
  width: 30px; height: 30px; border-radius: 50%; background: #ececec; color: #212121; border: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 800; flex-shrink: 0;
}
.suggestions { max-width: 760px; margin: 10px auto 0; display: flex; gap: 8px; flex-wrap: wrap; padding: 0 24px; }
.suggestions .sg { border: 1px solid #3a3a3a; border-radius: 999px; padding: 7px 14px; font-size: 0.78rem; color: #c9c9c9; cursor: pointer; }
.suggestions .sg:hover { background: #2a2a2a; }

/* Content components (dark themed) */
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0; }
.fact { background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 12px; padding: 14px 16px; }
.fact .num { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #10a37f; font-weight: 700; margin-bottom: 4px; }
.fact p { margin: 0; font-size: 0.88rem; color: #d8d8d8; }

.skills-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.skills-row span { background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 999px; padding: 6px 14px; font-size: 0.82rem; color: #d8d8d8; }

.platform-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.platform-row a {
  background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 999px; padding: 8px 18px; font-size: 0.85rem;
  font-weight: 600; text-decoration: none; color: #ececec; transition: background .2s ease;
}
.platform-row a:hover { background: #3a3a3a; }

.work-card { background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 12px; padding: 16px 18px; margin: 14px 0; }
.work-card h4 { margin: 0 0 4px; font-size: 1.05rem; color: #fff; }
.work-card .role { display: inline-block; color: #10a37f; font-size: 0.8rem; font-weight: 700; margin-bottom: 8px; }
.work-card p { margin: 0; font-size: 0.88rem; color: #d8d8d8; }

.video-embed { position: relative; width: 100%; padding-top: 56.25%; margin: 16px 0; border-radius: 12px; overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

.blog-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.blog-card {
  display: block; background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 12px; padding: 16px 18px;
  text-decoration: none; color: #ececec; transition: border-color .2s ease, transform .15s ease;
}
.blog-card:hover { border-color: #10a37f; transform: translateY(-2px); }
.blog-card .tag { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: #10a37f; font-weight: 700; }
.blog-card h3 { margin: 6px 0 6px; font-size: 1.05rem; }
.blog-card p { margin: 0; font-size: 0.86rem; color: #b3b3b3; }

.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0; }
.portfolio-card {
  display: flex; align-items: flex-end; min-height: 110px; border-radius: 12px; padding: 14px;
  font-weight: 700; font-size: 0.9rem; color: #fff; text-decoration: none; position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.portfolio-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,0.35); }
.portfolio-card .tag2 { position: absolute; top: 10px; left: 12px; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }
.portfolio-card.p1 { background: linear-gradient(135deg,#1a3fb5,#4a90ff); }
.portfolio-card.p2 { background: linear-gradient(135deg,#b53d00,#ff7a1a); }
.portfolio-card.p3 { background: linear-gradient(135deg,#2e7d32,#66bb6a); }
.portfolio-card.p4 { background: linear-gradient(135deg,#6a1ab5,#a45bff); }
.portfolio-card.p5 { background: linear-gradient(135deg,#b5171a,#ff5a5a); }
.portfolio-card.p6 { background: linear-gradient(135deg,#b58a00,#ffd54f); color: #2b241a; }
@media (max-width: 700px) { .portfolio-grid { grid-template-columns: 1fr 1fr; } }

.disclaimer { margin-top: 22px; padding: 14px 16px; background: #262018; border: 1px solid #4a3a1e; border-radius: 10px; font-size: 0.82rem; color: #d8c9a3; }
.back-link { display: inline-block; margin-top: 22px; font-size: 0.88rem; font-weight: 600; color: #10a37f; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #ececec; color: #212121; padding: 10px 20px; border-radius: 8px; font-size: 0.85rem;
  font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 40;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sidebar-backdrop { display: none; }

@media (max-width: 860px) {
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .composer-wrap { left: 0; }
  .intro-heading { left: 0; font-size: 1.3rem; }
  .topbar2 .menu-toggle { display: inline-block; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 25; }
}
