/* --- TEMEL AYARLAR & DEĞİŞKENLER --- */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #60a5fa;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f3f4f6;
    --bg-dark: #111827;
    --gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --container: 1100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 80px; 
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;  
    }
}

body {
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* iOS Safari: input zoom fix */
input, textarea, select, button {
    font-size: 16px;
}

button, a, .btn {
    touch-action: manipulation;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

::selection { background: var(--primary); color: white; }

/* --- YARDIMCI SINIFLAR --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    will-change: opacity, transform;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.bg-light { background: var(--bg-light); }
.bg-dark { background: var(--bg-dark); color: white; }
.text-white { color: white !important; }

.section-title {
    font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    margin: 10px auto 0;
    border-radius: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.mt-3 { margin-top: 1.5rem; }

/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: height 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header.scrolled {
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span { color: var(--primary); }

nav { display: flex; gap: 2rem; }

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    transition: 0.3s;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: 0.3s;
}

nav a:hover, nav a.active { color: var(--primary); }
nav a:hover::after, nav a.active::after { width: 100%; }

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-toggle:hover { background: rgba(37, 99, 235, 0.08); }

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 110px 5% 60px;
    padding-top: calc(72px + 40px);
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgb(243, 244, 246) 0%, rgb(255, 255, 255) 90%);
}

.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    max-width: var(--container);
    margin: 0 auto;
    width: 100%;
    z-index: 1;
    align-items: center;
}

.hero-text .badge {
    background: #dbeafe;
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-text h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-text h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-wrapper {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-light);
    margin-bottom: 1.5rem;
    min-height: 32px;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--primary);
}

@keyframes blink { 50% { opacity: 0; } }

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-icons a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    text-decoration: none;
    transition: 0.3s;
    font-size: 1.2rem;
    border: 1px solid #e5e7eb;
}

.social-icons a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.profile-card-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.profile-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid white;
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    width: 320px;
    transform: rotate(3deg);
    transition: 0.5s;
}

.profile-card:hover { transform: rotate(0); }

.profile-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.float-badge {
    position: absolute;
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}

.badge-1 { top: 20px; left: -20px; color: #68217a; }
.badge-2 { bottom: 40px; right: -30px; animation-delay: 1.5s; color: #e11d48; }
.badge-3 {
    bottom: -20px;
    left: 20px;
    background: linear-gradient(135deg, #ffb800, #ff8c00);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.35);
    animation-delay: 0.8s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- HAKKIMDA --- */
.about-wrapper {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* --- YETENEKLER --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
    border: 1px solid #e5e7eb;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.card-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.skill-item { margin-bottom: 1rem; }

.skill-item span {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--gradient);
    width: 0;
    transition: width 1.5s ease-out;
}

/* --- DENEYİM (TIMELINE) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -35px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-content h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.timeline-content p { color: var(--text-light); }

/* --- PROJELER --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.project-card:hover .project-img img { transform: scale(1.1); }

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: 0.3s;
}

.project-card:hover .overlay { opacity: 1; }

.icon-btn {
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    transition: 0.3s;
}

.icon-btn:hover { transform: scale(1.1); }

.project-info { padding: 1.5rem; }
.project-info h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.project-info p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 1rem; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tags span {
    background: #eff6ff;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* --- İLETİŞİM --- */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: 0.3s;
    background: #f9fafb;
}

.input-group textarea { min-height: 120px; resize: vertical; }

.input-group label {
    position: absolute;
    left: 45px;
    top: 14px;
    color: var(--text-light);
    transition: 0.3s;
    pointer-events: none;
    font-size: 0.95rem;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 15px;
    color: var(--text-light);
    transition: 0.3s;
}

.input-group input:focus, .input-group textarea:focus,
.input-group input:valid, .input-group textarea:valid {
    border-color: var(--primary);
    background: white;
    outline: none;
}

.input-group input:focus + label, .input-group textarea:focus + label,
.input-group input:valid + label, .input-group textarea:valid + label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    background: white;
    padding: 0 5px;
    color: var(--primary);
    font-weight: 600;
}

.input-group input:focus ~ .input-icon,
.input-group input:valid ~ .input-icon {
    color: var(--primary);
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    margin-top: 2rem;
}

.contact-info .social-icons {
    width: 100%;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-info p { color: #9ca3af; margin-bottom: 0.5rem; }
.mail-link { color: var(--accent); font-size: 1.2rem; text-decoration: none; font-weight: 700; }

/* --- MODAL --- */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: black;
    padding: 5px;
    border-radius: 10px;
    position: relative;
    width: 100%;
    max-width: 1000px;
    animation: zoomIn 0.3s;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px 15px;
}

.video-container video { width: 100%; border-radius: 5px; display: block; }

@keyframes zoomIn { from {transform: scale(0.8); opacity: 0;} to {transform: scale(1); opacity: 1;} }

/* --- TOAST & LOADER --- */
#toast {
    visibility: hidden;
    min-width: 250px;
    max-width: 90vw;
    background-color: #10b981;
    color: white;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    font-weight: 600;
    font-size: 0.95rem;
}

#toast.show { visibility: visible; animation: fadein 0.5s, fadeout 0.5s 2.5s; }

#preloader {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }
@keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} }

/* --- FOOTER --- */
footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 2rem 1rem;
    border-top: 1px solid #1e293b;
    font-size: 0.9rem;
}

/* ================================
   RESPONSIVE — TABLET (max 968px)
   ================================ */
@media (max-width: 968px) {
    .section { padding: 80px 0; }

        .hero {
        padding-top: 120px;
        padding-bottom: 60px;
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-text h1 {
        font-size: 2rem;
        line-height: 1.15;
        margin-bottom: 0.8rem;
    }

    .hero-text p { max-width: 100%; margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .social-icons { justify-content: center; }

    .profile-card-wrapper { margin-top: 20px; }

    .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ================================
   RESPONSIVE — MOBIL (max 768px)
   ================================ */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .section { padding: 60px 0; }

        header {
        height: 64px;
        padding: 0 4%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    header.scrolled { height: 56px; }

    .logo { font-size: 1.5rem; }

    .mobile-toggle { display: block; }

    nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: var(--shadow-md);
        clip-path: circle(0% at 100% 0);
        transition: 0.5s ease-in-out;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        z-index: 999;
    }

    .hero {
        padding-top: calc(64px + 30px);
        padding-bottom: 40px;
        min-height: auto;
    }

    .hero-text .badge {
        font-size: 0.72rem;
        padding: 5px 12px;
        margin-bottom: 0.8rem;
    }

    .hero-text h1 { font-size: 2.2rem; }

    .typing-wrapper {
        font-size: 1.05rem;
        min-height: 24px;
        margin-bottom: 1.2rem;
    }

    .hero-text p {
        font-size: 0.95rem;
        line-height: 1.55;
        margin-bottom: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .social-icons {
        gap: 10px;
        margin-top: 30px;
    }

    .social-icons a {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .profile-card {
        width: 260px;
        padding: 1.5rem;
    }

    .profile-img { height: 240px; margin-bottom: 1rem; }
    .profile-info h3 { font-size: 1.1rem; }
    .profile-info p { font-size: 0.9rem; }
    .profile-info small { font-size: 0.75rem; }

    .float-badge {
        padding: 7px 12px;
        font-size: 0.72rem;
        gap: 5px;
    }
    .badge-1 { top: 8px; left: -5px; }
    .badge-2 { bottom: 25px; right: -10px; }
    .badge-3 { bottom: -12px; left: 10px; }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .about-text p { font-size: 1rem; }

    .skills-grid { gap: 1.2rem; }
    .skill-card { padding: 1.5rem; }
    .card-icon { font-size: 1.6rem; }
    .skill-item span { font-size: 0.85rem; }

    .timeline { padding-left: 25px; }
    .timeline-item { margin-bottom: 2rem; }
    .timeline-dot { left: -30px; width: 10px; height: 10px; }
    .timeline-date { font-size: 0.8rem; }
    .timeline-content h3 { font-size: 1.1rem; }
    .timeline-content p { font-size: 0.92rem; }

    .projects-grid { gap: 1.5rem; }
    .project-img { height: 180px; }
    .project-info { padding: 1.2rem; }
    .project-info h3 { font-size: 1.05rem; }
    .project-info p { font-size: 0.9rem; }
    .tags span { font-size: 0.72rem; padding: 3px 10px; }

    .contact-form { padding: 1.8rem 1.2rem; }
    .input-group input, .input-group textarea {
        font-size: 16px;
        padding: 12px 15px 12px 42px;
    }
    .input-group label { font-size: 0.9rem; left: 42px; }
    .mail-link { font-size: 1rem; word-break: break-all; }

    footer { padding: 1.5rem 1rem; font-size: 0.82rem; }

    .modal-content { width: 95%; }
    .close-modal { top: -35px; font-size: 1.8rem; }
}

/* ================================
   RESPONSIVE — KÜÇÜK MOBIL (max 400px)
   ================================ */
@media (max-width: 400px) {
    .hero-text h1 { font-size: 1.9rem; }
    .section-title { font-size: 1.5rem; }
    .badge { font-size: 0.7rem !important; padding: 3px 10px !important; }

    .profile-card { width: 230px; padding: 1.2rem; }
    .profile-img { height: 200px; }
    .float-badge { font-size: 0.65rem; padding: 6px 10px; }

    .social-icons a { width: 38px; height: 38px; font-size: 0.9rem; }

    .project-img { height: 160px; }
}