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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #FFFFFF;
    background: #121927;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Photorealistic Dark Digital Landscape Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* Deep atmospheric fog layers */
        radial-gradient(ellipse 1400px 700px at 25% 15%, rgba(10, 31, 68, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 1000px 500px at 75% 70%, rgba(43, 58, 103, 0.25) 0%, transparent 65%),
        radial-gradient(ellipse 800px 400px at 15% 85%, rgba(10, 31, 68, 0.2) 0%, transparent 70%),
        radial-gradient(ellipse 600px 300px at 85% 25%, rgba(43, 58, 103, 0.15) 0%, transparent 75%),
        /* Gradient depth layers for cinematic feel */
        linear-gradient(135deg, 
            #0A1F44 0%, 
            #121927 25%, 
            #2B3A67 50%, 
            #121927 75%,
            #0A1F44 100%
        ),
        /* Subtle light rays */
        linear-gradient(45deg, 
            transparent 0%, 
            rgba(43, 58, 103, 0.05) 30%, 
            transparent 60%
        );
    pointer-events: none;
    z-index: -2;
    animation: atmospheric-flow 40s ease-in-out infinite;
}

@keyframes atmospheric-flow {
    0%, 100% { 
        opacity: 1;
        transform: translateY(0px) scale(1) rotate(0deg);
    }
    25% { 
        opacity: 0.95;
        transform: translateY(-3px) scale(1.005) rotate(0.2deg);
    }
    50% { 
        opacity: 0.98;
        transform: translateY(2px) scale(0.998) rotate(-0.1deg);
    }
    75% { 
        opacity: 0.96;
        transform: translateY(-1px) scale(1.002) rotate(0.1deg);
    }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* Soft fog overlay for depth */
        radial-gradient(ellipse 500px 250px at 30% 40%, rgba(43, 58, 103, 0.06) 0%, transparent 80%),
        radial-gradient(ellipse 400px 200px at 70% 60%, rgba(10, 31, 68, 0.04) 0%, transparent 75%),
        radial-gradient(ellipse 300px 150px at 50% 80%, rgba(43, 58, 103, 0.03) 0%, transparent 70%),
        /* Ultra-subtle texture for realism */
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.2" numOctaves="3" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter></defs><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.015"/></svg>');
    pointer-events: none;
    z-index: -1;
    animation: fog-drift 35s ease-in-out infinite;
}

@keyframes fog-drift {
    0%, 100% { 
        opacity: 1;
        transform: translateX(0px) translateY(0px);
    }
    33% { 
        opacity: 0.97;
        transform: translateX(1px) translateY(-1px);
    }
    66% { 
        opacity: 0.99;
        transform: translateX(-1px) translateY(1px);
    }
}

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

/* Navigation Instructions - Extreme Edge */
.nav-instructions {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    font-size: 0.7rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    line-height: 1.2;
    color: #FFFFFF;
    letter-spacing: -0.025em;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 500;
    letter-spacing: -0.025em;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
}

h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #FFFFFF;
}

p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    font-weight: 400;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

/* Minimal Navigation - Extreme Edge */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    z-index: 1000;
    padding: 1.5rem 0;
}

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

.nav-logo span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: -0.025em;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 300;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.3px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

.nav-link:hover,
.nav-link.active {
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 3px;
}

.bar {
    width: 20px;
    height: 1px;
    background-color: #FFFFFF;
    transition: 0.3s;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}

/* Hero Section with Photorealistic 3D Cube */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    perspective: 2000px;
}

.cube-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 4rem;
    perspective: 1200px;
}

.cube {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: cube-rotate 25s linear infinite, cube-hover 8s ease-in-out infinite;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.4)) 
            drop-shadow(0 0 25px rgba(255, 255, 255, 0.08));
}

@keyframes cube-rotate {
    0% { transform: rotateX(10deg) rotateY(0deg) rotateZ(2deg); }
    100% { transform: rotateX(10deg) rotateY(360deg) rotateZ(2deg); }
}

@keyframes cube-hover {
    0%, 100% { transform: translateY(0px) rotateX(10deg) rotateY(0deg) rotateZ(2deg); }
    50% { transform: translateY(-12px) rotateX(10deg) rotateY(180deg) rotateZ(2deg); }
}

.cube-face {
    position: absolute;
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.12) 0%, 
        rgba(255, 255, 255, 0.04) 50%, 
        rgba(0, 0, 0, 0.08) 100%);
    backdrop-filter: blur(8px);
    box-shadow: 
        inset 0 0 40px rgba(255, 255, 255, 0.08),
        inset 0 0 80px rgba(255, 255, 255, 0.04),
        0 0 30px rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

.cube-face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 20%, 
        rgba(255, 255, 255, 0.06) 50%, 
        transparent 80%);
    animation: face-shimmer 12s ease-in-out infinite;
    border-radius: 2px;
}

@keyframes face-shimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Cube Face Positioning */
.front { transform: rotateY(0deg) translateZ(140px); }
.back { transform: rotateY(180deg) translateZ(140px); }
.right { transform: rotateY(90deg) translateZ(140px); }
.left { transform: rotateY(-90deg) translateZ(140px); }
.top { transform: rotateX(90deg) translateZ(140px); }
.bottom { transform: rotateX(-90deg) translateZ(140px); }

/* Cube Soft Glow Effect */
.cube::after {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    right: -40px;
    bottom: -40px;
    background: radial-gradient(circle at center, 
        rgba(255, 255, 255, 0.08) 0%, 
        rgba(255, 255, 255, 0.02) 50%,
        transparent 80%);
    border-radius: 50%;
    animation: cube-glow 10s ease-in-out infinite;
    z-index: -1;
}

@keyframes cube-glow {
    0%, 100% { 
        opacity: 0.6;
        transform: scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: scale(1.15);
    }
}

/* Hero Content */
.hero-content {
    text-align: center;
    max-width: 600px;
    z-index: 2;
}

.hero-content h1 {
    margin-bottom: 1rem;
    color: #FFFFFF;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.8px;
}

.hero-description {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 480px;
    margin: 0 auto;
}

/* Section Styles */
section {
    padding: 8rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 6rem;
}

.section-header h2 {
    color: #FFFFFF;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* About Section */
.about {
    background: transparent;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.about-text {
    max-width: 500px;
}

.about-text p {
    margin-bottom: 2rem;
}

.skills-matrix {
    display: grid;
    gap: 3rem;
}

.skill-category {
    background: transparent;
    padding: 0;
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-2px);
}

.skill-category h4 {
    margin-bottom: 1.5rem;
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

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

.skill-tag {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

.skill-tag:hover {
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Work Section */
.work {
    background: transparent;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 6rem;
}

.project-card {
    background: transparent;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-3px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-header h3 {
    color: #FFFFFF;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.project-status {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 0;
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.3px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

.project-info p {
    margin-bottom: 2rem;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.project-tech span {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 0;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.3px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.project-tech span:hover {
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.project-metrics {
    display: flex;
    gap: 3rem;
}

.metric {
    text-align: left;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.metric-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.3px;
    font-weight: 300;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

/* Contact Section */
.contact {
    background: transparent;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6rem;
    align-items: start;
    text-align: center;
}

.contact-lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    line-height: 1.6;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

.contact-method:hover {
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Footer */
.footer {
    background: transparent;
    padding: 2rem 0;
}

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

.footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 400;
}

.status-indicator {
    width: 6px;
    height: 6px;
    background-color: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    animation: status-pulse 3s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    .nav-instructions {
        top: 10px;
        right: 10px;
        font-size: 0.65rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(18, 25, 39, 0.95);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .cube-container {
        width: 200px;
        height: 200px;
        margin-bottom: 3rem;
    }

    .cube-face {
        width: 200px;
        height: 200px;
    }

    .front { transform: rotateY(0deg) translateZ(100px); }
    .back { transform: rotateY(180deg) translateZ(100px); }
    .right { transform: rotateY(90deg) translateZ(100px); }
    .left { transform: rotateY(-90deg) translateZ(100px); }
    .top { transform: rotateX(90deg) translateZ(100px); }
    .bottom { transform: rotateX(-90deg) translateZ(100px); }

    section {
        padding: 4rem 0;
    }

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

    .skills-matrix {
        gap: 1.5rem;
    }

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

    .project-metrics {
        gap: 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .cube-container {
        width: 160px;
        height: 160px;
    }

    .cube-face {
        width: 160px;
        height: 160px;
    }

    .front { transform: rotateY(0deg) translateZ(80px); }
    .back { transform: rotateY(180deg) translateZ(80px); }
    .right { transform: rotateY(90deg) translateZ(80px); }
    .left { transform: rotateY(-90deg) translateZ(80px); }
    .top { transform: rotateX(90deg) translateZ(80px); }
    .bottom { transform: rotateX(-90deg) translateZ(80px); }

    .project-metrics {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Smooth animations */
@media (prefers-reduced-motion: no-preference) {
    .project-card,
    .nav-link,
    .contact-method,
    .skill-category {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Focus styles for accessibility */
.nav-link:focus,
.contact-method:focus {
    outline: 1px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
}

/* Smooth scrolling offset for fixed navbar */
section {
    scroll-margin-top: 80px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(18, 25, 39, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Selection styles */
::selection {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

::-moz-selection {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}
