/* ==========================================================================
   ALFAWEBTASARIM — TEK SAYFA İSKELET
   Renkleri / fontları hızlıca değiştirmek için :root içindeki değişkenleri kullan.
   ========================================================================== */

:root {
  --color-bg: #0f1115;
  --color-bg-alt: #151821;
  --color-surface: #1b1f2a;
  --color-surface-2: #212639;
  --color-border: #2a2f3d;
  --color-text: #e9ebf1;
  --color-text-muted: #9aa1b1;
  --color-primary: #6c5ce7;
  --color-primary-light: #8b7ff0;
  --color-accent: #00d1b2;

  --gradient-brand: linear-gradient(90deg, var(--color-primary), var(--color-accent));

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  --max-width: 1140px;
  --radius: 14px;
  --transition: 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(circle at 15% 0%, rgba(108, 92, 231, 0.10), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(0, 209, 178, 0.08), transparent 35%),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(108, 92, 231, 0.45); }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-outline:hover { border-color: var(--color-primary-light); color: var(--color-primary-light); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(15, 17, 21, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.site-header.scrolled {
  border-bottom-color: var(--color-border);
  background: rgba(15, 17, 21, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
}
.logo span { color: var(--color-primary-light); }

.nav ul { display: flex; gap: 32px; }

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
  transition: color var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--color-primary-light);
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--color-text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.header-cta { margin-left: auto; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
}
.hamburger span {
  display: block; height: 2px; width: 100%;
  background: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 76px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(108, 92, 231, 0.22), transparent 42%),
    radial-gradient(circle at 80% 65%, rgba(0, 209, 178, 0.15), transparent 48%),
    var(--color-bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 75% 60% at 25% 30%, black 35%, transparent 85%);
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}
.hero-blob-1 {
  width: 380px; height: 380px;
  background: rgba(108, 92, 231, 0.35);
  top: -80px; right: 5%;
}
.hero-blob-2 {
  width: 320px; height: 320px;
  background: rgba(0, 209, 178, 0.25);
  bottom: -100px; left: 8%;
  animation-delay: -7s;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, -18px) scale(1.06); }
}

.hero-flex {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-content { max-width: 620px; }

.eyebrow {
  display: inline-block;
  color: var(--color-primary-light);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 16px;
  padding: 7px 16px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 20px;
}
.highlight {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Hero visual: code window ---------- */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-window {
  width: 100%;
  max-width: 440px;
  background: #0c0e14;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02);
  transform: rotate(1.5deg);
  animation: float-window 6s ease-in-out infinite;
}

@keyframes float-window {
  0%, 100% { transform: rotate(1.5deg) translateY(0); }
  50% { transform: rotate(1.5deg) translateY(-10px); }
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #12141c;
  border-bottom: 1px solid var(--color-border);
}

.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.code-window-title {
  margin-left: 8px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.code-window-body {
  padding: 22px 20px;
  overflow-x: auto;
}

.code-window-body pre {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--color-text-muted);
  white-space: pre;
}

.cs-tag { color: #ff8fd6; }
.cs-attr { color: var(--color-accent); }
.cs-string { color: #ffd479; }
.cs-key {
  color: var(--color-primary-light);
  font-weight: 700;
}

.code-cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  background: var(--color-accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

.floating-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  animation: float-badge 5s ease-in-out infinite;
}
.badge-1 { top: -6%; left: -8%; animation-delay: 0s; }
.badge-2 { bottom: 10%; left: -10%; animation-delay: -1.5s; }
.badge-3 { top: 8%; right: -8%; animation-delay: -3s; }
.badge-4 { bottom: -6%; right: -4%; animation-delay: -4.2s; }

@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-alt {
  background:
    radial-gradient(circle at 90% 0%, rgba(0, 209, 178, 0.06), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(108, 92, 231, 0.08), transparent 40%),
    var(--color-bg-alt);
}

.section-tag {
  display: inline-block;
  color: var(--color-primary-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  margin-bottom: 10px;
  position: relative;
  padding-left: 18px;
}
.section-tag::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 10px; height: 2px;
  background: var(--gradient-brand);
  transform: translateY(-50%);
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 16px;
}

.section-desc {
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: 50px;
}

/* ---------- Skills ---------- */
.skills {
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 700px;
  margin-top: 40px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
  max-width: none;
}

.skill-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 500;
}

.skill-percent { color: var(--color-text-muted); }

.skill-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 1.1s ease;
}

/* ---------- Portfolio ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.portfolio-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-primary-light);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.portfolio-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #23283a, #171a24);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  overflow: hidden;
}

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

.portfolio-info { padding: 20px; }
.portfolio-info h3 { font-size: 1.05rem; margin-bottom: 6px; }
.portfolio-info p { color: var(--color-text-muted); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  margin-top: 50px;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-item p { color: var(--color-text-muted); font-size: 0.9rem; }
.contact-item p a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}
.contact-item p a:hover { color: var(--color-primary-light); }

.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-links a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.social-links a:hover {
  color: #fff;
  border-color: var(--color-primary-light);
  background: var(--color-primary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.form-row { display: flex; gap: 16px; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary-light);
}

.contact-form button { align-self: flex-start; }

.form-note {
  font-size: 0.85rem;
  color: var(--color-accent);
  min-height: 1em;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0.7;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.back-to-top { color: var(--color-text-muted); transition: color var(--transition); }
.back-to-top:hover { color: var(--color-primary-light); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-flex { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 40px; }
  .code-window { max-width: 480px; }
  .floating-badge { display: none; }
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav { position: fixed; top: 76px; left: 0; right: 0; bottom: 0;
    background: var(--color-bg); padding: 30px 24px;
    transform: translateX(100%); transition: transform var(--transition);
  }
  .nav.open { transform: translateX(0); }
  .nav ul { flex-direction: column; gap: 24px; }
  .header-cta { display: none; }
  .hamburger { display: flex; }
  .form-row { flex-direction: column; }
  .contact-form { padding: 22px; }
  .code-window-body pre { font-size: 0.72rem; }
}
