/* Hero Section */
.hero-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px; /* Increased gap between cta-group/content and visual */
    width: 100%;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 255, 65, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.cta-group {
    margin-top: 30px;
}

.greeting {
    color: var(--accent-color);
    font-family: var(--font-mono);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.glitch-text {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    position: relative;
    color: #fff;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.subtitle {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 40px;
    max-width: 600px;
}

.btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--accent-color);
    color: #000;
    font-weight: 700;
    margin-right: 20px;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    font-weight: 700;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Hero Visual Code Block */
.profile-code-visual {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent-color);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    max-width: 100%;
    overflow-x: auto;
}

.profile-code-visual pre {
    margin: 0;
}

.profile-code-visual code {
    font-family: var(--font-mono);
    color: #ccc;
    font-size: 0.9rem;
}

/* Services Grid */
.services-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

.services-grid {
    display: grid;
    /* Maksimum 5 sütun, her biri eşit genişlikte, ekran küçülürse alta kayar */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    /* Eğer tek satırda 5 tane sığmıyorsa sığdığı kadarını koyar, ama genişlemez */
    grid-template-columns: repeat(3, 1fr); /* Başlangıçta 3'lü yapı varsayalım, ama kullanıcı 5 tane istiyor */
}

/* Kullanıcının isteği: Kartlar genişlemeyecek, sabit boyutlu olacak. 
   Maksimum 5 tane yan yana olabilir dediği için, ekran genişliğine göre responsive davranmalı 
   ama az sayıda eleman varken (örn: 1 tane) tüm satırı kaplamamalı. */

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns by default */
    gap: 30px;
    margin-bottom: 40px;
}

.service-card {
    background-color: var(--bg-color);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%; /* Equal height */
    display: flex;
    flex-direction: column;
}

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}

.service-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 25px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: #aaa;
    line-height: 1.6;
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
    transition: var(--transition);
}

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

.project-image {
    height: 200px;
    background-color: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: #444;
}

.project-image i {
    color: var(--accent-color);
    opacity: 0.8;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-content p {
    color: #aaa;
    margin-bottom: 20px;
}

.link-arrow {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.link-arrow:hover {
    gap: 10px;
}

/* Latest Posts */
.latest-posts-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.latest-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 1200px) {
    .latest-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Blog Card Styles for Home Page */
.blog-card {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
    height: 450px; /* Fixed height */
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

.card-image {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .card-image img {
    transform: scale(1.1);
}

.category-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-color);
    color: #000;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.meta-date {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.card-content h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-content h2 a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.card-content h2 a:hover {
    color: var(--accent-color);
}

.card-content p {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.read-more {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: auto;
    display: inline-block;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* Certificates Section */
.certificates-section {
    padding: 100px 0;
}

.certificates-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center; /* Ortalar */
}

.cert-card {
    background-color: var(--bg-secondary);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: var(--transition);
    width: 300px; /* Sabit genişlik */
    flex: 0 0 300px; /* Genişlemeyi ve daralmayı engelle */
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.cert-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.cert-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.cert-card p {
    color: #aaa;
    font-size: 0.9rem;
}

/* Responsive adjustments for certificates */
@media (max-width: 768px) {
    .cert-card {
        width: 100%; /* Mobilde tam genişlik */
        flex: 0 0 100%;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }

    .hero-section .container {
        flex-direction: column-reverse;
        gap: 40px;
    }
    
    .glitch-text {
        font-size: 2.5rem;
    }
    
    .subtitle {
        margin: 0 auto 30px;
    }

    /* Mobile Buttons Fix */
    .cta-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0 20px;
    }

    .btn-primary {
        margin-right: 0;
        margin-bottom: 25px; /* Added explicit margin for spacing */
        width: 100%;
        max-width: 350px;
        text-align: center;
    }

    .btn-secondary {
        width: 100%;
        max-width: 350px;
        text-align: center;
    }
}

/* BLOG CARD STYLES (Copied from blog.css for index.php) */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
    height: 500px; /* Fixed height for equal size */
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

.card-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .card-image img {
    transform: scale(1.1);
}

.category-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-color);
    color: #000;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.meta-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.card-content h2 a {
    color: #fff;
    transition: color 0.3s;
    text-decoration: none;
}

.card-content h2 a:hover {
    color: var(--accent-color);
}

.card-content p {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.read-more {
    color: var(--secondary-accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
    display: inline-block;
    text-decoration: none;
}

.read-more:hover {
    color: var(--accent-color);
}

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