:root {
    /* Core Palette - Focused on Deep, Rich Tones */
    --bg-color: #050511;
    /* Very dark blue-black for depth */
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --primary-gradient: linear-gradient(135deg, #FF61D2 0%, #FE9090 100%);
    --secondary-gradient: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);

    /* Advanced Glass - The "Secret Sauce" */
    --glass-bg: rgba(255, 255, 255, 0.05);
    /* Extremely subtle transparency */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.5);
    /* Deep, diffuse shadow */
    --glass-blur: 20px;

    /* Metrics */
    --card-radius: 32px;
    --btn-radius: 16px;
    --transition-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Background Gradient */
    --bg-image: radial-gradient(circle at 50% 0%, #0f1c2e 0%, #050511 100%);
}

/* Light Mode Overrides (Refined to keep the glow) */
body.light-mode {
    --bg-color: #f2f4f8;
    --text-color: #1a1a2e;
    --text-secondary: rgba(26, 26, 46, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-highlight: rgba(255, 255, 255, 1);
    --glass-shadow: 0 30px 60px -15px rgba(136, 148, 160, 0.3);

    /* Light Mode Background - Clean */
    --bg-image: none;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    position: relative;
    transition: background-color 0.5s ease;
    /* Subtle, professional deep gradient */
    background-image: var(--bg-image);
    /* background-attachment: fixed; REMOVED for performance (causes scroll lag) */
}

/* --- Layout & Typography --- */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 10;
}

/* --- Components --- */

/* Cinematic Glass Card */
.glass-header,
.glass-card,
.glass-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    /* The "Glow" Border trick: Top/Left lighter, Bottom/Right darker */
    box-shadow:
        inset 0 1px 0 0 var(--glass-highlight),
        var(--glass-shadow);
}

/* Header */
.glass-header {
    position: sticky;
    top: 30px;
    z-index: 100;
    margin: 30px auto 60px;
    /* More breathing room */
    max-width: calc(100% - 40px);
    /* Ensure side spacing (padding effect outside capsule) */
    border-radius: 100px;
    /* Pill shape */
    transition: all 0.4s var(--transition-smooth);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
}

.header-logo-img {
    height: 32px;
    width: 32px;
    border-radius: 10px; /* Squircle */
    margin-right: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.logo {
    font-weight: 800;
    /* Extra bold */
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    /* text-transform: uppercase; REMOVED to respect exact casing */
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .logo {
    background: linear-gradient(to right, #1a1a2e, #4a4a6a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s;
}

button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Icon Toggling */
.icon-sun,
.icon-moon {
    display: none;
}

/* Default (Dark) shows Sun to switch to Light */
.icon-sun {
    display: block;
}

/* Light Mode shows Moon to switch to Dark */
body.light-mode .icon-sun {
    display: none;
}

body.light-mode .icon-moon {
    display: block;
}

.lang-switcher button {
    opacity: 0.5;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 6px;
}

.lang-switcher button.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

body.light-mode .lang-switcher button.active {
    background: rgba(0, 0, 0, 0.05);
}

/* Hero Section - The "Statement" */
.hero-section {
    padding: 100px 0;
    text-align: left;
    /* Editorial style */
}

.greeting {
    font-size: 5rem;
    /* Massive */
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #fff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.2));
    /* Text Glow */
}

body.light-mode .greeting {
    background: linear-gradient(135deg, #1a1a2e 0%, #4a4a6e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none;
}

.hero-card {
    padding: 50px;
    border-radius: var(--card-radius);
    text-align: left;
    position: relative;
    overflow: hidden;
}

/* Subtle shine effect on card hover */
.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
    transform: skewX(-15deg);
}

.hero-card:hover::before {
    left: 100%;
    transition: 0.7s;
}

.bio {
    font-size: 1.8rem;
    line-height: 1.4;
    font-weight: 400;
    max-width: 800px;
    margin-bottom: 24px;
    color: var(--text-color);
}

.bio-detail {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.7;
}

/* Portfolio Section */
.portfolio-section {
    padding: 50px 0 100px;
}

.project-container {
    display: flex;
    align-items: stretch;
    /* Cards same height */
    gap: 30px;
    margin-bottom: 80px;
}

.project-container.reverse-layout {
    flex-direction: row-reverse;
}

.project-info {
    flex: 1;
    padding: 50px;
    border-radius: var(--card-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.4s var(--transition-smooth);
}

.project-info:hover {
    transform: translateY(-5px);
}

.project-header {
    display: flex;
    flex-direction: column;
    /* Icon above title looks more modern */
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.app-icon {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    /* Make icon pop */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-container:hover .app-icon {
    transform: scale(1.1) rotate(3deg);
}

.project-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-color);
    margin-bottom: 10px;
    display: inline-block;
}

body.light-mode .badge {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.project-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
}

.project-links {
    margin-top: auto;
    /* Push to bottom */
    display: flex;
    gap: 16px;
    align-items: center;
    /* Fix alignment */
    flex-wrap: wrap;
}

/* Premium Buttons */
.btn {
    text-decoration: none;
    padding: 14px 28px;
    border-radius: var(--btn-radius);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    /* Prevent wrapping */
}

.primary-btn {
    background: var(--text-color);
    color: var(--bg-color);
    /* Inverted for contrast */
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

body.light-mode .primary-btn:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

body.light-mode .secondary-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Visuals Container */
.project-visuals {
    flex: 1.3;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 30px;
    /* Added internal spacing */

    /* Glass Card Style Adoption */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 0 var(--glass-highlight), var(--glass-shadow);
    border-radius: var(--card-radius);

    /* Hide scrollbar */
    scrollbar-width: none;
    /* mask-image removed for cleaner card look */
    scroll-behavior: smooth;
    cursor: grab;

    /* Center images vertically if card is tall */
    align-items: center;
}

.project-visuals::-webkit-scrollbar {
    display: none;
}

.project-visuals:active {
    cursor: grabbing;
}

.screenshot {
    height: 500px;
    /* Taller */
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transition: all 0.5s var(--transition-smooth);
    opacity: 0.9;
}

.screenshot:hover {
    opacity: 1;
    transform: scale(1.03) translateY(-10px);
    z-index: 5;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

/* Footer */
.glass-footer {
    text-align: center;
    padding: 40px 40px 80px;
    /* Extra bottom padding */
    border-top: 1px solid var(--glass-border);
    margin-top: 80px;
    color: var(--text-secondary);
    font-size: 0.9rem;

    /* Ensure it doesn't touch edges if preferred, or just full width. 
       User said "footer'ı ortala" (center footer). 
       If it is full width, text-align handles content.
       If it is floating, we need max-width. Sticking to full width for now but with more bottom padding. */
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

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

.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stagger animations would need simple JS or nth-child CSS, keeping it simple for now */

/* Responsive */
@media (max-width: 900px) {

    .project-container,
    .project-container.reverse-layout {
        flex-direction: column;
    }

    .screenshot {
        height: 400px;
    }

    .greeting {
        font-size: 3.5rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 20px;
    }

    .glass-header {
        top: 10px;
        margin-top: 10px;
        border-radius: 20px;
    }

    .header-content {
        padding: 12px 20px;
    }

    .hero-card,
    .project-info {
        padding: 30px;
    }

    .greeting {
        font-size: 2.8rem;
    }

    .bio {
        font-size: 1.4rem;
    }

    .project-visuals {
        mask-image: none;
    }

    .screenshot {
        height: 350px;
    }
}