/* ============================================
   SELBY MASHIKI — PERSONAL PORTFOLIO
   Dark Cybersecurity Aesthetic
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c27;
    --text-primary: #e8e8ec;
    --text-secondary: #8b8b9a;
    --text-muted: #5a5a6b;
    --accent: #00d4aa;
    --accent-dim: rgba(0, 212, 170, 0.1);
    --accent-glow: rgba(0, 212, 170, 0.4);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(0, 212, 170, 0.3);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-dim);
    color: var(--accent);
}

/* Noise Texture Overlay */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Ambient Glow */
.glow-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-50px, 30px) scale(1.1); }
    66% { transform: translate(30px, -20px) scale(0.9); }
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 40px;
}

.nav-brand {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-greeting {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 0.2s;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 0.4s;
}

.hero-role {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    margin-bottom: 24px;
    font-size: 1rem;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 0.6s;
}

.role-item {
    font-weight: 500;
}

.role-separator {
    color: var(--accent);
    opacity: 0.5;
}

.hero-bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 0.8s;
}

.hero-bio strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 1s;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 170, 0.4);
}

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

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card);
    transform: translateY(-2px);
}

/* Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 1.4s;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 60px;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* ============================================
   WORK SECTION
   ============================================ */
.work-section {
    background: var(--bg-secondary);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.work-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: var(--transition);
}

.work-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.work-card:hover::before {
    opacity: 1;
}

.work-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.work-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.work-org {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.work-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 212, 170, 0.05) 100%);
    border-color: var(--border-hover);
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.project-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 20px;
}

.project-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.project-link:hover {
    gap: 8px;
}

/* ============================================
   AWARDS SECTION
   ============================================ */
.awards-section {
    background: var(--bg-secondary);
}

.awards-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.award-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.award-item:last-child {
    border-bottom: none;
}

.award-item:hover {
    padding-left: 16px;
}

.award-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent);
    border-radius: 2px;
    transition: var(--transition);
}

.award-item:hover::before {
    height: 60%;
}

.award-year {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    padding-top: 4px;
}

.award-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.award-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    text-align: center;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 48px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    min-width: 160px;
}

.contact-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.contact-icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
    transition: var(--transition);
}

.contact-card:hover .contact-icon {
    transform: scale(1.1);
}

.contact-card span {
    font-weight: 600;
    font-size: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .navbar {
        padding: 16px 20px;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-role {
        font-size: 0.9rem;
    }

    .section {
        padding: 60px 0;
    }

    .project-card.featured {
        grid-column: span 1;
    }

    .award-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        width: 100%;
        max-width: 300px;
        flex-direction: row;
        justify-content: center;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2.2rem;
    }

    .work-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-cta {
        width: 100%;
    }
}

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

    .glow-orb {
        animation: none;
    }
}
