/* ===========================================================================
   Furkan Yeşilbaş • Portföy — style.css  (2025-10-10, mobile-first revizyon)
   Amaç: Mobil navbar/hero/about fix + genel stilin korunması
   ========================================================================== */

/* ------------------------------
   0) Değişkenler + Reset
   ------------------------------ */
:root{
  --bg:#0b0f14;
  --card:#101826;
  --text:#e5e7eb;
  --muted:#9aa3b2;
  --accent:#22f39b;
  --accent-2:#7c3aed;
  --stroke:#1b2743;
  --shadow:0 10px 30px rgba(0,0,0,.45);
  --ring:0 0 0 3px color-mix(in lab, var(--accent) 30%, transparent);

  --radius:16px;
  --radius-sm:12px;
  --radius-lg:22px;
  --gap:16px;
  --container:1100px;

  --t-fast:.18s;
  --t-norm:.28s;
  --t-slow:.45s;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height:100%; }
html { scroll-behavior:smooth; }
body{
  margin:0;
  font-family:'Poppins',system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%,rgba(124,58,237,.20),transparent 55%),
    radial-gradient(900px 500px at -10% 110%,rgba(34,243,155,.12),transparent 55%),
    var(--bg);
  line-height:1.6;
  overflow-x:hidden;            /* yatay taşmayı güvenli biçimde kes */
}

img{max-width:100%; height:auto; display:block;}
a{color:inherit; text-decoration:none;}
button{font:inherit;}

/* ------------------------------
   1) Erişilebilirlik yardımcıları
   ------------------------------ */
.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}
.skip-link{position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden}
.skip-link:focus{
  left:16px; top:16px; width:auto; height:auto; padding:8px 12px;
  background:#111; color:#fff; border-radius:8px; z-index:9999;
}

/* ------------------------------
   2) Arkaplan canvas + progress
   ------------------------------ */
#particles{position:fixed; inset:0; z-index:-1; pointer-events:none;}
#progressBar{position:fixed; top:0; left:0; height:3px; width:0;
  background:linear-gradient(90deg,var(--accent),var(--accent-2)); z-index:120;}

/* ------------------------------
   3) Genel Layout / UI
   ------------------------------ */
.section{padding:90px 24px; max-width:var(--container); margin:0 auto;}
.card{
  background:var(--card); border:1px solid var(--stroke);
  border-radius:var(--radius); box-shadow:var(--shadow);
}
.section-title{font-size:28px; margin:0 0 22px;}
.muted{color:var(--muted);}
.accent{color:var(--accent);}

.btn{
  padding:12px 18px; border-radius:10px; border:1px solid transparent;
  cursor:pointer; font-weight:600; transition:filter var(--t-fast), transform var(--t-fast);
}
.btn:focus-visible{outline:none; box-shadow:var(--ring);}
.btn-ghost{background:transparent; border-color:#253045; color:var(--text);}
.btn-ghost:hover{background:#121a2a;}
.btn-accent{background:var(--accent); color:#041611;}
.btn-accent:hover{filter:saturate(1.08) brightness(1.04);}
.btn:active{transform:translateY(1px);}
.icon-btn{display:inline-flex; align-items:center; justify-content:center;
  padding:10px; border-radius:12px; border:1px solid #263248;
  background:#0d1522; color:#bcd3ff; transition:filter var(--t-fast), transform var(--t-fast);}
.icon-btn:hover{background:#121b2a;}
.icon-btn:active{transform:translateY(1px);}

.title{font-size:40px; margin:0 0 10px;}
.sub{color:#cbd5e1; min-height:28px;}
.typewriter{border-right:2px solid var(--accent); padding-right:6px; white-space:nowrap;}
.cta{margin-top:18px; display:flex; gap:10px; flex-wrap:wrap;}
.socials{margin-top:14px; display:flex; gap:10px;}
/* ------------------------------
   4) Header / Navbar (mobile-first)
   ------------------------------ */
.nav{
  position:sticky; top:0; z-index:100;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 22px; backdrop-filter: blur(8px);
  background:linear-gradient(to bottom, color-mix(in lab, var(--bg) 85%, #0000), color-mix(in lab, var(--bg) 35%, #0000));
  border-bottom:1px solid var(--stroke);
}
.brand{display:flex; align-items:center; gap:10px;}
.brand strong{font-weight:800;}

.menu-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; border-radius:10px;
  border:1px solid #263248; background:#0d1522; color:#bcd3ff;
}
.nav-right{display:flex; align-items:center; gap:10px;}
#accentPicker{appearance:none; border:none; width:28px; height:28px; border-radius:8px; background:transparent; cursor:pointer; outline:1px solid #263248;}
#accentPicker::-webkit-color-swatch{border:none; border-radius:8px;}

/* Menünün mobilde kapalı başlaması */
#mainNav{display:none;}
#mainNav a.nav-link{
  color:#c9d6ff; padding:6px 12px; border-radius:10px;
  transition:background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
#mainNav a.nav-link:hover{background:#10182a;}
#mainNav a.nav-link.active,
#mainNav a.nav-link[aria-current="page"]{background:#0f1a2f; outline:1px solid #203054;}

/* Açıkken tam ekran */
#mainNav.open{
  position:fixed; inset:64px 0 0 0;
  display:flex; flex-direction:column; align-items:center;
  gap:18px; padding:22px 16px 32px;
  background:rgba(11,15,20,.96); backdrop-filter:blur(12px);
  overflow-y:auto; z-index:99;
}
#mainNav.open a.nav-link{font-size:18px; padding:12px 18px;}

/* Masaüstünde yatay menü */
@media (min-width:901px){
  .menu-btn{display:none;}
  #mainNav{
    display:flex; align-items:center; gap:12px;
    position:static; height:auto; background:transparent;
  }
}
/* ------------------------------
   5) HERO
   ------------------------------ */
/* Masaüstü: metin solda, foto sağda */
.hero .hero-grid{
  display:grid; grid-template-columns:1.15fr .85fr; gap:24px; padding:28px; align-items:center;
  grid-template-areas: "text photo";
}
.hero-text  { grid-area:text; }
.hero-photo { grid-area:photo; margin:0; position:relative; display:grid; place-items:center; text-align:center; }

.hero-photo img{
  width:280px; height:280px; object-fit:cover; border-radius:22px;
  border:1px solid #263248; box-shadow:0 10px 40px rgba(0,0,0,.45); background:#0c1422;
}
.hero-photo figcaption{margin-top:10px; color:#a7b3d6; font-size:14px;}

/* Mobil: foto ÜSTTE, metin ALTA ve ortalı */
@media (max-width:900px){
  .hero .hero-grid{
    grid-template-columns:1fr;
    grid-template-areas:
      "photo"
      "text";
    text-align:center;
  }
  .cta, .socials{ justify-content:center; }
  .hero-photo img{ width:200px; height:200px; }
}
@media (max-width:480px){
  .section{padding:60px 18px;}
  .title{font-size:32px;}
  .hero-photo img{ width:170px; height:170px; }
}

/* Küçük parıltı */
@keyframes spin{to{transform:rotate(1turn)}}
/* ------------------------------
   6) Hakkımda
   ------------------------------ */
.about-grid{
  display:grid; grid-template-columns:140px 1fr; gap:22px; align-items:center; padding:22px;
}
.avatar{
  width:250px; height:150px; border-radius:18px; display:grid; place-items:center;
  font-weight:800; font-size:38px;
  background:linear-gradient(135deg, color-mix(in lab, var(--accent-2) 55%, transparent), color-mix(in lab, var(--accent) 35%, transparent));
  border:1px solid #263248; color:#0d1320; text-shadow:0 2px 0 rgba(255,255,255,.35);
}
.about-list{margin:12px 0 0; padding-left:18px;}
.about-list li{margin:6px 0;}

/* Mobilde avatar üstte, metin geniş satırda */
@media (max-width:820px){
  .about-grid{ grid-template-columns:1fr; gap:16px; text-align:center; padding:18px; }
  .avatar{ width:140px; height:140px; margin:0 auto; }
  #about p{ max-width:60ch; margin:0 auto; word-break:normal; overflow-wrap:anywhere; }
  #about .about-list{ max-width:60ch; margin:10px auto 0; padding-left:0; list-style-position:inside; text-align:left; }
}

/* ------------------------------
   7) İstatistik
   ------------------------------ */
.stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px;}
.stat{padding:24px; text-align:center; background:var(--card); border:1px solid var(--stroke); border-radius:16px;}
.stat-num{font-size:42px; font-weight:800; color:var(--accent); text-shadow:0 0 22px color-mix(in lab, var(--accent) 20%, transparent);}
.stat-label{margin-top:8px; color:#cbd5e1;}

/* ------------------------------
   8) Yetenekler
   ------------------------------ */
.skills-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:16px;}
.skill{background:var(--card); border:1px solid var(--stroke); border-radius:14px; padding:16px;}
.skill span{font-weight:600;}
.bar{margin-top:8px; height:10px; background:#0b1220; border:1px solid #203054; border-radius:8px; overflow:hidden;}
.bar i{
  display:block; height:100%;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  box-shadow:0 0 14px color-mix(in lab, var(--accent) 45%, transparent);
  transition:width 1.2s ease;
}
.tag-cloud .tags{display:flex; flex-wrap:wrap; gap:6px; margin-top:10px;}
.tag-cloud em{display:inline-block; padding:6px 10px; border-radius:999px; background:#0c1422; border:1px solid #233457; color:#c6d9ff; font-style:normal;}
/* ------------------------------
   9) Projeler
   ------------------------------ */
.filters{display:flex; gap:10px; margin:8px 0 16px; flex-wrap:wrap; align-items:center;}
.filters .search{
  flex:1 1 240px; min-width:220px; padding:10px 12px; border-radius:10px;
  border:1px solid var(--stroke); background:#0c1422; color:var(--text);
}
.chip{padding:8px 12px; border-radius:999px; border:1px solid var(--stroke);
  background:#0c1422; color:#c6d9ff; cursor:pointer; transition:background var(--t-fast);}
.chip.is-active{background:var(--accent); color:#041611; border-color:transparent;}
.projects{display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:18px;}
.project-card{
  background:var(--card); border:1px solid var(--stroke); border-radius:16px;
  overflow:hidden; box-shadow:var(--shadow); transition:transform .25s, box-shadow var(--t-norm);
}
.project-card:hover{transform:translateY(-4px); box-shadow:0 18px 40px rgba(0,0,0,.5);}
.thumb{height:160px; background: radial-gradient(600px 200px at 60% -10%,color-mix(in lab, var(--accent-2) 35%, transparent),transparent 60%), #0b1220;}
.skeleton{position:relative;}
.skeleton::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(100deg, transparent 20%, rgba(255,255,255,.06) 40%, transparent 60%);
  animation:shimmer 1.4s infinite; transform:translateX(-100%);
}
@keyframes shimmer{to{transform:translateX(100%)}}
.project-body{padding:16px;}
.project-body h3{margin:0 0 6px; font-size:18px;}
.pill-row{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px;}
.pill-row span{background:#0c1422; border:1px solid #233457; color:#c6d9ff; padding:6px 10px; border-radius:999px; font-size:12px;}

/* ------------------------------
   10) Timeline
   ------------------------------ */
.timeline{position:relative; padding-left:36px; border-left:2px solid var(--accent-2); margin-top:28px;}
.timeline-item{margin-bottom:28px; position:relative;}
.timeline-item::before{
  content:""; position:absolute; left:-11px; top:4px; width:14px; height:14px;
  background:var(--accent); border-radius:50%; box-shadow:0 0 12px color-mix(in lab,var(--accent) 40%,transparent);
}
.timeline h4{margin:0 0 4px; color:var(--accent); font-size:18px;}
.timeline span{display:block; font-size:13px; color:var(--muted); margin-bottom:6px;}
.timeline p{margin:0; line-height:1.5;}

/* ------------------------------
   11) SSS / Accordion (native <details>)
   ------------------------------ */
.accordion details{background:var(--card); border:1px solid var(--stroke); border-radius:12px; padding:12px 14px; margin:10px 0;}
.accordion summary{cursor:pointer; font-weight:600;}
.accordion p{margin:10px 0 0; color:var(--text);}

/* ------------------------------
   12) İletişim
   ------------------------------ */
.contact-form{display:grid; gap:10px; margin-top:14px;}
.contact-form .row{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.contact-form input,
.contact-form textarea{
  width:100%; padding:12px 14px; border-radius:10px;
  border:1px solid var(--stroke); background:#0c1422; color:var(--text);
}
.contact-form textarea{min-height:120px; resize:vertical;}
.contact-form button{justify-self:start;}
@media (max-width:640px){
  .contact-form .row{grid-template-columns:1fr;}
}

/* Basit toast (JS tarafı id=toast oluşturuyor) */
.toast{
  position:fixed; bottom:28px; left:50%; transform:translateX(-50%);
  background:var(--card); color:var(--text); padding:10px 18px;
  border-radius:10px; border:1px solid var(--stroke); box-shadow:var(--shadow);
  opacity:0; pointer-events:none; transition:opacity .25s ease;
}
.toast.show{opacity:1; pointer-events:auto;}

/* ------------------------------
   13) Komut Paleti (Ctrl/Cmd+K)
   ------------------------------ */
.cmdk{position:fixed; inset:0; background:rgba(0,0,0,.45); backdrop-filter:blur(8px); display:none; align-items:center; justify-content:center; z-index:100; overflow:auto; transition:opacity .25s;}
.cmdk.show{display:flex;}
.cmdk-box{background:var(--card); border:1px solid var(--stroke); border-radius:16px; width:min(600px,90%); box-shadow:var(--shadow); padding:12px;}
.cmdk-list{list-style:none; margin:8px 0 0; padding:0;}
.cmdk-list li{padding:10px 12px; border-radius:10px; border:1px solid #192033; margin-top:8px; cursor:pointer;}
.cmdk-list li:hover{background:#141d2f;}

/* ------------------------------
   14) Reveal animasyonları
   ------------------------------ */
.reveal{opacity:0; transform:translateY(40px); transition:opacity .6s ease, transform .6s ease;}
.reveal.in{opacity:1; transform:translateY(0);}

/* ------------------------------
   15) Yukarı çık butonu
   ------------------------------ */
#toTop{
  position:fixed; bottom:30px; right:30px; background:var(--accent);
  color:#041611; border:none; border-radius:999px; width:48px; height:48px; font-size:22px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; box-shadow:0 0 10px color-mix(in lab,var(--accent) 50%,transparent);
  opacity:0; pointer-events:none; transition:opacity .3s, transform .25s;
}
#toTop.show{opacity:1; pointer-events:auto;}
#toTop:hover{transform:translateY(-3px);}

/* ------------------------------
   16) Footer
   ------------------------------ */
footer{
  text-align:center; padding:50px 18px; font-size:14px; color:var(--muted);
  border-top:1px solid var(--stroke); margin-top:40px;
}
footer a{color:var(--accent); font-weight:500;}
footer small{display:block; margin-top:6px; color:#7c8ca6;}

/* ------------------------------
   17) Light Tema
   ------------------------------ */
body.light{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --stroke:#e5e7eb;
  background:
    radial-gradient(900px 500px at 10% -10%,color-mix(in lab,var(--accent-2)10%,transparent),transparent 40%),
    radial-gradient(800px 500px at 110% 110%,color-mix(in lab,var(--accent)10%,transparent),transparent 40%),
    var(--bg);
}
body.light .nav{
  background:linear-gradient(to bottom,rgba(255,255,255,.85),rgba(255,255,255,.55));
  border-bottom-color:#e5e7eb;
}
body.light .icon-btn{background:#f0f4ff; border-color:#dbe4ff; color:#2b3a63;}
body.light .chip{background:#f4f7ff;color:#21304f;}
body.light .chip.is-active{background:var(--accent);color:#052216;}
body.light .avatar{color:#0f172a;}
body.light .section-title{color:#0f172a;}
body.light .btn-ghost{border-color:#d3d6e0;color:#1f2937;}
body.light .btn-ghost:hover{background:#f2f4f8;}
body.light .project-card{border-color:#e7eaf1;}
body.light .stat{background:#fff;border-color:#e7eaf1;}
body.light .toast{background:#fff;color:#0f172a;}
body.light .cmdk-box{background:#fff;color:#0f172a;border-color:#d7dbe6;}
body.light .cmdk-list li:hover{background:#f1f4fa;}
body.light #toTop{box-shadow:0 0 12px color-mix(in lab,var(--accent) 35%,transparent);}
body.light footer{background:#fafafa;border-top-color:#e5e7eb;color:#475569;}

/* ------------------------------
   18) Detaylı cilalar
   ------------------------------ */
:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; transition:outline .25s ease; }
button:hover, .btn:hover, .chip:hover{ filter:brightness(1.05); }
.project-card:hover .thumb{ filter:brightness(1.12); }

code{ background:#131a29; color:var(--accent); padding:2px 6px; border-radius:6px; }
blockquote{ border-left:4px solid var(--accent); padding-left:14px; color:#a4b3d6; font-style:italic; }

/* Scrollbar */
::-webkit-scrollbar{width:10px;height:10px;}
::-webkit-scrollbar-thumb{ background:color-mix(in lab,var(--accent) 60%,transparent); border-radius:8px; }
::-webkit-scrollbar-thumb:hover{ background:color-mix(in lab,var(--accent) 85%,transparent); }
::-webkit-scrollbar-track{ background:rgba(0,0,0,.1); }

/* Responsive özet */
@media (max-width:900px){
  .stats{grid-template-columns:1fr 1fr;}
}
@media (max-width:600px){
  .stats{grid-template-columns:1fr;}
}
