/* ============================================
   HSR Portfolio - Custom Stylesheet v2
   Author: HSR Web Development
   Theme: Neon Tech (Green/Orange/Dark)
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
    background: #0a0e27;
    color: #e8e8e8;
    line-height: 1.6;
}

/* ============================================
   CURSOR GLOW EFFECT
   ============================================ */

.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(16, 185, 129, 0.15) 0%,
        rgba(16, 185, 129, 0.08) 25%,
        rgba(249, 115, 22, 0.05) 50%,
        transparent 70%
    );
    mix-blend-mode: screen;
    transition: opacity 0.3s ease;
}

/* Keep default cursor visible */
a, button, .filter-btn, .card, .service-card {
    cursor: pointer;
}

/* Hide glow on touch devices */
@media (hover: none) and (pointer: coarse) {
    .cursor-glow {
        display: none;
    }
}

/* ============================================
   SVG ICONS
   ============================================ */

.icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-lg {
    width: 32px;
    height: 32px;
}

.icon-xl {
    width: 48px;
    height: 48px;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
    .md-grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .lg-grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .lg-grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at top, #1a1f3a 0%, #0a0e27 50%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.4;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.blob-1 {
    top: 10%;
    left: 10%;
    width: 20rem;
    height: 20rem;
    background: #10b981;
    animation: float 8s ease-in-out infinite;
}

.blob-2 {
    bottom: 10%;
    right: 10%;
    width: 25rem;
    height: 25rem;
    background: #f97316;
    animation: float 10s ease-in-out infinite 2s;
}

.blob-3 {
    top: 50%;
    right: 30%;
    width: 18rem;
    height: 18rem;
    background: #fbbf24;
    animation: float 12s ease-in-out infinite 4s;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    33% { 
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.5;
    }
    66% { 
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.3;
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 1.5rem;
    max-width: 80rem;
}

.badge {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', monospace;
    color: #34d399;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.hero-title {
    font-size: 3.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #10b981 50%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-family: 'JetBrains Mono', monospace;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    min-width: 100%;
    word-break: keep-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fix for mobile - prevent layout shift */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Disable morphing animation on small screens */
    #glitch-text.glitching {
        animation: none;
    }
}

/* Code glitch effect */
#glitch-text.glitching {
    animation: glitch-shake 0.3s ease-in-out;
}

@keyframes glitch-shake {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-1px, 1px); }
    20% { transform: translate(1px, -1px); }
    30% { transform: translate(-1px, -1px); }
    40% { transform: translate(1px, 1px); }
    50% { transform: translate(-1px, 1px); }
    60% { transform: translate(1px, -1px); }
    70% { transform: translate(-1px, -1px); }
    80% { transform: translate(1px, 1px); }
    90% { transform: translate(-1px, 0); }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 6rem;
    }
}

.hero-description {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    line-height: 1.75;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.5rem;
    }
}

.text-purple {
    color: #10b981;
    font-weight: 600;
}

.text-cyan {
    color: #f97316;
    font-weight: 600;
}

.text-white-bold {
    color: #fbbf24;
    font-weight: 700;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .btn-group {
        flex-direction: row;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #0a0e27;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.6);
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #10b981;
    color: #10b981;
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: #34d399;
    color: #34d399;
}

/* ============================================
   STATS
   ============================================ */

.stats {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: #64748b;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    color: #10b981;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 0.875rem;
    color: #94a3b8;
}

.stat-divider {
    width: 1px;
    background: #334155;
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { 
        transform: translateY(0) translateX(-50%); 
    }
    50% { 
        transform: translateY(-10px) translateX(-50%); 
    }
}

.scroll-mouse {
    width: 1.5rem;
    height: 2.5rem;
    border: 2px solid rgba(16, 185, 129, 0.5);
    border-radius: 9999px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0.5rem;
}

.scroll-dot {
    width: 0.25rem;
    height: 0.75rem;
    background: #10b981;
    border-radius: 9999px;
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 5rem 1.5rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #10b981 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3.75rem;
    }
}

.section-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
}

/* ============================================
   FILTER BUTTONS
   ============================================ */

.filter-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #334155;
    background: rgba(15, 23, 42, 0.6);
    color: #e2e8f0;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
}

.filter-btn:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #10b981;
}

.filter-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
    color: #0a0e27;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* ============================================
   PROJECT CARDS
   ============================================ */

.card {
    position: relative;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.6);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.card:hover {
    transform: translateY(-8px);
    border-color: #10b981;
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0a0e27;
    z-index: 10;
}

.card-content {
    position: relative;
    padding: 1.5rem;
}

/* Minimal Icons for Cards */
.card-icon-minimal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.icon-minimal {
    width: 32px;
    height: 32px;
    stroke: #10b981;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: all 0.3s ease;
}

.card:hover .icon-minimal {
    stroke: #34d399;
    transform: scale(1.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    color: #f1f5f9;
}

.card:hover .card-title {
    background: linear-gradient(135deg, #10b981 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-description {
    color: #94a3b8;
    margin-bottom: 1rem;
    line-height: 1.75;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    color: #34d399;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #10b981;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: #34d399;
}

/* ============================================
   SERVICE CARDS
   ============================================ */

.service-card {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(51, 65, 85, 0.6);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: #10b981;
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
}

/* Minimal Icons for Services */
.service-icon-minimal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
}

.icon-minimal-lg {
    width: 40px;
    height: 40px;
    stroke: #10b981;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: all 0.3s ease;
}

.service-card:hover .icon-minimal-lg {
    stroke: #f97316;
    transform: scale(1.15) rotate(5deg);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.service-description {
    color: #94a3b8;
    line-height: 1.75;
}

/* ============================================
   CMS HIGHLIGHT
   ============================================ */

.cms-highlight {
    margin-top: 4rem;
    background: rgba(249, 115, 22, 0.05);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 40px rgba(249, 115, 22, 0.1);
}

.cms-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .cms-content {
        flex-direction: row;
    }
}

.cms-icon-minimal {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
}

.icon-minimal-xl {
    width: 48px;
    height: 48px;
    stroke: #f97316;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: all 0.3s ease;
}

.cms-highlight:hover .icon-minimal-xl {
    stroke: #fb923c;
    transform: scale(1.1);
}

.cms-text {
    flex: 1;
    text-align: center;
}

@media (min-width: 768px) {
    .cms-text {
        text-align: left;
    }
}

.cms-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #f1f5f9;
}

.cms-description {
    color: #cbd5e1;
    margin-bottom: 1rem;
    line-height: 1.75;
}

.cms-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #f97316;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cms-link:hover {
    color: #fb923c;
}

/* ============================================
   ABOUT ME SECTION
   ============================================ */

.about-card {
    max-width: 56rem;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 1.5rem;
    padding: 3rem;
    border: 1px solid rgba(51, 65, 85, 0.6);
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .about-content {
        flex-direction: row;
        text-align: left;
    }
}

.about-avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.4);
}

.icon-avatar {
    width: 64px;
    height: 64px;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.about-info {
    flex: 1;
}

.about-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-title {
    font-size: 1.125rem;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: 'JetBrains Mono', monospace;
}

.about-description {
    color: #cbd5e1;
    line-height: 1.75;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .social-links {
        justify-content: flex-start;
    }
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.6);
    border-radius: 0.5rem;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.social-link:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
    color: #10b981;
}

/* ============================================
   TECH STACK
   ============================================ */

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.tech-item {
    padding: 0.75rem 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.6);
    border-radius: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    color: #94a3b8;
}

.tech-item:hover {
    border-color: #10b981;
    transform: translateY(-3px);
    color: #10b981;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

/* ============================================
   CONTACT
   ============================================ */

.contact-description {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 3rem;
    line-height: 1.75;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .contact-buttons {
        flex-direction: row;
    }
}

.footer {
    padding-top: 3rem;
    border-top: 1px solid #1e293b;
}

.footer-text {
    color: #64748b;
    font-size: 0.875rem;
    text-align: center;
}

/* ============================================
   BACKGROUNDS
   ============================================ */

.pattern-bg {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.05) 0%, transparent 50%);
}

.bg-dark {
    background: rgba(10, 14, 39, 0.6);
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
}

/* ============================================
   UTILITIES
   ============================================ */

.hidden {
    display: none;
}