/* Modern Academic Design System */
:root {
    --bg-primary: #0f172a;
    /* Slate 900 */
    --bg-secondary: #1e293b;
    /* Slate 800 */
    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #94a3b8;
    /* Slate 400 */
    --accent-color: #38bdf8;
    /* Sky 400 - Modern & Trustworthy */
    --accent-glow: rgba(56, 189, 248, 0.3);
    --gold: #fbbf24;
    /* Amber 400 - Academic Excellence */

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.3s ease;
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, var(--text-primary), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 400px;
    padding: 100px 20px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Background Effects */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.1), transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
}

.hero-content {
    flex: 1;
    padding-right: 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 50px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.hero h1 span {
    font-size: 1.2rem;
    margin-top: 5px;
}

.hero p {
    font-size: 0.8rem;
    max-width: 700px;
    /* Metnin çok yayılmasını önlemek için */
    margin: 0 auto 25px;
    line-height: 1.5;
}

.cta-group {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-color);
    color: var(--bg-primary);
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--glass-border);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--bg-secondary), var(--bg-primary));
    padding: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.image-wrapper::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-color), transparent, var(--gold));
    z-index: -1;
    animation: spin 10s linear infinite;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: var(--transition);
}

.image-wrapper:hover img {
    filter: grayscale(0%);
    transform: scale(1.02);
}

/* Stats Section */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: -30px auto 0;
    position: relative;
    z-index: 2;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 10px;
    box-shadow: var(--card-shadow);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 2px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* About Section */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
}

.section-subtitle {
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 10px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.skill-tag {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: var(--transition);
}

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

/* Publications/Work Section */
.works {
    background: var(--bg-secondary);
    width: 100%;
    /* Sayfa genişliğini tam kaplasın */
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Başlığı ve Grid'i merkeze hizalar */
}

.work-grid {
    display: grid;
    /* Kartların genişliğini dengeli tutar */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    /* BURADAKİ 100px HATASINI 1200px YAPTIK */
    max-width: 1200px;
    /* Kartların kendi içinde ortalanmasını sağlar */
    justify-content: center;
    margin: 40px auto 0;
    /* Yatayda dış boşlukla ortalama */
}

.work-card {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.work-card:hover {
    transform: translateY(-10px);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.work-icon {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.work-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.work-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.read-more {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 10px;
}

/* Footer */
footer {
    padding: 60px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
    transform: scale(1.1);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 120px;
        justify-content: center;
    }

    .hero-content {
        padding-right: 0;
        margin-top: 40px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .cta-group {
        justify-content: center;
    }

    .image-wrapper {
        width: 280px;
        height: 280px;
    }

    .nav-links {
        display: none;
        /* Add JS toggle later */
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .about {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .skill-tags {
        justify-content: center;
    }
}

/* Announcements Section Styles */
.announcements {
    padding: 60px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.announcement-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.announcement-item {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--text-secondary);
    transition: var(--transition);
    border: var(--glass-border);
}

.announcement-item:hover {
    transform: translateX(10px);
    border-left-color: var(--accent-color);
    background: rgba(30, 41, 59, 0.9);
}

.announcement-item.featured {
    border-left-color: var(--gold);
    background: rgba(251, 191, 36, 0.05);
}

.announcement-date {
    min-width: 80px;
    text-align: center;
    padding-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 20px;
}

.announcement-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
}

.announcement-date .month {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.announcement-content h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.announcement-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Mobil Uyumluluk */
@media (max-width: 600px) {
    .announcement-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .announcement-date {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        text-align: left;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
}

.announcement-content h3 a:hover {
    color: var(--accent-color) !important;
    transition: var(--transition);
}

/* Course Materials Page Styles */
.page-header {
    padding-top: 150px;
    padding-bottom: 50px;
    text-align: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 1) 0%, rgba(30, 41, 59, 1) 100%);
}

.course-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.course-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.course-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.course-title {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.materials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

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

.material-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.material-list {
    list-style: none;
}

.material-list li {
    margin-bottom: 12px;
}

.material-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: var(--transition);
}

.material-link:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    border-color: rgba(56, 189, 248, 0.2);
    transform: translateX(5px);
}

.material-link i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.video-link i {
    color: #ef4444;
    /* Red for YouTube/Video */
}

.doc-link i {
    color: #3b82f6;
    /* Blue for files */
}

/* --- Accordion / Açılır Menü Stilleri --- */

.course-title {
    cursor: pointer;
    /* Tıklanabilir olduğunu gösterir */
    position: relative;
    display: flex;
    justify-content: space-between;
    /* İkonu en sağa itmek için */
    align-items: center;
    transition: var(--transition);
}

.course-title:hover {
    color: var(--text-primary);
    /* Hover durumunda renk değişimi */
}

/* Sağ tarafa otomatik ok ikonu ekleme */
.course-title::after {
    content: '\f078';
    /* FontAwesome aşağı ok ikonu */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: transform 0.4s ease;
}

/* Tıklandığında ok işaretini döndür */
.course-title.active::after {
    transform: rotate(180deg);
    color: var(--accent-color);
}

/* Ders Materyalleri Alanı - Başlangıçta Kapalı */
.materials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    /* Kapalıyken gap sorun çıkarmasın diye 0 */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s ease-in-out;
    padding-top: 0;
    /* Padding animasyonu bozmasın diye sıfırlıyoruz */
}

/* Force visibility for Boutique Software page */
.materials-grid.always-visible {
    max-height: none;
    overflow: visible;
    gap: 30px;
    opacity: 1;
}

/* Açık Durum */
.materials-grid.active {
    opacity: 1;
    gap: 30px;
    /* Orijinal gap değerini geri getiriyoruz */
    padding-top: 20px;
    /* İçerik ile başlık arasına biraz boşluk */
    /* max-height JS ile dinamik verilecek */
}

/* Mobilde tek sütun kuralını koruyalım */
@media (max-width: 768px) {
    .materials-grid {
        grid-template-columns: 1fr;
    }
}

/* Ana Konteyner Ayarları */
.course-container {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Grid (Izgara) Yapısı - Kartları yan yana dizer */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Kart Tasarımı */
.course-card {
    background: rgba(255, 255, 255, 0.05);
    /* Hafif şeffaf beyaz arka plan */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* İnce kenarlık */
    border-radius: 16px;
    /* Yuvarlatılmış köşeler */
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(56, 189, 248, 0.5);
    /* Hover olunca mavi kenarlık */
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Başlık Stili */
.course-title {
    color: #fff;
    /* Beyaz yazı */
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-title i {
    color: #38bdf8;
    /* Mavi ikon rengi */
}

/* Etiketler (Python, Streamlit vb.) */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Buton/Link Tasarımı */
.material-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
    /* Butonu her zaman en alta iter */
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.material-link:hover {
    background: rgba(56, 189, 248, 0.2) !important;
}