/* ========================================
   AnonyX — Custom Stylesheet v2.0
   Refined Black & White Brutalist Editorial
======================================== */

:root {
    --ax-black: #0a0a0a;
    --ax-white: #fafafa;
    --ax-gray: #7c7c7c;
    --ax-border: #e5e5e5;
    --ax-surface: #ffffff;
    --ax-muted: #f5f5f5;
    --ax-radius: 14px;
    --ax-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
    --ax-black: #fafafa;
    --ax-white: #0a0a0a;
    --ax-gray: #989898;
    --ax-border: #2a2a2a;
    --ax-surface: #141414;
    --ax-muted: #1a1a1a;
}

body {
    font-family: 'Satoshi', 'DM Sans', system-ui, sans-serif;
    background: var(--ax-white);
    color: var(--ax-black);
    -webkit-font-smoothing: antialiased;
}

.font-display { font-family: 'Instrument Serif', Georgia, serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

::selection { background: var(--ax-black); color: var(--ax-white); }

/* Grain Overlay */
.grain-overlay {
    position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat; background-size: 128px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes width-grow {
    from { width: 0%; }
    to { width: var(--target-width); }
}
@keyframes count-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up { animation: fadeUp 0.5s ease-out both; }
.animate-fade-in { animation: fadeIn 0.4s ease-out both; }
.animate-slide-down { animation: slideDown 0.4s ease-out both; }
.animate-slide-up { animation: slideUp 0.3s ease-out both; }
.animate-scale-in { animation: scaleIn 0.3s ease-out both; }
.animate-marquee { animation: marquee 30s linear infinite; }
.animate-spin-slow { animation: spin-slow 20s linear infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

/* Stagger children */
.stagger > * { opacity: 0; animation: fadeUp 0.5s ease-out forwards; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }
.stagger > *:nth-child(9) { animation-delay: 0.45s; }
.stagger > *:nth-child(10) { animation-delay: 0.5s; }
.stagger > *:nth-child(11) { animation-delay: 0.55s; }
.stagger > *:nth-child(12) { animation-delay: 0.6s; }

/* Scroll reveal */
.reveal {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== COMPONENTS ===== */

/* Cards */
.ax-card {
    background: var(--ax-surface);
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius);
    transition: all var(--ax-transition);
    position: relative; overflow: hidden;
}
.ax-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.02) 100%);
    pointer-events: none; transition: opacity var(--ax-transition);
}
.ax-card:hover {
    border-color: var(--ax-black);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.dark .ax-card:hover { box-shadow: 0 8px 30px rgba(255,255,255,0.05); }

/* Featured card glow */
.ax-card-featured {
    border-color: var(--ax-black);
    box-shadow: 0 0 0 1px var(--ax-black);
}
.ax-card-featured::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--ax-black);
}

/* Buttons */
.ax-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; font-weight: 600; font-size: 14px;
    border-radius: 999px; transition: all var(--ax-transition);
    cursor: pointer; position: relative; overflow: hidden; white-space: nowrap;
}
.ax-btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%); transition: transform 0.5s ease;
}
.ax-btn:hover::after { transform: translateX(100%); }

.ax-btn-primary {
    background: var(--ax-black); color: var(--ax-white);
}
.ax-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.ax-btn-outline {
    background: transparent; color: var(--ax-black);
    border: 1.5px solid var(--ax-border);
}
.ax-btn-outline:hover {
    border-color: var(--ax-black);
    background: var(--ax-muted);
}
.ax-btn-ghost {
    background: transparent; color: var(--ax-gray);
    padding: 8px 16px;
}
.ax-btn-ghost:hover { color: var(--ax-black); background: var(--ax-muted); }

/* Inputs */
.ax-input {
    width: 100%; padding: 10px 16px;
    background: var(--ax-surface);
    border: 1.5px solid var(--ax-border);
    border-radius: 12px; font-size: 14px;
    transition: all var(--ax-transition);
    color: var(--ax-black);
}
.ax-input::placeholder { color: var(--ax-gray); }
.ax-input:focus {
    outline: none; border-color: var(--ax-black);
    box-shadow: 0 0 0 3px rgba(10,10,10,0.06);
}
.dark .ax-input:focus { box-shadow: 0 0 0 3px rgba(250,250,250,0.06); }

.ax-select {
    padding: 8px 32px 8px 14px;
    background: var(--ax-surface);
    border: 1.5px solid var(--ax-border);
    border-radius: 10px; font-size: 13px;
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c7c7c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    transition: border-color var(--ax-transition);
    color: var(--ax-black);
}
.ax-select:focus { outline: none; border-color: var(--ax-black); }

/* Badge */
.ax-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; font-size: 11px; font-weight: 600;
    border-radius: 999px; letter-spacing: 0.02em;
}
.ax-badge-black { background: var(--ax-black); color: var(--ax-white); }
.ax-badge-outline { border: 1px solid var(--ax-border); color: var(--ax-gray); }
.ax-badge-green { background: #dcfce7; color: #166534; }
.dark .ax-badge-green { background: #14532d; color: #86efac; }

/* Skeleton loading */
.ax-skeleton {
    background: linear-gradient(90deg, var(--ax-muted) 25%, var(--ax-border) 50%, var(--ax-muted) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Tags / skill pills */
.ax-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 12px; font-size: 12px; font-weight: 500;
    border-radius: 999px; border: 1px solid var(--ax-border);
    transition: all var(--ax-transition); cursor: default;
    color: var(--ax-gray);
}
.ax-tag:hover { border-color: var(--ax-black); color: var(--ax-black); }
.ax-tag-filled {
    background: var(--ax-black); color: var(--ax-white);
    border-color: var(--ax-black);
}

/* Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
    padding: 4px 10px; font-size: 11px; font-weight: 500;
    background: var(--ax-black); color: var(--ax-white);
    border-radius: 6px; white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
[data-tooltip]:hover::after { opacity: 1; }

/* Dropdown */
.ax-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 220px; background: var(--ax-surface);
    border: 1px solid var(--ax-border); border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
    padding: 6px; z-index: 50;
    animation: scaleIn 0.2s ease-out;
}
.dark .ax-dropdown { box-shadow: 0 16px 48px rgba(0,0,0,0.5); }
.ax-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; font-size: 13px; border-radius: 10px;
    transition: background var(--ax-transition); cursor: pointer;
    color: var(--ax-black);
}
.ax-dropdown-item:hover { background: var(--ax-muted); }
.ax-dropdown-divider { height: 1px; background: var(--ax-border); margin: 4px 0; }

/* Progress ring */
.progress-ring { transform: rotate(-90deg); }
.progress-ring-circle {
    transition: stroke-dashoffset 1s ease-out;
    stroke-linecap: round;
}

/* Status badges */
.status-applied    { background: #f3f4f6; color: #6b7280; }
.status-reviewed   { background: #fef3c7; color: #92400e; }
.status-shortlisted { background: #dbeafe; color: #1e40af; }
.status-interview  { background: #ede9fe; color: #5b21b6; }
.status-offered    { background: #d1fae5; color: #065f46; }
.status-hired      { background: var(--ax-black); color: var(--ax-white); }
.status-rejected   { background: #fee2e2; color: #991b1b; }
.status-active     { background: var(--ax-black); color: var(--ax-white); }
.status-paused     { background: #fef3c7; color: #92400e; }
.status-closed     { background: #f3f4f6; color: #6b7280; }
.status-draft      { background: #f3f4f6; color: #9ca3af; }

/* Match score ring colors */
.match-high { stroke: #0a0a0a; }
.match-medium { stroke: #7c7c7c; }
.match-low { stroke: #dcdcdc; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ax-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ax-gray); }

/* Line clamp */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Modal overlay */
.ax-overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; animation: fadeIn 0.2s ease-out;
}
.ax-modal {
    background: var(--ax-surface);
    border-radius: 20px; width: 100%; max-width: 520px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    animation: scaleIn 0.25s ease-out;
    max-height: 90vh; overflow-y: auto;
}

/* Tabs */
.ax-tabs { display: flex; gap: 2px; background: var(--ax-muted); padding: 3px; border-radius: 10px; }
.ax-tab {
    flex: 1; padding: 8px 16px; text-align: center;
    font-size: 13px; font-weight: 500; border-radius: 8px;
    cursor: pointer; transition: all var(--ax-transition);
    color: var(--ax-gray);
}
.ax-tab.active { background: var(--ax-surface); color: var(--ax-black); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* Notification dot */
.notif-dot {
    position: absolute; top: 2px; right: 2px;
    width: 8px; height: 8px; background: #ef4444;
    border-radius: 50%; border: 2px solid var(--ax-surface);
}

/* ATS Pipeline columns */
.pipeline-col {
    min-height: 200px; background: var(--ax-muted);
    border-radius: 12px; padding: 12px;
    transition: background var(--ax-transition);
}
.pipeline-col.dragover { background: rgba(0,0,0,0.05); }

/* Empty state */
.ax-empty {
    text-align: center; padding: 60px 20px;
}
.ax-empty-icon {
    width: 56px; height: 56px; margin: 0 auto 16px;
    background: var(--ax-muted); border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    color: var(--ax-gray);
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .ax-card:hover { transform: none; }
    .ax-btn { padding: 9px 18px; font-size: 13px; }
}
