@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Montserrat:wght@700;800&display=swap');

:root {
    --primary: #4f46e5;
    /* Deep Indigo */
    --primary-dark: #3730a3;
    --secondary: #0ea5e9;
    /* Sky Blue */
    --accent: #7c44ff;
    --background: #f1f5f9;
    /* Slate 100 - Warmer/deeper than Slate 50 */
    --text-main: #0f172a;
    /* Deep Navy */
    --text-muted: #627691;
    /* Slate 600 */
    --bg-alt: #cbd5e1;
    /* Slate 300 - Much more visible transition */
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.85);
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --badge-bg: rgba(79, 70, 229, 0.08);
    --badge-text: #4f46e5;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}


[data-theme="dark"] {
    --primary: #a78bfa;
    /* More vibrant purple for better contrast */
    --background: #243652;
    /* Slate 800 - Lighter and more professional navy */
    --text-main: #f8fafc;
    --text-muted: #bebfc2;
    --bg-alt: #16223f;
    /* Darker sections for depth */
    --white: #41536b;
    --glass: rgba(30, 41, 59, 0.8);
    --border: rgba(255, 255, 255, 0.06);
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --badge-bg: rgba(124, 68, 255, 0.15);
    --badge-text: #c7d2fe; /* Light Indigo for better contrast */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
    border: 3px solid var(--background);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: linear-gradient(135deg, var(--background) 0%, var(--bg-alt) 100%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3 {
    font-family: 'Montserrat', sans-serif;
}

/* Background Gradients */
.bg-blob {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, rgba(14, 165, 233, 0.04) 100%);
    filter: blur(100px);
    z-index: -1;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.status-pulse {
    animation: statusPulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
}

@keyframes statusPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

.blob-1 {
    top: -50px;
    right: -50px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
}

.blob-2 {
    bottom: -50px;
    left: -50px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    filter: blur(120px);
    opacity: 0.6;
    animation-delay: -10s;
}

/* Navigation */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    padding: 10px 30px;
    border-radius: 99px;
    display: flex;
    gap: 20px;
    z-index: 1000;
    box-shadow: var(--shadow);
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 99px;
    transition: var(--transition);
}

nav a:hover,
nav a.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
}

/* Controls Container (Top Right) */
.controls-container {
    position: fixed;
    top: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1001;
}

.language-selector {
    display: flex;
    gap: 8px;
    background: var(--glass);
    padding: 5px;
    border-radius: 99px;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.flag-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
}

.flag-btn.active {
    border-color: var(--primary);
    transform: scale(1.1);
}

.flag-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.theme-toggle:hover {
    transform: rotate(45deg) scale(1.1);
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate].animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Content Container */
.main-wrapper {
    flex: 1;
    max-width: 1000px;
    margin: 100px auto 0;
    padding: 0 20px 40px;
    width: 100%;
}

section {
    display: none;
    padding-top: 40px;
}

section.active {
    display: block;
    animation: sectionFadeUp 0.5s ease-out;
}

@keyframes sectionFadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0;
}

.hero h1 {
    font-size: 4rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

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

.social-btn {
    padding: 12px 24px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.social-btn:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 15px 30px -10px rgba(79, 70, 229, 0.2);
}

.social-btn.github:hover {
    border-color: #24292e;
    color: #24292e;
    background: rgba(36, 41, 46, 0.05);
}

.social-btn.linkedin:hover {
    border-color: #0077b5;
    color: #0077b5;
    background: rgba(0, 119, 181, 0.05);
}

/* Dark Mode Social Hover Overrides */
[data-theme="dark"] .social-btn.github:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
}

[data-theme="dark"] .social-btn.linkedin:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(59, 130, 246, 0.1);
}

.social-btn i,
.social-btn svg {
    width: 20px;
    height: 20px;
    transition: var(--transition-fast);
}

.social-btn:hover i,
.social-btn:hover svg {
    transform: scale(1.2) rotate(-10deg);
}

/* Cards & Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.card {
    background: linear-gradient(160deg, var(--white) 0%, var(--background) 100%);
    opacity: 0.98;
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.card h3 {
    margin-bottom: 12px;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.badge {
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-fast);
}

.badge:hover {
    background: var(--badge-text);
    color: var(--background);
    transform: translateY(-2px);
}

/* Specific Section Styles */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

#experience .section-title {
    text-align: left;
    margin-bottom: 20px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

#experience .underline {
    width: 100%;
    max-width: 100px;
    /* Center it like others but maybe a bit wider */
    height: 4px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* Experience Section (Integrated Style) */
#experience {
    max-width: 900px !important;
    margin: 0 auto;
    padding: 40px 20px;
}

#experience .timeline {
    background: none;
    border: none;
    padding: 0;
    backdrop-filter: none;
    box-shadow: none;
}

.exp-item {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.exp-item:last-child {
    border-bottom: none;
}

.exp-header {
    margin-bottom: 20px;
}

.exp-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 5px;
}

.exp-company {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.exp-title-text {
    font-weight: 600;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-main);
}

.exp-meta {
    font-size: 0.9rem;
    text-align: right;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.exp-bullets {
    padding-left: 20px;
    margin-top: 15px;
    list-style-type: none;
}

.exp-bullets li {
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
    color: var(--text-main);
    opacity: 0.9;
}

.exp-bullets li::before {
    content: "→";
    color: var(--primary);
    position: absolute;
    left: -25px;
    font-weight: bold;
}

.exp-bullets li strong {
    font-weight: 700;
    color: var(--primary);
}

/* Profile Section (Integrated Style) */
.profile-container {
    max-width: 800px;
    margin: 40px auto 0;
}

.profile-item {
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-item-category {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 10px;
}

.profile-item-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
}

.profile-item-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.profile-item-main {
    font-size: 1.5rem;
    color: var(--text-main);
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

.profile-item-sub {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 5px;
    display: block;
}

.profile-item-description {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.6;
    opacity: 0.9;
}

/* Drive Section (Belgeler) */
.file-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.file-card:hover {
    background: var(--bg-alt);
    border-color: var(--secondary);
    transform: scale(1.02);
}

.file-icon {
    width: 48px;
    height: 48px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 1.5rem;
}

footer {
    padding: 15px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

footer p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .controls-container {
        top: 15px;
        right: 15px;
    }

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

    nav {
        width: 92%;
        gap: 5px;
        padding: 5px;
        top: auto;
        bottom: 20px;
    }

    nav a {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 32px;
    position: relative;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    z-index: 10;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

.modal-hero-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.modal-inner-body {
    padding: 40px;
}

.modal-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-description {
    color: var(--text-main);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.modal-gallery img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.modal-gallery img:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
    border-color: var(--primary);
}

.project-card-clickable {
    cursor: pointer;
}

/* Lightbox System */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

#lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-overlay.active #lightbox-img {
    transform: scale(1);
}

.lightbox-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.lightbox-close-btn:hover {
    transform: scale(1.2) rotate(90deg);
    color: var(--primary);
}

@media (max-width: 640px) {
    .modal-inner-body {
        padding: 25px;
    }

    .modal-hero-image {
        height: 200px;
    }

    .modal-title {
        font-size: 1.6rem;
    }
}