:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --accent: #06b6d4;
    --success: #10b981;
    --bg: #0f172a;
    --bg-light: #1e293b;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --text-gray: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.1);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    --hero-bg: url("./assets/islamabad_midnight.png")
}

body.light {
    --primary: #0284c7;
    --primary-dark: #075985;
    --accent: #0891b2;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-gray: #475569;
    --text-muted: #64748b;
    --border: rgba(15, 23, 42, 0.1);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    --hero-bg: url("./assets/islamabad_monochrome_blue.png")
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s;
}

body.light .nav {
    background: rgba(255, 255, 255, 0.8);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

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

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

.nav-menu a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary);
}

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

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.mobile-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-btn span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: all 0.3s;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    background: var(--bg);
    background-image: var(--hero-bg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.neural-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-main {
    flex: 1;
    max-width: 600px;
    border: none;
    border-radius: 16px;
    padding: 2.2rem;
    padding-top: 2rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(5px);

}

body.light .hero-main {
    background: rgba(241, 245, 249, 0.8);
}

.hero-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.2rem;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.hero-title {
    font-size: clamp(3.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    color: var(--text);
}

.hero-role {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text);
}

.role-prefix {
    color: var(--text-gray);
}

.role-text {
    color: var(--primary);
    font-weight: 700;
}

.cursor {
    color: var(--primary);
    animation: blink 1s infinite;
    margin-left: 2px;
}

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

.hero-description {
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.hero-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.hero-buttons .btn i {
    font-size: 1.2rem;
}

.hero-buttons .btn-primary {
    background: var(--primary);
    color: white;
}

.hero-buttons .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
}

.hero-buttons .btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--primary);
}

.hero-buttons .btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Hero Skills - Animated Tech Stack Pills */
.hero-skills {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    animation: slideUp 0.8s ease-out 0.4s both;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: rgba(14, 165, 233, 0.1);
    border: 1.5px solid var(--primary);
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.skill-tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

.skill-tag:hover::before {
    left: 100%;
}

.skill-tag i {
    font-size: 1.1rem;
}

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

/* Hero Stats Section */
.hero-stats {
    display: none;
}

/* Hero Accent Elements - Animated Background */
.hero-accent {
    display: none;
}

/* Hero Cards - Featured Showcase */
.hero-cards {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
}

.card-showcase {
    width: 100%;
    height: 100%;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1.2rem;
    perspective: 1000px;
}

.card-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: var(--card-bg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    animation: cardSlideIn 0.6s ease-out forwards;
    opacity: 0;
}

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

.card-item:nth-child(1) { 
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    animation-delay: 0.1s;
}

.card-item:nth-child(2) { 
    grid-column: 3;
    grid-row: 1;
    animation-delay: 0.2s;
}

.card-item:nth-child(3) { 
    grid-column: 3;
    grid-row: 2;
    animation-delay: 0.3s;
}

.card-item:nth-child(4) { 
    grid-column: 1 / 3;
    grid-row: 3;
    animation-delay: 0.4s;
}

.card-item:nth-child(5) { 
    grid-column: 3;
    grid-row: 3;
    animation-delay: 0.5s;
}

.card-link:nth-child(4) { 
    grid-column: 1 / 3;
    grid-row: 3;
}

.card-link:nth-child(5) { 
    grid-column: 3;
    grid-row: 3;
}

.card-link .card-item {
    flex: 1;
    animation-delay: 0.4s;
}

.card-link:nth-child(5) .card-item {
    animation-delay: 0.5s;
}

.card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.card-badge {
    display: inline-block;
    width: fit-content;
    padding: 0.4rem 0.9rem;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid var(--primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.card-item h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.card-item p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin: 0;
}

.card-item a {
    font-size: 1rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: auto;
}

.card-item a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.card-meta {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Wikipedia-style hover effect */
.card-bg-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(14, 165, 233, 0) 0%,
        rgba(14, 165, 233, 0.1) 50%,
        rgba(6, 182, 212, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
}

.card-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.card-item:hover {
    border-color: var(--primary);
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.25), 
                0 0 30px rgba(14, 165, 233, 0.1);
}

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

.card-item:hover::after {
    opacity: 1;
}

.card-item:hover .card-bg-effect {
    opacity: 1;
}

.card-item:hover h3 {
    color: var(--primary);
}

/* lvl0-style glow effect on focus */
.card-item:focus-within {
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.4),
                inset 0 0 20px rgba(14, 165, 233, 0.1);
}

.card-item.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--card-bg), rgba(14, 165, 233, 0.05));
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.3),
                inset 0 0 20px rgba(14, 165, 233, 0.05);
}

.card-item.active h3 {
    color: var(--primary);
}

.card-item.active .card-badge {
    background: rgba(14, 165, 233, 0.3);
    border-color: var(--accent);
}

.featured-image-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(14, 165, 233, 0.2)), 
                url('./assets/wikipedia-future.png') center / cover;
    background-attachment: fixed;
}

.featured-image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(14, 165, 233, 0.3) 0%,
        rgba(6, 182, 212, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.featured-image-card:hover::before {
    opacity: 1;
}

.featured-image-card h3 {
    font-size: 1.6rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.featured-image-card p {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    font-weight: 500;
}

.featured-badge {
    background: rgba(14, 165, 233, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: white !important;
}

.featured-image-card:hover h3 {
    color: #0ea5e9;
}

/* Open Source Card - lvl0 Image */
.open-source-card {
    background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.75), rgba(14, 165, 233, 0.25)), 
                      url('./assets/lvl0-human.webp') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.open-source-card h3 {
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.open-source-card .card-badge {
    background: rgba(14, 165, 233, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    backdrop-filter: blur(8px);
}

.open-source-card:hover h3 {
    color: #0ea5e9;
}

/* Responsive card sizing */
@media (max-width: 1024px) {
    .card-showcase {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    
    .card-item:nth-child(1) { 
        grid-column: 1 / 3;
        grid-row: 1;
    }
    
    .card-item:nth-child(2) { 
        grid-column: 1;
        grid-row: 2;
    }
    
    .card-item:nth-child(3) { 
        grid-column: 2;
        grid-row: 2;
    }
    
    .card-item:nth-child(4) { 
        grid-column: 1;
        grid-row: 3;
    }
    
    .card-item:nth-child(5) { 
        grid-column: 2;
        grid-row: 3;
    }
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.desc {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.quote-block {
    margin: 2rem 0 2rem 0;
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    border-left: 4px solid var(--primary);
    background: rgba(14, 165, 233, 0.05);
    border-radius: 8px;
    transition: all 0.3s;
}

.quote-block:hover {
    background: rgba(14, 165, 233, 0.1);
    border-left-color: var(--accent);
}

.quote-text {
    font-size: 1.15rem;
    color: var(--text);
    font-style: italic;
    margin-bottom: 0.8rem;
    line-height: 1.6;
    font-weight: 500;
}

.quote-author {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin: 0;
}

.buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.1rem 2.2rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1.05rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--card-bg);
    border-color: var(--primary);
}

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

/* Hero Visual - Hidden */
.hero-visual {
    display: none;
}

.avatar-box {
    display: none;
}

.avatar {
    display: none;
}

.floating-card {
    display: none;
}

/* Section */
section {
    padding: 5rem 0;
}

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

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-top: 0.5rem;
}

/* About */
.about {
    background: var(--bg-light);
}

.about-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
}

.img-frame {
    position: relative;
    max-width: 430px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.profile {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: white;
    box-shadow: var(--shadow);
}

.profile.ascii-profile {
    background: var(--bg-light);
    overflow: hidden;
    padding: 1.5rem;
}

.ascii {
    color: var(--primary) !important;
    background: transparent !important;
}

body.light .ascii {
    color: var(--primary-dark) !important;
}

.badge {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.badge i {
    color: var(--primary);
}

.b1 {
    top: -15px;
    left: -15px;
}

.b2 {
    bottom: -15px;
    right: -15px;
}

.about-text h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.about-text {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-weight: 800;
    color: var(--text);
}

.about-text p {
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.8;
    padding: 2rem;
    border-left: 3px solid var(--primary);
    border-right: 3px solid var(--primary);
    border-radius: 8px;
}

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 2px solid #10b981;
    border-radius: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
}

.feature:hover {
    border-color: #10b981;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
    transform: translateY(-4px);
}

.feature i {
    color: var(--success);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
    display: none;
}

.feature span {
    color: var(--text);
    font-weight: 500;
    line-height: 1.5;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.skill-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1rem;
}

.skill-card:nth-child(1) .skill-icon {
    background: #0b74c9;
}

.skill-card:nth-child(1) .skill-icon i {
    color: white;
}

.skill-card:nth-child(3) .skill-icon {
    background: #f84040;
}

.skill-card:nth-child(3) .skill-icon i {
    color: white;
}

.skill-card:nth-child(4) .skill-icon {
    background: hwb(167 3% 5%);
}

.skill-card:nth-child(4) .skill-icon i {
    color: rgb(255, 44, 202);
}

.skill-card:nth-child(2) .skill-icon {
    background: #F7DF1E;
}

.skill-card:nth-child(2) .skill-icon i {
    color: #333;
}

.skill-card:nth-child(5) .skill-icon {
    background: #000000;
}

.skill-card:nth-child(5) .skill-icon i {
    color: white;
}

.skill-card:nth-child(6) .skill-icon {
    background: #ffe656;
}

.skill-card:nth-child(6) .skill-icon i {
    color: rgb(15, 138, 238);
}

.skill-card:nth-child(7) .skill-icon {
    background: #ffffff;
}

.skill-card:nth-child(7) .skill-icon i {
    color: rgb(18, 150, 6);
}

.skill-card:nth-child(8) .skill-icon {
    background: #ff961f;
}

.skill-card:nth-child(8) .skill-icon i {
    color: rgb(255, 255, 255);
}

.skill-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.skill-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.progress {
    width: 100%;
    height: 6px;
    background: var(--bg);
    border-radius: 10px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease;
}

/* Projects */
.projects {
    background: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

.placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.project:hover .hover-overlay {
    opacity: 1;
}

.hover-overlay a {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg);
    text-decoration: none;
    transition: all 0.3s;
}

.hover-overlay a:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.project-info {
    padding: 1.5rem;
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tags span {
    padding: 0.3rem 0.8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--primary);
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

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

.project-link:hover {
    color: var(--accent);
    transform: translateX(3px);
}

/* log */
.log {
    background: var(--bg);
}

.log-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.log-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.log-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.log-date {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.log-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text);
    line-height: 1.4;
}

.log-card p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.log-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.log-tags span {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    border: 1px solid var(--border);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.method {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.method:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.method .icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.method h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.method p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Form */
.form {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 16px;
}

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

.group {
    margin-bottom: 1.5rem;
}

.group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-gray);
}

.group input,
.group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.group input:focus,
.group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.group textarea {
    resize: vertical;
}

.msg {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    text-align: center;
}

.msg.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
    display: block;
}

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

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.footer p {
    color: var(--text-gray);
}

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

.socials a {
    width: 45px;
    height: 45px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
}

.socials a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-gray);
}

.footer-bottom i {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 968px) {
    .hero-grid, .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .avatar-box {
        height: 350px;
    }

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: left 0.3s;
    }

    body.light .nav-menu {
        background: rgba(255, 255, 255, 0.98);
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-btn {
        display: flex;
    }

    .mobile-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

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

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

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

    section {
        padding: 3rem 0;
    }

    .avatar-box {
        height: 300px;
    }

    .avatar {
        width: 150px;
        height: 150px;
        font-size: 4rem;
    }

    .floating-card {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }

    .floating-card i {
        font-size: 1.2rem;
    }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 25, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 9999;
}

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

.modal {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  position: relative;
  animation: modalIn 0.25s ease;
}

.modal-date {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 30px;
  color: var(--text);
  cursor: pointer;
  opacity: 0.7;
}

.modal-close:hover {
  opacity: 1;
}

@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.card-link {
  text-decoration: none;
  color: inherit;
  grid-column: inherit;
  grid-row: inherit;
  display: flex;
}