/* ==========================================================================
   umut.qa — Portfolio Stylesheet
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --primary: #135bec;
  --primary-hover: #1a6fff;
  --primary-glow: rgba(19, 91, 236, 0.2);

  /* Light theme */
  --bg-light: #f6f6f8;
  --bg-dark: #101622;

  /* Neutral palette */
  --neutral-50: #f8faff;
  --neutral-100: #f0f4fc;
  --neutral-200: #e1e9f8;
  --neutral-300: #cbd9f2;
  --neutral-400: #a6bde8;
  --neutral-500: #7b9adb;
  --neutral-600: #5a7bc7;
  --neutral-700: #4662a8;
  --neutral-800: #3d5189;
  --neutral-900: #34436e;
  --neutral-950: #242d4a;

  /* Defaults (dark) */
  --bg: var(--bg-dark);
  --text: var(--neutral-50);
  --text-muted: var(--neutral-400);
  --text-subtle: var(--neutral-500);
  --surface: #1a2233;
  --surface-hover: var(--neutral-800);
  --surface-transparent: rgba(61, 81, 137, 0.3);
  --border: rgba(70, 98, 168, 0.5);
  --border-hover: rgba(70, 98, 168, 0.7);
  --card-bg: rgba(61, 81, 137, 0.15);

  /* Transitions */
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
}

[data-theme="light"] {
  --bg: var(--bg-light);
  --text: var(--neutral-900);
  --text-muted: var(--neutral-600);
  --text-subtle: var(--neutral-500);
  --surface: #ffffff;
  --surface-hover: var(--neutral-100);
  --surface-transparent: rgba(225, 233, 248, 0.5);
  --border: var(--neutral-200);
  --border-hover: var(--neutral-300);
  --card-bg: #ffffff;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.6;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--neutral-800);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-700);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-400);
}

/* ---------- Navigation ---------- */
.top-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
}

.logo {
  text-decoration: none;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--transition);
}

.logo:hover {
  color: var(--primary);
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  color: #fff;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--surface-transparent);
  color: var(--text);
}

/* ---------- Main Content ---------- */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem 2rem;
  position: relative;
  z-index: 10;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
  gap: 1.5rem;
  width: 100%;
}

/* ---------- Avatar ---------- */
.avatar-wrapper {
  position: relative;
}

.avatar-glow {
  position: absolute;
  inset: -4px;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.25;
  transition: opacity 1s;
}

.avatar-wrapper:hover .avatar-glow {
  opacity: 0.5;
  transition-duration: 0.2s;
}

.avatar {
  position: relative;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--bg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-dot {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 1rem;
  height: 1rem;
  background: #22c55e;
  border: 2px solid var(--bg);
  border-radius: 50%;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
}

/* ---------- Hero Text ---------- */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.name-label {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, var(--text), var(--text-muted));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.subtitle {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.bio {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-subtle);
  max-width: 42rem;
  margin: 0.75rem auto 0;
  line-height: 1.7;
}

.bio-highlight {
  color: var(--text);
  font-weight: 500;
}

[data-theme="light"] .bio-highlight {
  color: var(--neutral-900);
}

/* ---------- Social Links ---------- */
.social-row {
  width: 100%;
}

.social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--surface-transparent);
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.social-link:hover {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.social-link .icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

.social-link .icon-material {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
}

.social-linkedin:hover {
  color: #0077b5;
}

.social-github:hover {
  color: var(--text);
}

.social-x:hover {
  color: var(--text);
}

.social-email:hover {
  color: #ef4444;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px var(--primary-glow);
  font-family: inherit;
}

.cta-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

/* ---------- AI Chat Section ---------- */
.chat-section {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding-top: 0.5rem;
}

.suggested-prompts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.prompt-chip {
  flex-shrink: 0;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: 9999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.prompt-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Chat Messages */
.chat-messages {
  display: none;
  flex-direction: column;
  gap: 1rem;
  max-height: 24rem;
  overflow-y: auto;
  padding: 1rem 0;
  margin-bottom: 0.75rem;
}

.chat-messages.active {
  display: flex;
}

.chat-message {
  display: flex;
  gap: 0.75rem;
  animation: fadeInUp 0.3s ease;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.chat-message.user .message-avatar {
  background: var(--primary);
  color: #fff;
}

.chat-message.assistant .message-avatar {
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: #fff;
}

.chat-message.assistant .message-avatar .material-icons-outlined {
  font-size: 1rem;
}

.message-bubble {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  word-wrap: break-word;
}

.chat-message.user .message-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}

.chat-message.assistant .message-bubble {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 0.25rem;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0;
}

.typing-indicator .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--text-subtle);
  animation: typingBounce 1.4s infinite;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* Chat Input */
.chat-input-wrapper {
  position: relative;
}

.chat-input-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, rgba(19, 91, 236, 0.3), rgba(96, 165, 250, 0.3));
  border-radius: 0.75rem;
  filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition-slow);
  pointer-events: none;
}

.chat-input-wrapper:hover .chat-input-glow,
.chat-input-wrapper:focus-within .chat-input-glow {
  opacity: 1;
}

.chat-form {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  transition: border-color var(--transition);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px var(--primary-glow);
}

.chat-form:focus-within {
  border-color: var(--primary);
}

.chat-icon {
  padding-left: 1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
}

.chat-icon .material-icons-outlined {
  font-size: 1.25rem;
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 1rem;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.chat-input::placeholder {
  color: var(--text-subtle);
}

.chat-send {
  margin: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  transition: background var(--transition);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.chat-send:hover {
  background: var(--primary-hover);
}

.chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-send .material-icons-outlined {
  font-size: 1.25rem;
}

.chat-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.5rem;
}




/* ---------- Background Blobs ---------- */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(64px);
  mix-blend-mode: multiply;
  opacity: 0.7;
  animation: blobFloat 7s infinite;
}

[data-theme="light"] .blob {
  mix-blend-mode: multiply;
  opacity: 0.35;
}

.blob-1 {
  top: 25%;
  left: 25%;
  background: rgba(19, 91, 236, 0.1);
}

.blob-2 {
  top: 33%;
  right: 25%;
  background: rgba(96, 165, 250, 0.1);
  animation-delay: 2s;
}

.blob-3 {
  bottom: 25%;
  left: 33%;
  background: rgba(168, 85, 247, 0.1);
  animation-delay: 4s;
}

@keyframes blobFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -50px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .avatar {
    width: 10rem;
    height: 10rem;
  }
}

@media (max-width: 480px) {
  .social-icons {
    gap: 0.5rem;
  }

  .cta-button {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .main-content {
    padding-top: 4rem;
  }
}

/* ---------- Error toast ---------- */
.error-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #ef4444;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
  z-index: 100;
  transition: transform 0.3s ease;
  max-width: 90vw;
  text-align: center;
}

.error-toast.show {
  transform: translateX(-50%) translateY(0);
}