/* STEP 3: CSS Styling - Modern, Dark Theme, High Contrast */
:root {
    /* Color Palette */
    --bg-dark: #1e2128;
    /* Soft dark */
    --bg-card: #272a33;
    --bg-hover: #313540;

    --text-main: #f8f8f8;
    --text-muted: #a3abb8;

    --accent-primary: #10b981;
    /* Emerald green */
    --accent-glow: rgba(16, 185, 129, 0.25);

    --border-subtle: #3f4452;

    /* Typography */
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Z-Index Architecture */
    --z-base: 1;
    --z-nav: 100;
    --z-modal: 1000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Smooth scrolling between sections */
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* :: Typography & Globals :: */
h1,
h2,
h3 {
    font-weight: 800;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 3.5rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 10%;
    width: 80%;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* --- Biyografi Metni --- */
#about-me-text {
    transition: opacity 0.3s ease;
}

/* :: Navbar :: */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    background: rgba(30, 33, 40, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: var(--z-nav);
    border-bottom: 1px solid var(--border-subtle);
    transition: padding 0.3s ease;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent-primary);
}

.navbar.scrolled {
    background: rgba(30, 33, 40, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    padding: 1rem 0;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cv-highlight {
    color: var(--accent-primary) !important;
    display: inline-block;
    animation: cv-attention 2s infinite ease-in-out;
}

.nav-cv-highlight::after {
    display: none;
}

@keyframes cv-attention {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0px transparent;
    }

    50% {
        transform: scale(1.15);
        text-shadow: 0 0 15px var(--accent-glow);
    }

    100% {
        transform: scale(1);
        text-shadow: 0 0 0px transparent;
    }
}

/* :: Buttons :: */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-size: 1.05rem;
}

/* --- Modüler Buton Sınıfları --- */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 20px;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: var(--bg-dark);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-primary);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 2px solid var(--border-subtle);
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background-color: var(--bg-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--border-subtle);
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    background-color: rgba(16, 185, 129, 0.05);
}

.btn-cv-download {
    font-size: 1.15rem;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    animation: cv-download-attention 3s infinite ease-in-out;
}

.btn-cv-download:hover {
    animation-play-state: paused;
}

@keyframes cv-download-attention {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px var(--accent-glow);
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 0 35px rgba(16, 185, 129, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px var(--accent-glow);
    }
}

.btn-linkedin {
    background-color: #0A66C2;
    color: white;
    border: 2px solid #0A66C2;
}

.btn-linkedin:hover {
    background-color: transparent;
    color: #0A66C2;
    transform: translateY(-2px);
}

/* --- Accessibility (A11y) --- */
.btn:focus-visible,
.nav-links a:focus-visible,
.socials a:focus-visible {
    outline: 2px dashed var(--accent-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* :: Layout Sections :: */
section {
    padding: 120px 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- Hizalama ve Konteyner Stilleri --- */
.center-title {
    left: auto;
    transform: none;
    display: block;
    text-align: center;
}

.cv-download-container {
    text-align: center;
    margin-top: 4rem;
}

.lang-toggle-container {
    margin-bottom: 1rem;
}

/* Home / Hero */
.hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--border-subtle);
    box-shadow: 0 0 30px var(--accent-glow);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-wrapper::before {
    content: 'Fotoğraf (profile.jpg)';
    position: absolute;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    z-index: 1;
}

.image-wrapper:hover {
    border-color: var(--accent-primary);
    transform: scale(1.03);
    box-shadow: 0 0 50px rgba(16, 185, 129, 0.4);
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

.greeting {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.name {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0ab 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.bio {
    max-width: 650px;
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.bio strong {
    color: var(--text-main);
}

.cta-group {
    display: flex;
    gap: 1.5rem;
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2.5rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        border-color 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: background 0.3s;
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: #333344;
}

.project-card:hover::before {
    background: var(--accent-primary);
}

.highlight-card {
    grid-column: 1 / -1;
    /* spans full width */
    display: grid;
    background: linear-gradient(145deg, var(--bg-card) 0%, #20232a 100%);
    border: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
    .highlight-card .card-content {
        max-width: 70%;
    }
}

.project-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.project-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.tags span {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.08);
    padding: 0.4rem 1rem;
    border-radius: 4px;
}

.github-cta {
    text-align: center;
}

/* Skills section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.skill-category h3::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
    margin-left: 1rem;
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.skill-list li {
    background: var(--bg-card);
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.skill-list li:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
    background: var(--bg-hover);
}

.skill-list i {
    font-size: 1.8rem;
    color: var(--accent-primary);
    width: 30px;
    text-align: center;
}

.skill-list div {
    display: flex;
    flex-direction: column;
}

.skill-list strong {
    font-size: 1.1rem;
    color: var(--text-main);
}

.skill-list span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Contact */
.contact {
    min-height: 70vh;
}

.contact-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 4rem 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.network-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-subtle);
    padding: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.socials a {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-left: 1rem;
    transition: color 0.3s;
}

.socials a:hover {
    color: var(--accent-primary);
}

/* :: JavaScript Classes :: */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* :: Mobile Responsiveness :: */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide on small screens for simplicity */
    }

    .cta-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }



    .hero {
        flex-direction: column-reverse;
        /* Put image on top of text on mobile */
        text-align: center;
        gap: 3rem;
        padding-top: 140px;
    }

    .hero-image {
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
    }

    .greeting {
        justify-content: center;
    }

    .cta-group {
        align-items: center;
    }

    section {
        padding: 100px 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}