/* ============================================
   SHAN'S PORTFOLIO - SHAYAN JIZAN STYLE
   Dark theme with boxed sections and 3D tilt
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-card-hover: #222230;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    
    --accent-primary: #00d4ff;
    --accent-secondary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #a855f7 100%);
    
    --border-color: rgba(0, 212, 255, 0.2);
    --border-glow: rgba(0, 212, 255, 0.4);
    
    --font-main: 'Poppins', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

/* Canvas Backgrounds */
#star-canvas, #shooting-star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#shooting-star-canvas {
    z-index: 1;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3rem;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.logo-icon {
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-icon {
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

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

.nav-icon-linkedin {
    background: #0077b5;
    padding: 0.3rem;
    border-radius: 4px;
    color: white;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    padding: 2rem;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Section Styles */
section {
    position: relative;
    z-index: 2;
    padding: 6rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* About section - starts the second "page" */
.about {
    padding-top: 8rem;
    min-height: 100vh;
}

.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    font-style: italic;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Hero Section - Full First Page, Centered */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 3rem;
    position: relative;
}

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

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-name {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    animation: fadeInUp 1s ease-out 1s both;
}

.scroll-arrow {
    animation: bounce 2s infinite;
}

.scroll-arrow svg {
    stroke: var(--accent-primary);
    opacity: 0.7;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(8px);
    }
    60% {
        transform: translateY(4px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* About Section */
.about-content {
    max-width: 700px;
    margin-bottom: 3rem;
}

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

.linkedin-cta, .github-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.linkedin-cta svg, .github-cta svg {
    fill: #0077b5;
}

.github-cta svg {
    fill: var(--text-primary);
}

.linkedin-cta:hover, .github-cta:hover {
    color: var(--accent-primary);
}

.arrow {
    transition: transform 0.3s ease;
}

.linkedin-cta:hover .arrow, .github-cta:hover .arrow {
    transform: translateX(5px);
}

/* Strength Cards */
.strength-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.strength-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.strength-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}

.strength-icon {
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.strength-card h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Work Experience Timeline - FIXED CENTERED LAYOUT */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 3rem auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    align-items: start;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.timeline-content-left {
    grid-column: 1;
    text-align: left;
    margin-right: 20px;
}

.timeline-content-right {
    grid-column: 3;
    text-align: left;
    margin-left: 20px;
}

.timeline-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.company {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.job-details {
    list-style: disc;
    padding-left: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.job-details li {
    margin-bottom: 0.3rem;
}

.timeline-marker {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 5;
}

.marker-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.timeline-date-container {
    display: flex;
    align-items: flex-start;
    padding-top: 12px;
}

.timeline-date-left {
    grid-column: 1;
    justify-content: flex-end;
    padding-right: 20px;
}

.timeline-date-right {
    grid-column: 3;
    justify-content: flex-start;
    padding-left: 20px;
}

.timeline-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Tech Stack 3D Spheres - True 3D Rotation */
.tech-stack {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-top: 4rem;
    padding: 2rem 0;
    perspective: 1000px;
}

.tech-sphere {
    width: 90px;
    height: 90px;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
}

.sphere-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
    
    /* 3D sphere shading */
    background: radial-gradient(circle at 30% 30%, 
        rgba(80, 80, 100, 1) 0%, 
        rgba(40, 40, 55, 1) 40%, 
        rgba(20, 20, 30, 1) 100%);
    box-shadow: 
        inset -15px -15px 40px rgba(0, 0, 0, 0.6),
        inset 8px 8px 25px rgba(255, 255, 255, 0.15),
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.3);
    
    /* Center the logo */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Highlight/shine effect that moves with rotation */
.sphere-inner::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 15%;
    width: 35%;
    height: 25%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transition: transform 0.15s ease-out;
}

/* Secondary shine */
.sphere-inner::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 10%;
    width: 20%;
    height: 15%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.sphere-inner img {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 2;
    transition: transform 0.15s ease-out;
}

.sphere-letter {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.tech-sphere:hover .sphere-inner {
    box-shadow: 
        inset -15px -15px 40px rgba(0, 0, 0, 0.6),
        inset 8px 8px 25px rgba(255, 255, 255, 0.2),
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 212, 255, 0.4);
    border-color: var(--accent-primary);
}

/* Education Grid */
.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.edu-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}

.edu-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.edu-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.edu-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.edu-school {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.edu-details {
    list-style: disc;
    padding-left: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.edu-details li {
    margin-bottom: 0.3rem;
}

/* Education card as link */
.edu-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.edu-card-link:hover {
    border-color: var(--accent-primary);
}

/* In-progress status badge */
.edu-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.edu-status.in-progress {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Projects Section */
.projects-intro {
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    transform-style: preserve-3d;
    perspective: 1000px;
    display: block;
}

.project-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}

.project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem;
    border-radius: 8px;
    color: var(--text-primary);
    z-index: 5;
}

.project-image {
    height: 180px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.project-placeholder {
    font-size: 4rem;
    opacity: 0.5;
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 1rem 0.5rem;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0 1rem;
    line-height: 1.6;
}

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

.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: transparent;
}

.tag-python { color: #3776ab; }
.tag-java { color: #f89820; }
.tag-react { color: #61dafb; }
.tag-network { color: #00d4ff; }
.tag-security { color: #ff6b6b; }
.tag-gui { color: #9b59b6; }
.tag-physics { color: #2ecc71; }
.tag-api { color: #f1c40f; }
.tag-data { color: #e74c3c; }
.tag-maps { color: #1abc9c; }

/* Contact Section */
.contact {
    text-align: center;
    padding: 6rem 3rem;
}

.contact-text {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.contact-btn:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.contact-btn.primary {
    background: var(--accent-gradient);
    border: none;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

/* 3D Tilt Card Effect */
.tilt-card {
    transition: transform 0.1s ease-out;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .strength-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .education-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Timeline responsive */
    .timeline-item {
        display: flex;
        flex-direction: column;
        padding-left: 80px;
    }
    
    .timeline-line {
        left: 35px;
    }
    
    .timeline-content-left,
    .timeline-content-right {
        margin: 0;
        width: 100%;
    }
    
    .timeline-marker {
        position: absolute;
        left: 10px;
    }
    
    .timeline-date-container {
        padding: 0;
        margin-bottom: 0.5rem;
    }
    
    .timeline-date-left,
    .timeline-date-right {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    section {
        padding: 4rem 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .strength-cards {
        grid-template-columns: 1fr;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-stack {
        gap: 1rem;
    }
    
    .tech-sphere {
        width: 60px;
        height: 60px;
    }
    
    .sphere-inner img {
        width: 30px;
        height: 30px;
    }
    
    .sphere-letter {
        font-size: 1rem;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

/* Selection */
::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}