/* ==========================================================================
   Shai's Portfolio - Premium Dark with Vibrant Accents
   Sophisticated, professional, alive
   ========================================================================== */

:root {
    /* Deep sophisticated dark */
    --bg: #0a0e1a;
    --bg-2: #131829;
    --bg-3: #1a2138;
    --bg-card: #161b2e;
    --ink: #f5f5f7;
    --ink-soft: #a8b0c4;
    --ink-mute: #6b7589;
    --rule: #232a40;
    --rule-soft: #1c2237;
    --accent: #fbbf24;        /* Warm gold/amber */
    --accent-2: #f59e0b;
    --accent-soft: #fcd34d;
    --secondary: #06b6d4;     /* Cyan for variety */
    --secondary-2: #0891b2;
    --tertiary: #ec4899;      /* Pink accent */
    --success: #10b981;
    --warn: #f59e0b;
    --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga', 'kern';
    position: relative;
    overflow-x: hidden;
}

/* Background gradient mesh */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(at 20% 10%, rgba(251, 191, 36, 0.08) 0%, transparent 50%),
        radial-gradient(at 80% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        radial-gradient(at 50% 50%, rgba(236, 72, 153, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-soft); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.container.wide { max-width: 1400px; }
.container.narrow { max-width: 720px; }

/* ==========================================================================
   Header
   ========================================================================== */
.app-header {
    border-bottom: 1px solid var(--rule-soft);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10, 14, 26, 0.85);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.brand {
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-mark {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 16px var(--accent);
}
.brand-sub {
    font-size: 10px;
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 2px;
}

.app-main { padding: 60px 0 100px; min-height: calc(100vh - 200px); }

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
    border-top: 1px solid var(--rule-soft);
    padding: 40px 0;
    text-align: center;
    color: var(--ink-mute);
    font-size: 12px;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    padding: 80px 0 60px;
    border-bottom: 1px solid var(--rule-soft);
    margin-bottom: 60px;
    position: relative;
}
.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 100px;
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 32px;
    font-weight: 600;
}
.hero-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.hero h1 {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    max-width: 900px;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero .accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 18px;
    color: var(--ink-soft);
    margin-bottom: 48px;
    max-width: 700px;
    line-height: 1.6;
}
.hero-stats {
    display: flex;
    gap: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--rule-soft);
}
.hero-stat {
    display: flex;
    flex-direction: column;
}
.hero-stat .num {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, var(--tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    font-family: 'Inter', sans-serif;
}
.hero-stat .label {
    font-size: 11px;
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 8px;
    font-weight: 600;
}

/* ==========================================================================
   Project Grid - Vibrant cards
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 28px;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 14px;
    overflow: hidden;
    color: var(--ink);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    text-decoration: none;
    position: relative;
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--tertiary) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}
.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 24px 48px -12px rgba(251, 191, 36, 0.15);
}
.project-card:hover::before { opacity: 1; }
.project-card.featured {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.04) 0%, var(--bg-card) 40%);
}
.project-cover {
    aspect-ratio: 16/10;
    background: var(--bg-3);
    overflow: hidden;
    position: relative;
}
.project-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 70%, rgba(10, 14, 26, 0.6) 100%);
    pointer-events: none;
}
.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.project-card:hover .project-cover img {
    transform: scale(1.06);
}
.project-cover.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 96px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, var(--tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.project-body { padding: 24px; }
.project-meta-top {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    align-items: center;
}
.project-body h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.subtitle {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}
.description {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.6;
}

/* ==========================================================================
   Badges - Vibrant
   ========================================================================== */
.category-badge, .status-badge, .year {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: var(--bg-3);
    color: var(--ink-soft);
    border: 1px solid var(--rule);
}
.category-ai {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(236, 72, 153, 0.15));
    color: var(--accent);
    border-color: var(--accent);
}
.category-e-commerce {
    background: rgba(6, 182, 212, 0.12);
    color: var(--secondary);
    border-color: rgba(6, 182, 212, 0.3);
}
.category-business {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent);
    border-color: rgba(251, 191, 36, 0.3);
}
.category-productivity {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}
.category-creative {
    background: rgba(236, 72, 153, 0.12);
    color: var(--tertiary);
    border-color: rgba(236, 72, 153, 0.3);
}
.category-devops {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
}
.category-personal {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warn);
    border-color: rgba(245, 158, 11, 0.3);
}
.category-mobile {
    background: rgba(20, 184, 166, 0.12);
    color: #14b8a6;
    border-color: rgba(20, 184, 166, 0.3);
}
.status-completed {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}
.status-active {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(236, 72, 153, 0.15));
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
}
.status-in-progress {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warn);
    border-color: rgba(245, 158, 11, 0.3);
}
.status-archived {
    background: rgba(107, 117, 137, 0.12);
    color: var(--ink-mute);
    border-color: var(--rule);
}
.year { background: transparent; }

/* ==========================================================================
   Project Detail
   ========================================================================== */
.project-header {
    padding: 48px 0;
}
.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-mute);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.breadcrumb .separator { color: var(--rule); }
.breadcrumb a { color: var(--ink-mute); }
.breadcrumb a:hover { color: var(--accent); }

.project-header h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--ink) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.project-tagline {
    font-size: 19px;
    color: var(--ink-soft);
    margin-bottom: 24px;
    max-width: 800px;
    font-style: italic;
}
.project-meta-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--ink-soft);
}
.meta-item { color: var(--ink-soft); font-size: 13px; }

.project-hero-image {
    margin: 48px auto;
    border: 1px solid var(--rule);
    max-width: 480px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.4);
}
.project-hero-image img { width: 100%; display: block; }

.project-video {
    margin: 48px auto;
    max-width: 720px;
    border: 1px solid var(--rule);
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.4);
}
.video-label {
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(236, 72, 153, 0.1));
    border-bottom: 1px solid var(--rule);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.project-video video {
    width: 100%;
    display: block;
    background: #000;
}

.project-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 64px;
    margin-top: 48px;
}
.project-section { margin-bottom: 64px; }
.project-section h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule-soft);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--ink) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prose {
    font-size: 16px;
    line-height: 1.8;
}
.prose h2 {
    font-size: 26px;
    margin-top: 48px;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    background: none;
    -webkit-text-fill-color: var(--ink);
    border-bottom: 0;
    padding-bottom: 0;
}
.prose h3 {
    font-size: 20px;
    margin-top: 32px;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--ink);
}
.prose p {
    margin-bottom: 20px;
    color: var(--ink-soft);
}
.prose strong { color: var(--ink); font-weight: 700; background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(236, 72, 153, 0.1)); padding: 1px 6px; border-radius: 4px; }
.prose code {
    background: var(--bg-3);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--accent);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 14px;
    border: 1px solid var(--rule);
}
.prose ul, .prose ol {
    margin-bottom: 20px;
    padding-inline-start: 28px;
}
.prose li {
    margin-bottom: 8px;
    color: var(--ink-soft);
}
.prose em { color: var(--accent); font-style: italic; }

.outcome-box {
    padding: 28px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(236, 72, 153, 0.05));
    border: 1px solid var(--accent);
    border-radius: 12px;
    border-inline-start: 4px solid var(--accent);
}
.outcome-box p { color: var(--ink); font-size: 17px; line-height: 1.6; }

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.gallery-item {
    background: var(--bg-3);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--rule);
}
.gallery-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.gallery-item figcaption {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--ink-soft);
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.link-item {
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 10px;
    color: var(--ink);
    word-break: break-all;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    transition: all 0.15s;
    border-inline-start: 3px solid var(--accent);
}
.link-item:hover {
    background: var(--bg-3);
    border-color: var(--accent);
    transform: translateX(-2px);
}

.project-aside { display: flex; flex-direction: column; gap: 24px; }
.aside-section {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 12px;
}
.aside-section h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 16px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule-soft);
}

.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag {
    padding: 4px 12px;
    background: var(--bg-3);
    border: 1px solid var(--rule);
    border-radius: 100px;
    font-size: 11px;
    color: var(--ink);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

.meta-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 16px;
    font-size: 13px;
}
.meta-list dt { color: var(--ink-mute); }
.meta-list dd { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Forms
   ========================================================================== */
.page-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--rule-soft);
}
.page-header.with-action {
    display: flex;
    justify-content: space-between;
    align-items: end;
    flex-wrap: wrap;
    gap: 16px;
}
.page-header h1 {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.page-header .lead {
    color: var(--ink-soft);
    font-size: 16px;
}

.flash {
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    border-radius: 8px;
    border-inline-start: 3px solid;
}
.flash-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border-color: var(--success);
}
.flash-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: var(--danger);
}

.form-card {
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 12px;
}
.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
.form-field { margin-bottom: 20px; }
.form-field label {
    display: block;
    font-size: 12px;
    color: var(--ink-soft);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="password"],
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--rule);
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
    border-radius: 8px;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}
.form-field small {
    display: block;
    color: var(--ink-mute);
    font-size: 11px;
    margin-top: 6px;
}
.form-field.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-field.checkbox-field input { width: auto; }
.form-field.checkbox-field label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 14px; }
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--rule-soft);
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--bg-3);
    color: var(--ink);
    text-decoration: none;
}
.btn:hover {
    background: var(--bg);
    border-color: var(--rule);
}
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { display: block; width: 100%; padding: 12px 18px; text-align: center; }
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: var(--bg);
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-soft);
    border-color: var(--accent-soft);
    color: var(--bg);
}
.btn-link {
    background: transparent;
    color: var(--ink-soft);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.btn-link:hover { color: var(--ink); }

.current-image {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding: 8px;
    background: var(--bg);
    border-radius: 8px;
}
.current-image img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}
.current-image small { color: var(--ink-mute); margin: 0; }

/* ==========================================================================
   Tables
   ========================================================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--rule);
}
.data-table th, .data-table td {
    padding: 14px 16px;
    text-align: start;
    border-bottom: 1px solid var(--rule-soft);
}
.data-table th {
    background: var(--bg-3);
    font-weight: 600;
    color: var(--ink-soft);
    font-size: 12px;
}
.data-table td { font-size: 13px; }
.data-table small a { color: var(--ink-mute); font-size: 12px; }

.action-btn {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--rule);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}
.action-btn:hover { color: var(--ink); border-color: var(--ink-soft); }
.action-btn.danger { color: var(--danger); border-color: var(--danger); }
.action-btn.danger:hover { background: var(--danger); color: white; }

/* ==========================================================================
   Login
   ========================================================================== */
.login-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-card {
    max-width: 420px;
    width: 100%;
    padding: 48px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 16px;
}
.login-brand {
    text-align: center;
    margin-bottom: 32px;
}
.login-brand h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 16px 0 8px;
    letter-spacing: -0.02em;
}
.login-brand p {
    color: var(--ink-soft);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.login-hint {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-mute);
}
.login-hint code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-mute);
    font-size: 15px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px dashed var(--rule);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
    .project-layout { grid-template-columns: 1fr; gap: 48px; }
    .form-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 42px; }
    .project-header h1 { font-size: 36px; }
    .projects-grid { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .container { padding: 0 20px; }
    .header-inner { flex-wrap: wrap; gap: 12px; }
    .hero { padding: 48px 0; }
    .hero h1 { font-size: 32px; }
    .hero-stats { gap: 24px; flex-wrap: wrap; }
    .hero-stat .num { font-size: 28px; }
    .project-header h1 { font-size: 28px; }
    .project-tagline { font-size: 16px; }
}