/* ==========================================================================
   Ortak tasarım sistemi — anasayfa, proje vitrini ve proje detay sayfaları
   Sade, tek aksan renkli; açık ve koyu tema desteklidir (sağ üstteki düğmeyle
   değiştirilir, tercih localStorage'da saklanır). Varsayılan: koyu tema.
   ========================================================================== */

:root {
    --bg: #0a0a0d;
    --bg-soft: #131318;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.20);
    --text: #eef0f4;
    --text-dim: #989ca8;
    --text-faint: #6c6f7a;

    --accent: #5183e0;
    --accent-contrast: #ffffff;
    --accent-soft-bg: rgba(81, 131, 224, 0.14);
    --accent-soft-border: rgba(81, 131, 224, 0.28);
    --accent-glow: rgba(81, 131, 224, 0.4);

    --invert-bg: var(--text);
    --invert-text: var(--bg);

    --shadow-md: rgba(0, 0, 0, 0.45);
    --shadow-lg: rgba(0, 0, 0, 0.6);
    --nav-bg: rgba(10, 10, 13, 0.65);

    --radius: 18px;
}

:root[data-theme="light"] {
    --bg: #f6f7f9;
    --bg-soft: #ffffff;
    --surface: rgba(16, 20, 30, 0.035);
    --surface-hover: rgba(16, 20, 30, 0.06);
    --border: rgba(16, 20, 30, 0.10);
    --border-strong: rgba(16, 20, 30, 0.18);
    --text: #14161c;
    --text-dim: #565a68;
    --text-faint: #8b8f9b;

    --accent: #3763c9;
    --accent-contrast: #ffffff;
    --accent-soft-bg: rgba(55, 99, 201, 0.09);
    --accent-soft-border: rgba(55, 99, 201, 0.22);
    --accent-glow: rgba(55, 99, 201, 0.3);

    --shadow-md: rgba(16, 20, 30, 0.12);
    --shadow-lg: rgba(16, 20, 30, 0.18);
    --nav-bg: rgba(246, 247, 249, 0.75);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    transition: background 0.25s ease, color 0.25s ease;
}

h1, h2, h3, .brand {
    font-family: 'Sora', 'Inter', sans-serif;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

::selection {
    background: var(--accent-soft-border);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-wide {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Background ambience — tek aksan renginin çok hafif bir izi */
.bg-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(700px circle at 50% -10%, var(--accent-soft-bg), transparent 60%);
}

/* Nav */
.nav {
    position: sticky;
    top: 0;
    z-index: 500;
    backdrop-filter: blur(14px);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--invert-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--invert-text);
    flex-shrink: 0;
}

.brand-text {
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.nav-links a.active {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 4px;
    transition: all 0.25s ease;
}

.theme-toggle:hover {
    color: var(--text);
    background: var(--surface-hover);
    border-color: var(--border-strong);
}

.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: inline; }

@media (max-width: 640px) {
    .nav-links span.nav-label { display: none; }
}

/* Hero (anasayfa) */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 22px;
}

.eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    display: inline-block;
}

.avatar {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    margin: 0 auto 28px;
    padding: 3px;
    background: var(--bg-soft);
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px -20px var(--shadow-lg);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-inner .initials {
    font-size: 2.6rem;
    font-weight: 700;
}

.name {
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.title {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto 34px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-primary {
    background: var(--invert-bg);
    color: var(--invert-text);
}

.btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-2px);
}

.btn-ghost {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.82rem;
}

/* Sections */
.section {
    padding: 46px 0;
    scroll-margin-top: 80px;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 30px;
}

.section-num {
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-faint);
}

.section-title {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

.section-kicker {
    color: var(--text-dim);
    max-width: 560px;
    margin-top: -18px;
    margin-bottom: 30px;
    font-size: 1.02rem;
}

/* Cards (generic) */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.card:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.about-text {
    font-size: 1.02rem;
    color: var(--text-dim);
    white-space: pre-line;
}

/* Serbest HTML içeriği (ör. gizlilik politikası metni) için okunabilir varsayılan stiller */
.rich-text {
    font-size: 1.02rem;
    color: var(--text-dim);
}

.rich-text p { margin-bottom: 14px; }
.rich-text p:last-child { margin-bottom: 0; }

.rich-text ul, .rich-text ol { margin: 0 0 14px 22px; }
.rich-text li { margin-bottom: 6px; }

.rich-text a { color: var(--accent); text-decoration: underline; }

.rich-text strong, .rich-text b { color: var(--text); font-weight: 700; }

.rich-text h1, .rich-text h2, .rich-text h3, .rich-text h4 {
    color: var(--text);
    font-family: 'Sora', 'Inter', sans-serif;
    margin: 22px 0 10px;
    line-height: 1.3;
}

.rich-text h1:first-child, .rich-text h2:first-child,
.rich-text h3:first-child, .rich-text h4:first-child { margin-top: 0; }

.rich-text hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* Timeline items (experience / education) */
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.item-role {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.item-sub {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.95rem;
}

.item-duration {
    color: var(--text-faint);
    font-size: 0.85rem;
    white-space: nowrap;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.item-desc {
    color: var(--text-dim);
    margin-bottom: 14px;
}

.item-desc ul {
    list-style: none;
}

.item-desc li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
}

.item-desc li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.not-ortalamasi {
    font-weight: 700;
    color: var(--accent);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: var(--accent-soft-bg);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid var(--accent-soft-border);
}

/* Project filter pills */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.filter-pill.active {
    background: var(--invert-bg);
    color: var(--invert-text);
    border-color: var(--invert-bg);
}

/* Project grid + card */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text);
    position: relative;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: 0 24px 50px -24px var(--shadow-lg);
}

.project-cover {
    aspect-ratio: 16 / 10;
    position: relative;
    background: var(--bg-soft);
    overflow: hidden;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-cover img {
    transform: scale(1.05);
}

.project-cover.placeholder,
.app-hero-visual.placeholder,
.app-icon-wrap.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-soft-bg), transparent 70%), var(--bg-soft);
    color: var(--accent);
}

.project-cover.placeholder { font-size: 2.6rem; }

.project-year-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--accent);
    color: var(--accent-contrast);
}

.project-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.project-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--accent-soft-bg);
    color: var(--accent);
}

.project-title {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.35;
}

.project-tagline {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.project-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.project-desc ul {
    list-style: none;
}

.project-desc li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
}

.project-desc li::before {
    content: '·';
    position: absolute;
    left: 4px;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2em;
    line-height: 0.8;
}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 6px;
    flex-wrap: wrap;
}

.project-links a, .project-links span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-dim);
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.project-links a:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-faint);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all 0.25s ease;
}

.contact-btn:hover {
    transform: translateY(-4px);
    background: var(--surface-hover);
    border-color: var(--border-strong);
}

.btn-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Bu üç ikon, hizmetlerin kendi marka renkleriyle gösterilir (tanınabilirlik için) */
.icon-email { background: rgba(234, 67, 53, 0.15); color: #ea4335; }
.icon-linkedin { background: rgba(10, 102, 194, 0.15); color: #4098e7; }
.icon-github { background: var(--surface-hover); color: var(--text); }

.btn-content { flex: 1; min-width: 0; }

.btn-title {
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.btn-subtitle {
    font-size: 0.83rem;
    color: var(--text-faint);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0 50px;
    color: var(--text-faint);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 30px;
}

.footer a {
    color: var(--text-dim);
    text-decoration: none;
}

.footer a:hover {
    color: var(--text);
}

/* Reveal-on-scroll */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Breadcrumb */
.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-faint);
    font-size: 0.85rem;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.breadcrumb-trail a {
    color: var(--text-dim);
    text-decoration: none;
}

.breadcrumb-trail a:hover {
    color: var(--text);
}

/* Page header (used on projeler.php) */
.page-hero {
    padding: 64px 0 20px;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.page-hero p {
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ===== Proje detay (landing) sayfası ===== */
.app-hero {
    position: relative;
    padding: 64px 0 50px;
    overflow: hidden;
}

.app-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

@media (max-width: 860px) {
    .app-hero-grid { grid-template-columns: 1fr; }
}

.app-icon-wrap {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    overflow: hidden;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 22px;
    box-shadow: 0 20px 45px -20px var(--shadow-lg);
    border: 1px solid var(--border);
}

.app-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-hero h1 {
    font-size: clamp(1.8rem, 4.2vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    line-height: 1.2;
}

.app-tagline {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.app-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    align-items: center;
}

.app-cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.app-hero-visual {
    aspect-ratio: 16 / 11;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    box-shadow: 0 40px 80px -30px var(--shadow-lg);
}

.app-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-hero-visual.placeholder {
    font-size: 4rem;
}

/* Gallery */
.gallery-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-snap-type: x proximity;
}

.gallery-scroll::-webkit-scrollbar { height: 8px; }

.gallery-item {
    flex: 0 0 auto;
    width: min(78vw, 300px);
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    scroll-snap-align: start;
    background: var(--bg-soft);
    cursor: zoom-in;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox — görsel odaklı olduğu için tema fark etmeksizin her zaman koyu */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 10, 0.92);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 40px 20px;
}

.lightbox.open { display: flex; }

.lightbox img {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Related projects footer strip */
.related-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

/* Responsive */
@media (max-width: 640px) {
    .hero { padding: 70px 0 56px; }
    .item-header { flex-direction: column; }
    .card { padding: 20px; }
    .project-body { padding: 18px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 5px;
}
