/* ================================================
   oguzhany.dev — Modern Portfolio Styles
   ================================================ */

html {
  scroll-behavior: smooth;
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
}
body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  position: relative;
}

:root {
  --bg-primary: #050a14;
  --bg-secondary: #0a1628;
  --glass-bg: rgba(10, 22, 40, 0.6);
  --glass-border: rgba(148, 163, 184, 0.1);
  --accent-1: #6366f1;
  --accent-2: #22d3ee;
  --accent-3: #a855f7;
  --accent-4: #3b82f6;
  --glow-indigo: rgba(99, 102, 241, 0.15);
  --glow-cyan: rgba(34, 211, 238, 0.1);
}

/* ---- Base ---- */
body {
  background: var(--bg-primary);
  color: #e2e8f0;
}

::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}

/* ---- Background Scene ---- */
.bg-scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-scene::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  animation: pulseGlow 8s ease-in-out infinite;
}
.bg-scene::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.08) 0%, transparent 70%);
  animation: pulseGlow 10s ease-in-out infinite 2s;
}

/* Animated grid overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
}

/* ---- Glassmorphism Cards ---- */
.card-glass {
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-glass:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.08), 0 0 0 1px rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
}

.card-glass-static {
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
}

/* ---- Gradient Texts ---- */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.accent-text {
  background: linear-gradient(135deg, #818cf8, #22d3ee 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Buttons ---- */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-4));
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-4), var(--accent-1));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
  color: #fff;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary span { position: relative; z-index: 1; }
.btn-primary i { position: relative; z-index: 1; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.3);
  transition: all 0.3s ease;
}
.btn-ghost:hover {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  transform: translateY(-1px);
}

/* ---- Chips / Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 6px 14px;
  transition: all 0.2s ease;
}
.badge:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(34, 211, 238, 0.15));
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(15, 23, 42, 0.5);
  color: #cbd5e1;
  transition: all 0.2s ease;
}
.chip:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.1);
  color: #e2e8f0;
  transform: translateY(-1px);
}

.chip-muted {
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.08);
  backdrop-filter: blur(8px);
  color: #e5e7eb;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
}
.stat-chip:hover {
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-1px);
}

/* ---- Meta Line ---- */
.meta-line {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 9999px;
  background: rgba(10, 22, 40, 0.5);
  backdrop-filter: blur(8px);
}
.meta-line span { display: inline-flex; align-items: center; gap: 6px; }
.meta-line i { color: #6366f1; font-size: 11px; }

/* ---- Navbar ---- */
.nav-link {
  position: relative;
  color: #94a3b8;
  transition: color 0.2s ease;
  font-weight: 500;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 1px;
  transition: width 0.3s ease;
}
.nav-link:hover { color: #e2e8f0; }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: #e2e8f0; }
.nav-link.active::after { width: 100%; }

/* ---- Mobile Menu ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 10, 20, 0.95);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  font-size: 20px;
  font-weight: 600;
  color: #e2e8f0;
  transition: color 0.2s;
}
.mobile-menu a:hover { color: #6366f1; }

/* Hamburger */
.hamburger { display: none; cursor: pointer; padding: 4px; }
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #94a3b8;
  margin: 6px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
@media (max-width: 768px) { .hamburger { display: block; } }

/* ---- Lang Switch ---- */
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 9999px;
  overflow: hidden;
}
.lang-switch a {
  padding: 4px 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}
.lang-switch a.active {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

/* ---- Avatar ---- */
.ring-gradient {
  position: relative;
  display: inline-block;
}
.ring-gradient::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-1), var(--accent-3));
  z-index: 0;
  filter: blur(12px);
  opacity: 0.6;
  animation: pulseGlow 4s ease-in-out infinite;
}
.ring-gradient > * { position: relative; z-index: 1; }
.avatar-fallback {
  width: 7rem;
  height: 7rem;
  border-radius: 9999px;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0b1220;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}

/* ---- Timeline ---- */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-1), var(--accent-2), transparent);
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  padding-bottom: 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-1);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* ---- Typewriter ---- */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent-2);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ---- Animated Counter ---- */
.counter { font-variant-numeric: tabular-nums; }

/* ---- Section Divider ---- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6366f1;
  margin-bottom: 8px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-1), transparent);
  border-radius: 1px;
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ---- Orbs (decorative) ---- */
.orb {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 9999px;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.2), rgba(34, 211, 238, 0.08), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

/* ---- Glow border on hover ---- */
.glow-border {
  position: relative;
}
.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  filter: blur(8px);
}
.glow-border:hover::before { opacity: 0.3; }

/* ---- Form elements ---- */
.form-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: #e2e8f0;
  font-size: 14px;
  transition: all 0.3s ease;
  outline: none;
  width: 100%;
}
.form-input::placeholder { color: #475569; }
.form-input:focus {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 40;
  backdrop-filter: blur(8px);
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  background: rgba(99, 102, 241, 0.25);
  transform: translateY(-2px);
}

/* ---- Keyframes ---- */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.avatar-card { animation: floatY 6s ease-in-out infinite; }

/* ---- Smooth scroll indicator ---- */
.scroll-indicator {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  position: relative;
}
.scroll-indicator::after {
  content: '';
  width: 4px;
  height: 8px;
  background: #6366f1;
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(16px); opacity: 0; }
}

/* ---- Social Links ---- */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  transition: all 0.3s ease;
}
.social-link:hover {
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

/* ---- Hover Card ---- */
.hover-card { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(99, 102, 241, 0.06);
}

/* ---- Prose & content overflow fix ---- */
.prose { overflow-wrap: break-word; word-wrap: break-word; }
.prose pre { overflow-x: auto; max-width: calc(100vw - 2rem); }
.prose code { word-break: break-word; }
.prose img { max-width: 100%; height: auto; }
.prose table { display: block; overflow-x: auto; }
article, main { overflow-x: hidden; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .orb { display: none; }
  .bg-scene::before, .bg-scene::after { display: none; }
  .meta-line { flex-wrap: wrap; justify-content: center; }
  .stat-chip { font-size: 12px; padding: 8px 12px; }
}
