/* ==========================================================================
   1. TEMEL AYARLAR VE DEĞİŞKENLER
   ========================================================================== */

   :root {
    /* Renkler */
    --color-primary: #667eea;
    --color-primary-dark: #5563c1;
    --color-bg: #1a1a1a;
    --color-bg-light: #232526;
    --color-bg-card: rgba(40, 40, 50, 0.95);
    --color-navbar-bg: rgba(20, 20, 20, 0.95);
    --color-text: #fff;
    --color-text-secondary: #e0e0e0;
    --color-success: #67ea8a;
    
    /* Font */
    --font-family-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Boşluklar ve Boyutlar */
    --navbar-height: 60px;
    --container-width: 1200px;
    --spacing-xs: 0.5rem;   /* 8px */
    --spacing-s: 1rem;      /* 16px */
    --spacing-m: 1.5rem;    /* 24px */
    --spacing-l: 2.5rem;    /* 40px */
    --spacing-xl: 5rem;     /* 80px */

    /* Diğer */
    --border-radius-s: 6px;
    --border-radius-m: 14px;
    --border-radius-l: 22px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(.77,0,.18,1);
    --box-shadow-soft: 0 2px 8px rgba(0,0,0,0.08);
    --box-shadow-medium: 0 4px 24px rgba(0,0,0,0.13);
    --box-shadow-primary: 0 8px 32px rgba(102,126,234,0.18);
}

/* Genel Reset ve Body Stilleri */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    height: 100%;
    font-family: var(--font-family-base);
    background: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

section {
    opacity: 0;
    transform: translateY(50px);
    /* JS ile scroll animasyonu için başlangıç durumu */
}


/* ==========================================================================
   2. YARDIMCI SINIFLAR (UTILITIES)
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}


/* ==========================================================================
   3. BİLEŞENLER (COMPONENTS)
   ========================================================================== */

/* Navbar */
.navbar {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--color-navbar-bg);
    box-shadow: var(--box-shadow-soft);
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 1px 1px 8px #222;
}

.menu {
    display: flex;
    gap: 2rem;
}

.menu a {
    font-size: 1.1rem;
    padding: 8px 18px;
    border-radius: var(--border-radius-s);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.menu a:hover, .menu a:focus {
    background: var(--color-primary);
    color: var(--color-text);
}

.menu-toggle {
    display: none; /* Varsayılan olarak gizli */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 28px;
    height: 4px;
    background: var(--color-text);
    margin: 4px 0;
    border-radius: 2px;
    transition: var(--transition-normal);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding-top: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    margin-bottom: var(--spacing-l);
}

.hero-content h1 {
    font-size: 3.2em;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: 1px;
}

.hero-content .highlight {
    color: var(--color-primary);
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: var(--color-text-secondary);
}

.cta-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--color-primary);
    color: var(--color-text);
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 500;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(102,126,234,0.15);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.cta-btn:hover, .cta-btn:focus {
    background: var(--color-primary-dark);
    transform: translateY(-2px) scale(1.04);
}

/* Genel Section Stilleri */
.section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    padding: var(--spacing-xl) 20px;
    position: relative;
    overflow: hidden;
}

.section-content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 2.8em;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-l);
    letter-spacing: 1px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-primary);
    margin: 18px auto 0 auto;
    border-radius: 2px;
}

/* Kartlar (Card Components) */
.about-card {
    display: flex;
    align-items: center;
    background: var(--color-bg-card);
    border-radius: var(--border-radius-l);
    box-shadow: var(--box-shadow-medium);
    padding: 36px 32px;
    gap: 36px;
    max-width: 700px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.profile-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-primary);
    box-shadow: 0 2px 12px rgba(102,126,234,0.13);
}

.about-text {
    flex: 1;
    color: var(--color-text-secondary);
    font-size: 1.15em;
    line-height: 1.7;
    min-width: 220px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 28px;
    margin-bottom: var(--spacing-l);
    width: 100%;
}

.project-card {
    background: linear-gradient(120deg, rgba(102,126,234,0.18) 0%, rgba(144,238,144,0.18) 100%);
    border-radius: var(--border-radius-m);
    box-shadow: var(--box-shadow-soft);
    padding: 28px 22px;
    transition: transform 0.18s, box-shadow 0.18s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.project-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: var(--box-shadow-primary);
}

.project-card h3 {
    font-size: 1.3em;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.project-card p {
    color: var(--color-text-secondary);
    font-size: 1em;
    line-height: 1.5;
    flex-grow: 1; /* Paragrafın kalan alanı doldurmasını sağlar */
}

.project-card .project-underline {
    height: 3px;
    background: linear-gradient(to right, #667eea, #764ba2);
    margin-top: 15px;
    width: 100%;
    border-radius: 2px;
    transform: scaleX(0.7);
    transition: transform 0.3s;
}

.project-card:hover .project-underline {
    transform: scaleX(1);
}

.contact-card {
    width: 100%;
    max-width: 700px;
    margin-top: var(--spacing-l);
    padding: 28px 32px;
    border-radius: var(--border-radius-l);
    background: linear-gradient(120deg, rgba(102,126,234,0.18) 0%, rgba(144,238,144,0.18) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 32px rgba(102,126,234,0.13);
    border: 1.5px solid rgba(102,126,234,0.13);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

/* Diğer Bileşenler */
.archived-toggle {
    cursor: pointer;
    background: rgba(102,126,234,0.18);
    border: none;
    border-radius: 8px;
    color: var(--color-text);
    font-size: 1.2em;
    font-weight: 600;
    width: 100%;
    margin: var(--spacing-l) 0 var(--spacing-s) 0;
    padding: var(--spacing-s) 0;
    transition: background var(--transition-fast), color var(--transition-fast);
    box-shadow: 0 1px 8px rgba(102,126,234,0.10);
}
.archived-toggle:hover, .archived-toggle:focus {
    background: var(--color-primary);
}
.archived-projects-list {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(.77,0,.18,1), opacity 0.4s, padding 0.3s;
}
.archived-projects-list.open {
    max-height: 2000px; /* İçerik yüksekliğinden fazla bir değer */
    opacity: 1;
    padding: 12px 0;
}
.archived-arrow {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
    transition: transform var(--transition-normal);
    animation: archived-arrow-bounce 1.2s infinite alternate;
}
.archived-toggle.active .archived-arrow {
    transform: rotate(180deg);
    animation: none;
}

.contact-icons {
    display: flex;
    gap: 18px;
}

.contact-icon {
    color: var(--color-primary);
    background: rgba(255,255,255,0.10);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 1.2em;
    border: none;
    cursor: pointer;
    box-shadow: var(--box-shadow-soft);
}
.contact-icon:hover, .contact-icon:focus {
    background: var(--color-primary);
    color: var(--color-text);
    transform: scale(1.10);
    box-shadow: 0 4px 16px rgba(102,126,234,0.18);
}

.contact-email-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.contact-email {
    color: var(--color-text-secondary);
    font-size: 1.1em;
    background: rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 8px 16px;
    transition: background var(--transition-fast), color var(--transition-fast);
    cursor: pointer;
}
.contact-email:hover, .contact-email:focus {
    background: var(--color-primary);
    color: var(--color-text);
}
.copy-success-popup {
    position: absolute;
    top: -44px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg-light);
    color: var(--color-success);
    padding: 6px 18px;
    border-radius: 8px;
    font-size: 1em;
    box-shadow: var(--box-shadow-medium);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, top 0.25s;
    z-index: 10;
}
.copy-success-popup.active {
    opacity: 1;
}

/* ==========================================================================
   4. BÖLÜM ÖZEL STİLLERİ VE EFEKTLER
   ========================================================================== */

/* Bölüm Arka Planları */
#hero, #about {
    background: linear-gradient(120deg, #232526 0%, #414345 100%);
}
#projects {
    background: linear-gradient(120deg, #232526 0%, var(--color-primary) 100%);
}

/* Parçacık Efektleri Konteynerleri */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1; /* İçeriğin arkasında kalır */
}

/* Kar Taneleri */
.snowflake {
    position: absolute;
    top: -10px;
    width: 20px;
    height: 20px;
    background: url('assets/snow.png') no-repeat center center / contain;
    animation: snow-fall linear infinite;
}

/* Sakura Yaprakları */
.sakura {
    position: absolute;
    top: -10px;
    background: url('assets/sakuraleaf.png') no-repeat center center / contain;
    opacity: 0.7;
    animation: sakura-fall linear infinite;
}

/* Sonbahar Yaprakları */
.leaf {
    position: absolute;
    top: -10px;
    width: 30px;
    height: 30px;
    background: url('assets/leaf.png') no-repeat center center / contain;
    opacity: 0.8;
    animation: fall linear infinite;
}


/* ==========================================================================
   5. ANİMASYONLAR (KEYFRAMES)
   ========================================================================== */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@keyframes snow-fall {
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

@keyframes sakura-fall {
    50% { transform: translateY(50vh) rotate(180deg) scale(0.9); opacity: 0.8; }
    100% { transform: translateY(100vh) rotate(360deg) scale(1); opacity: 0; }
}

@keyframes fall {
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

@keyframes archived-arrow-bounce {
    100% { transform: translateY(6px) rotate(0deg); }
}


/* ==========================================================================
   6. RESPONSIVE TASARIM (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 900px) {
    .nav-container { padding: 0.7rem 1rem; }
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5em; }
    .hero-content p { font-size: 1.1em; }
    .section-title { font-size: 2.2em; }
    .about-card { flex-direction: column; padding: 24px; gap: 18px; }
    .profile-img { width: 120px; height: 120px; }
    .contact-card { flex-direction: column; gap: 18px; padding: 22px; }
}

@media (max-width: 700px) {
    .menu-toggle { display: flex; }
    .menu {
        position: fixed;
        top: var(--navbar-height);
        right: 0;
        background: rgba(20,20,20,0.98);
        flex-direction: column;
        width: 100vw;
        height: calc(100vh - var(--navbar-height));
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        z-index: 999;
    }
    .menu.open-menu {
        transform: translateX(0);
    }
    .cta-btn { font-size: 1em; padding: 10px 22px; }
    .projects-grid { gap: 14px; }
    .project-card { padding: 16px; min-height: 160px; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero-content h1 { font-size: 2.1em; }
    .hero-content p { font-size: 1em; }
    .section-title { font-size: 2em; }
}