/* 
   PREMIUM ENGINEER PORTFOLIO 
   Aesthetic: Matte Dark, High Precision, Advanced Cards
*/

:root {
    /* Base Colors - Matte Black Theme */
    --bg-body: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-accent: #3b82f6; /* Professional Blue */
    
    --border-subtle: #262626;
    --border-highlight: #404040;
    
    --gradient-glow: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
    
    /* Dimensions */
    --nav-height: 70px;
    --card-radius: 16px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, .logo {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

/* Navigation - Glassmorphic */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

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

.social-icons-nav a {
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: color 0.3s;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
    /* User Image Background with Dark Overlay */
    background: 
        linear-gradient(to bottom, rgba(10,10,10,0.7), rgba(10,10,10,0.9)),
        url('image.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    z-index: 2;
}

/* Typewriter Effect Container */
.typewriter-container {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.1rem;
    color: var(--text-accent);
    margin-bottom: 1.5rem;
    min-height: 1.6em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--text-accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: slideUp 0.8s ease-out 0.2s backwards;
}

.hero p {
    font-size: 1.2rem;
    color: #d4d4d4;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: slideUp 0.8s ease-out 0.4s backwards;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: slideUp 0.8s ease-out 0.6s backwards;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-body);
}

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

.btn-secondary {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-primary);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: rgba(20, 20, 20, 0.8);
}

/* Sections */
section { padding: 6rem 0; }

.section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.about-highlight {
    color: var(--text-primary);
    font-weight: 500;
}

/* Skills/Tech Stack Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    border-radius: var(--card-radius);
    transition: transform 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-highlight);
}

.skill-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: rgba(255,255,255,0.05);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.skill-card:hover .skill-tag {
    background: rgba(255,255,255,0.1);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

/* Projects Grid - Advanced Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--border-highlight);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    z-index: 10;
}

/* Image Area - Cropping Logic */
.card-image-wrapper {
    height: 220px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures full image is visible without cropping */
    object-position: center;
    transform: scale(1.0); 
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(0.95);
    background-color: var(--bg-card); /* Seamless background for aspect ratio gaps */
}

.card:hover .card-image {
    transform: scale(1.1);
    filter: brightness(1);
}

/* Card Content */
.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-icon {
    font-size: 1.2rem;
    color: var(--text-accent);
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex: 1;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.card:hover .tag {
    border-color: var(--border-subtle);
    background: rgba(255,255,255,0.08);
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.card-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}

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

/* Contact Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 0;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-link {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.social-link:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
}

/* Mobile Nav */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border-subtle);
        gap: 1.5rem;
    }
    
    .nav-links.active { display: flex; }
    
    .menu-toggle { display: block; }
    
    .projects-grid { grid-template-columns: 1fr; }
    
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    
    .hero h1 { font-size: 2.5rem; }
    
    section { padding: 4rem 0; }
    
    .container { padding: 0 1.5rem; }
    
    .section-title { font-size: 2rem; margin-bottom: 3rem; }
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Mission Card with Interactive Background */
/* Mission Card with Interactive Background */
.mission-card {
    position: relative;
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    min-height: 420px; /* taller card to show more of the portrait */
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    z-index: 1;
    background: var(--bg-card); /* Fallback */
}

/* Background Image - Natural Color */
.mission-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('joseph.jpeg');
    background-size: 80% auto; /* make image smaller so head + some torso are visible */
    background-position: center 30%; /* vertical framing for a professional crop */
    background-repeat: no-repeat;
    z-index: -2;
    filter: brightness(0.9) contrast(1.1);
    transform: scale(1);
    transition: transform 0.6s ease;
}

.mission-card:hover::after {
    transform: scale(1.05); /* Subtle zoom on hover */
}

/* Dark Overlay for Text Readability */
.mission-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.85); /* Dark matte overlay */
    z-index: -1;
    transition: background 0.5s ease;
}

/* Hover: Reveal Image */
.mission-card:hover::before {
    background: rgba(5, 5, 5, 0.2);
}

/* Content Container */
.mission-content {
    position: relative;
    z-index: 2;
    transition: opacity 0.4s ease;
}

.mission-card:hover .mission-content {
    opacity: 0;
}