/* ============================================
   PORTFOLIO STYLES - techvishnu
   ============================================ */

/* CSS Variables - Theme Colors */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: rgba(255, 255, 255, 0.08);
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(17, 17, 19, 0.8);
    --success: #22c55e;

    /* Spacing */
    --nav-height: 64px;
    --container-max: 1200px;
    --container-padding: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(0, 0, 0, 0.02);
    --bg-card-hover: rgba(0, 0, 0, 0.05);
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.9);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 0% 80%, rgba(168, 85, 247, 0.08), transparent);
    pointer-events: none;
    z-index: -2;
}

[data-theme="light"] .bg-gradient {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.05), transparent);
}

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

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    transform: scale(1.05);
}

.theme-icon {
    font-size: 18px;
    transition: all var(--transition-normal);
}

.theme-icon.sun {
    display: none;
}

.theme-icon.moon {
    display: block;
}

[data-theme="light"] .theme-icon.sun {
    display: block;
}

[data-theme="light"] .theme-icon.moon {
    display: none;
}

/* Navigation */
.nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    z-index: 100;
    box-shadow: 0 8px 32px var(--shadow-color);
}

.nav-logo {
    display: none;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

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

.nav-link.active {
    color: var(--text-primary);
    background: var(--accent-gradient);
}

/* Main Container */
.main-container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Sections */
.section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    padding-bottom: 100px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-slow);
    overflow-y: auto;
}

.section.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 10;
}

.section-content {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Home Section */
.home-content {
    text-align: center;
    max-width: 700px;
}

.avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.avatar::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    z-index: -1;
    opacity: 0.5;
    filter: blur(15px);
}

.avatar-emoji {
    font-size: 56px;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--success);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: var(--radius-full);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hero-title {
    margin-bottom: 16px;
}

.greeting {
    display: block;
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.name {
    display: block;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.info-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 14px;
    color: var(--text-secondary);
}

.chip-icon {
    font-size: 16px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.about-card {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.about-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-icon {
    font-size: 24px;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.bio-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.experience-item,
.education-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exp-company,
.edu-institution {
    font-weight: 600;
    color: var(--text-primary);
}

.exp-role,
.edu-degree {
    color: var(--text-secondary);
    font-size: 14px;
}

.exp-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.skill-tag {
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.certifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.cert-icon {
    font-size: 24px;
}

.cert-info {
    flex: 1;
}

.cert-name {
    font-weight: 500;
    font-size: 14px;
}

.cert-issuer {
    font-size: 12px;
    color: var(--text-muted);
}

/* Hobbies */
.hobbies-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hobby-category {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hobby-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hobbies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hobby-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    font-size: 13px;
}

.hobby-item span:first-child {
    font-size: 14px;
}

/* Skills */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.skill-name {
    font-weight: 500;
}

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

.skill-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 1s ease;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.project-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.project-arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.project-card:hover .project-arrow {
    background: var(--accent-primary);
    color: white;
    transform: translate(4px, -4px);
}

.project-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tag {
    padding: 4px 12px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

/* Contact Section */
.contact-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 800px;
    width: 100%;
    margin-bottom: 60px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-normal);
}

.contact-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-8px);
}

.contact-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.contact-icon.linkedin {
    background: rgba(10, 102, 194, 0.1);
    color: #0a66c2;
}

.contact-card:hover .contact-icon.linkedin {
    background: #0a66c2;
    color: white;
}

.contact-icon.github {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.contact-card:hover .contact-icon.github {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.contact-icon.email {
    background: rgba(234, 67, 53, 0.1);
    color: #ea4335;
}

.contact-card:hover .contact-icon.email {
    background: #ea4335;
    color: white;
}

.contact-icon.cv {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}

.contact-card:hover .contact-icon.cv {
    background: var(--accent-gradient);
    color: white;
}

.contact-label {
    font-weight: 600;
    font-size: 1rem;
}

.contact-handle {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-note {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-note .highlight {
    color: var(--accent-primary);
    font-weight: 500;
}

.footer-note .year {
    margin-top: 4px;
    font-size: 12px;
}

/* Responsive */
/* Responsive Design */
@media (max-width: 768px) {

    /* Layout Adjustments */
    .section {
        padding: 80px 20px 100px 20px;
        /* More top padding, comfortable bottom padding for nav */
        height: 100%;
        /* Ensure full height */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll on iOS */
    }

    .main-container {
        height: 100dvh;
        /* Use dynamic viewport height for mobile browsers */
    }

    /* Navigation */
    .nav {
        width: calc(100% - 32px);
        /* Full width minus margin */
        bottom: 20px;
        left: 16px;
        right: 16px;
        transform: none;
        justify-content: space-between;
        padding: 12px;
        background: rgba(17, 17, 19, 0.95);
        /* More solid background */
        backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: 0;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 12px;
        flex: 1;
        /* Distribute space evenly */
    }

    .nav-logo {
        display: none;
        /* Hide logo on mobile to save space */
    }

    /* Hero Section */
    .home-content {
        width: 100%;
        padding-top: 20px;
    }

    .avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .avatar-emoji {
        font-size: 48px;
    }

    .name {
        font-size: 3rem;
        /* Smaller hero text */
        line-height: 1.1;
    }

    .hero-tagline {
        font-size: 1rem;
        padding: 0 10px;
    }

    .hero-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .info-chip {
        width: 100%;
        justify-content: center;
        background: rgba(255, 255, 255, 0.03);
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }

    /* Cards & Grids */
    .about-grid,
    .projects-grid,
    .contact-cards {
        grid-template-columns: 1fr;
        /* Force stack */
        gap: 16px;
    }

    .about-card,
    .project-card,
    .contact-card {
        padding: 20px;
    }

    /* Typography Scaling */
    .section-title {
        font-size: 2.5rem;
        text-align: center;
    }

    .section-subtitle {
        text-align: center;
        font-size: 1rem;
        margin-bottom: 32px;
    }

    /* Contact Adjustments */
    .contact-cards {
        margin-bottom: 80px;
        /* Space for nav */
    }
}

/* Small Mobile Adjustments */
@media (max-width: 380px) {
    .name {
        font-size: 2.5rem;
    }

    .nav-link {
        padding: 8px;
        /* Tighter nav for small screens */
        font-size: 11px;
    }
}

/* Scrollbar Styling for Mobile */
::-webkit-scrollbar {
    width: 4px;
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}