/* ===================================================================
   Buğra Ünver 3D — app.css
   Koyu, zarif, performans öncelikli. Reveal animasyonları + responsive.
   =================================================================== */

:root {
    /* Nötr / Yüzey */
    --bg:           #f3f6f4;            /* serin kırık-beyaz, hafif yeşil alt ton */
    --bg-soft:      #e7ece9;
    --surface:      #ffffff;            /* kartlar: net beyaz = premium */
    --text:         #16201c;
    --muted:        #586460;
    --border:       rgba(18, 40, 34, .10);

    /* Marka vurguları */
    --accent:       #0b7a57;            /* derin zümrüt — primary */
    --accent-2:     #13b5a6;            /* canlı teal — dekoratif gradient */
    --accent-3:     #e8743b;            /* sıcak terracotta — enerji vurgusu */

    /* Türev tokenlar */
    --accent-strong: #096a4c;           /* primary hover */
    --accent-soft:   rgba(11, 122, 87, .10);
    --accent-ring:   rgba(11, 122, 87, .45);

    /* Modern soft shadow */
    --shadow-sm:     0 1px 2px rgba(16, 40, 34, .05);
    --shadow-md:     0 10px 30px -12px rgba(16, 40, 34, .14);
    --shadow-card-hover: 0 18px 40px -18px rgba(11, 122, 87, .28);

    --radius: 18px;
    --container: 1180px;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; overflow-x: hidden; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Plus Jakarta Sans', sans-serif; line-height: 1.15; font-weight: 700; margin: 0 0 .5em; }
a { color: inherit; text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.container-narrow { max-width: 760px; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--accent); color: #000; padding: 10px 16px; border-radius: 8px; z-index: 999; }

/* ---------- Header ---------- */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    transition: background .3s var(--ease), backdrop-filter .3s var(--ease), padding .3s var(--ease), box-shadow .3s var(--ease);
    padding: 16px 0;
    background: rgba(243, 246, 244, .82);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-header.scrolled { background: rgba(243, 246, 244, .92); padding: 10px 0; box-shadow: 0 8px 30px -18px rgba(16, 40, 34, .30); }

/* WP admin çubuğu açıkken (giriş yapılmışken) header onun altına insin */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

/* Anasayfa dışındaki sayfalarda içerik sabit header'ın altına gizlenmesin */
body:not(.home):not(.page-template) .site-main { padding-top: 78px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; margin-right: auto; }   /* sola hizalı */
.brand-name { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--text); }
.brand img, .brand-logo, .custom-logo { max-height: 46px; width: auto; display: block; }
.primary-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.primary-nav a { font-size: 14px; font-weight: 500; color: var(--muted); }
.primary-nav a:hover { color: var(--text); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; z-index: 110; }
.nav-toggle span { width: 26px; height: 2px; background: var(--text); transition: .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }

/* Gradient modu (varsayılan zarif arka plan) */
.hero--gradient::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(60% 60% at 72% 28%, rgba(11, 122, 87, .16), transparent 60%),
                radial-gradient(52% 52% at 18% 82%, rgba(19, 181, 166, .13), transparent 62%),
                radial-gradient(40% 40% at 50% 50%, rgba(232, 116, 59, .05), transparent 70%); }

/* Fotoğraf modu — resmin üzerine HİÇBİR renk/degrade uygulanmaz (net görünür) */
.hero-bg-image { position: absolute; inset: 0; z-index: 0; background: center/cover no-repeat; }
/* Fotoğraf modu: SOLDAN sağa açılan gölge.
   Sol taraf hafif koyu (yazı okunsun), ekranın ortasından sağa doğru
   tamamen şeffaf (fotoğraf net kalır). Yazılar beyaz + çok hafif gölge. */
.hero--image::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg,
        rgba(0, 0, 0, .55) 0%,
        rgba(0, 0, 0, .34) 26%,
        rgba(0, 0, 0, .12) 44%,
        rgba(0, 0, 0, 0) 58%);
}
.hero--image .hero-title,
.hero--image .hero-typed,
.hero--image .hero-desc,
.hero--image .stat-num,
.hero--image .stat-label { color: #ffffff; }
.hero--image .hero-eyebrow { color: #eafae0; }
.hero--image .hero-content { text-shadow: 0 1px 4px rgba(0, 0, 0, .30); }
.hero--image .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .08); text-shadow: none; }
.hero--image .btn-ghost:hover { color: #fff; border-color: #fff; }
.hero--image .btn-primary { text-shadow: none; }
.hero--image .scroll-hint { border-color: rgba(255, 255, 255, .6); }
.hero-content { position: relative; z-index: 2; padding-top: 120px; padding-bottom: 80px; }
.hero-eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; margin: 0 0 14px; }
.hero-title { font-size: clamp(44px, 9vw, 104px); letter-spacing: -.03em; margin: 0 0 12px; }
.hero-typed { font-size: clamp(18px, 3vw, 28px); font-weight: 600; color: var(--text); min-height: 1.4em; margin: 0 0 22px; font-family: 'Plus Jakarta Sans'; }
.hero-typed .caret { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc { max-width: 560px; color: var(--muted); font-size: 17px; margin: 0 0 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease); cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { transform: translateY(-2px); color: #ffffff; background: var(--accent-strong); box-shadow: 0 12px 30px -10px rgba(11, 122, 87, .45); }
.btn-ghost { border-color: var(--border); color: var(--text); background: rgba(255, 255, 255, .03); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }

.hero-stats { display: flex; gap: clamp(28px, 6vw, 64px); flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: 'Plus Jakarta Sans'; font-size: clamp(28px, 4vw, 44px); font-weight: 800; color: var(--accent-3); }
.stat-label { color: var(--muted); font-size: 14px; }

.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2; width: 26px; height: 42px; border: 2px solid var(--border); border-radius: 14px; }
.scroll-hint span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: var(--accent); border-radius: 2px; animation: scrolldot 1.8s var(--ease) infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 12vh, 140px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--border); }
.section-eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; margin: 0 0 12px; }
.section-title { font-size: clamp(30px, 5vw, 56px); letter-spacing: -.02em; margin: 0 0 40px; max-width: 16ch; }
.section-title em { color: var(--accent); font-style: normal; }
.about-text { max-width: 720px; color: var(--muted); font-size: 18px; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); }
.card:hover { transform: translateY(-6px); border-color: var(--accent-ring); box-shadow: var(--shadow-card-hover); }
.card h3 { font-size: 20px; }
.card-desc { color: var(--muted); font-size: 15px; }

.post-card { padding: 0; overflow: hidden; }
.post-card-link { display: block; color: inherit; }
.post-thumb { aspect-ratio: 16/10; background: var(--bg-soft) center/cover no-repeat; }
.post-thumb--empty { background: linear-gradient(135deg, #e7ecf2, #d8e0ea); }
.post-card-body { padding: 22px 24px 26px; }
.post-meta { color: var(--muted); font-size: 13px; }
.post-card-title { font-size: 19px; margin: 8px 0; }
.post-card-excerpt { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Skills ---------- */
.skills-col { display: flex; flex-direction: column; gap: 22px; }
.skill-head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.skill-bar { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.skill-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width 1.1s var(--ease); }
.skill.is-visible .skill-bar i { width: var(--val); }

/* ---------- Çalışmalar (kutular, görselsiz) ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.work-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; position: relative; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); }
.work-box:hover { transform: translateY(-5px); border-color: var(--accent-ring); box-shadow: var(--shadow-card-hover); }
.work-date { display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }
.work-title { font-size: 19px; margin: 0 0 4px; }
.work-role { display: block; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.work-desc { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Timeline ---------- */
.timeline h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 24px; }
.tl-item { position: relative; padding: 0 0 26px 26px; border-left: 1px solid var(--border); }
.tl-item::before { content: ""; position: absolute; left: -5px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.tl-date { color: var(--accent); font-size: 13px; font-weight: 600; }
.tl-item h4 { font-size: 17px; margin: 4px 0 2px; }
.tl-sub { color: var(--muted); font-size: 14px; }
.tl-item p { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

/* ---------- Contact ---------- */
.contact-info ul { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.contact-info li { display: flex; flex-direction: column; }
.contact-info strong { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-embed iframe { width: 100%; min-height: 260px; border: 0; display: block; }
.contact-form input, .contact-form textarea { width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 14px 16px; border-radius: 12px; margin-bottom: 14px; font: inherit; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form .btn, .contact-form input[type="submit"], .contact-form button { background: var(--accent); color: #ffffff; border: 0; border-radius: 999px; padding: 14px 30px; font-weight: 600; cursor: pointer; }

.load-more-wrap { text-align: center; margin-top: 44px; }

/* Alt sayfalar (Hakkımda, Yetenekler vb.) — sabit header için üst boşluk */
.subpage { padding-top: 92px; }
.subpage .section:first-child { padding-top: clamp(40px, 8vh, 90px); }

/* ---------- Single / Page ---------- */
.single { padding-top: 140px; }
.back-link { color: var(--muted); font-size: 14px; display: inline-block; margin-bottom: 28px; }
.single-title { font-size: clamp(30px, 5vw, 52px); letter-spacing: -.02em; }
.single-thumb { border-radius: var(--radius); overflow: hidden; margin: 0 0 32px; }
.single-content { font-size: 18px; color: #2a3340; }
.single-content p { margin: 0 0 1.3em; }
.single-content h2, .single-content h3 { margin-top: 1.6em; }
.single-content a { color: var(--accent); text-decoration: underline; }
.single-content details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin: 0 0 12px; }
.single-content summary { cursor: pointer; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.copyright { color: var(--muted); font-size: 14px; margin: 0; }
.footer-social { display: flex; gap: 18px; }
.footer-social a { color: var(--muted); font-size: 14px; }
.footer-social a:hover { color: var(--accent); }

/* ---------- Reveal animasyon (GSAP yoksa da görünür) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

/* Tablet & mobil: HAMBURGER menü (sağ üstte) */
@media (max-width: 992px) {
    .grid-2, .grid-3, .work-grid { grid-template-columns: 1fr; }

    .nav-toggle { display: flex; }                 /* hamburger görünür */
    /* Hamburger'ın HEMEN ALTINDAN aşağı doğru açılan, tam genişlik, opak panel. */
    .primary-nav {
        position: absolute; top: 100%; left: 0; right: 0;   /* header'ın tam altı */
        background: #f3f6f4;                                  /* solid fallback */
        background: var(--bg);                                /* opak zemin */
        border-top: 1px solid var(--border);
        box-shadow: 0 16px 32px -14px rgba(16, 40, 34, .25);
        max-height: 78vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
        opacity: 0; visibility: hidden; pointer-events: none;
        transform: translateY(-10px);                        /* aşağı doğru açılır */
        transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
        z-index: 99;                                          /* hamburger (110) altında ki kapatılabilsin */
    }
    .primary-nav.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
    .primary-nav ul { flex-direction: column; gap: 0; padding: 6px 0; margin: 0; width: 100%; align-items: stretch; }
    .primary-nav li { width: 100%; }
    .primary-nav a { display: block; padding: 15px 24px; font-size: 17px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); }
    .primary-nav li:last-child a { border-bottom: 0; }
    .primary-nav a:hover { color: var(--accent); background: var(--accent-soft); }

    /* —— Mobil yatay taşma kalkanı —— */
    *, *::before, *::after { min-width: 0; }
    img, svg, video, iframe, embed, object { max-width: 100%; height: auto; }
    .map-embed iframe { width: 100% !important; }
    .section, .hero, .site-footer, .single, .subpage { overflow-x: clip; }
    .container { max-width: 100%; }
    pre, code { white-space: pre-wrap; word-break: break-word; }
}

/* Telefon: tipografi, boşluk ve hero düzeni */
@media (max-width: 768px) {
    .section { padding: clamp(54px, 9vh, 88px) 0; }
    .section-title { font-size: clamp(26px, 7vw, 40px); margin-bottom: 28px; }
    .hero-content { padding-top: 96px; padding-bottom: 56px; }
    .hero-title { font-size: clamp(34px, 12vw, 60px); }
    .hero-typed { font-size: clamp(16px, 5vw, 22px); }
    .hero-desc { font-size: 16px; }
    .hero-cta { gap: 10px; }
    .hero-cta .btn { padding: 12px 22px; font-size: 14px; }
    .hero-stats { gap: 24px; }
    .footer-inner { flex-direction: column; text-align: center; gap: 16px; }

    /* HERO FOTOĞRAF MODU — dikey stack: foto küçülüp ekrana sığar, yazı altta */
    .hero--image { min-height: auto; display: block; }
    .hero--image::before { display: none; }                 /* sol gölge mobilde kapalı */
    .hero--image .hero-bg-image {
        position: relative; inset: auto; z-index: 0;
        width: 100%; aspect-ratio: 4 / 3;
        background-size: contain;                            /* tüm fotoğraf görünür, sığar */
        background-repeat: no-repeat; background-position: center;
        background-color: var(--bg-soft);
    }
    /* Foto altına inen yazı: koyu zemin için tekrar koyu renk (beyaz override iptal) */
    .hero--image .hero-title,
    .hero--image .hero-typed,
    .hero--image .hero-desc { color: var(--text); }
    .hero--image .stat-num { color: var(--accent-3); }
    .hero--image .stat-label { color: var(--muted); }
    .hero--image .hero-eyebrow { color: var(--accent); }
    .hero--image .hero-content { text-shadow: none; padding-top: 28px; }
    .hero--image .btn-ghost { color: var(--text); border-color: var(--border); background: transparent; }
    .hero--image .scroll-hint { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    #hero-canvas { display: none; }
    * { animation: none !important; scroll-behavior: auto !important; }
}
