:root {
    --primary-color: #0b192c;
    /* Koyu Lacivert (Dark Navy) */
    --accent-color: #d6a848;
    /* Altın Sarısı / Gold (Logo Rengi) */
    --red-color: #c92a2a;
    /* Logodaki Kırmızı (Red) */
    --bg-color: #f8f9fa;
    /* Hafif kırık beyaz arkaplan */
    --white: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    animation: fadeInPage 0.6s ease-out forwards;
}

/* --- Animated Intro Loader --- */
.intro-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--primary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideUpOut 0.8s cubic-bezier(0.77, 0, 0.175, 1) 1.5s forwards;
}

.intro-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.intro-logo {
    width: 250px;
    /* Açılış animasyonundaki logoyu da büyüttük */
    height: auto;
    opacity: 0;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s forwards;
    filter: drop-shadow(0 0 15px rgba(214, 168, 72, 0.3));
}

.intro-text {
    display: flex;
    gap: 0.5rem;
    overflow: hidden;
}

.intro-text .word {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    opacity: 0;
    transform: translateY(100%);
    animation: slideUpText 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.intro-text .word.highlight {
    color: var(--red-color);
}

.intro-text .word:nth-child(1) {
    animation-delay: 0.3s;
}

.intro-text .word:nth-child(2) {
    animation-delay: 0.5s;
}

.intro-text .word:nth-child(3) {
    animation-delay: 0.7s;
}

.intro-text .word:nth-child(4) {
    animation-delay: 0.9s;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUpText {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpOut {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100%);
        display: none;
    }
}

@keyframes fadeInPage {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

/* --- Navbar --- */
.navbar {
    background-color: var(--primary-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 75px;
    /* Logoyu daha büyük yaptık */
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
    /* Üzerine gelince biraz büyür */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s ease;
    opacity: 0.8;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--red-color);
    transition: width 0.3s ease;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    opacity: 1;
    transform: translateY(-2px);
}

/* --- Hero Section (Anasayfa) --- */
.hero {
    background-color: var(--primary-color);
    flex: 1;
    /* Soft transitions / fades at the top (nav) and bottom (footer) */
    background-image:
        linear-gradient(to bottom, var(--primary-color) 0%, transparent 15%, transparent 85%, var(--primary-color) 100%),
        url('anasayfaresmi.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 80vh;
    /* Ensure it takes up a beautiful portion of the screen without content stretching it */
}

/* --- Page Headers --- */
.page-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    border-bottom: 4px solid var(--accent-color);
}

.page-header h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 0;
}

/* --- Main Content Layout --- */
.main-content {
    flex: 1;
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title-wrapper {
    text-align: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--red-color);
    margin: 0.5rem auto 0;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.section-title:hover::after {
    width: 100px;
}

/* --- Cards / Grid Layout --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border-top: 4px solid var(--primary-color);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(214, 168, 72, 0.05);
    /* Altın sarısı saydam */
    transition: height 0.4s ease;
    z-index: 0;
}

.card:hover::before {
    height: 100%;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
    border-top-color: var(--red-color);
}

.card h3,
.card p {
    position: relative;
    z-index: 1;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    margin: 0.5rem 0.2rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--red-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(201, 42, 42, 0.2);
}

.project-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
}

.card:hover .project-img {
    transform: scale(1.03);
}

.project-img.vertical {
    height: auto;
    max-height: 500px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto 1.5rem;
}

.project-images-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.project-images-row .project-img {
    flex: 1;
    min-width: 250px;
    margin-bottom: 0;
    max-height: 500px;
    object-fit: contain;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.card:hover h3 {
    color: var(--accent-color);
}

.card p {
    color: var(--text-secondary);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--red-color);
    transition: left 0.4s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    color: var(--white);
    border-color: var(--red-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(201, 42, 42, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(201, 42, 42, 0.3);
}

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

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    transition: left 0.4s ease;
    z-index: -1;
}

.btn-outline:hover::before {
    left: 0;
}

.btn-outline:hover {
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(11, 25, 44, 0.3);
}

.btn-outline:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(11, 25, 44, 0.3);
}

/* --- Forms --- */
.contact-form {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    max-width: 600px;
    margin: 0 auto;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.contact-form:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: color 0.3s ease, transform 0.3s ease;
    transform-origin: left;
}

.form-group:focus-within label {
    color: var(--red-color);
    transform: scale(1.05);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fafafa;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease, transform 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(214, 168, 72, 0.15);
    background-color: var(--white);
    transform: translateY(-2px);
}

.btn-submit {
    width: 100%;
    cursor: pointer;
    border: 2px solid var(--accent-color);
}

/* --- Footer --- */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* --- Text Alignment & Utilities --- */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.readable-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    color: var(--text-secondary);
}

.readable-text p {
    margin-bottom: 1.5rem;
}

/* --- Responsive Layout --- */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding: 5rem 0;
    }

    .page-header {
        padding: 3rem 0;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .contact-form {
        padding: 2rem;
    }
}