/* ============================================
   GAURANG PATEL - PORTFOLIO STYLES
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --text-primary: #e8e8ed;
    --text-secondary: #9494a8;
    --text-muted: #5e5e72;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-glow: rgba(108, 92, 231, 0.15);
    --accent-glow-strong: rgba(108, 92, 231, 0.3);
    --border: #1e1e2e;
    --border-light: #2a2a3c;
    --success: #00b894;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --nav-height: 64px;
    --section-padding: 100px;
    --container-max: 1200px;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::selection {
    background: var(--accent);
    color: #fff;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: #fff;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow-strong);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-2px);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-bracket {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
}

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

.nav-link.active {
    color: var(--accent-light);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-light);
    padding: 8px 16px;
}

.nav-cta:hover {
    border-color: var(--accent);
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 40px) 0 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(108, 92, 231, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 92, 231, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 30%, transparent 80%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-greeting {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-light);
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-name {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 400;
}

.tagline-divider {
    color: var(--text-muted);
    margin: 0 12px;
}

.hero-bio {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 40px;
    font-family: var(--font-mono);
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-light);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-decoration: none;
}

.scroll-mouse {
    display: block;
    width: 26px;
    height: 40px;
    border: 2px solid var(--border-light);
    border-radius: 13px;
    position: relative;
}

.scroll-wheel {
    display: block;
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { opacity: 1; top: 8px; }
    50% { opacity: 0.3; top: 18px; }
}

/* --- Section Titles --- */
.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

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

/* --- About Section --- */
.about {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-lead {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-size: 1.02rem;
}

.about-text em {
    color: var(--accent-light);
    font-style: italic;
}

.about-cta {
    margin-top: 32px;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
}

.highlight-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.highlight-icon {
    color: var(--accent);
    margin-bottom: 14px;
}

.highlight-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.highlight-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Projects Section --- */
.projects {
    padding: var(--section-padding) 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all var(--transition);
    position: relative;
}

.project-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

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

.project-icon {
    color: var(--accent);
}

.project-link {
    color: var(--text-muted);
    transition: color var(--transition);
}

.project-link:hover {
    color: var(--accent-light);
}

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

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

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

.tech-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-glow);
    color: var(--accent-light);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.projects-more {
    text-align: center;
    margin-top: 48px;
}

/* --- Skills Section --- */
.skills {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
}

.skill-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.skill-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.skill-group-title svg {
    color: var(--accent);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.skill-name {
    font-size: 0.92rem;
    font-weight: 500;
}

.skill-percent {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

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

.skill-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 3px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-fill.animate {
    width: var(--width);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    display: inline-block;
    padding: 8px 18px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition);
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}

.skill-tag.highlight {
    background: var(--accent-glow);
    border-color: rgba(108, 92, 231, 0.3);
    color: var(--accent-light);
}

/* --- Contact Section --- */
.contact {
    padding: var(--section-padding) 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.contact-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

.contact-card svg {
    color: var(--accent);
    flex-shrink: 0;
}

.contact-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.contact-url {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-light);
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    justify-content: center;
}

.form-note {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* --- Footer --- */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.footer-text strong {
    color: var(--accent-light);
}

.footer-sub {
    margin-top: 8px;
    font-size: 0.82rem;
    font-family: var(--font-mono);
}

/* --- Animations --- */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }
.animate-in:nth-child(6) { animation-delay: 0.6s; }
.animate-in:nth-child(7) { animation-delay: 0.7s; }

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

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 960px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 70px;
        --nav-height: 56px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 32px 32px;
        gap: 4px;
        transition: right var(--transition);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-link {
        width: 100%;
        padding: 12px 16px;
        font-size: 1rem;
    }

    .nav-cta {
        margin-top: 16px;
    }

    .hero-stats {
        gap: 32px;
    }

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

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

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

    .hero-name {
        font-size: 2.4rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .tagline-divider {
        display: none;
    }

    .hero-tagline {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .project-card {
        padding: 24px;
    }

    .contact-card {
        padding: 20px;
    }

    .contact-form {
        padding: 24px;
    }
}

/* --- Overlay for mobile menu --- */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}
