/* ---------------------------------------------------
   Temel: Değişkenler & Tema
--------------------------------------------------- */
:root {
  --bg: #121212;
  --fg: #ffffff;
  --muted: #bdbdbd;
  --card: #1a1a1a;
  --accent: #ff6a00;
  --accent-2: #ee0979;
  --ring: rgba(255, 255, 255, 0.12);
  --gradient-bg: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

body[data-theme="light"] {
  --bg: #f7f7f8;
  --fg: #0e0e10;
  --muted: #5b5b63;
  --card: #ffffff;
  --accent: #3366ff;
  --accent-2: #8a2be2;
  --ring: rgba(0, 0, 0, 0.08);
  --gradient-bg: linear-gradient(135deg, #ffffff 0%, #f2f2f2 100%);
}

/* ---------------------------------------------------
   Genel Ayarlar
--------------------------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--gradient-bg);
  color: var(--fg);
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Site iskeleti */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------
   Üst Bar
--------------------------------------------------- */
.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 56px;
  padding: 0 16px;
}

.theme-toggle {
  height: 36px;
  width: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--ring);
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease;
}
.theme-toggle:hover { 
  transform: translateY(-2px) rotate(10deg);
  background-color: var(--card);
  box-shadow: 0 6px 20px var(--ring);
}

/* ---------------------------------------------------
   Hero Alanı
--------------------------------------------------- */
.hero {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
}

.container {
  width: 100%;
  max-width: 560px;
  padding: 24px;
  border-radius: 16px;
  animation: fadeUp .6s ease both;
  transform: translateY(-6vh);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------
   Profil & Başlıklar
--------------------------------------------------- */
.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 3px solid var(--ring);
  box-shadow: 0 8px 28px var(--ring);
  transition: 0.3s ease;
}
.avatar:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: 0 12px 36px var(--ring);
  border-color: rgba(255,255,255,.22);
}

.name {
  font-size: 32px;
  font-weight: 700;
  margin: 6px 0 4px;
}

.subtitle {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 26px;
}

/* ---------------------------------------------------
   Sosyal Medya İkonları
--------------------------------------------------- */
.social-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 0 0 28px;
}

.social-links a {
  font-size: 32px;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; 
  height: 48px;
  border-radius: 12px;
  transition: 0.3s ease;
}
.social-links a:hover {
  transform: translateY(-4px) scale(1.05);
  color: #fff;
  background: linear-gradient(45deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}

.social-links .fa-x-twitter {
  font-family: "Font Awesome 6 Brands";
  font-weight: 400;
}

/* ---------------------------------------------------
   Butonlar
--------------------------------------------------- */
.buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 28px;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  background: linear-gradient(45deg, var(--accent), var(--accent-2));
  background-size: 200% 200%;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: 0.35s ease;
}
.btn:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,.3);
}
.btn:active { transform: translateY(0); opacity: .95; }

/* ---------------------------------------------------
   Footer
--------------------------------------------------- */
.footer {
  padding: 16px 12px 22px;
  font-size: 14px;
  color: rgba(255,255,255,.7);
  border-top: 1px solid var(--ring);
  backdrop-filter: blur(5px);
}
body[data-theme="light"] .footer { color: rgba(0,0,0,.65); }

/* ---------------------------------------------------
   Responsive
--------------------------------------------------- */
@media (max-width: 640px) {
  .container { padding: 16px; max-width: 92vw; transform: translateY(-4vh); }
  .avatar { width: 150px; height: 150px; }
  .name { font-size: 26px; }
  .social-links { gap: 14px; }
  .social-links a { font-size: 28px; width: 42px; height: 42px; }
  .btn { padding: 10px 18px; font-size: 13px; }
}

/* ---------------------------------------------------
   Odak Durumu
--------------------------------------------------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}
/* ----- Modal ----- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.modal.show { display: flex; }

.modal-content {
  width: 100%;
  max-width: 760px;
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  text-align: left;
  position: relative;
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--ring);
  background: transparent;
  color: var(--fg);
  font-size: 20px;
  cursor: pointer;
}

/* Var olan contact stillerini modal içi için de kullan */
.contact-text { color: var(--muted); margin: 8px 0 16px; text-align: left; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ring);
  background: transparent; color: var(--fg); font: inherit;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--ring); }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* Modal açıkken kaydırmayı kilitle */
body.modal-open { overflow: hidden; }

/* Overlay: arka planı karart + arkadakini blurla; modal içeriği etkilenmez */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
}
.modal.show { display: flex; }

.modal-content {
  position: relative;
  width: 100%;
  max-width: 760px;
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  filter: none;             /* modal içeriği NET kalsın */
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--ring);
  background: transparent;
  color: var(--fg);
  font-size: 20px;
  cursor: pointer;
}

/* Form içi (varsa mevcutlarını kullanabilirsin) */
.contact-text { color: var(--muted); margin: 8px 0 16px; text-align: left; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ring);
  background: transparent; color: var(--fg); font: inherit;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--ring); }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }




/* Mobil uyum */
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ================================
   BACKGROUND ANIMATION (CSS only)
================================== */
.animated-bg{
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* taban gradyan */
  background:
    radial-gradient(1200px 800px at 10% 10%, var(--card), transparent 60%),
    radial-gradient(1200px 800px at 90% 90%, var(--card), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--card));
  overflow: hidden;
}

/* ince grid (developer vibe) */
.animated-bg::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--ring) 1px, transparent 1px),
    linear-gradient(to bottom, var(--ring) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  /* kenarlarda kaybolsun */
  mask-image: radial-gradient(90% 90% at 50% 50%, black 60%, transparent 100%);
  opacity: 0.15;
}

/* yumuşak renkli "blob"lar */
.animated-bg::after{
  content: "";
  position: absolute;
  width: 160vmax;
  height: 160vmax;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  filter: blur(60px);
  opacity: .45;
  background:
    radial-gradient(closest-side, var(--accent) 0%, transparent 60%) 15% 30% / 40% 40% no-repeat,
    radial-gradient(closest-side, var(--accent-2) 0%, transparent 60%) 80% 70% / 45% 45% no-repeat,
    radial-gradient(closest-side, #00c6ff 0%, transparent 60%) 50% 50% / 35% 35% no-repeat;
  animation: floatBlobs 24s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

/* spotlight süpürme efekti */
.animated-bg .sweep{
  position: absolute;
  inset: -20%;
  background: radial-gradient(60% 40% at 20% 20%, rgba(255,255,255,.08), transparent 60%);
  mix-blend-mode: soft-light;
  animation: sweep 18s linear infinite;
  opacity: .4;
  will-change: transform, opacity;
}

/* hafif film grain */
.animated-bg .grain{
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'>\
  <filter id='n'>\
    <feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/>\
    <feColorMatrix type='saturate' values='0'/>\
    <feComponentTransfer><feFuncA type='table' tableValues='0 0.45'/></feComponentTransfer>\
  </filter>\
  <rect width='100%' height='100%' filter='url(%23n)'/>\
</svg>");
  opacity: .08;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* keyframes */
@keyframes floatBlobs{
  0%   { transform: translate(-50%, -50%) rotate(0deg)   scale(1); }
  50%  { transform: translate(-52%, -48%) rotate(15deg)  scale(1.05); }
  100% { transform: translate(-48%, -52%) rotate(-12deg) scale(1.1); }
}
@keyframes sweep{
  0%   { transform: translate(-10%, -10%) rotate(0deg); }
  50%  { transform: translate(10%, 5%)    rotate(15deg); }
  100% { transform: translate(-10%, -10%) rotate(0deg); }
}

/* hareketi azalt tercihini saygıla */
@media (prefers-reduced-motion: reduce){
  .animated-bg::after, .animated-bg .sweep{ animation: none; }
  .animated-bg::after{ opacity: .35; }
}

/* içerik üstte kalsın (gerekirse) */
.site{ position: relative; z-index: 0; }

