:root {
    --primary-color: #6c5ce7;
    --secondary-color: #fd79a8;
    --dark-bg: #0d1117;
    --dark-card: #161b22;
    --dark-border: #21262d;
    --text-light: #f0f6fc;
    --text-muted: #c9d1d9;
    --gradient: linear-gradient(135deg, #6c5ce7, #fd79a8);
    --gradient-hover: linear-gradient(135deg, #5f3dc4, #e84393);
    --shadow: 0 8px 32px rgba(108, 92, 231, 0.1);
    --shadow-hover: 0 12px 48px rgba(108, 92, 231, 0.2);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden;
    font-weight: 300;
}

/* Improved text contrast for better readability */
p, .text-muted {
    color: var(--text-muted) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-light) !important;
    font-weight: 400;
}

.lead {
    color: var(--text-light) !important;
    font-weight: 400;
    opacity: 0.9;
}

/* Better contrast for specific elements */
.project-desc, .product-description {
    color: var(--text-light) !important;
    opacity: 0.85;
}

.project-date {
    color: var(--text-light) !important;
    opacity: 0.75;
}

.no-content-text {
    color: var(--text-light) !important;
    opacity: 0.8;
}

.cta-text {
    color: var(--text-light) !important;
    opacity: 0.9;
}

.stat-label {
    color: var(--text-light) !important;
    opacity: 0.85;
}

/* Service card text improvements */
.service-card p {
    color: var(--text-light) !important;
    opacity: 0.85;
}

.dark-theme {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

.content-wrapper {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.bg-dark-custom {
    background-color: var(--dark-card) !important;
    border-bottom: 1px solid var(--dark-border);
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.btn-gradient {
    background: var(--gradient);
    border: none;
    color: white;
    font-weight: 300;
    padding: 6px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.85rem;
}

.btn-gradient:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: white;
}

.btn-outline-gradient {
    background: transparent;
    border: 2px solid;
    border-image: var(--gradient) 1;
    color: var(--primary-color);
    font-weight: 300;
    padding: 4px 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.85rem;
}

.btn-outline-gradient:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
}

.card-custom {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 15px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(108, 92, 231, 0.1) 0%, transparent 70%);
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.hero-buttons .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.hero-image {
    position: relative;
    text-align: center;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 100%;
    height: auto;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 4px;
    background: var(--gradient);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.service-card {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

.project-card {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links a {
    background: var(--gradient);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-links a:hover {
    transform: scale(1.1);
}

.product-card {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.product-content {
    padding: 20px;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-description {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.product-links {
    display: flex;
    gap: 10px;
}

.product-links .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 8px 16px;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--text-light);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    background: var(--gradient);
    color: white;
}

.footer-section {
    margin-top: 80px;
    border-top: 1px solid var(--dark-border);
}

.footer-desc {
    color: var(--text-light) !important;
    opacity: 0.85;
    line-height: 1.6;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
    opacity: 1;
}

.footer-address {
    color: var(--text-light);
    opacity: 0.8;
}

.footer-copyright {
    color: var(--text-light) !important;
    opacity: 0.8;
}

.footer-dev-text {
    color: var(--text-light) !important;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--dark-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stats-section {
    padding: 80px 0;
    background: rgba(108, 92, 231, 0.05);
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light) !important;
    margin-top: 10px;
    opacity: 0.85;
}

.contact-form {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 15px;
    padding: 40px;
}

.form-control {
    background-color: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    color: var(--text-light);
    padding: 12px 20px;
    margin-bottom: 20px;
}

.form-control:focus {
    background-color: var(--dark-bg);
    border-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section {
        min-height: 80vh;
        text-align: center;
        padding: 40px 0;
    }
    
    .hero-content {
        margin-top: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 20px;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Hero Profile Image Styles - Simple gradient border */
.hero-profile-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    padding: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.hero-profile-image .profile-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border: 3px solid var(--dark-bg);
    border-radius: 50%;
    transition: all 0.3s ease;
    display: block;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.2);
}

.hero-profile-image .profile-img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
}

.hero-placeholder {
    padding: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    width: fit-content;
}

.hero-placeholder-inner {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 3px solid var(--dark-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.2);
}

.hero-placeholder i {
    font-size: 100px;
    color: white;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Responsive adjustments for hero profile image */
@media (max-width: 768px) {
    .hero-profile-image .profile-img {
        width: 300px;
        height: 300px;
        border-width: 2px;
    }
    
    .hero-placeholder-inner {
        width: 300px;
        height: 300px;
        border-width: 2px;
    }
    
    .hero-placeholder i {
        font-size: 100px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
    
    .hero-section {
        padding: 30px 0;
        min-height: 75vh;
    }
    
    .hero-profile-image .profile-img {
        width: 250px;
        height: 250px;
        border-width: 2px;
    }
    
    .hero-placeholder-inner {
        width: 250px;
        height: 250px;
        border-width: 2px;
    }
    
    .hero-placeholder i {
        font-size: 90px;
    }
}

/* Theme Toggle Button - Geliştirilmiş Tasarım */
.theme-toggle-btn {
    background: var(--gradient) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 25px !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    margin-left: 15px !important;
    position: relative !important;
    overflow: hidden !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3) !important;
    z-index: 1050 !important;
    outline: none !important;
}

.theme-toggle-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.6) !important;
}

.theme-toggle-btn:active {
    transform: translateY(-1px) scale(0.95);
}

.theme-toggle-btn i {
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.theme-toggle-btn:hover i {
    transform: rotate(360deg) scale(1.1);
}

/* Theme Toggle Ripple Effect */
.theme-toggle-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.theme-toggle-btn:hover::before {
    width: 100px;
    height: 100px;
}

/* Theme transition for smooth switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Light Mode Styles */
.light-theme {
    --dark-bg: #ffffff;
    --dark-card: #f8f9fa;
    --dark-border: #e9ecef;
    --text-light: #212529;
    --text-muted: #6c757d;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.light-theme body {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

.light-theme .navbar {
    background-color: rgba(248, 249, 250, 0.95) !important;
    border-bottom: 1px solid var(--dark-border);
}

.light-theme .navbar-dark .navbar-nav .nav-link {
    color: var(--text-light);
}

.light-theme .navbar-dark .navbar-nav .nav-link:hover,
.light-theme .navbar-dark .navbar-nav .nav-link.active {
    background: var(--gradient);
    color: white;
}

/* Light mode hamburger menu fix */
.light-theme .navbar-toggler {
    border-color: var(--text-light);
}

.light-theme .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.light-theme .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(108, 92, 231, 0.25);
}

.light-theme .card-custom {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    box-shadow: var(--shadow);
}

.light-theme .service-card {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
}

.light-theme .project-card {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
}

.light-theme .product-card {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
}

.light-theme .blog-card {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
}

.light-theme .footer-section {
    background-color: var(--dark-card);
    border-top: 1px solid var(--dark-border);
}

.light-theme .hero-section {
    background: radial-gradient(ellipse at center, rgba(108, 92, 231, 0.05) 0%, transparent 70%);
}

.light-theme .stats-section {
    background: rgba(108, 92, 231, 0.03);
}

/* Light mode text colors */
.light-theme h1,
.light-theme h2,
.light-theme h3,
.light-theme h4,
.light-theme h5,
.light-theme h6 {
    color: var(--text-light) !important;
}

/* Light mode kod blokları */
.light-theme pre,
.light-theme code {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border: 1px solid #e9ecef !important;
}

.light-theme .highlight {
    background-color: #f8f9fa !important;
}

.light-theme .hljs {
    background: #f8f9fa !important;
    color: #212529 !important;
}

.light-theme .hljs-keyword,
.light-theme .hljs-selector-tag,
.light-theme .hljs-built_in {
    color: #d73a49 !important;
}

.light-theme .hljs-string,
.light-theme .hljs-attr {
    color: #032f62 !important;
}

.light-theme .hljs-comment {
    color: #6a737d !important;
}

.light-theme p,
.light-theme .text-muted {
    color: var(--text-muted) !important;
}

.light-theme .lead {
    color: var(--text-light) !important;
    opacity: 0.8;
}

/* Light mode form elements */
.light-theme .form-control {
    background-color: white;
    border: 1px solid var(--dark-border);
    color: var(--text-light);
}

.light-theme .form-control:focus {
    background-color: white;
    border-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
}

/* Light mode social links */
.light-theme .social-link {
    background: var(--dark-border);
    color: var(--text-light);
}

.light-theme .social-link:hover {
    background: var(--gradient);
    color: white;
}

/* Light mode scroll to top */
.light-theme .scroll-to-top {
    background: var(--gradient);
    box-shadow: var(--shadow);
}

/* Light mode notifications */
.light-theme .notification {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    color: var(--text-light);
    box-shadow: var(--shadow);
}

/* Light mode badge styles */
.light-theme .badge-category {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-light);
}

.light-theme .badge-category:hover,
.light-theme .badge-category.active {
    background: var(--gradient);
    color: white;
}

/* Light mode pagination */
.light-theme .pagination .page-link {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    color: var(--text-light);
}

.light-theme .pagination .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.light-theme .pagination .page-item.active .page-link {
    background: var(--gradient);
    border-color: var(--primary-color);
    color: white;
}

/* Mobile responsive for theme toggle */
@media (max-width: 768px) {
    .theme-toggle-btn {
        width: 45px;
        height: 45px;
        margin-left: 10px;
        border-radius: 22px;
    }
    
    .theme-toggle-btn i {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .theme-toggle-btn {
        width: 40px;
        height: 40px;
        margin-left: 8px;
        border-radius: 20px;
    }
    
    .theme-toggle-btn i {
        font-size: 1rem;
    }
}

/* Navbar collapse durumunda theme toggle */
@media (max-width: 991px) {
    .navbar-collapse .theme-toggle-btn {
        margin: 15px 0 10px 0;
        align-self: flex-start;
        width: 45px;
        height: 45px;
        border-radius: 22px;
    }
    
    .navbar-nav .nav-item:last-child {
        text-align: left;
        padding-left: 0;
        margin-top: 10px;
    }
    
    .navbar-nav .nav-item:last-child .theme-toggle-btn {
        margin-left: 0;
    }
}