/* Temel değişkenler */
:root{
  --bg: #0b1220;
  --panel: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --brand: #0ea5e9;
  --brand-2: #22d3ee;
  --border: #1f2a44;
  --shadow: 0 10px 30px rgba(2,6,23,.4);
}

/* Işık tema */
@media (prefers-color-scheme: light){
  :root{ --bg:#f9fafb; --panel:#fcfcfc; --text:#111827; --muted:#4b5563; --border:#e5e7eb; --shadow: 0 10px 30px rgba(0,0,0,.08); }
}

html{ scroll-behavior:smooth; }
*{ box-sizing:border-box; }
body{
  margin:0; font-family:Inter, Segoe UI, Roboto, Arial, sans-serif; color:var(--text); background:radial-gradient(1200px 600px at 10% -10%, rgba(34,211,238,.15), transparent 60%), radial-gradient(1200px 600px at 110% 10%, rgba(14,165,233,.15), transparent 60%), var(--bg);
}

.container{ width:min(1100px, 92%); margin-inline:auto; }
.section{ padding:72px 0; }
.section, .card, .about-card, .projects article, .skills li, .highlights li{ content-visibility:auto; contain-intrinsic-size:1px 300px; }
.section.alt{ background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)) ; }

/* Skip link */
.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; background:var(--brand); color:#001018; padding:8px 12px; border-radius:8px; box-shadow:var(--shadow); }

/* Header & Nav */
.site-header{ position:sticky; top:0; backdrop-filter:saturate(180%) blur(8px); background:color-mix(in srgb, var(--bg) 82%, transparent); z-index:1002; border-bottom:1px solid var(--border); }
.nav{ display:flex; align-items:center; justify-content:space-between; min-height:64px; gap:24px; }
.logo{ display:grid; place-items:center; width:40px; height:40px; border-radius:10px; background:linear-gradient(135deg, var(--brand), var(--brand-2)); color:#001018; font-weight:800; text-decoration:none; box-shadow:0 6px 20px rgba(14,165,233,.35); overflow:hidden; position:relative; z-index:1001; }
.logo img{ width:100%; height:100%; object-fit:cover; border-radius:10px; display:block; }
.nav-list{ list-style:none; display:flex; align-items:center; gap:18px; margin:0; padding:0; }
.nav-list a{ color:var(--text); text-decoration:none; padding:10px 12px; border-radius:8px; }
.nav-list a:hover,.nav-list a.active{ background:rgba(255,255,255,.06); }
.theme-toggle, .lang-toggle{ background:transparent; border:1px solid var(--border); color:var(--text); border-radius:10px; padding:8px 10px; cursor:pointer; transition:all .2s ease; }
.theme-toggle:hover, .lang-toggle:hover{ background:rgba(255,255,255,.08); border-color:var(--brand); }

.nav-toggle{ 
  display:none; 
  background:rgba(255,255,255,.05); 
  border:1px solid var(--border); 
  width:48px; 
  height:48px; 
  border-radius:14px; 
  position:relative; 
  cursor:pointer;
  backdrop-filter:blur(8px);
  transition:all .3s ease;
  box-shadow:0 4px 12px rgba(0,0,0,.1);
}
.nav-toggle:hover{ 
  background:rgba(255,255,255,.08); 
  border-color:var(--brand);
  transform:scale(1.05);
  box-shadow:0 6px 20px rgba(14,165,233,.2);
}
.nav-toggle .bar{ 
  position:absolute; 
  left:12px; 
  right:12px; 
  height:3px; 
  background:linear-gradient(90deg, var(--brand), var(--brand-2)); 
  border-radius:3px; 
  transition:all .3s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
  box-shadow:0 2px 4px rgba(14,165,233,.3);
}
.nav-toggle .bar:nth-child(1){ top:16px; }
.nav-toggle .bar:nth-child(2){ top:22.5px; }
.nav-toggle .bar:nth-child(3){ top:29px; }

/* Hero */
.hero{ padding:96px 0 64px; }
.hero-inner{ text-align:center; display:grid; place-items:center; gap:14px; }
.avatar{ width:96px; height:96px; border-radius:28px; background:linear-gradient(135deg, var(--brand), var(--brand-2)); color:#001018; display:grid; place-items:center; font-weight:900; font-size:36px; box-shadow:0 10px 30px rgba(14,165,233,.4); overflow:hidden; }
.avatar img{ width:100%; height:100%; object-fit:cover; display:block; border-radius:28px; }
.title{ font-size:clamp(28px, 5vw, 44px); line-height:1.1; margin:8px 0 0; letter-spacing:-.02em; }
.subtitle{ font-weight:700; color:var(--muted); margin:0; }
.hero-social{ margin-top:4px; }
/* Ensure hero social links (CodePen / Behance in hero) have no underline */
.hero-social a{ text-decoration:none; }
.lede{ color:var(--muted); max-width:800px; margin-inline:auto; }
.actions{ display:flex; gap:14px; justify-content:center; margin-top:10px; flex-wrap:wrap; }

.btn{ display:inline-block; padding:10px 14px; border-radius:12px; border:1px solid var(--border); color:var(--text); text-decoration:none; transition:transform .06s ease, background .2s ease, border-color .25s ease, color .25s ease; }
.btn:hover{ transform:translateY(-1px); background:rgba(255,255,255,.05); }
.btn.primary{ background:linear-gradient(135deg, var(--brand), var(--brand-2)); border-color:transparent; color:#001018; box-shadow:0 8px 24px rgba(14,165,233,.35); }
.actions .btn:not(.primary):hover{ border-color:var(--brand); color:var(--brand-2); }
.btn.small{ padding:8px 10px; border-radius:10px; font-size:14px; }
.btn.outline{ background:transparent; }

/* Grid helpers */
.grid-2{ display:grid; grid-template-columns:1.3fr 1fr; gap:32px; align-items:start; }

/* About */
.highlights{ margin:14px 0 0; padding-left:18px; }
.highlights li{ margin:6px 0; }
.about-services{ margin:18px 0 18px; padding-left:20px; display:grid; gap:10px; }
.about-card{ display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:16px; background:var(--panel); border:1px solid var(--border); padding:18px; border-radius:16px; box-shadow:var(--shadow); }
.about-stat{ text-align:center; background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)); padding:14px; border-radius:12px; border:1px solid var(--border); }
.kpi{ font-weight:800; font-size:clamp(20px, 4vw, 28px); }
.kpi-label{ color:var(--muted); font-size:14px; }

/* Projects */
.projects{ display:grid; grid-template-columns:repeat(3, 1fr); gap:22px; }
.card{ background:var(--panel); border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow); overflow:hidden; display:flex; flex-direction:column; height: 400px; transition: border-color .25s ease; }
.card:hover{ border-color:var(--brand); }
.card-media{ aspect-ratio: 1/3; position:relative; background:conic-gradient(from 180deg at 50% 50%, #0ea5e9, #22d3ee, #8b5cf6, #0ea5e9); filter:saturate(85%); will-change:transform; overflow: hidden; }
@media (prefers-color-scheme: light){
  .card-media{ background:conic-gradient(from 180deg at 50% 50%, #1f2937, #374151, #4b5563, #1f2937); }
}
.card-media img{ width:100%; height:100%; object-fit:cover; display:block; }
.card-body{ flex:1 1 0; padding:10px 14px 10px; display:grid; gap:4px; }
.card-body h3{ margin:0 0 2px; font-size:clamp(15px, 1.05rem, 19px); line-height:1.2; }
.card-body p{ margin:4px 0 2px; font-size:14px; line-height:1.35; }
.card-actions{ display:flex; gap:10px; margin-top:6px; }
.fullscreen-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 10px;
  background:transparent;
  border:1px solid var(--border);
  border-radius:10px;
  cursor:pointer;
  transition:all .2s ease;
}
.fullscreen-btn:hover{
  background:rgba(14, 165, 233, 0.1);
  border-color:var(--brand);
  transform:translateY(-1px);
}
.fullscreen-btn img{
  width:16px;
  height:16px;
  display:block;
  object-fit:contain;
}

/* Skills */
.skills{ display:flex; flex-wrap:wrap; gap:10px; padding:0; margin:16px 0 0; list-style:none; }
.skills li{ padding:8px 10px; border-radius:999px; border:1px solid var(--border); background:rgba(255,255,255,.02); color:var(--muted); }

/* Contact */
.form{ padding:16px; }
.field{ display:grid; gap:6px; margin:10px 0; }
input, textarea{ width:100%; padding:10px 12px; border-radius:10px; border:1px solid var(--border); background:transparent; color:var(--text); }
input:focus, textarea:focus{ outline:2px solid color-mix(in srgb, var(--brand) 45%, transparent); border-color:var(--brand); }
.form-note{ color:var(--muted); font-size:12px; margin:8px 0 0; }

/* Footer */
.site-footer{ border-top:1px solid var(--border); padding:28px 0; }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; }
.social-links{ display:flex; align-items:center; gap:12px; }
.social-links a{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 14px;
  min-height:40px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(255,255,255,.03);
  transition:background .25s ease, transform .15s ease, border-color .25s ease, color .25s ease;
  text-decoration: none; /* ensure no underline for social links */
}
.social-links a:hover{
  background:color-mix(in srgb, var(--brand) 18%, transparent);
  border-color:var(--brand);
  transform:translateY(-2px);
  color:var(--text);
}
.social-links img{
  width:22px;
  height:22px;
  object-fit:contain;
  filter:grayscale(.1) contrast(1.1);
  flex-shrink:0;
}
.social-links a span{
  font-size:14px;
  font-weight:600;
  letter-spacing:.01em;
  text-transform:capitalize;
  color:var(--muted);
}
.social-links a:hover span{
  color:var(--text);
}
.codepen-icon{ transition:filter .3s ease; }
[data-theme="dark"] .codepen-icon{ filter:invert(1) brightness(1.4) contrast(1.1); }
[data-theme="light"] .codepen-icon{ filter:none; }
.behance-icon{ transition:filter .3s ease; }
[data-theme="dark"] .behance-icon{ filter:invert(1) brightness(1.35) contrast(1.05); }
[data-theme="light"] .behance-icon{ filter:none; }
.back-to-top{ text-decoration:none; color:var(--text); border:1px solid var(--border); padding:6px 10px; border-radius:8px; }
.back-to-top:hover{ background:rgba(255,255,255,.05); }

/* Responsive */
@media (min-width: 721px){
  .nav-list{ display:flex !important; }
  .nav-toggle{ display:none !important; }
}
@media (max-width: 960px){
  .grid-2{ grid-template-columns:1fr; }
  .projects{ grid-template-columns:1fr 1fr; }
}
@media (max-width: 720px){
  .nav-toggle{ display:block; z-index:1001; }
  .nav-list{
    display:none;
    position:fixed;
    top:0; left:0;
    width:100%; height:100vh;
    background:linear-gradient(135deg, 
      color-mix(in srgb, var(--bg) 95%, transparent) 0%, 
      color-mix(in srgb, var(--panel) 92%, transparent) 50%, 
      color-mix(in srgb, var(--bg) 95%, transparent) 100%);
    backdrop-filter:blur(20px) saturate(180%);
    flex-direction:column;
    justify-content:center;
    align-items:center;
    z-index:900;
    transform:translateY(-100%);
    opacity:0;
    transition:all .4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border:1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  }
  .nav-list.show{ 
    display:flex; 
    transform:translateY(0); 
    opacity:1;
  }
  .nav-list::before{
    content:'';
    position:absolute;
    top:0; left:0;
    width:100%; height:100%;
    background:radial-gradient(600px circle at 50% 50%, 
      color-mix(in srgb, var(--brand) 8%, transparent), 
      color-mix(in srgb, var(--brand-2) 4%, transparent), 
      transparent 70%);
    pointer-events:none;
  }
  .nav-list a{ 
    display:flex; 
    align-items:center; 
    justify-content:center;
    gap:12px; 
    padding:18px 32px; 
    border-radius:16px; 
    font-size:clamp(20px, 5vw, 28px); 
    font-weight:600; 
    color:var(--text);
    text-decoration:none;
    background:color-mix(in srgb, var(--panel) 60%, transparent);
    border:1px solid var(--border);
    margin:8px 0;
    min-width:240px;
    text-align:center;
    backdrop-filter:blur(10px);
    transition:all .3s ease;
    position:relative;
    overflow:hidden;
  }
  .nav-list a::before{
    content:'';
    position:absolute;
    top:0; left:-100%;
    width:100%; height:100%;
    background:linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 20%, transparent), transparent);
    transition:left .5s ease;
  }
  .nav-list a:hover{ 
    background:color-mix(in srgb, var(--brand) 15%, transparent);
    border-color:var(--brand);
    transform:translateY(-2px) scale(1.02);
    box-shadow:0 8px 25px color-mix(in srgb, var(--brand) 25%, transparent);
  }
  .nav-list a:hover::before{
    left:100%;
  }
  .nav-list a.active{
    background:linear-gradient(135deg, var(--brand), var(--brand-2));
    color:#ffffff;
    border-color:transparent;
    box-shadow:0 12px 30px color-mix(in srgb, var(--brand) 40%, transparent);
  }
  .theme-toggle, .lang-toggle{
    background:color-mix(in srgb, var(--panel) 60%, transparent);
    border:1px solid var(--border);
    padding:12px 14px;
    border-radius:12px;
    font-size:18px;
    transition:all .3s ease;
  }
  .theme-toggle:hover, .lang-toggle:hover{
    background:var(--brand);
    border-color:var(--brand);
    transform:rotate(180deg) scale(1.1);
  }
  .lang-toggle:hover{
    transform:scale(1.1);
  }
  .projects{ grid-template-columns:1fr; }
}

/* Lock scroll when menu is open */
body.menu-open{ 
  overflow:hidden; 
}

/* Motion & focus */
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}
@media (prefers-reduced-data: reduce){
  .card-media{ background:#0f172a; }
  .nav-list a:hover{ box-shadow:none; }
}
:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; border-radius:8px; }

/* WhatsApp floating button */
.whatsapp-fab{
  position:fixed;
  right:18px;
  bottom:18px;
  width:56px;
  height:56px;
  display:grid;
  place-items:center;
  border-radius:50%;
  overflow:hidden;
  background:#25D366;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  border:1px solid color-mix(in srgb, #25D366 60%, var(--border));
  z-index:1000;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.whatsapp-fab img{ width:100%; height:100%; object-fit:contain; display:block; }
.whatsapp-fab:hover{ transform:translateY(-3px); filter:saturate(110%); box-shadow:0 14px 34px rgba(0,0,0,.4); }
.whatsapp-fab:focus-visible{ outline:3px solid #b7ffd1; border-radius:50%; }

/* Image Modal */
.image-modal{
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.image-modal.show{
  display: flex;
  opacity: 1;
}
.modal-backdrop{
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  cursor: pointer;
}
.modal-content{
  position: relative;
  max-width: 50vw;
  max-height: 50vh;
  width: 50vw;
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#modal-image{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Slider Modal */
.slider-modal{
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.slider-modal.show{
  display: flex;
  opacity: 1;
}
.slider-modal-backdrop{
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  cursor: pointer;
}
.slider-modal-content{
  position: relative;
  width: min(92vw, 1200px);
  height: min(92vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.slider-modal-wrapper{
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 48px;
}
.slider-modal-image{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

@media (max-width: 720px){
  .slider-modal-content{
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
  .slider-modal-wrapper{
    padding: 0 20px;
  }
}
.slider-modal-prev, .slider-modal-next{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.slider-modal-prev:hover, .slider-modal-next:hover{
  background: rgba(14, 165, 233, 0.5);
  border-color: var(--brand);
  transform: translateY(-50%) scale(1.15);
}
.slider-modal-prev{ left: 20px; }
.slider-modal-next{ right: 20px; }
.slider-modal-dots{
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}
.slider-modal-dot{
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  padding: 0;
  line-height: 0;
  font-size: 0;
  appearance: none;
}
.slider-modal-dot.active{
  background: var(--brand);
  width: 32px;
  border-radius: 6px;
  border-color: var(--brand);
}
.slider-modal-dot:hover{
  background: rgba(255, 255, 255, 0.6);
}
.slider-modal-dot:focus-visible{
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
}
.slider-modal-close{
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 15;
  backdrop-filter: blur(8px);
}
.slider-modal-close:hover{
  background: rgba(239, 68, 68, 0.5);
  border-color: #ef4444;
  transform: rotate(90deg);
}

/* Clickable project images */
.card-media[data-clickable="true"]{
  cursor: pointer;
  transition: transform 0.2s ease;
}
.card-media[data-clickable="true"]:hover{
  transform: scale(1.02);
}

/* Image Slider */
.slider-container{
  position: relative;
  overflow: hidden;
}
.slider-wrapper{
  display: flex;
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}
.slider-wrapper[data-clickable="true"]:hover{
  filter: brightness(1.05);
}
.slider-wrapper img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.slider-prev, .slider-next{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(4px);
}
.slider-prev:hover, .slider-next:hover{
  background: rgba(14, 165, 233, 0.8);
  transform: translateY(-50%) scale(1.1);
}
.slider-prev{ left: 8px; }
.slider-next{ right: 8px; }
.slider-dots{
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.dot.active{
  background: var(--brand);
  width: 24px;
  border-radius: 4px;
  border-color: var(--brand);
}
.dot:hover{
  background: rgba(255, 255, 255, 0.7);
}
.slider-hint{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
  pointer-events: none;
  display: none;
}
.slider-container:hover .slider-hint{
  opacity: 1;
}

/* Modern mobile nav enhancements */
.nav-toggle[aria-expanded="true"] .bar:nth-child(1){ 
  transform:translateY(6.5px) rotate(45deg); 
  background:linear-gradient(90deg, #ef4444, #f97316);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(2){ 
  opacity:0; 
  transform:scale(0);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(3){ 
  transform:translateY(-6.5px) rotate(-45deg); 
  background:linear-gradient(90deg, #ef4444, #f97316);
}
.nav-toggle[aria-expanded="true"]{
  background:rgba(239,68,68,.1);
  border-color:#ef4444;
  transform:scale(1.1);
}
