/**
 * Zurbahan Web - Custom Styles
 * Main Stylesheet
 */

/* ============================================
   CSS Variables (Design Tokens)
   ============================================ */
:root {
    /* Colors */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #7c3aed;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Grays */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Typography */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Syne', sans-serif;
    --font-mono: 'JetBrains Mono', 'Monaco', 'Courier New', monospace;
    
    /* Transitions */
    --transition-fast: 150ms;
    --transition-base: 300ms;
    --transition-slow: 500ms;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--gray-900);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem;  font-weight: 800; }
h2 { font-size: 2rem;    font-weight: 700; }
h3 { font-size: 1.75rem; font-weight: 700; }
h4 { font-size: 1.5rem;  font-weight: 600; }
h5 { font-size: 1.25rem; font-weight: 600; }
h6 { font-size: 1rem;    font-weight: 600; letter-spacing: 0; }

p {
    margin-bottom: 1rem;
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #6d28d9;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   Forms
   ============================================ */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-error {
    border-color: var(--error);
}

.form-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ============================================
   Alerts & Notifications
   ============================================ */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info);
}

/* ============================================
   Loading States
   ============================================ */
.loading-spinner {
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    animation: fadeIn var(--transition-base) ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight var(--transition-base) ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }

.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-accent { background-color: var(--accent); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }

.transition-all { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }

/* ============================================
   Responsive Utilities
   ============================================ */
@media (max-width: 640px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ============================================
   Accessibility
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focus-visible:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .dark-mode-auto {
        --gray-900: #f9fafb;
        --gray-800: #f3f4f6;
        --gray-700: #e5e7eb;
        background-color: #111827;
        color: #f9fafb;
    }
}

/* ============================================
   Prose / Rich Text Typography
   (Tailwind CDN typography plugin yok, manuel)
   ============================================ */
.prose {
    color: var(--gray-700);
    line-height: 1.8;
    font-size: 1rem;
}

.prose.prose-lg {
    font-size: 1.125rem;
    line-height: 1.85;
}

.prose.max-w-none {
    max-width: none;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    font-family: var(--font-display);
    color: var(--gray-900);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-top: 1.75em;
    margin-bottom: 0.6em;
}

.prose h1 { font-size: 2.25rem; }
.prose h2 { font-size: 1.75rem; border-bottom: 1px solid var(--gray-200); padding-bottom: 0.4em; }
.prose h3 { font-size: 1.35rem; }
.prose h4 { font-size: 1.125rem; }
.prose h5 { font-size: 1rem; }
.prose h6 { font-size: 0.9rem; color: var(--gray-600); }

.prose p {
    margin-bottom: 1.3em;
}

.prose strong {
    font-weight: 700;
    color: var(--gray-900);
}

.prose em {
    font-style: italic;
}

.prose ul,
.prose ol {
    padding-left: 1.6em;
    margin-bottom: 1.3em;
}

.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }

.prose li {
    margin-bottom: 0.4em;
    line-height: 1.7;
}

.prose li > ul,
.prose li > ol {
    margin-top: 0.4em;
    margin-bottom: 0;
}

.prose a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(37, 99, 235, 0.4);
    transition: color var(--transition-base), text-decoration-color var(--transition-base);
}

.prose a:hover {
    color: var(--primary-dark);
    text-decoration-color: var(--primary-dark);
}

.prose blockquote {
    border-left: 4px solid var(--primary);
    padding: 0.75em 1.25em;
    margin: 1.75em 0;
    background: #f0f4ff;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--gray-700);
    font-style: italic;
}

.prose blockquote p:last-child {
    margin-bottom: 0;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    margin: 1.75em auto;
    display: block;
    box-shadow: var(--shadow-md);
}

.prose figure {
    margin: 1.75em 0;
    text-align: center;
}

.prose figcaption {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.5em;
}

.prose code {
    background: var(--gray-100);
    color: #c0392b;
    padding: 0.15em 0.45em;
    border-radius: var(--radius-sm);
    font-size: 0.875em;
    font-family: var(--font-mono);
    font-weight: 500;
    white-space: nowrap;
}

.prose pre {
    background: var(--gray-900);
    color: #e2e8f0;
    padding: 1.25em 1.5em;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 1.75em 0;
    line-height: 1.7;
    font-size: 0.9rem;
}

.prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
    white-space: pre;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.75em 0;
    font-size: 0.9rem;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.prose thead {
    background: var(--primary);
    color: white;
}

.prose th {
    padding: 0.75em 1em;
    font-weight: 600;
    text-align: left;
}

.prose td {
    padding: 0.65em 1em;
    border-bottom: 1px solid var(--gray-200);
}

.prose tbody tr:last-child td {
    border-bottom: none;
}

.prose tbody tr:nth-child(even) {
    background: var(--gray-50);
}

.prose hr {
    border: none;
    border-top: 2px solid var(--gray-200);
    margin: 2.5em 0;
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
[data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Project Card Mobile Fix
   ============================================ */
@media (max-width: 1023px) {
    .project-hover-overlay {
        display: none !important;
    }
}

/* ============================================
   Prose Content — Yasal Sayfa Tipografisi
   (Tailwind typography plugin alternatifi)
   ============================================ */
.prose-content {
    line-height: 1.75;
    color: #374151;
    font-size: 1rem;
}
.prose-content h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f3f4f6;
}
.prose-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}
.prose-content p {
    margin-bottom: 1.25rem;
}
.prose-content ul,
.prose-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.prose-content li {
    margin-bottom: 0.375rem;
    list-style-type: disc;
}
.prose-content ol li {
    list-style-type: decimal;
}
.prose-content strong {
    font-weight: 700;
    color: #1f2937;
}
.prose-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s;
}
.prose-content a:hover {
    text-decoration-color: var(--primary);
}
.prose-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    color: #6b7280;
    font-style: italic;
    margin: 1.5rem 0;
}
.prose-content .not-prose {
    all: revert;
}