:root{
  --bg:#ffffff; --panel:#f6f6f6; --muted:#444444; --text:#0a0a0a;
  --accent:#000000; --accent-2:#222222; --ring:rgba(0,0,0,.25);
  --net-line: rgba(0,0,0,.50); /* çizgi rengi (açık tema) */
}

:root{ --dur:.6s; --ease:cubic-bezier(.2,.8,.2,1); }
@media (prefers-color-scheme: dark){
  :root{ --bg:#0b0b0b; --panel:#161616; --muted:#bbbbbb; --text:#f3f3f3; --accent:#ffffff; --accent-2:#cfcfcf; --ring:rgba(255,255,255,.25); --net-line: rgba(255,255,255,.80); }
  .profile-cover .cover{ filter: invert(1) saturate(.1) contrast(1.05); }
}
*{box-sizing:border-box}
html,body{overflow-x:hidden}
body{
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background:var(--bg); color:var(--text); line-height:1.6;
}
html[lang="ar"] body, html[lang="fa"] body{
  font-family: Vazirmatn, "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
img{max-width:100%;display:block;border-radius:12px}
a{color:inherit;text-decoration:none}
.container{width:min(1100px,92%);margin-inline:auto}
.sr-only,.skip-link{position:absolute;inset-inline-start:-10000px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{inset-inline-start:1rem;top:1rem;background:var(--panel);padding:.5rem .75rem;border-radius:.5rem}

/* Header */
.site-header{position:sticky;top:0;z-index:20;background:var(--bg);border-bottom:3px solid var(--accent)}
.nav{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 0}
.brand{display:flex;align-items:center;gap:.6rem;font-weight:800}
.menu{display:flex;gap:1rem;list-style:none;margin:0;padding:0}
.menu a{padding:.4rem .6rem;border-radius:.5rem;position:relative}
.menu a:focus,.menu a:hover{outline:2px solid var(--ring);outline-offset:2px}
.menu a::after{content:"";position:absolute;left:0;right:0;bottom:-6px;height:2px;background:var(--text);transform:scaleX(0);transform-origin:left;transition:transform var(--dur) var(--ease)}
.menu a:hover::after,.menu a.active::after{transform:scaleX(1)}
.actions{display:flex;align-items:center;gap:.6rem}
#langSelect{background:var(--panel);color:var(--text);border:1px solid rgba(148,163,184,.3);border-radius:.6rem;padding:.4rem .6rem}
.btn{border:1px solid rgba(148,163,184,.25);background:transparent;color:var(--text);padding:.55rem .9rem;border-radius:.7rem;cursor:pointer}
.btn.primary{background:var(--accent);color:var(--bg);border:none;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.btn.primary:hover{background:var(--accent-2)}
.btn.ghost{background:transparent}

/* Hero */
.hero{padding:5rem 0 3rem;background:repeating-linear-gradient(45deg, #fafafa, #fafafa 20px, #ffffff 20px, #ffffff 40px);background-size:40px 40px;animation:stripes 16s linear infinite}
@keyframes stripes{to{background-position:40px 0}}
@media (prefers-color-scheme: dark){
  :root{ --bg:#0b0b0b; --panel:#161616; --muted:#bbbbbb; --text:#f3f3f3; --accent:#ffffff; --accent-2:#cfcfcf; --ring:rgba(255,255,255,.25); --net-line: rgba(255,255,255,.80); }
  .hero{background:repeating-linear-gradient(45deg, #121212, #121212 20px, #0b0b0b 20px, #0b0b0b 40px);}
  .profile-cover .cover{ filter: invert(1) saturate(.1) contrast(1.05); }
}
/* Hero grid (masaüstünde 2 sütun) */
.hero-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:1.2rem;align-items:center}

/* LinkedIn benzeri kapak alanı */
.profile-cover{
  grid-column:1/-1;
  position:relative;
  height:280px;
  border-radius:16px;
  border:2px solid var(--accent);
  overflow:visible;
  background:var(--panel);
}
.profile-cover .cover{
  position:absolute; inset:0;
  background-image:var(--cover, url('https://picsum.photos/1200/400'));
  background-size:cover; background-position:center;
  border-radius:16px;
}

/* Avatar: dairesel maske + zoom + odak noktası */
.profile-cover .avatar{
  position:absolute; left:24px; bottom:-56px;
  width:120px; height:120px;
  border-radius:50%; overflow:hidden;
  border:3px solid var(--bg); background:#fff; z-index:1;
  box-shadow:0 10px 24px rgba(0,0,0,.20);
}
.profile-cover .avatar img{
  width:100%; height:100%; display:block;
  object-fit:cover;
  /* Odak noktası (x/y yüzeyi) */
  object-position:var(--x,50%) var(--y,50%);
  /* Yakınlaştırma */
  transform:translateZ(0) scale(var(--zoom,1.1)); /* <— translateZ(0) eklendi */
  transform-origin:var(--x,50%) var(--y,50%);
  will-change:transform;
}

/* Avatar taşması nedeniyle kahraman metnini biraz aşağı it */
.hero .hero-text{margin-top:72px}

/* Sections */
.section{padding:3.2rem 0}
.section.alt{background:#f4f4f4}
@media (prefers-color-scheme: dark){
    :root{ --bg:#0b0b0b; --panel:#161616; --muted:#bbbbbb; --text:#f3f3f3; --accent:#ffffff; --accent-2:#cfcfcf; --ring:rgba(255,255,255,.25); --net-line: rgba(255,255,255,.80); }
    .section.alt{background:#111111} 
    .profile-cover .cover{ filter: invert(1) saturate(.1) contrast(1.05); }
}

/* Cards */
.cards{display:grid;grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));gap:1rem}
.card{background:var(--panel);padding:1rem;border-radius:0;border:2px solid var(--accent);transition:transform .3s var(--ease), border-color .3s var(--ease)}
.card:hover{transform:translateY(-4px)}
.card h3{margin:.2rem 0 .4rem;text-transform:uppercase;letter-spacing:.03em;font-weight:700}

/* Folio */
.folio{display:grid;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));gap:1rem}
.folio figcaption{margin-top:.6rem;color:var(--muted)}
.folio img{filter:grayscale(100%);transition:filter .3s var(--ease)}
.folio img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    display: block;
}
@supports not (aspect-ratio: 1) {
  .folio img { height: 200px; }
}
.folio .folio-item img{transition:transform .35s var(--ease)}
.folio .folio-item:hover img{transform:scale(1.02)}
.folio .folio-item:hover img{filter:grayscale(0%)}

/* Contact */
.contact-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:1.2rem}
.contact{background:var(--panel);padding:1rem;border-radius:14px;border:1px solid rgba(148,163,184,.2)}
.contact label{display:grid;gap:.35rem;margin:.6rem 0}
.contact input,.contact textarea{background:#0000;color:var(--text);border:1px solid rgba(148,163,184,.35);border-radius:.6rem;padding:.6rem .7rem;outline:none}
.contact input:focus,.contact textarea:focus{box-shadow:0 0 0 .2rem var(--ring)}
.form-actions{display:flex;align-items:center;gap:.8rem;margin-top:.6rem}
.muted{color:var(--muted);font-size:.9rem}
.contact-info{background:var(--panel);padding:1rem;border-radius:14px;border:1px solid rgba(148,163,184,.2)}

/* Footer */
.site-footer{border-top:1px solid rgba(148,163,184,.2);padding:1.2rem 0;margin-top:2rem}
.foot{display:flex;align-items:center;justify-content:space-between;color:var(--muted)}
.to-top{border:1px solid rgba(148,163,184,.25);padding:.35rem .55rem;border-radius:.6rem;opacity:.0;pointer-events:none;transition:opacity .3s var(--ease)}
.to-top.show{opacity:.9;pointer-events:auto}

/* Progress bar */
#progress{position:fixed;inset:0 auto auto 0;height:3px;width:0;background:var(--text);z-index:50;transition:width .15s linear}

/* Mouse'a yapışan ağ için arkaplan canvas */
#net-canvas{
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 5; /* içerikten düşük, arkaplanda */
  }
  
  /* İçeriği canvas'ın üstüne taşı */
  .site-header, main, .site-footer{
    position: relative;
    z-index: 2;
  }
  
  /* Hareket azalt tercihi: efekt kapalı */
  @media (prefers-reduced-motion: reduce){
    #net-canvas{ display:none !important; }
  }
/* Reveal animations */
.reveal{opacity:0;transform:translateY(14px);transition:opacity var(--dur) var(--ease), transform var(--dur) var(--ease)}
.reveal.in{opacity:1;transform:none}

/* Responsive */
@media (max-width: 980px){
  .contact {
      background: rgba( var(--panel-rgb, 246,246,246), 0.95); /* saydamlığı azalttık */
      backdrop-filter: blur(4px);
    }
  .hero-grid{grid-template-columns:1fr}
  .cards{grid-template-columns:repeat(auto-fit, minmax(220px, 1fr))}
  .folio{grid-template-columns:repeat(auto-fit, minmax(200px, 1fr))}
  .contact-grid{grid-template-columns:1fr}
}
@media (max-width: 1155px){
  .profile-cover{height:180px}
  .profile-cover .avatar{
    left:50%; right:auto; transform:translateX(-50%);
    bottom:-46px; width:96px; height:96px;
  }
  .profile-cover .avatar img{ transform:scale(var(--zoom,1.05)); }
  .hero .hero-text{margin-top:64px}
  .menu{ display:none; }          /* Ana Sayfa / Hizmetler vb. gizle */
  .actions .btn{ display:none; }  /* “İletişime Geç” butonunu gizle */
  .site-header .nav{
    position: relative;
    min-height: 56px;             /* header yüksekliği stabil kalsın */
    justify-content: center;      /* flex içeriği ortala */
  }
  .site-header .brand{
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);  /* tam ortaya sabitle */
  }
  .site-header .actions{
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);       /* dil seçimi sağda ortalı */
  }
  .nav{ gap:.5rem; }              /* Sıkışmayı azalt */
}
/* Yüzen dil seçici: masaüstünde gizli; sadece mobilde açılır */
.lang-fab{ display:none; }

/* Mobilde sağ üstte yüzen dil seçici */
@media (max-width: 1155px){
  /* Orijinal select'i gizle */
  .actions #langSelect{ display:none; }

  .lang-fab{
    display:block;                   /* mobilde görünür */
    position: fixed;
    right: calc(8px + env(safe-area-inset-right));
    left: auto;
    transform: none;
    top: calc(var(--hdr-h, 56px) + 12px + env(safe-area-inset-top));
    z-index: 60;                     /* progress(50) üstünde */
    pointer-events: auto;            /* tıklanabilir */
    background: var(--panel);
    border: 1px solid rgba(148,163,184,.38);
    border-radius: 999px;
    padding: .2rem .5rem;
    box-shadow: 0 8px 18px rgba(0,0,0,.16);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .lang-fab select{
    appearance: none;
    background: transparent;
    color: var(--text);
    border: none;
    padding: .15rem .3rem;
    font: inherit;
    font-size: .9rem;
    line-height: 1.1;
    outline: none;
    cursor: pointer;
  }
}
/* RTL tweaks */
html[dir="rtl"] .profile-cover .avatar{left:auto; right:24px; transform:none;}

/* Toasts */
.toast-stack{
  position:fixed;
  left:50%;
  bottom:16px;
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index:100;
  pointer-events:none;
}
.toast{
  pointer-events:auto;
  background:var(--panel);
  color:var(--text);
  border:2px solid var(--accent);
  border-radius:12px;
  padding:.7rem .9rem;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
  display:flex; align-items:center; gap:.55rem;
  max-width:min(92vw, 520px);
  font-weight:600;
  opacity:0; transform:translateY(8px);
  animation:toast-in .25s var(--ease) forwards;
}
.toast.hide{ animation:toast-out .2s var(--ease) forwards; }
.toast .icon{font-size:1.1rem; line-height:1;}
@keyframes toast-in{ to{opacity:1; transform:none;} }
@keyframes toast-out{ to{opacity:0; transform:translateY(8px);} }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{animation:none !important;transition:none !important}
}