/* ===============================================
   MODERN PORTFOLIO - OPTIMIZED STYLES
   Enhanced with premium aesthetics, full responsiveness,
   smooth animations, and accessibility features
   =============================================== */

/* ================= CSS Variables ================= */
:root {
    /* Colors - Light Mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;

    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-muted: #718096;

    /* Accent Colors - Matching Logo Palette */
    --accent-primary: #8B1F1F;
    --accent-secondary: #3A3A3A;
    --accent-tertiary: #2D1B4E;
    --accent-gradient: linear-gradient(135deg, #8B1F1F 0%, #5A1515 50%, #2D1B4E 100%);
    --accent-gradient-reverse: linear-gradient(135deg, #2D1B4E 0%, #5A1515 50%, #8B1F1F 100%);

    --accent-burgundy: #8B1F1F;
    --accent-maroon: #5A1515;
    --accent-charcoal: #3A3A3A;
    --accent-purple: #2D1B4E;

    /* UI Elements */
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(139, 31, 31, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(139, 31, 31, 0.08);
    --shadow-md: 0 4px 16px rgba(139, 31, 31, 0.12);
    --shadow-lg: 0 12px 32px rgba(139, 31, 31, 0.16);
    --shadow-xl: 0 20px 48px rgba(139, 31, 31, 0.2);

    /* Glow Effects */
    --glow-primary: 0 0 20px rgba(139, 31, 31, 0.4);
    --glow-secondary: 0 0 20px rgba(45, 27, 78, 0.4);

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-fast: 150ms var(--ease-smooth);
    --transition-base: 250ms var(--ease-smooth);
    --transition-slow: 400ms var(--ease-smooth);
}

/* Dark Mode Variables */
body.dark {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --card-bg: rgba(26, 26, 26, 0.95);
    --card-border: rgba(139, 31, 31, 0.2);
    --glass-bg: rgba(26, 26, 26, 0.8);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.7);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    background-image: url('bgi.svg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background var(--transition-base), color var(--transition-base);
    position: relative;
}

/* Background overlay for better readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: -2;
    pointer-events: none;
}

body.dark::before {
    background: rgba(15, 23, 42, 0.85);
}

/* ================= H3 CODE STYLING ================= */
h3 {
    font-family: 'Fira Code', 'Courier New', 'Consolas', monospace;
    font-weight: 600;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

/* Code bracket decoration */
h3::before {
    content: '< ';
    color: var(--accent-primary);
    opacity: 0.7;
    font-weight: 700;
}

h3::after {
    content: ' />';
    color: var(--accent-secondary);
    opacity: 0.7;
    font-weight: 700;
    animation: blink-cursor 1.2s infinite;
}

/* Blinking cursor animation */
@keyframes blink-cursor {

    0%,
    49% {
        opacity: 0.7;
    }

    50%,
    100% {
        opacity: 0;
    }
}

/* Hover effect for H3 */
h3:hover {
    transform: translateX(4px);
    border-left-width: 4px;
    box-shadow: var(--shadow-md), var(--glow-primary);
    transition: all var(--transition-base);
}

/* Dark mode adjustments */
body.dark h3 {
    text-shadow: 0 0 10px rgba(139, 31, 31, 0.3);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ================= Canvas Background ================= */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
    opacity: 0.6;
}

/* ================= Scroll Progress Indicator ================= */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 1000;
    transform-origin: left;
    transition: width var(--transition-fast);
    box-shadow: var(--glow-primary);
}

/* ================= Header & Navigation ================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1rem, 5vw, 3rem);
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
    transition: all var(--transition-base);
}

.header.scrolled {
    height: 70px;
    box-shadow: var(--shadow-md);
}

/* Logo */
.logo img {
    height: 50px;
    width: auto;
    display: block;
    transition: transform var(--transition-base), filter var(--transition-base);
    cursor: pointer;
}

.logo img:hover {
    transform: scale(1.05) rotate(-2deg);
    filter: drop-shadow(0 4px 12px rgba(139, 31, 31, 0.5));
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: transform var(--transition-base);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--accent-primary);
    background: rgba(139, 31, 31, 0.08);
}

.nav-link:hover::before,
.nav-link:focus::before {
    transform: translateX(-50%) scaleX(1);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all var(--transition-base);
    margin-left: 0.5rem;
}

.theme-toggle:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: var(--shadow-md);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 99;
}

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

/* ================= Section Layouts ================= */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(3rem, 8vh, 6rem) clamp(1rem, 5vw, 3rem);
}

.section:first-of-type {
    padding-top: clamp(6rem, 15vh, 10rem);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-gradient);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--glow-primary);
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

/* ================= HOME SECTION ================= */
.home {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: calc(100vh - 80px);
}

.home-content {
    animation: fadeInUp 0.8s var(--ease-smooth);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.greeting-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.greeting-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 0.4rem;
}

.home h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.home-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

/* CTA Buttons */
.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md), var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

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

.btn-secondary:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Hero Image */
.hero-image-wrapper {
    position: relative;
    animation: fadeInRight 0.8s var(--ease-smooth) 0.2s both;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-image {
    width: 100%;
    height: 500px;
    border-radius: var(--radius-xl);
    background-size: cover !important;
    background-position: center !important;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-slow);
}

.hero-image:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: var(--shadow-xl), var(--glow-primary);
}

.hero-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 31, 31, 0.3), rgba(45, 27, 78, 0.3));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.hero-image:hover .hero-image-overlay {
    opacity: 1;
}

/* Floating Badges */
.floating-badge {
    position: absolute;
    padding: 0.75rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

.badge-1 {
    top: 10%;
    right: -10%;
    animation-delay: 0s;
}

.badge-2 {
    bottom: 10%;
    left: -10%;
    animation-delay: 1.5s;
}

@keyframes float {

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

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

/* ================= ABOUT SECTION ================= */
.about-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-slow);
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.about-card-inner {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.about-avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    background: var(--accent-gradient);
    background-image: url('assets/AvatarMaker.png');
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--bg-primary);
    transition: all var(--transition-base);
}

body.dark .about-avatar {
    background-image: url('assets/Avatar.png');
}

.about-avatar:hover {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: var(--shadow-lg);
}

.about-content {
    flex: 1;
}

.about-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    transition: all var(--transition-base);
    overflow: hidden;
}

/* About Highlights */
.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.highlight-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.highlight-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.highlight-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.highlight-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.highlight-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.highlight-item p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* About Actions */
.about-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-toggle {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-toggle:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.about-updated {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-left: auto;
}

/* About Habits Animation */
.about-habits {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1.5rem;
    z-index: 10;
}

.habit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-base);
}

.habit.active {
    opacity: 1;
    transform: translateY(0);
}

.habit img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.habit-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.about-accent {
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 200px;
    height: 200px;
    background: var(--accent-gradient);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

/* ================= SKILLS SECTION ================= */
.skills-intro {
    text-align: center;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 2rem;
    justify-items: center;
}

.tech-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    width: 140px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
}

.tech-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
}

.tech-tile:hover,
.tech-tile:focus {
    transform: translateY(-8px) rotate(-2deg);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.tech-tile:hover::before,
.tech-tile:focus::before {
    opacity: 0.1;
}

.tech-tile img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: all var(--transition-base);
    filter: grayscale(30%);
}

.tech-tile:hover img,
.tech-tile:focus img {
    filter: grayscale(0);
    transform: scale(1.1) rotate(5deg);
}

.tech-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Tech Description Panel */
.tech-desc {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

#tech-desc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

#tech-desc-body {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ================= PORTFOLIO SECTION ================= */
.projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.projects-loading {
    text-align: center;
    padding: 4rem 2rem;
    width: 100%;
}

.loader {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--card-border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Project Cards */
.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

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

.project-card:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: var(--shadow-xl);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-card a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
}

.project-card a:hover {
    gap: 0.75rem;
    color: var(--accent-secondary);
}

/* Carousel Styles */
.projects-carousel {
    position: relative;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.carousel-viewport {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    margin: 0 auto;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s var(--ease-smooth);
}

.carousel-slide {
    min-width: 100%;
    height: 500px;
    border-radius: var(--radius-xl);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
}

.carousel-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0.05;
    pointer-events: none;
}

.slide-content {
    position: relative;
    padding: 2.5rem 2rem;
    color: var(--text-primary);
    z-index: 2;
    max-width: 100%;
    text-align: center;
    margin: 0 auto;
}

.slide-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slide-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.slide-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.carousel-btn:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.carousel-btn.prev {
    left: 1rem;
}

.carousel-btn.next {
    right: 1rem;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--card-border);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
}

.carousel-dot.active {
    background: var(--accent-primary);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: var(--accent-secondary);
}

/* ================= CONTACT SECTION ================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.contact-grid .section-header {
    grid-column: 1 / -1;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Contact Info */
.contact-list {
    list-style: none;
    margin-bottom: 2rem;
}

.contact-list li {
    margin-bottom: 1.5rem;
}

.contact-list strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.contact-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.contact-list .muted {
    color: var(--text-muted);
}

.contact-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
}

.contact-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Socials */
.follow-us {
    margin-top: 2rem;
}

.follow-us small {
    display: block;
    margin-bottom: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.socials {
    display: flex;
    gap: 1rem;
}

.social-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.social-btn:hover {
    background: var(--accent-gradient);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.social-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(0.5);
    transition: filter var(--transition-base);
}

.social-btn:hover img {
    filter: brightness(0) invert(1);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.row.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.vis-label {
    display: block;
}

.field-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-base);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

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

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.send-btn {
    background: var(--accent-gradient);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-md), var(--glow-primary);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.form-status {
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    margin-top: 1rem;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ================= FOOTER ================= */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--card-border);
    padding: 3rem clamp(1rem, 5vw, 3rem);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-left p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

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

.footer .socials img {
    width: 24px;
    height: 24px;
}

/* ================= BACK TO TOP BUTTON ================= */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg), var(--glow-primary);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), var(--glow-primary);
}

/* ================= UTILITY CLASSES ================= */
.muted {
    color: var(--text-muted);
}

.full-width {
    grid-column: 1 / -1;
}

/* ================= PIN MODAL ================= */
.pin-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.pin-modal.active {
    display: flex;
    opacity: 1;
}

.pin-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.pin-modal-content {
    position: relative;
    background: var(--card-bg);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-xl), var(--glow-primary);
    animation: slideUp 0.4s ease-out;
    z-index: 10000;
}

.pin-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 2px solid var(--card-border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pin-modal-close:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: rotate(90deg);
}

.pin-modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pin-lock-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 0.6s ease-out;
}

.pin-modal-header h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.pin-modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.pin-input-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.pin-digit {
    width: 60px;
    height: 70px;
    font-family: 'Fira Code', monospace;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    background: var(--bg-secondary);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-base);
    caret-color: var(--accent-primary);
}

.pin-digit:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 31, 31, 0.1), var(--glow-primary);
    transform: scale(1.05);
}

.pin-digit.filled {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent-primary);
}

.pin-digit.error {
    border-color: #ef4444;
    animation: shake 0.4s ease-out;
}

.pin-error {
    min-height: 24px;
    text-align: center;
    color: #ef4444;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.pin-error.show {
    opacity: 1;
}

.pin-modal-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pin-modal-actions .btn {
    flex: 1;
}

.pin-hint {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

.pin-hint small {
    font-size: 0.85rem;
}

/* PIN Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {

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

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

@keyframes shake {

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

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}


/* ================= RESPONSIVE DESIGN ================= */

/* Tablet */
@media (max-width: 1024px) {
    .home {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-image-wrapper {
        order: -1;
    }

    .hero-image {
        height: 400px;
    }

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

    .quick-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }

    .nav {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        flex-direction: column;
        align-items: stretch;
        background: var(--card-bg);
        backdrop-filter: blur(12px);
        border-left: 1px solid var(--card-border);
        padding: 2rem 1rem;
        transition: right var(--transition-base);
        box-shadow: var(--shadow-xl);
    }

    .nav.active {
        right: 0;
    }

    .nav-link {
        padding: 1rem;
        text-align: center;
    }

    .theme-toggle {
        margin: 1rem 0 0 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .section {
        padding: 3rem 1rem;
    }

    .section:first-of-type {
        padding-top: 6rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .home h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .cta-group {
        flex-direction: column;
    }

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

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .hero-image {
        height: 300px;
    }

    .floating-badge {
        display: none;
    }

    .about-card {
        padding: 2rem 1.5rem;
    }

    .about-card-inner {
        flex-direction: column;
        text-align: center;
    }

    .about-avatar {
        margin: 0 auto;
    }

    .about-habits {
        position: static;
        transform: none;
        justify-content: center;
        margin-bottom: 2rem;
        flex-wrap: wrap;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

    .about-actions {
        justify-content: center;
    }

    .about-updated {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 1.5rem;
        max-width: 400px;
    }

    .tech-tile {
        width: 120px;
        padding: 1.25rem 0.75rem;
    }

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

    .projects-carousel {
        padding: 0 1rem;
    }

    .carousel-slide {
        height: 400px;
    }

    .slide-content {
        max-width: 95%;
        padding: 2rem 1.5rem;
    }

    .slide-content h3 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .carousel-btn.prev {
        left: 0.5rem;
    }

    .carousel-btn.next {
        right: 0.5rem;
    }

    .row.two-col {
        grid-template-columns: 1fr;
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

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

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    /* PIN Modal Mobile */
    .pin-modal-content {
        padding: 2rem 1.5rem;
    }

    .pin-digit {
        width: 50px;
        height: 60px;
        font-size: 1.5rem;
    }

    .pin-input-container {
        gap: 0.5rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .section-tag {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .home h1 {
        font-size: 1.75rem;
    }

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

    .about-card {
        padding: 1.5rem 1rem;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 320px;
    }

    .tech-tile {
        width: 100px;
        padding: 1rem 0.5rem;
    }

    .carousel-slide {
        height: 350px;
    }

    .slide-content {
        padding: 1.5rem 1rem;
        max-width: 95%;
    }

    .slide-content h3 {
        font-size: 1.5rem;
    }

    .slide-content p {
        font-size: 0.95rem;
    }
}

/* ================= PRINT STYLES ================= */
@media print {

    .header,
    .mobile-menu-toggle,
    .mobile-menu-overlay,
    .scroll-progress,
    .back-to-top,
    .floating-badge,
    .about-habits,
    .carousel-btn,
    .carousel-dots {
        display: none !important;
    }

    .section {
        page-break-inside: avoid;
    }

    body {
        background: white;
        color: black;
    }
}