/* ===== ROOT VARIABLES ===== */
:root {
    --bg: #0d0d0d;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.25);
    --text: #ffffff;
    --text-secondary: #888888;
    --text-muted: #4a4a4a;
    --accent: #d0d0d0;
    --accent-sub: rgba(255, 255, 255, 0.12);
    --nav-bg: rgba(18, 18, 18, 0.88);
    --t: 0.18s ease;
}


/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default !important;
    user-select: none;
    -webkit-user-select: none;
}

a, button, [data-tab], .view-project, .btn-sm, .btn-accent,
.btn-outline, .btn-outline-link, .social-btn, .visit-link,
.thumbnail, .gallery-btn, .close-modal, .project-card,
.resume-open-card {
    cursor: pointer !important;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== CANVAS ===== */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}


/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--nav-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 5px 7px;
    white-space: nowrap;
}

.nav-brand,
.nav-link {
    text-decoration: none;
    font-size: 13.5px;
    padding: 6px 14px;
    border-radius: 50px;
    cursor: pointer;
    transition: color var(--t), background var(--t), border-color var(--t);
    border: 1px solid transparent;
    user-select: none;
    display: inline-block;
}

.nav-brand {
    color: var(--text);
    font-weight: 600;
}

.nav-brand:hover { background: var(--bg-card); }

.nav-link {
    color: var(--text-secondary);
    font-weight: 400;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-card);
}

.nav-link.active {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}


/* ===== TAB SYSTEM ===== */
.tab-content {
    display: none;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-top: 80px;
    animation: fadeIn 0.25s ease;
}

.tab-content.active { display: block; }

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

/* ===== CONTAINER ===== */
.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ===== HOME TAB ===== */
.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 40px 24px;
    text-align: center;
}

.headshot {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    margin-bottom: 24px;
}

.hero-name {
    font-size: clamp(52px, 9vw, 88px);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 44px;
    font-weight: 400;
}

.prev-exp-section { margin-bottom: 44px; }

.prev-exp-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.company-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.company-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: border-color var(--t), color var(--t);
}

.company-badge:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.company-badge i {
    color: var(--accent);
    font-size: 13px;
}

.social-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 26px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    min-width: 96px;
    transition: border-color var(--t), color var(--t), background var(--t);
}

.social-btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: var(--bg-card-hover);
}

.social-btn i { font-size: 22px; }

/* ===== PAGE TITLES ===== */
.page-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.5;
}

/* ===== SHARED BUTTONS ===== */
.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: var(--accent);
    color: #0a0a0a;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: opacity var(--t);
    font-family: inherit;
}

.btn-accent:hover { opacity: 0.82; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--t), background var(--t);
    font-family: inherit;
}

.btn-outline:hover {
    border-color: var(--border-hover);
    background: var(--bg-card);
}

.btn-outline-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color var(--t), background var(--t);
}

.btn-outline-link:hover {
    border-color: var(--border-hover);
    background: var(--bg-card);
}

.btn-sm {
    padding: 8px 18px;
    background: var(--accent);
    color: #0a0a0a;
    border: none;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--t);
    font-family: inherit;
}

.btn-sm:hover { opacity: 0.82; }

/* ===== TAGS ===== */
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    padding: 4px 12px;
    background: var(--accent-sub);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 11.5px;
    border-radius: 50px;
    font-weight: 500;
}

/* ===== PROJECT GRID CARDS ===== */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-card {
    display: grid;
    grid-template-columns: 340px 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color var(--t), transform var(--t);
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #111;
}

.card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-img-placeholder::before {
    content: "Image";
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #111;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.project-card:hover .card-img img { transform: scale(1.04); }

/* Portrait phone screenshot variant */
.project-card.portrait-card {
    grid-template-columns: 120px 1fr;
}

.card-img-portrait {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #111;
}

.card-img-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.35s ease;
}

.project-card:hover .card-img-portrait img { transform: scale(1.04); }

/* Square app icon variant */
.project-card.icon-card {
    grid-template-columns: 200px 1fr;
}

.card-img-icon {
    position: relative;
    height: 200px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    overflow: hidden;
}

.card-img-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 22px;
    transition: transform 0.35s ease;
}

.project-card:hover .card-img-icon img { transform: scale(1.05); }

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--t);
}

.project-card:hover .card-overlay { opacity: 1; }

.card-body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.card-body h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}

.card-body p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ===== EXPERIENCE TAB ===== */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.exp-card {
    display: flex;
    gap: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px 28px;
    transition: border-color var(--t);
}

.exp-card:hover { border-color: var(--border-hover); }

.exp-logo {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    min-width: 64px;
    max-width: 64px;
}

.exp-icon-wrap {
    width: 64px;
    height: 64px;
    max-width: 64px;
    max-height: 64px;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.exp-icon-wrap img {
    width: 64px;
    height: 64px;
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
    display: block;
}

.exp-body { flex: 1; }

.exp-company {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.exp-company + .exp-meta {
    margin-top: 12px;
}

.exp-role {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
    margin-bottom: 12px;
}

.exp-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.exp-meta span {
    font-size: 12.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.exp-meta i {
    color: var(--text-secondary);
    font-size: 11px;
}

.exp-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exp-bullets li {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.55;
    padding-left: 16px;
    position: relative;
}

.exp-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
}

/* ===== RESUME TAB ===== */
.resume-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.resume-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.resume-preview-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.resume-img {
    width: 100%;
    display: block;
}

/* ===== PROJECT MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 2000;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    background: #131313;
    border: 1px solid var(--border);
    border-radius: 20px;
    margin: 40px auto;
    max-width: 880px;
    width: 90%;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 26px;
    border-bottom: 1px solid var(--border);
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-project-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-title-logo {
    height: 28px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.modal-header h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
}

.tag-logo {
    padding: 0 4px;
    background: transparent;
    border-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tag-logo img {
    height: 16px;
    width: auto;
    display: block;
}

.tag-fa {
    padding: 0 4px;
    background: transparent;
    border-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tag-fa i {
    font-size: 16px;
    color: var(--text-secondary);
}

.tech-tag-fa {
    padding: 0 4px;
    background: transparent !important;
    border-color: transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tech-tag-fa i {
    font-size: 18px;
    color: var(--text-secondary);
}

.tech-tag-logo {
    padding: 0 4px;
    background: transparent !important;
    border-color: transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tech-tag-logo img {
    height: 18px;
    width: auto;
    display: block;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color var(--t), background var(--t);
    line-height: 1;
}

.close-modal:hover {
    color: var(--text);
    background: var(--bg-card);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-height: 68vh;
    height: 68vh;
    overflow: hidden;
}

.project-gallery {
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    height: 100%;
    overflow: hidden;
}

.gallery-main {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-main.landscape { aspect-ratio: 16/9; }

.modal-content.portrait-mode .modal-body {
    max-height: 82vh;
    height: 82vh;
}

.gallery-main img,
.gallery-main video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes slideFromRight {
    from { transform: translateX(40px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideFromLeft {
    from { transform: translateX(-40px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

.slide-from-right { animation: slideFromRight 0.22s ease; }
.slide-from-left  { animation: slideFromLeft  0.22s ease; }

.gallery-controls {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}

.gallery-btn {
    width: 34px;
    height: 34px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: background var(--t);
    font-size: 11px;
}

.gallery-btn:hover { background: rgba(0, 0, 0, 0.92); }

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    padding: 10px;
    overflow-x: auto;
    border-top: 1px solid var(--border);
}

.thumbnail {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--t);
    position: relative;
}

.thumbnail.active { border-color: var(--accent); }

.thumbnail img,
.thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 11px;
}

.project-details {
    padding: 22px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.project-details h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 7px;
}

.project-details p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

#modalFeatures {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#modalFeatures li {
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 13px;
    position: relative;
    line-height: 1.5;
}

#modalFeatures li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
}

#modalTechStack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-tag {
    padding: 3px 10px;
    background: var(--accent-sub);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 11px;
    border-radius: 50px;
}

.visit-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.visit-link {
    display: inline-flex;
    background: transparent;
    border: none;
    padding: 0;
    transition: transform 0.18s ease;
}

.visit-link:hover {
    transform: scale(1.12);
}

.visit-link img {
    height: 36px;
    width: auto;
    display: block;
    border-radius: 8px;
}

.visit-link i {
    font-size: 36px;
    color: var(--text);
    display: block;
}

#projectLinks {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#projectLinks a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity var(--t);
    font-family: inherit;
}

#projectLinks .btn-primary {
    background: var(--accent);
    color: #0a0a0a;
}

#projectLinks .btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

#projectLinks a:hover { opacity: 0.8; }

/* ===== RESPONSIVE ===== */
.novra-logo-mobile { display: none; }

@media (max-width: 820px) {
    .project-card,
    .project-card.portrait-card,
    .project-card.icon-card { grid-template-columns: 1fr; }

    .card-img,
    .card-img-portrait { height: 200px; }

    .card-img-icon { width: 100%; height: 180px; }

    .modal-body {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }

    .project-gallery {
        border-right: none;
        border-bottom: 1px solid var(--border);
        height: 320px;
    }

    .project-details { max-height: 50vh; overflow-y: auto; }
}

@media (max-width: 640px) {
    .navbar { top: 12px; width: calc(100% - 24px); }

    .nav-pill {
        padding: 4px 5px;
        gap: 1px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
    }

    .nav-pill::-webkit-scrollbar { display: none; }

    .nav-brand { font-size: 11px; padding: 5px 10px; }
    .nav-link  { font-size: 11px; padding: 5px 10px; white-space: nowrap; }

    .hero-container { padding: 24px 16px; }
    .hero-name { font-size: 42px; letter-spacing: -1px; margin-bottom: 8px; }
    .hero-subtitle { font-size: 15px; margin-bottom: 32px; }
    .headshot { width: 96px; height: 96px; margin-bottom: 18px; }

    .social-buttons { gap: 8px; }
    .social-btn { padding: 14px 18px; min-width: 76px; font-size: 11px; }
    .social-btn i { font-size: 20px; }

    .container { padding: 28px 16px 60px; }
    .page-title { font-size: 28px; }

    .card-body { padding: 14px 16px 16px; }
    .card-body h3 { font-size: 15px; }

    .exp-card { flex-direction: column; gap: 12px; padding: 20px; }
    .exp-company { font-size: 15px; }
    .exp-meta { gap: 10px; }

    .modal-content { margin: 16px auto; width: 95%; border-radius: 14px; }
    .modal-header { padding: 16px 18px; }
    .modal-header h2 { font-size: 16px; }
    .modal-title-logo { height: 22px; }
    .modal-project-icon { width: 28px; height: 28px; }
    .project-gallery { height: 260px; }
    .project-details { padding: 16px; gap: 14px; }

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

    .novra-logo-default { display: none; }
    .novra-logo-mobile { display: block; }
}
