/**
 * Main Stylesheet for Vignesh A Portfolio
 * Modern, aesthetic design with glassmorphism and smooth animations
 */

/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */

:root {
    /* Colors */
    --color-dark: #0f1419;
    --color-dark-alt: #1a1f26;
    --color-dark-card: #1e2530;
    --color-border-gray: #2d3748;
    --color-text-gray: #9ca3af;
    --color-white: #ffffff;

    /* Accent Colors */
    --color-blue: #3eaeee;
    --color-red: #ee533e;
    --color-green: #10b981;
    --color-purple: #8b5cf6;
    --color-orange: #f97316;
    --color-yellow: #fbbf24;
    --color-gold: #ffd700;
    --color-cyan: #06b6d4;
    --color-pink: #ec4899;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-blue: linear-gradient(135deg, #3eaeee 0%, #667eea 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-green: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    --gradient-dark: linear-gradient(180deg, #0f1419 0%, #1a1f26 100%);

    /* Typography */
    --font-primary: 'Lexend', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

    /* Spacing */
    --container-max-width: 1200px;

    /* Effects */
    --glass-bg: rgba(30, 37, 48, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 18px;
    line-height: 1.7;
    background: var(--gradient-dark);
    background-attachment: fixed;
    color: var(--color-white);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Subtle animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(62, 174, 238, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

::selection {
    background: var(--color-purple);
    color: var(--color-white);
}

/* ==========================================================================
   Tailwind Custom Classes
   ========================================================================== */

.bg-dark {
    background-color: var(--color-dark);
}

.font-lexend {
    font-family: var(--font-primary);
}

.text-gold {
    color: var(--color-gold);
}

.text-orange {
    color: var(--color-orange);
}

.text-green {
    color: var(--color-green);
}

.text-yellow {
    color: var(--color-yellow);
}

.text-purple {
    color: var(--color-purple);
}

.text-cyan {
    color: var(--color-cyan);
}

.text-pink {
    color: var(--color-pink);
}

.border-orange {
    border-color: var(--color-orange);
}

.border-green {
    border-color: var(--color-green);
}

.border-yellow {
    border-color: var(--color-yellow);
}

.border-purple {
    border-color: var(--color-purple);
}

.border-border-gray {
    border-color: var(--color-border-gray);
}

/* ==========================================================================
   Glassmorphism Components
   ========================================================================== */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
}

.glass-card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    border-color: rgba(139, 92, 246, 0.3);
}

/* ==========================================================================
   Typewriter Animation (Home Page)
   ========================================================================== */

.typewriter {
    overflow: hidden;
    border-right: 0.15em solid var(--color-purple);
    white-space: nowrap;
    letter-spacing: 0.05em;
    animation:
        typing 3s steps(40, end),
        blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--color-purple); }
}

/* Typing cursor for role rotation */
.typing-cursor {
    color: var(--color-purple);
    animation: blink-cursor 0.7s step-end infinite;
    font-weight: 300;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.role-rotate {
    display: inline;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.max-w-base-container {
    max-width: var(--container-max-width);
}

.responsive {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Two Column Layout */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    gap: 20px;
}

.row::after {
    content: "";
    display: table;
    clear: both;
}

.column {
    flex: 1;
    padding: 15px;
    min-width: 300px;
}

/* ==========================================================================
   Service Cards (About Page)
   ========================================================================== */

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-purple);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(139, 92, 246, 0.4);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: var(--gradient-blue);
    box-shadow: 0 8px 24px rgba(62, 174, 238, 0.3);
}

.service-icon i {
    font-size: 28px;
    color: white;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-white);
}

.service-card p {
    color: var(--color-text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================================
   Skills Section (About Page)
   ========================================================================== */

.skill-category {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.skill-category h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category h3 i {
    color: var(--color-purple);
}

.skill-item {
    margin-bottom: 1rem;
}

.skill-item:last-child {
    margin-bottom: 0;
}

.skill-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.skill-label span:first-child {
    color: var(--color-text-gray);
}

.skill-label span:last-child {
    color: var(--color-purple);
    font-weight: 500;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: var(--gradient-purple);
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.skill-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Legacy skill styles */
.skill-container {
    width: 100%;
    max-width: 400px;
}

/* ==========================================================================
   Project Cards (Portfolio Page)
   ========================================================================== */

.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-glow), 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(139, 92, 246, 0.4);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border-gray), transparent);
    margin: 1rem 0;
}

.project-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-type-badge.orange {
    background: rgba(249, 115, 22, 0.2);
    color: var(--color-orange);
}

.project-type-badge.green {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-green);
}

.project-type-badge.yellow {
    background: rgba(251, 191, 36, 0.2);
    color: var(--color-yellow);
}

.project-type-badge.purple {
    background: rgba(139, 92, 246, 0.2);
    color: var(--color-purple);
}

.project-type-badge.cyan {
    background: rgba(6, 182, 212, 0.2);
    color: var(--color-cyan);
}

.project-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border: 2px solid;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
}

.project-btn:hover {
    transform: translateX(5px);
}

.project-btn.orange {
    border-color: var(--color-orange);
    color: var(--color-orange);
}

.project-btn.orange:hover {
    background: var(--color-orange);
    color: var(--color-dark);
}

.project-btn.green {
    border-color: var(--color-green);
    color: var(--color-green);
}

.project-btn.green:hover {
    background: var(--color-green);
    color: var(--color-dark);
}

.project-btn.yellow {
    border-color: var(--color-yellow);
    color: var(--color-yellow);
}

.project-btn.yellow:hover {
    background: var(--color-yellow);
    color: var(--color-dark);
}

.project-btn.purple {
    border-color: var(--color-purple);
    color: var(--color-purple);
}

.project-btn.purple:hover {
    background: var(--color-purple);
    color: var(--color-white);
}

.project-btn.cyan {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
}

.project-btn.cyan:hover {
    background: var(--color-cyan);
    color: var(--color-dark);
}

/* ==========================================================================
   Contact Form (Contact Page)
   ========================================================================== */

.contact-form {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 1.25rem;
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    outline: none;
    color: var(--color-white);
    transition: all 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--color-text-gray);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-purple);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.contact-form textarea {
    resize: none;
    min-height: 150px;
}

.contact-form button[type="submit"] {
    background: var(--gradient-purple);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-form button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.contact-form button[type="submit"]:hover::before {
    left: 100%;
}

.contact-form button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

/* ==========================================================================
   Navigation Enhancements
   ========================================================================== */

nav {
    background: rgba(15, 20, 25, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Mobile nav */
.mobile-nav-item {
    transition: all 0.3s ease;
}

.mobile-nav-item:hover {
    background: rgba(139, 92, 246, 0.1);
}

.mobile-nav-item.active {
    background: rgba(139, 92, 246, 0.15);
}

/* Desktop bottom nav */
.desktop-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* ==========================================================================
   Buttons & CTAs
   ========================================================================== */

.btn-gradient {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--gradient-purple);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.btn-gradient span {
    position: relative;
    padding: 0.75rem 1.5rem;
    background: var(--color-dark);
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-gradient:hover span {
    background: transparent;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

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

.section-header h1,
.section-header h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header .accent-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gradient-purple);
    margin-left: 0.5rem;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.section-subtitle {
    color: var(--color-text-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Stats/Numbers Section
   ========================================================================== */

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    color: var(--color-text-gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Animated Underline
   ========================================================================== */

.underline-animation {
    position: relative;
    display: inline-block;
}

.underline-animation::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-purple);
    transition: width 0.3s ease;
}

.underline-animation:hover::after {
    width: 100%;
}

/* ==========================================================================
   Floating Animation
   ========================================================================== */

.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ==========================================================================
   Glow Effects
   ========================================================================== */

.glow-text {
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.glow-border {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* ==========================================================================
   Responsive / Mobile Styles
   ========================================================================== */

.mobileHide {
    display: block;
}

@media only screen and (max-width: 480px) {
    .mobileHide {
        display: none;
    }

    body {
        font-size: 16px;
    }

    .column {
        min-width: 100%;
    }

    .row {
        flex-direction: column;
        gap: 15px;
    }

    .section-header h1,
    .section-header h2 {
        font-size: 2rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .skill-category {
        padding: 1rem;
    }
}

@media screen and (max-width: 768px) {
    .column {
        flex: 100%;
    }

    .section-header h1,
    .section-header h2 {
        font-size: 2.5rem;
    }

    .project-card img {
        height: 180px;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .section-header h1,
    .section-header h2 {
        font-size: 2.75rem;
    }
}

/* ==========================================================================
   AOS (Animate On Scroll) Custom Styles
   ========================================================================== */

[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

[data-aos="fade-down"] {
    transform: translate3d(0, -30px, 0);
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos="fade-down"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translate3d(0, 30px, 0);
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos="fade-up"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-right"] {
    transform: translate3d(-30px, 0, 0);
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos="fade-right"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-left"] {
    transform: translate3d(30px, 0, 0);
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos="fade-left"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center {
    text-align: center;
}

.accessibility {
    width: 0;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
}

/* Gradient text utility */
.gradient-text {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

::-webkit-scrollbar-track {
    background: var(--color-dark);
}

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

::-webkit-scrollbar-thumb:hover {
    background: #9f7aea;
}
