/* ===================================
   ARİF.İSTE — PORTFOLIO CSS
   =================================== */

:root {
  --bg-primary: #0a0b10;
  --bg-secondary: #0d0f18;
  --bg-card: #111420;
  --bg-card-hover: #151925;
  --accent-blue: #4facfe;
  --accent-cyan: #00e5ff;
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00e5ff 100%);
  --text-primary: #e8eaf6;
  --text-secondary: #8892b0;
  --text-muted: #4a5568;
  --border: rgba(79, 172, 254, 0.12);
  --border-hover: rgba(79, 172, 254, 0.35);
  --glow-blue: rgba(79, 172, 254, 0.15);
  --glow-cyan: rgba(0, 229, 255, 0.12);
  --font-main: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-height: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 3px; }

/* THREE.JS CANVAS */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(10, 11, 16, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}
#navbar.scrolled {
  background: rgba(10, 11, 16, 0.95);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-logo { flex: 0 0 auto; }
.logo-text {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}
.logo-dot { color: var(--accent-cyan); }
.logo-iste {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover { color: var(--accent-blue); background: var(--glow-blue); }
.terminal-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.07);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 0.45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.terminal-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.2);
}
.terminal-icon { font-size: 0.9rem; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== TERMINAL MODAL ===== */
.terminal-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}
.terminal-modal.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.terminal-window {
  width: min(700px, 90vw);
  background: #0d0d0d;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.15), 0 25px 50px rgba(0,0,0,0.6);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp {
  from { transform: translateY(30px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
}
.terminal-dots { display: flex; gap: 6px; }
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #666;
  flex: 1;
  text-align: center;
}
.terminal-close {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.terminal-close:hover { color: #fff; background: #333; }
.terminal-body {
  padding: 1.5rem;
  min-height: 320px;
  max-height: 60vh;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}
.terminal-line { display: flex; gap: 0.5rem; align-items: flex-start; margin-bottom: 0.15rem; }
.prompt { color: var(--accent-cyan); flex-shrink: 0; }
.cmd { color: #ccc; }
.t-output { color: #27c93f; }
.t-highlight { color: var(--accent-blue); }
.t-dim { color: #555; }
.t-white { color: #eee; }
.t-cursor {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--accent-cyan);
  animation: blink 1s infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}
@keyframes blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }

/* ===== HERO ===== */
.hero-section {
  min-height: 100vh;
  padding: calc(var(--nav-height) + 4rem) 2rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-left { display: flex; flex-direction: column; gap: 1.5rem; }
.mission-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-blue);
  background: rgba(79, 172, 254, 0.08);
  border: 1px solid rgba(79, 172, 254, 0.2);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  width: fit-content;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(0, 229, 255, 0); }
}
.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.typing-container {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  width: fit-content;
  max-width: 100%;
}
.typing-prefix { color: var(--text-muted); }
.typing-text { color: var(--accent-cyan); min-width: 2ch; }
.cursor-blink {
  color: var(--accent-cyan);
  animation: blink 1s infinite;
  margin-left: 2px;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 480px;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: var(--accent-gradient);
  color: #0a0b10;
  border: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}
.btn-secondary:hover {
  background: var(--glow-blue);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-size: 1.6rem;
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* PHOTO FRAME */
.hero-right {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.photo-frame {
  position: relative;
  width: 320px;
  height: 320px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
}
.photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(50% at 50% 50%);
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  border: 2px solid rgba(79, 172, 254, 0.3);
}
.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #111420, #1a2035);
}
.profile-photo:not([src=""]) + .photo-placeholder { display: none; }
.photo-inner.no-photo .photo-placeholder { display: flex; }
.photo-inner.no-photo .profile-photo { display: none; }
.placeholder-initials {
  font-size: 4rem;
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.photo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: ringRotate 12s linear infinite;
  z-index: 1;
}
.ring-1 {
  inset: -18px;
  border-color: rgba(79, 172, 254, 0.2);
}
.ring-2 {
  inset: -36px;
  border-color: rgba(0, 229, 255, 0.1);
  animation-duration: 20s;
  animation-direction: reverse;
  border-style: dashed;
}
@keyframes ringRotate { to { transform: rotate(360deg); } }
.photo-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 172, 254, 0.12) 0%, transparent 70%);
  z-index: 0;
  animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* FLOATING BADGES */
.floating-badge {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: rgba(13, 15, 24, 0.9);
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  backdrop-filter: blur(10px);
  animation: floatBadge 3s ease-in-out infinite;
}
.badge-java { top: 10%; right: -5%; animation-delay: 0s; }
.badge-react { bottom: 25%; left: -10%; animation-delay: 1s; }
.badge-sql { bottom: 10%; right: 0%; animation-delay: 2s; }
@keyframes floatBadge {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.badge-icon { font-size: 1rem; }

/* SCROLL HINT */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 1.5s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 1; }
  50% { transform: rotate(45deg) translateY(6px); opacity: 0.4; }
}

/* ===== SECTIONS ===== */
.section { padding: 6rem 2rem; }
.section-container {
  max-width: 1280px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ===== PROJECTS ===== */
.projects-section { background: linear-gradient(to bottom, transparent, rgba(13,15,24,0.5), transparent); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  transform-style: preserve-3d;
  cursor: default;
}
.project-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 40px rgba(79, 172, 254, 0.1);
}
.card-glow {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .card-glow { opacity: 1; }
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.card-icon { font-size: 2rem; }
.card-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(79, 172, 254, 0.08);
  color: var(--accent-blue);
  border: 1px solid rgba(79, 172, 254, 0.15);
}
.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.card-features {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}
.card-features span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-blue);
  transition: gap var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.card-link:hover span { transform: translateX(3px); }
.card-link span { display: inline-block; transition: transform var(--transition); }
.card-link-icon {
  color: var(--text-muted);
  transition: color var(--transition);
  display: flex;
}
.card-link-icon:hover { color: var(--text-primary); }

/* ===== SKILLS ===== */
.skills-section { }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: border-color var(--transition);
}
.skill-category:hover { border-color: var(--border-hover); }
.skill-cat-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cat-icon { font-size: 1rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.06);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.15);
  transition: all var(--transition);
}
.skill-tag:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

/* ===== CONTACT ===== */
.contact-section {
  background: linear-gradient(to bottom, transparent, rgba(13,15,24,0.4));
}
.contact-box {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3.5rem 3rem;
  position: relative;
  overflow: hidden;
}
.contact-box::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: var(--accent-gradient);
}
.contact-desc {
  color: var(--text-secondary);
  margin: 1rem 0 2rem;
  line-height: 1.75;
}
.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.contact-link:hover {
  background: var(--glow-blue);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
}
.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-secondary);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay { transition-delay: 0.18s; }

/* FALLBACK: Eğer JS çalışmazsa, elemanlar görünür kalsın */
@media (scripting: none) {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .terminal-btn { display: none; }
  .hamburger { display: flex; }
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .hero-left { align-items: center; }
  .hero-right { order: -1; }
  .photo-frame { width: 240px; height: 240px; }
  .badge-java { top: 0; right: 0; }
  .badge-react { bottom: 30%; left: -5%; }
  .badge-sql { bottom: 5%; right: 0; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-box { padding: 2.5rem 1.5rem; }
  .hero-stats { justify-content: center; }
  .hero-buttons { justify-content: center; }
  .typing-container { font-size: 0.9rem; }
  .mission-badge { font-size: 0.7rem; }
  .floating-badge { display: none; }
}

@media (max-width: 480px) {
  .section { padding: 4rem 1.25rem; }
  .hero-section { padding: calc(var(--nav-height) + 2.5rem) 1.25rem 3rem; }
  .contact-links { flex-direction: column; align-items: center; }
  .footer-container { justify-content: center; text-align: center; }
}