/* ============================================
   PRASID PORTFOLIO - MAIN STYLES
   Easy to edit and well-organized
   ============================================ */

/* ============================================
   COLOR VARIABLES
   ============================================ */

:root {
    /* Light Mode Colors */
    --bg-primary: #FFFBF1;
    --bg-secondary: #F5F1E8;
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-muted: #7A7A7A;
    --border-color: #E0DCD3;
    --accent-color: #1A1A1A;
    --hover-bg: #F0EBE0;
    
    /* Spacing */
    --nav-height: 80px;
    --container-max: 1400px;
    --container-padding: clamp(1.5rem, 5vw, 4rem);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #333333;
    --bg-secondary: #2A2A2A;
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8B8;
    --text-muted: #888888;
    --border-color: #4A4A4A;
    --accent-color: #FFFFFF;
    --hover-bg: #3D3D3D;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

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

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

::selection {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

/* ============================================
   NAVIGATION BAR
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-base);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Styling */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    transition: opacity var(--transition-fast);
}

.logo:hover {
    opacity: 0.7;
}

.logo-line {
    width: 30px;
    height: 2px;
    background-color: var(--text-primary);
    transition: width var(--transition-base);
}

.logo:hover .logo-line {
    width: 40px;
}

.logo-text {
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

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

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

/* Active link styling */
.nav-link.active {
    color: var(--text-primary);
}

/* Hover underline effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-primary);
    transition: width var(--transition-base);
}

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

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

/* Navigation Controls (Language & Theme) */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-btn,
.theme-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    font-weight: 500;
}

.lang-btn:hover,
.theme-btn:hover {
    background-color: var(--hover-bg);
    border-color: var(--text-primary);
}

.lang-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

/* Theme Toggle Icons */
.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-base);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-height) + 2rem) 0 4rem;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

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

.hero-greeting {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.title-line {
    display: block;
    animation: fadeInUp 0.6s ease both;
}

.title-line:nth-child(1) { animation-delay: 0.3s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }

.title-line.highlight {
    color: var(--text-primary);
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease 0.7s both;
}

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

/* ============================================
   TECH STACK MARQUEE WITH BLUR BACKGROUND
   ============================================ */

.tech-marquee {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    overflow: hidden;
    position: relative;
}

/* Blur background for icon consistency */
.tech-marquee::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    z-index: 0;
}

.marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
    position: relative;
    z-index: 1;
}

.marquee-content {
    display: flex;
    animation: scroll 40s linear infinite;
    gap: 4rem;
}

/* Seamless infinite scroll animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 120px;
}

.tech-item svg {
    width: 48px;
    height: 48px;
    transition: all var(--transition-base);
}

.tech-item:hover svg {
    transform: translateY(-5px) scale(1.1);
}

.tech-item span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

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

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

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

.footer-link svg {
    width: 20px;
    height: 20px;
}

/* Email hover tooltip */
.email-link {
    position: relative;
}

.email-link::after {
    content: 'Click to copy';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    margin-bottom: 0.5rem;
}

.email-link:hover::after {
    opacity: 1;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--bg-primary);
        padding: 2rem var(--container-padding);
        gap: 1.5rem;
        transform: translateX(100%);
        transition: transform var(--transition-base);
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(10px);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 1.5rem;
    }
    
    .nav-controls {
        gap: 0.5rem;
    }
    
    .lang-btn,
    .theme-btn {
        padding: 0.4rem 0.6rem;
    }
    
    .marquee-content {
        gap: 3rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 4px;
}

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