/* ==========================================================================
   PORTFOLIO DESIGN SYSTEM & STYLESHEET
   Author: Harshitha
   Theme: Premium Dark & Immersive Glassmorphism
   ========================================================================== */

/* --- Custom Properties (Design Tokens) --- */
:root {
    /* Color Palette */
    --bg-dark: #0a0a0f;
    --bg-dark-alt: #12121e;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.07);
    --card-hover-border: rgba(99, 102, 241, 0.4);
    
    --primary: #6366f1;         /* Electric Indigo */
    --primary-glow: rgba(99, 102, 241, 0.15);
    --secondary: #06b6d4;       /* Glowing Cyan */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --white: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-text: linear-gradient(135deg, #ffffff 20%, #818cf8 60%, #22d3ee 100%);
    --gradient-glow-1: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    --gradient-glow-2: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, rgba(0, 0, 0, 0) 70%);

    /* Typography */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions & Blur */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
    --glass-blur: blur(12px);
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #27273a;
    border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- Background Ambient Glows --- */
.ambient-glow {
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.6;
    filter: blur(80px);
}
.glow-1 {
    top: -20vh;
    left: -10vw;
    background: var(--gradient-glow-1);
}
.glow-2 {
    bottom: -20vh;
    right: -10vw;
    background: var(--gradient-glow-2);
}
.glow-3 {
    top: 40vh;
    left: 50%;
    transform: translateX(-50%);
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
}

/* --- Custom Cursor --- */
.custom-cursor {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--secondary);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

.custom-cursor.hovered {
    width: 60px;
    height: 60px;
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

/* --- Navigation Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2100;
    background-color: rgba(10, 10, 15, 0.7);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo .dot {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Utility Typography & Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
    position: relative;
}

.section-alt {
    background-color: var(--bg-dark-alt);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.section-header {
    margin-bottom: 4rem;
}

.section-tag {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.text-highlight {
    color: var(--secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 2rem 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1.2;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.75rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.hero-title .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-name-line {
    display: block;
}

.hero-typing-line {
    display: block;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--white);
    margin-top: 0.5rem;
    min-height: 3rem; /* Prevents height layout shifts during typing loop */
}

#typing-text {
    color: var(--secondary);
    position: relative;
}

#typing-text::after {
    content: '';
    display: inline-block;
    width: 1.5px; /* Matches thin arc width */
    height: 1.1em;
    background-color: var(--secondary); /* Matches arc cyan color */
    margin-left: 6px;
    vertical-align: -2px;
    box-shadow: 0 0 6px var(--secondary); /* Matches arc glow shadow */
    animation: blink-caret 0.8s step-end infinite;
}

@keyframes blink-caret {
    from, to { background-color: transparent; box-shadow: none; }
    50% { background-color: var(--secondary); box-shadow: 0 0 6px var(--secondary); }
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Interactive Futuristic Card Visual */
.visual-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 300px;
}

.visual-card {
    background: rgba(10, 10, 15, 0.4);
    border: 1px solid var(--card-border);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    position: absolute;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.card-main {
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
}

.card-header {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.card-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.card-header .red { background-color: #ef4444; }
.card-header .yellow { background-color: #eab308; }
.card-header .green { background-color: #22c55e; }

.card-body {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.code-keyword { color: #f472b6; }
.code-variable { color: #818cf8; }
.code-string { color: #34d399; }
.code-boolean { color: #fb7185; }

.card-sub {
    bottom: -40px;
    right: -20px;
    width: 200px;
    z-index: 3;
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.2);
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.stat-title {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.stat-val {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Floating Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

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

/* Scroll Mouse Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    justify-content: center;
    z-index: 999;
    transition: var(--transition-smooth), bottom 0.3s ease;
}

.scroll-indicator.at-footer {
    bottom: 8rem; /* Shift upwards to avoid overlapping the footer */
}

.mouse {
    width: 26px;
    height: 44px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 2px;
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(12px); }
}

/* --- Selected Work Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

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

.project-img-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
    transition: var(--transition-smooth);
}

.stylized-bg-1 { background: linear-gradient(135deg, #1e1b4b 0%, #311042 100%); }
.stylized-bg-2 { background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%); }
.stylized-bg-3 { background: linear-gradient(135deg, #064e3b 0%, #022c22 100%); }
.stylized-bg-4 { background: linear-gradient(135deg, #7c2d12 0%, #451a03 100%); }

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

.project-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.project-card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.project-link i {
    transition: var(--transition-fast);
}

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

.project-link:hover i {
    transform: translateX(4px);
}

/* --- Brand Experience Section --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--card-border);
    top: 0;
    bottom: 0;
    left: 20px;
}

.timeline-item {
    padding: 0 0 3rem 50px;
    position: relative;
}

.timeline-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    background-color: var(--bg-dark);
    border: 3px solid var(--primary);
    border-radius: 50%;
    left: 14px;
    top: 5px;
    z-index: 1;
    transition: var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
    background-color: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.timeline-date {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.75rem;
    border-radius: var(--border-radius-lg);
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-content {
    border-color: var(--card-hover-border);
    transform: translateX(5px);
}

.timeline-role {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Front-End Projects Grid --- */
.frontend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.fe-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 2.25rem;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.fe-card:hover {
    transform: translateY(-5px);
    border-color: var(--card-hover-border);
    box-shadow: 0 15px 30px rgba(6, 182, 212, 0.05);
}

.fe-icon {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.fe-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.fe-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
    flex-grow: 1;
}

.fe-links {
    display: flex;
    gap: 1.25rem;
}

.fe-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-fast);
}

.fe-links a:hover {
    color: var(--text-primary);
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.skills-box {
    margin-top: 2.5rem;
}

.skills-heading {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    position: relative;
    padding-left: 1rem;
}

.skills-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.about-graphic {
    display: flex;
    justify-content: center;
    position: relative;
}

.graphic-container {
    position: relative;
    width: 280px;
    height: 280px;
}

.avatar-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: blur(10px);
    opacity: 0.4;
    animation: morph 8s ease-in-out infinite;
}

.avatar-placeholder {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--bg-dark-alt);
    border: 2px solid var(--card-border);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary);
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.floating-badge {
    position: absolute;
    background: rgba(10, 10, 15, 0.7);
    border: 1px solid var(--card-border);
    backdrop-filter: var(--glass-blur);
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.badge-1 {
    top: 10%;
    left: -22%;
    animation: float 5s ease-in-out infinite;
}

.badge-2 {
    bottom: 10%;
    right: -22%;
    animation: float 6s ease-in-out infinite 1s;
}

.badge-3 {
    top: 10%;
    right: -22%;
    animation: float 5.5s ease-in-out infinite 1.5s;
}

.badge-4 {
    bottom: 10%;
    left: -22%;
    animation: float 6.5s ease-in-out infinite 0.5s;
}

.badge-lbl {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* --- Resume Section --- */
.resume-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.resume-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.method-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.method-icon {
    width: 48px;
    height: 48px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
}

.method-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.method-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.method-link:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    color: var(--white);
    border-color: var(--primary);
    background-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    backdrop-filter: var(--glass-blur);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.form-group input, .form-group textarea {
    background: rgba(10, 10, 15, 0.5);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.form-status {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
    text-align: center;
}

.form-status.success {
    color: #10b981;
}

.form-status.error {
    color: #f43f5e;
}

/* --- Footer --- */
.footer-main {
    padding: 3rem 0;
    border-top: 1px solid var(--card-border);
    background-color: var(--bg-dark);
}

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

.copyright i {
    color: #ef4444;
}

/* --- Modals System --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding-top: 6.5rem;
    padding-bottom: 3rem;
    overflow-y: auto;
    scrollbar-width: auto; /* Force scrollbars on Firefox */
    scrollbar-color: var(--secondary) rgba(10, 10, 15, 0.5);
}

/* Explicit Modal Scrollbar rules */
.modal::-webkit-scrollbar {
    width: 8px;
    display: block !important;
}
.modal::-webkit-scrollbar-track {
    background: rgba(10, 10, 15, 0.5);
}
.modal::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: var(--border-radius-sm);
}
.modal::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 15, 0.8);
    backdrop-filter: var(--glass-blur);
}

.modal-container {
    background: var(--bg-dark-alt);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 650px;
    padding: 3rem;
    position: relative;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    margin-bottom: 2rem;
}

.modal.active .modal-container {
    transform: translateY(0);
}



.modal-body h2 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.modal-body hr {
    border: 0;
    height: 1px;
    background: var(--card-border);
    margin-bottom: 2rem;
}

.modal-body h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    font-size: 1rem;
}

.modal-body ul {
    list-style-position: inside;
    margin-bottom: 1.75rem;
    color: var(--text-secondary);
}

.modal-body li {
    margin-bottom: 0.5rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
    .hero-section {
        min-height: auto !important; /* Disables jumpy 100vh address-bar loops on mobile devices */
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        gap: 3rem;
        padding-top: 10rem;
        padding-bottom: 5rem;
    }
    
    .hero-subtitle {
        margin: 0 auto 2.5rem auto;
    }
    
    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
        max-width: 400px;
    }

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

    .frontend-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-graphic {
        order: -1;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .section {
        padding: 5rem 0;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute !important; /* Absolute layout inside fixed header keeps it perfectly flush and fixed relative to viewport */
        top: 100% !important; /* Always start exactly at the bottom border of the header */
        left: 0;
        width: 100%;
        height: 100vh; /* Fills screen height smoothly */
        background: #0a0a0f !important; /* Solid background prevents nested fixed overlay blending bugs */
        backdrop-filter: none !important; /* Disables nested backdrop-filter to fix rendering opacity glitches */
        -webkit-backdrop-filter: none !important;
        border-top: 1px solid var(--card-border);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition-smooth);
        z-index: -1 !important; /* Positions behind header logo/bar, sliding out from underneath it */
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        font-size: 1.5rem;
    }

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

    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-form-wrapper {
        padding: 2rem;
    }

    .modal-container {
        padding: 2rem;
    }

    .badge-1 { left: -5%; }
    .badge-2 { right: -5%; }
    .badge-3 { right: -5%; }
    .badge-4 { left: -5%; }
}

/* --- Responsive Code Snippets --- */
pre {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: var(--border-radius-md) !important;
    padding: 1.25rem !important;
    font-family: monospace !important;
    font-size: 0.9rem !important;
    color: var(--text-primary) !important;
    overflow-x: auto !important;
    white-space: pre !important;
    word-spacing: normal !important;
    word-break: normal !important;
    word-wrap: normal !important;
    margin: 1.5rem 0 !important;
    max-width: 100% !important;
}

pre code {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

@media (max-width: 768px) {
    pre {
        font-size: 0.75rem !important;
        padding: 0.85rem !important;
    }
}

/* --- AURA Interactive Gallery --- */
.aura-gallery-container {
    position: relative;
    width: 100%;
    margin: 2rem 0;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.4);
    overflow: hidden;
    padding-bottom: 3.5rem;
}

.aura-gallery-slides {
    position: relative;
    width: 100%;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .aura-gallery-slides {
        height: 280px;
    }
}

.aura-gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.aura-gallery-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.aura-gallery-slide img {
    max-width: 100%;
    max-height: calc(100% - 60px);
    object-fit: contain;
    border-radius: 8px;
    padding: 1rem 1rem 0 1rem;
}

.aura-gallery-caption {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0.75rem 0 0.5rem 0;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 500;
}

/* Arrow Buttons */
.aura-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid var(--card-border);
    backdrop-filter: var(--glass-blur);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition-fast);
}

.aura-gallery-arrow:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.aura-gallery-arrow.prev {
    left: 1.5rem;
}

.aura-gallery-arrow.next {
    right: 1.5rem;
}

/* Dots */
.aura-gallery-dots {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.aura-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition-fast);
}

.aura-dot.active {
    background: var(--secondary);
    width: 22px;
    border-radius: 4px;
}

/* --- Scroll Progress Bar --- */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: var(--gradient-primary);
    z-index: 3000;
    transition: width 0.1s ease;
}

/* --- Touch Screen Optimizations --- */
@media (pointer: coarse) {
    .custom-cursor, .custom-cursor-dot {
        display: none !important;
    }
}

/* --- Image Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 15, 0.95);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
    transition: var(--transition-fast);
}

.lightbox-close:hover {
    background: var(--primary);
    color: var(--white);
}

/* --- Bottom Nav Buttons inside Modals --- */
.modal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    gap: 1.5rem;
}

@media (max-width: 480px) {
    .modal-nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-nav-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Static Contact Layout --- */
.contact-static-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 3rem auto;
}

.contact-method-card {
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.contact-method-card:hover {
    border-color: var(--card-hover-border);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

.contact-method-card .method-icon {
    margin: 0;
}

.contact-social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-social-links a {
    width: 44px;
    height: 44px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.15rem;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.contact-social-links a:hover {
    color: var(--white);
    border-color: var(--primary);
    background-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

@media (max-width: 768px) {
    .contact-static-grid {
        grid-template-columns: 1fr;
    }
}

/* --- About Page Blockquote --- */
.about-quote {
    position: relative;
    margin: 2rem 0 0 0;
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.about-quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px 0 0 4px;
}

/* --- Hero Slider Comparison Layout --- */
.slider-wrapper-outer {
    position: relative;
    width: 100%;
    max-width: 540px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-comparison-container {
    position: relative;
    width: 100%;
    max-width: 540px;
    aspect-ratio: 1 / 1;
    height: auto;
    background: transparent;
    border: 1px solid var(--card-border); /* Beautiful frosted outline border */
    border-radius: 24px; /* Rounded rectangle card container */
    overflow: hidden;
    user-select: none;
    box-shadow: none;
}

.slider-panel {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-panel-content {
    position: absolute;
    top: 0;
    width: 100%; /* Dynamically matches container clientWidth */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Left panel gets revealed by opacity animation */
.panel-left {
    left: 0;
    width: 100%;
    z-index: 2;
    background: transparent;
    opacity: 0;
    animation: revealCycle 12s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.panel-left .slider-panel-content {
    left: 0;
}

/* Right panel sits in background */
.panel-right {
    right: 0;
    width: 100%;
    z-index: 1;
    background: transparent;
    animation: hideCycle 12s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.panel-right .slider-panel-content {
    right: 0;
}

/* Inline Card Structures to match slider bounds */
.inline-card {
    width: 250px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition-fast);
}

.premium-product-card.inline-card {
    border-color: rgba(6, 182, 212, 0.2);
}

.product-code-card.inline-card {
    border-color: rgba(99, 102, 241, 0.2);
    background: rgba(10, 10, 15, 0.85);
}

.product-badge {
    background: var(--gradient-primary);
    font-size: 0.65rem;
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    align-self: flex-start;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.product-image-area {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 0.75rem;
}

.product-info-area {
    display: flex;
    flex-direction: column;
}

.product-brand {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin: 0.1rem 0;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
}

.product-buy-btn {
    background: var(--gradient-primary);
    border: none;
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.2);
    transition: var(--transition-fast);
}

.product-buy-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(6, 182, 212, 0.4);
}

.code-selector {
    color: var(--secondary);
    font-weight: 600;
}

/* Panel Design/Development Labels */
.panel-label {
    position: absolute;
    bottom: 1rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 0.3rem 0.6rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    z-index: 10;
}

.label-left {
    left: 1rem;
    color: var(--secondary);
}

.label-right {
    right: 1rem;
    color: var(--primary);
}

/* Rounded Rectangle SVG Path Tracing */
.rect-trace-svg {
    position: absolute;
    top: -2.5px; /* Sits perfectly centered over container border */
    left: -2.5px;
    width: calc(100% + 5px);
    height: calc(100% + 5px);
    pointer-events: none;
    z-index: 10;
    overflow: visible;
}

.rect-trace-path {
    fill: none;
    stroke: var(--secondary);
    stroke-width: 0.6px; /* Razor-thin line */
    stroke-dasharray: 90 310; /* Length of tracing segment is 90, gap is 310 */
    stroke-linecap: round;
    opacity: 0.35; /* Low opacity matching glassmorphism theme */
    filter: drop-shadow(0 0 4px var(--secondary)); /* Soft cyan glow shadow */
    animation: traceRect 12s linear infinite;
}

@keyframes traceRect {
    0% { stroke-dashoffset: 400; }
    100% { stroke-dashoffset: 0; }
}

@keyframes revealCycle {
    0% { opacity: 0; }
    30% { opacity: 1; }
    50% { opacity: 1; }
    80% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes hideCycle {
    0% { opacity: 1; }
    30% { opacity: 0; }
    50% { opacity: 0; }
    80% { opacity: 1; }
    100% { opacity: 1; }
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important; /* Premium scaled-down size for mobile viewports */
        line-height: 1.2;
    }
    .hero-typing-line {
        font-size: 1.6rem !important; /* Snug, clean fit that prevents triple-line wraps */
        min-height: 4.2rem !important; /* Stable space for up to two lines of typed text */
    }
    .slider-wrapper-outer {
        width: 100%;
        max-width: 320px !important;
    }
    .slider-comparison-container {
        width: 100%;
        max-width: 320px;
    }
    .slider-panel-content {
        width: 100%;
    }
    .inline-card {
        width: 185px;
        padding: 0.6rem;
    }
    .inline-card h4 {
        font-size: 1rem !important;
    }
    .inline-card p {
        font-size: 0.6rem !important;
    }
    .inline-card p span {
        font-size: 0.55rem !important;
    }
    .inline-card p span + span {
        font-size: 0.75rem !important;
    }
    .inline-card .profile-photo-container {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 0.5rem !important;
    }
    .product-image-area {
        height: 70px;
    }
    .product-name {
        font-size: 0.9rem;
    }
    .product-code-card .card-body {
        font-size: 0.6rem;
    }
    .circle-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }
    .design-badge {
        top: -10px !important;
        left: 10px !important;
    }
    .dev-badge {
        top: -10px !important;
        right: 10px !important;
    }
}

/* Dynamic Floating Circular Badges */
.circle-badge {
    position: absolute;
    z-index: 12;
    padding: 0.5rem 1rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: var(--border-radius-md);
    background: var(--gradient-primary);
    border: none;
    color: var(--white);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    opacity: 0;
    pointer-events: none;
}

.design-badge {
    top: 60px;
    left: -70px;
    animation: designBadgeCycle 12s ease-in-out infinite;
}

.dev-badge {
    top: 60px;
    right: -70px;
    animation: devBadgeCycle 12s ease-in-out infinite;
}

@keyframes designBadgeCycle {
    0%, 27% { opacity: 0; transform: translateY(10px); }
    30%, 48% { opacity: 1; transform: translateY(0); }
    50%, 100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes devBadgeCycle {
    0%, 77% { opacity: 0; transform: translateY(10px); }
    80%, 98% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes rotateRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.9; box-shadow: 0 0 8px #10b981; }
    50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 16px #10b981; }
}



