:root {
    /* Color Palette - Technical/Industrial */
    --color-bg: #0a0a0a;
    --color-surface: #141414;
    --color-surface-hover: #1a1a1a;
    --color-border: #282828;
    --color-border-light: #333333;
    
    --color-text-primary: #e8e8e8;
    --color-text-secondary: #a0a0a0;
    --color-text-muted: #666666;
    
    --color-accent: #00ff88;
    --color-accent-dim: #00cc6a;
    --color-accent-glow: rgba(0, 255, 136, 0.2);
    
    --color-problem: #ff6b6b;
    --color-solution: #4ecdc4;
    
    /* Typography */
    --font-display: 'Darker Grotesque', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Animation */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

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

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: var(--transition-base);
}

.logo:hover {
    color: var(--color-text-primary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
    letter-spacing: 0.02em;
    position: relative;
}

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

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

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

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.grid-pattern {
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background-image: 
        linear-gradient(var(--color-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    animation: gridMove 60s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(60px, 60px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}

.hero-title .line {
    display: inline-block;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.hero-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    padding: 0.4rem 0.9rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.divider {
    color: var(--color-text-muted);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    max-width: 700px;
    line-height: 1.7;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

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

.btn {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.9rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    border: 1px solid transparent;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background: var(--color-accent-dim);
    box-shadow: 0 0 30px var(--color-accent-glow);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: var(--color-surface);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.5s forwards;
}

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

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Section Styles */
section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: var(--spacing-lg);
}

.section-number {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-accent);
    font-weight: 500;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* About Section */
.about {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

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

.about-approach h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

/* Projects Section */
.project-grid {
    display: grid;
    gap: 3rem;
}

.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2.5rem;
    transition: all var(--transition-slow);
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.1);
    transform: translateY(-4px);
}

/* Project Gallery/Carousel */
.project-gallery {
    margin: -2.5rem -2.5rem 2rem -2.5rem;
    position: relative;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.gallery-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.gallery-slides {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gallery-slide.placeholder {
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 100%);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-align: center;
    padding: 2rem;
}

/* Gallery Navigation Buttons */
.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-base);
    z-index: 10;
    opacity: 0;
}

.gallery-container:hover .gallery-prev,
.gallery-container:hover .gallery-next {
    opacity: 1;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.gallery-prev:active,
.gallery-next:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-prev {
    left: 1rem;
}

.gallery-next {
    right: 1rem;
}

.gallery-prev.hidden,
.gallery-next.hidden {
    display: none;
}

/* Gallery Dots */
.gallery-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 1rem 0;
    background: var(--color-bg);
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

.gallery-dot:hover {
    background: var(--color-border-light);
    transform: scale(1.2);
}

.gallery-dot.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: scale(1.3);
}

.gallery-dots.hidden {
    display: none;
}

.project-header {
    margin-bottom: 2rem;
}

.project-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-accent);
    background: rgba(0, 255, 136, 0.1);
    padding: 0.3rem 0.7rem;
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.project-problem,
.project-solution {
    margin-bottom: 1.5rem;
}

.problem-label,
.solution-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.problem-label {
    color: var(--color-problem);
}

.solution-label {
    color: var(--color-solution);
}

.project-problem p,
.project-solution p {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.project-features,
.project-learnings {
    margin-top: 1.5rem;
}

.project-features h4,
.project-learnings h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary);
}

.project-features ul,
.project-learnings ul {
    list-style: none;
    padding-left: 0;
}

.project-features li,
.project-learnings li {
    color: var(--color-text-secondary);
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.project-features li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

.project-learnings li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-solution);
}

/* Skills Section */
.skills {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    padding: 0.6rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--color-border);
}

.skill-list li:last-child {
    border-bottom: none;
}

.skill-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-size: 1.5rem;
    line-height: 1;
}

/* Experience Section */
.experience-content {
    max-width: 800px;
}

.job {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2.5rem;
}

.job-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.job-company {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.job-responsibilities {
    list-style: none;
}

.job-responsibilities li {
    color: var(--color-text-secondary);
    padding: 0.6rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.job-responsibilities li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

/* Contact Section */
.contact {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.contact-content {
    max-width: 600px;
}

.contact-intro {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--color-text-primary);
    text-decoration: none;
    padding: 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all var(--transition-base);
}

.contact-link:hover {
    border-color: var(--color-accent);
    transform: translateX(8px);
    background: rgba(0, 255, 136, 0.05);
}

.contact-icon {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--color-accent);
    width: 32px;
    text-align: center;
}

.contact-tagline {
    font-size: 1.3rem;
    color: var(--color-accent);
    font-weight: 600;
}

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

.footer p {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }
    
    .hero {
        padding-top: 120px;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    /* Mobile carousel adjustments */
    .project-gallery {
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    }
    
    .gallery-prev,
    .gallery-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        opacity: 0.8; /* More visible on mobile */
    }
    
    .gallery-prev {
        left: 0.5rem;
    }
    
    .gallery-next {
        right: 0.5rem;
    }
    
    .gallery-dots {
        padding: 0.75rem 0;
    }
    
    .gallery-dot {
        width: 10px;
        height: 10px;
    }
    
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .container {
        padding: 0 1.5rem;
    }
}

/* Scroll Animations */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
}
