/* ─── Tema değişkenleri ─── */
:root {
    --accent:        #4fc3f7;
    --accent-dim:    rgba(79, 195, 247, 0.12);
    --accent-border: rgba(79, 195, 247, 0.25);
}

[data-theme="dark"] {
    --bg-page:    #0d1117;
    --bg-surface: #0d1117;
    --bg-card:    rgba(255, 255, 255, 0.03);
    --border:     rgba(255, 255, 255, 0.08);
    --border-mid: rgba(255, 255, 255, 0.12);
    --text-1:     #e6edf3;
    --text-2:     rgba(230, 237, 243, 0.55);
    --text-3:     rgba(230, 237, 243, 0.35);
    --nav-bg:     rgba(13, 17, 23, 0.85);
    --grid-line:  rgba(79, 195, 247, 0.04);
    --section-alt:#0d1117;
}

[data-theme="light"] {
    --bg-page:    #f5f7fa;
    --bg-surface: #ffffff;
    --bg-card:    #ffffff;
    --border:     #dde2ea;
    --border-mid: #cdd3de;
    --text-1:     #0f1623;
    --text-2:     #5a6580;
    --text-3:     #9aa3b5;
    --nav-bg:     rgba(255, 255, 255, 0.9);
    --grid-line:  rgba(21, 101, 192, 0.05);
    --section-alt:#f5f7fa;
    --accent:        #1565c0;
    --accent-dim:    rgba(21, 101, 192, 0.07);
    --accent-border: rgba(21, 101, 192, 0.25);
}

/* ─── Reset & base ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    background: var(--bg-page);
    color: var(--text-1);
    transition: background 0.3s, color 0.3s;
}

/* ─── Nav ─── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 2.5rem;
    background: var(--nav-bg);
    border-bottom: 0.5px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-decoration: none;
}

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

.nav-links a {
    font-size: 13px;
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

/* Tema toggle butonu */
.theme-toggle {
    background: none;
    border: 0.5px solid var(--border-mid);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--text-2);
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── Hero ─── */
.hero {
    position: relative;
    padding: 6rem 2.5rem 4rem;
    background: var(--bg-surface);
    border-bottom: 0.5px solid var(--border);
    overflow: hidden;
}

.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.hero-inner { position: relative; max-width: 700px; }

.hero-tag {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    opacity: 0.8;
}

.hero-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1.1rem;
}

.hero-title span { color: var(--accent); }

.hero-sub {
    font-size: 15px;
    color: var(--text-2);
    max-width: 480px;
    margin-bottom: 2rem;
}

.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
    background: var(--accent);
    color: #0d1117;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.85; }

[data-theme="light"] .btn-primary { color: #ffffff; }

.btn-secondary {
    background: transparent;
    color: var(--accent);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 13px;
    border: 0.5px solid var(--accent-border);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-secondary:hover { background: var(--accent-dim); }

.hero-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 0.5px solid var(--border);
}

.stat-val {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 500;
    color: var(--accent);
}

.stat-lbl {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}

/* ─── Bölümler ─── */
section {
    padding: 3.5rem 2.5rem;
    border-bottom: 0.5px solid var(--border);
    background: var(--bg-surface);
}

section.alt { background: var(--section-alt); }

.section-tag {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--accent);
    opacity: 0.6;
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}

.section-title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 2rem;
}

/* ─── Proje kartları ─── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.project-card {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.project-card:hover {
    border-color: var(--accent-border);
    transform: translateY(-2px);
}

.card-badge {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.75rem;
    letter-spacing: 0.06em;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.card-desc {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.6;
}

/* ─── Simülasyon ─── */
.sim-preview {
    background: var(--accent-dim);
    border: 0.5px solid var(--accent-border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
}

.sim-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 1.2rem;
}

.sim-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-border);
}

.sim-dot.active { background: var(--accent); }

.sim-label {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--accent);
    opacity: 0.7;
    margin-bottom: 0.6rem;
    letter-spacing: 0.08em;
}

.sim-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.sim-desc {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 1.5rem;
}

/* Godot WASM container — simülasyon yüklendiğinde kullanılır */
.sim-canvas-wrapper {
    display: none; /* js ile gösterilecek */
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.sim-canvas-wrapper canvas { width: 100%; height: 100%; display: block; }

.btn-sim {
    background: var(--accent-dim);
    border: 0.5px solid var(--accent-border);
    color: var(--accent);
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: background 0.2s;
}

.btn-sim:hover { background: rgba(79, 195, 247, 0.18); }

/* ─── Yetenekler ─── */
.skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-pill {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--text-2);
    border: 0.5px solid var(--border-mid);
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--bg-card);
    transition: border-color 0.2s, color 0.2s;
}

.skill-pill:hover {
    border-color: var(--accent-border);
    color: var(--accent);
}

/* ─── Hakkımda ─── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } }

.about-text { font-size: 14px; color: var(--text-2); line-height: 1.8; }
.about-text p + p { margin-top: 1rem; }

.about-links { display: flex; flex-direction: column; gap: 10px; }

.about-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-2);
    text-decoration: none;
    padding: 10px 14px;
    border: 0.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    transition: border-color 0.2s, color 0.2s;
}

.about-link:hover {
    border-color: var(--accent-border);
    color: var(--accent);
}

.about-link-icon {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--accent);
    min-width: 24px;
}

/* ─── İletişim ─── */
.contact-form {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-form input,
.contact-form textarea {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-1);
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-border);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-3); }

/* ─── Footer ─── */
footer {
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--bg-surface);
}

.footer-copy {
    font-size: 12px;
    color: var(--text-3);
    font-family: 'Courier New', monospace;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    font-size: 12px;
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ─── Responsive ─── */
@media (max-width: 600px) {
    nav { padding: 1rem 1.2rem; }
    .hero, section { padding-left: 1.2rem; padding-right: 1.2rem; }
    .nav-links { gap: 1rem; }
    footer { padding: 1.2rem; }
}