/* Kerem Güney - Developer Premium Theme 2025 */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #171717;
    --border-color: #262626;
    --primary: #8b5cf6; /* Violet */
    --secondary: #ec4899; /* Pink */
    --text-primary: #ededed;
    --text-secondary: #a3a3a3;
    
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', sans-serif;
    
    --glow-color: rgba(139, 92, 246, 0.15);
}

[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glow-color: rgba(139, 92, 246, 0.08); /* Hafif gölge */
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography */
h1, h2, h3, h4, h5, h6, .font-mono, button, input, textarea {
    font-family: var(--font-mono);
}

.text-gradient {
    background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: all 0.3s ease;
}

::selection {
    background: rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
}

/* Grid Background Pattern */
.bg-grid-pattern {
    background-size: 50px 50px;
    background-image: 
        linear-gradient(to right, var(--text-secondary) 1px, transparent 1px),
        linear-gradient(to bottom, var(--text-secondary) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
    opacity: 0.05;
    pointer-events: none;
}

/* Glass & Cards */
.dev-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}
.dev-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(225deg, rgba(139,92,246,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.dev-card:hover::before {
    opacity: 1;
}
.dev-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 10px 40px -10px var(--glow-color);
}

/* Input Fields Fix */
input, textarea {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    transition: all 0.3s ease;
}
input:focus, textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
    outline: none;
    background-color: var(--bg-card) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 99px;
    transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Animations */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.cursor-blink {
    animation: blink 1.2s step-end infinite;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fade-in-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Mobile Menu Fullscreen */
#mobileMenu {
    background-color: var(--bg-dark);
}

/* Command Palette Modal */
#cmdPalette {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
}
#cmdPalette .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    animation: cmdSlideIn 0.2s ease-out;
}
@keyframes cmdSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
#cmdInput {
    color: var(--text-primary);
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    h1 { font-size: 2.5rem !important; }
    h2 { font-size: 2rem !important; }
    .container { padding-left: 1.5rem; padding-right: 1.5rem; }
    .dev-card:hover { transform: none; } /* Disable hover lift on touch */
}

/* --- Page Transitions --- */

/* Fallback (JS Controlled) */
.page-transition-exit {
    opacity: 0;
    transform: scale(0.98);
    filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.page-transition-enter {
    animation: pageSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pageSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Native View Transitions API */
::view-transition-old(root) {
    animation: vt-fade-out 0.4s ease-in-out both;
}
::view-transition-new(root) {
    animation: vt-slide-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes vt-fade-out {
    to { 
        opacity: 0; 
        transform: scale(0.95); 
        filter: blur(2px);
    }
}
@keyframes vt-slide-in {
    from { 
        opacity: 0; 
        transform: translateY(40px); 
    }
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.stagger-item.active {
    opacity: 1;
    transform: translateY(0);
}
