/* ═══════════════════════════════════════════════════════════
   WELDER PORTFOLIO — Premium Dark Industrial Theme
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────── */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-surface: #161616;
    --bg-surface-hover: #1e1e1e;
    --bg-sidebar: #0e0e0e;

    --accent: #c8891a;
    --accent-light: #e8a838;
    --accent-dim: #a06e10;
    --accent-glow: rgba(200, 137, 26, 0.10);
    --accent-glow-strong: rgba(200, 137, 26, 0.25);

    --text-primary: #eaeaea;
    --text-secondary: #999999;
    --text-tertiary: #5a5a5a;

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(200, 137, 26, 0.3);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(200, 137, 26, 0.08);

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    --sidebar-width: 340px;
    --header-height: 56px;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent);
}

/* ── Layout ────────────────────────────────────────────── */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    z-index: 10;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}

.sidebar-inner {
    padding: 48px 36px 36px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.sidebar-header {
    margin-bottom: 8px;
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.profile-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

.profile-bio p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.profile-bio p:last-child {
    margin-bottom: 0;
}

/* ── Certifications ────────────────────────────────────── */
.section-label {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
}

.certifications {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-light);
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: 100px;
    letter-spacing: 0.02em;
    transition: all var(--transition);
}

.cert-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.cert-badge:hover {
    background: var(--accent-glow-strong);
    transform: translateY(-1px);
}

/* ── Contact Actions ───────────────────────────────────── */
.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
}

.contact-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.contact-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
    transform: translateX(4px);
    color: var(--text-primary);
}

.contact-btn.whatsapp:hover {
    border-color: #25d366;
    box-shadow: 0 0 16px rgba(37, 211, 102, 0.1);
}

.contact-btn.email:hover {
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
}

.contact-btn.phone:hover {
    border-color: #5a8fa8;
    box-shadow: 0 0 16px rgba(90, 143, 168, 0.1);
}

/* ── Sidebar Footer ────────────────────────────────────── */
.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
}

.copyright {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════
   GALLERY
   ═══════════════════════════════════════════════════════════ */

.gallery-wrapper {
    flex: 1;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* ── Gallery Header / Filters ──────────────────────────── */
.gallery-header {
    position: sticky;
    top: 0;
    z-index: 9;
    background: linear-gradient(to bottom, var(--bg-primary) 60%, transparent);
    padding: 20px 28px 28px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    padding: 7px 18px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.02em;
    user-select: none;
}

.filter-pill:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
}

.filter-pill.active {
    color: var(--bg-primary);
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}

/* ── Masonry Grid ──────────────────────────────────────── */
.gallery-masonry {
    column-count: 2;
    column-gap: 16px;
    padding: 0 28px 40px;
}

.gallery-card {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    position: relative;
    transition: all var(--transition);
}

.gallery-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.gallery-card img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: filter var(--transition);
}

.gallery-card:hover img {
    filter: brightness(1.05);
}

.card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent-light);
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-accent);
    border-radius: 100px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 2;
    pointer-events: none;
}

.card-info {
    padding: 14px 16px 4px;
}

.card-info h3 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-desc {
    padding: 4px 16px 14px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── YouTube Embed ─────────────────────────────────────── */
.gallery-card-video .video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.gallery-card-video .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ── YouTube Shorts (9:16 portrait) ───────────────────── */
.gallery-card-video .video-wrapper.video-shorts {
    padding-bottom: 177.78%; /* 16/9 * 100 = 9:16 ratio */
}

/* ── Disable iframe pointer events during drag ────────── */
body.is-dragging .gallery-card-video iframe {
    pointer-events: none;
}

/* ── Empty State ───────────────────────────────────────── */
.gallery-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    color: var(--text-tertiary);
}

.empty-icon {
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-icon svg {
    stroke: var(--text-tertiary);
}

.empty-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-sub {
    font-size: 0.85rem;
    max-width: 320px;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════ */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    animation: lightboxIn 0.3s ease;
}

@keyframes lightboxIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.lightbox-info {
    margin-top: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.lightbox-info h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 1002;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    color: var(--text-primary);
    transition: all var(--transition);
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.16);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    color: var(--text-primary);
    transition: all var(--transition);
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.14);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 12px 24px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    animation: toastIn 0.4s var(--transition), toastOut 0.3s ease 2.7s forwards;
    white-space: nowrap;
}

.toast.success {
    border-color: rgba(37, 211, 102, 0.3);
    background: linear-gradient(135deg, var(--bg-surface), rgba(37, 211, 102, 0.05));
}

.toast.error {
    border-color: rgba(255, 80, 80, 0.3);
    background: linear-gradient(135deg, var(--bg-surface), rgba(255, 80, 80, 0.05));
}

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

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* Large desktop: 3 columns */
@media (min-width: 1400px) {
    .gallery-masonry {
        column-count: 3;
    }
}

/* Tablet & small desktop */
@media (max-width: 1024px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-inner {
        padding: 32px 28px 28px;
    }

    .profile-name {
        font-size: 2rem;
    }

    .gallery-masonry {
        column-count: 2;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .sidebar-inner {
        padding: 24px 20px 20px;
    }

    .profile-name {
        font-size: 1.7rem;
    }

    .gallery-header {
        padding: 16px 16px 20px;
    }

    .gallery-masonry {
        column-count: 1;
        padding: 0 16px 32px;
    }

    .gallery-card {
        border-radius: var(--radius-sm);
    }

    .lightbox-nav {
        display: none;
    }

    .lightbox-content img {
        max-width: 95vw;
        max-height: 80vh;
        border-radius: var(--radius-sm);
    }

    .filter-pills {
        gap: 6px;
    }

    .filter-pill {
        padding: 6px 14px;
        font-size: 0.7rem;
    }
}

/* ── Accessibility ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
