/* ===== CSS Variables - Neo Brutalism ===== */
:root {
    /* Colors */
    --black: #0a0a0a;
    --black-light: #1a1a1a;
    --black-lighter: #252525;
    --red-dark: #8B0000;
    --red: #B22222;
    --red-bright: #DC143C;
    --gold: #D4AF37;
    --gold-light: #F4D03F;
    --white: #FAFAFA;
    --gray: #888888;
    --gray-dark: #444444;
    --accent: #D4AF37;

    /* Neo Brutalism */
    --border-width: 4px;
    --shadow-offset: 6px;
    --shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--black);
    --shadow-gold: var(--shadow-offset) var(--shadow-offset) 0 var(--gold);
    --shadow-red: var(--shadow-offset) var(--shadow-offset) 0 var(--red-dark);

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --container-width: 1400px;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

.text-accent {
    color: var(--accent);
}

/* ===== Container ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--black);
    border-bottom: var(--border-width) solid var(--white);
    padding: 16px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    padding: 10px 20px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: var(--border-width) solid transparent;
    transition: all 0.15s ease;
}

.nav-link:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

/* ===== Main ===== */
.main {
    flex: 1;
    padding: 120px 0 60px;
}

/* ===== Page Header ===== */
.page-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
}

.page-icon {
    width: 80px;
    height: 80px;
    background: var(--red-dark);
    border: var(--border-width) solid var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 4px 0 var(--gold);
    flex-shrink: 0;
}

.page-icon svg {
    width: 40px;
    height: 40px;
    color: var(--white);
}

.page-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.page-description {
    color: var(--gray);
    font-size: 1.1rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: var(--border-width) solid var(--white);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--red-dark);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:active {
    background: var(--red);
    box-shadow: 2px 2px 0 var(--black);
    transform: translate(4px, 4px);
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--gold);
}

.btn-secondary {
    background: var(--black-light);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-secondary:active {
    box-shadow: 2px 2px 0 var(--black);
    transform: translate(4px, 4px);
}

.btn-secondary:hover {
    background: var(--black-lighter);
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--gold);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* ===== Upload Panel ===== */
.upload-panel {
    background: var(--black-light);
    border: var(--border-width) solid var(--white);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
}

.upload-panel.hidden {
    display: none;
}

.drop-zone {
    border: 3px dashed var(--gray-dark);
    border-radius: 4px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}

.drop-icon {
    width: 48px;
    height: 48px;
    color: var(--gray);
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.drop-zone:hover .drop-icon,
.drop-zone.dragover .drop-icon {
    color: var(--gold);
}

.drop-text {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 24px;
}

.hidden-input {
    display: none;
}

/* ===== Viewer Panel ===== */
.viewer-panel {
    display: block;
}

.viewer-panel.hidden {
    display: none;
}

/* ===== Toolbar ===== */
.toolbar {
    background: var(--black-light);
    border: var(--border-width) solid var(--white);
    padding: 16px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.toolbar-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-name {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--gray);
}

.badge {
    background: var(--red-dark);
    color: var(--white);
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.8rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid var(--white);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--gray);
    pointer-events: none;
}

.search-input {
    background: var(--black);
    border: 2px solid var(--gray-dark);
    color: var(--white);
    padding: 10px 16px 10px 40px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    width: 260px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--gold);
}

.search-input::placeholder {
    color: var(--gray-dark);
}

/* ===== Contacts Grid ===== */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* ===== Contact Card ===== */
.contact-card {
    background: var(--black-light);
    border: var(--border-width) solid var(--white);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--gold);
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-avatar {
    width: 56px;
    height: 56px;
    background: var(--red-dark);
    border: 3px solid var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-initials {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
}

.contact-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.contact-org {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 500;
    margin-top: 2px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
}

.contact-field svg {
    width: 16px;
    height: 16px;
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 3px;
}

.contact-field-value {
    color: var(--gray);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    word-break: break-all;
}

.contact-field-value a {
    color: var(--gray);
    transition: color 0.2s;
}

.contact-field-value a:hover {
    color: var(--gold);
}

.contact-actions {
    margin-top: auto;
    padding-top: 12px;
    border-top: 2px solid var(--gray-dark);
}

.btn-download-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 2px solid var(--gray-dark);
    color: var(--gray);
    padding: 8px 14px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-download-contact svg {
    width: 14px;
    height: 14px;
}

.btn-download-contact:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

/* ===== Empty Search ===== */
.empty-search {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-search.hidden {
    display: none;
}

.empty-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-search p {
    font-size: 1.1rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--red-dark);
    border-top: var(--border-width) solid var(--white);
    padding: 30px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-dark);
    border: 2px solid var(--black);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .page-header {
        flex-direction: column;
        text-align: center;
    }

    .page-title {
        font-size: 2rem;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-info {
        justify-content: center;
    }

    .toolbar-actions {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        justify-content: center;
    }
}
