/* --- CSS VARIABLES --- */
:root {
    --brand-dark: #0f172a;
    --brand-card: #1e293b;
    --brand-primary: #2dd4bf;
    --brand-secondary: #fbbf24;
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(15, 23, 42, 0.85);
    --transition: all 0.3s ease;
}

/* --- BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--brand-dark);
    color: var(--text-white);
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.font-mono {
    font-family: "JetBrains Mono", monospace;
}

.hidden {
    display: none !important;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: var(--brand-dark);
}

.btn-primary:hover {
    background-color: white;
    transform: translateY(-2px);
}


/* --- NAVBAR --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    z-index: 100;
    background-color: var(--brand-dark);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

nav.scrolled {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: -1px;
}

.nav-links, .desktop-only {
    display: none;
}

@media (min-width: 880px) {
    .nav-links {
        display: flex;
        gap: 2rem;
        font-size: 0.875rem;
    }
    .desktop-only {
        display: block !important;
    }
}

.nav-links a {
    padding: 0.5rem 0.75rem;
}

.nav-links a:hover {
    color: var(--brand-primary);
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (min-width: 880px) {
    .mobile-menu-btn,
    .mobile-menu-panel {
        display: none !important;
    }
}

.mobile-menu-panel {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--brand-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    display: none;
}

.mobile-menu-panel.active {
    display: block;
}

.mobile-menu-panel a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 6px;
}

.mobile-menu-panel a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* --- HERO HEADER --- */
.hero-header {
    padding: 140px 0 60px;
    border-bottom: 1px solid var(--border-color);
}

.hero-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-header p {
    max-width: 700px;
    color: var(--text-gray);
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

/* --- HEADER --- */
header {
    padding: 120px 0 40px;
    text-align: left;
    position: relative;
    z-index: 10;
}

header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

header p {
    color: var(--text-gray);
    max-width: 600px;
    font-size: 1.125rem;
}

/* --- FILTER BAR --- */
.filter-section {
    position: sticky;
    top: 80px;
    z-index: 90;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .filter-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.filter-group::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 0.4rem 1.25rem;
    border-radius: 999px;
    border: 1px solid #334155;
    background: transparent;
    color: var(--text-gray);
    font-size: 0.875rem;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--brand-primary);
}

.filter-btn.active {
    background: var(--brand-primary);
    color: var(--brand-dark);
    border-color: var(--brand-primary);
    font-weight: 700;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .search-wrapper {
        width: 260px;
    }
}

.search-wrapper input {
    width: 100%;
    background: var(--brand-card);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    color: white;
    font-size: 0.875rem;
    outline: none;
}

.search-wrapper input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 1px var(--brand-primary);
}

.search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.875rem;
}

/* --- PORTFOLIO GRID --- */
main {
    padding: 4rem 0;
    flex-grow: 1;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- PROJECT CARD --- */
.project-card {
    background-color: var(--brand-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(45, 212, 191, 0.4);
}

.project-img-container {
    height: 200px;
    background-color: #161e2e;
    position: relative;
    overflow: hidden;
}

.project-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    transition: var(--transition);
}

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

.project-img-placeholder i {
    font-size: 4rem;
    color: #334155;
}

.project-tags {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.tag-pill {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: white;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.project-card:hover .project-title {
    color: var(--brand-primary);
}

.external-links {
    display: flex;
    gap: 0.75rem;
    color: #64748b;
}

.external-links a:hover {
    color: white;
}

.project-desc {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer-info {
    border-top: 1px solid #334155;
    padding-top: 1rem;
    margin-bottom: 1.25rem;
}

.footer-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-family: "JetBrains Mono", monospace;
    color: #475569;
    margin-bottom: 4px;
    display: block;
}

.footer-value {
    font-size: 0.875rem;
    font-weight: 600;
}

/* --- NEW: DETAIL LINK BUTTON --- */
.btn-view-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: #161e2e;
    border: 1px solid #334155;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    transition: var(--transition);
}

.project-card:hover .btn-view-detail {
    background: var(--brand-primary);
    color: var(--brand-dark);
    border-color: var(--brand-primary);
}

/* --- EMPTY STATE --- */
#noResults {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 0;
}

#noResults i {
    font-size: 3rem;
    color: #334155;
    margin-bottom: 1rem;
}

/* --- CTA SECTION --- */
.cta-section {
    padding: 80px 0;
    background: rgba(30, 41, 59, 0.3);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.btn-collab {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 2rem;
    background: white;
    color: var(--brand-dark);
    border-radius: 8px;
    font-weight: 700;
}

.btn-collab:hover {
    transform: scale(1.05);
}

/* --- FOOTER --- */
footer {
    background-color: #080808;
    padding: 50px 0 40px;
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: block;
}

.footer-text {
    color: var(--text-gray);
    font-size: 0.875rem;
    max-width: 350px;
}

.footer-title {
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.footer-links a:hover {
    color: var(--brand-primary);
}

.social-row {
    display: flex;
    gap: 1rem;
}

.social-row a {
    font-size: 1.25rem;
    color: var(--text-gray);
    transition: var(--transition);
}

.social-row a:hover {
    color: var(--icon-color);
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .footer-bottom { flex-direction: row; }
}

.footer-bottom p {
    font-size: 0.75rem;
    color: #4b5563;
}
