/* ===== CSS Variables ===== */
:root {
    --primary-color: #3498db;
    --secondary-color: #9b59b6;
    --accent-color: #e74c3c;
    --dark-bg: #1a1a2e;
    --darker-bg: #16213e;
    --light-text: #ffffff;
    --gray-text: #a0a0a0;
    --card-bg: #0f3460;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background: rgba(26, 26, 46, 0.98);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.navbar .container>*:not(.nav-brand):not(.hamburger) {
    display: flex;
    align-items: center;
}

.nav-brand a {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.nav-brand a:hover {
    transform: scale(1.1);
    color: var(--secondary-color);
}

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

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

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

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

/* ===== Language Selector ===== */
.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.language-selector i {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.language-dropdown {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.05));
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 20px;
    color: var(--light-text);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.language-dropdown:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(52, 152, 219, 0.1));
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

.language-dropdown:focus {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(52, 152, 219, 0.1));
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.3);
}

.language-dropdown option {
    background: var(--darker-bg);
    color: var(--light-text);
    padding: 0.5rem;
    font-size: 0.9rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--light-text);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 100px 20px 50px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0.1;
    z-index: 0;
}

.hero-background::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
    top: 20%;
    left: 10%;
}

.hero-background::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    animation: float 8s ease-in-out infinite reverse;
    bottom: 20%;
    right: 10%;
}

@keyframes float {

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

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

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

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--gray-text);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
}

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 0.1px solid rgba(255, 255, 255, 0.35);
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--light-text);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--light-text);
    transform: translateY(-3px);
}

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

.social-links a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--light-text);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 3px;
    height: 8px;
    background: var(--light-text);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 8px;
    }

    100% {
        opacity: 0;
        top: 20px;
    }
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.fade-in.delay-1 {
    animation-delay: 0.2s;
}

.fade-in.delay-2 {
    animation-delay: 0.4s;
}

.fade-in.delay-3 {
    animation-delay: 0.6s;
}

.fade-in.delay-4 {
    animation-delay: 0.8s;
}

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

    from {
        transform: translateY(20px);
    }
}

/* ===== Sections ===== */
.section {
    padding: 100px 20px;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

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

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

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    color: rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow);
    padding: 8px;
    position: relative;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ===== GitHub Contribution Chart ===== */
.contribution-chart {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.contribution-chart h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contribution-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 0.5rem;
    padding-top: 2.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.5) rgba(255, 255, 255, 0.1);
}

.contribution-wrapper::-webkit-scrollbar {
    height: 8px;
}

.contribution-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.contribution-wrapper::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 10px;
}

.contribution-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.contribution-months {
    display: flex;
    font-size: 0.75rem;
    color: var(--gray-text);
    margin-bottom: 0.5rem;
    padding-left: 20px;
    width: 100%;
    justify-content: space-between;
}

.contribution-month {
    min-width: 52px;
}

.contribution-grid {
    display: grid;
    grid-template-rows: repeat(7, 12px);
    grid-auto-flow: column;
    gap: 3px;
    width: 100%;
    padding-left: 20px;
}

.contribution-day {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: rgba(102, 126, 234, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.contribution-day:hover {
    transform: scale(1.5);
    z-index: 10;
}

.contribution-day.level-1 {
    background: rgba(102, 126, 234, 0.3);
}

.contribution-day.level-2 {
    background: rgba(102, 126, 234, 0.5);
}

.contribution-day.level-3 {
    background: rgba(102, 126, 234, 0.7);
}

.contribution-day.level-4 {
    background: rgba(102, 126, 234, 1);
}

.contribution-day::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 5px;
    z-index: 100;
    transition: opacity 0.2s;
    max-width: 250px;
}

/* Adjust tooltip position for left edge squares */
.contribution-grid>.contribution-day:nth-child(-n+100)::after {
    left: 0;
    transform: translateX(0);
}

/* Adjust tooltip position for right edge squares */
.contribution-grid>.contribution-day:nth-last-child(-n+100)::after {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.contribution-day:hover::after {
    opacity: 1;
}

.contribution-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--gray-text);
    margin-top: 1rem;
}

.legend-boxes {
    display: flex;
    gap: 3px;
}

.legend-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-box.level-0 {
    background: rgba(102, 126, 234, 0.1);
}

.legend-box.level-1 {
    background: rgba(102, 126, 234, 0.3);
}

.legend-box.level-2 {
    background: rgba(102, 126, 234, 0.5);
}

.legend-box.level-3 {
    background: rgba(102, 126, 234, 0.7);
}

.legend-box.level-4 {
    background: rgba(102, 126, 234, 1);
}

/* ===== Skills Section ===== */
.skills {
    background: var(--darker-bg);
}

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

.skill-category {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    transition: var(--transition);
}

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

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

.skill-category h3 i {
    margin-right: 10px;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.skill-name {
    color: var(--light-text);
    font-weight: 500;
}

.skill-level {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    opacity: 0.9;
}

.skill-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 10px;
    width: 0;
    transition: width 1s ease;
}

/* ===== Languages Section ===== */
.languages {
    background: var(--dark-bg);
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.language-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    transition: var(--transition);
}

.language-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.language-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--light-text);
}

.language-level {
    margin-top: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

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

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

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateX(-50px);
    transition: var(--transition);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--dark-bg);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    transition: var(--transition);
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.timeline-content h4 {
    color: var(--gray-text);
    margin-bottom: 1rem;
}

.project-highlight {
    background: rgba(52, 152, 219, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.timeline-content ul {
    margin-left: 1.5rem;
    color: var(--gray-text);
}

.timeline-content li {
    margin-bottom: 0.5rem;
}

.timeline-content code {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* ===== Projects Section ===== */
.projects {
    background: var(--darker-bg);
}

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

.project-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    transition: var(--transition);
    border: 1px solid transparent;
}

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

.project-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

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

.project-type {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.project-date {
    color: var(--gray-text);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-date i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.project-card>p {
    color: var(--gray-text);
    margin-bottom: 1.5rem;
}

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

.project-tags span {
    background: rgba(52, 152, 219, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-links a {
    color: var(--light-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-links a:hover {
    background: var(--primary-color);
}

/* ===== Did You Know Section ===== */
.didyouknow {
    background: rgba(255, 255, 255, 0.02);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-text);
    font-size: 1.1rem;
    margin-top: -1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.didyouknow-grid {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    overflow-x: auto;
    padding-top: 0.5rem;
    padding-bottom: 2rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.didyouknow-grid::-webkit-scrollbar {
    height: 12px;
}

.didyouknow-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.didyouknow-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.didyouknow-grid::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.didyouknow-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 350px;
    max-width: 350px;
    flex-shrink: 0;
}

.didyouknow-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.didyouknow-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: white;
}

.didyouknow-card h3 {
    color: var(--light-text);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.didyouknow-tag {
    display: inline-block;
    background: rgba(102, 126, 234, 0.2);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    width: fit-content;
    font-weight: 500;
}

.didyouknow-card p {
    color: var(--gray-text);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.didyouknow-card code {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.didyouknow-footer {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.didyouknow-footer a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.didyouknow-footer a:hover {
    color: var(--light-text);
    transform: translateX(3px);
}

.didyouknow-footer a i {
    font-size: 1rem;
}

/* ===== Calculator Section ===== */
.calculator {
    background: rgba(15, 52, 96, 0.15);
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.calculator-form {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

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

.form-group {
    margin-bottom: 1.8rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.7rem;
    color: var(--light-text);
    font-weight: 600;
    font-size: 1rem;
}

/* Apply option-card visual and hover behavior to specific selects without changing HTML */
select#projectSize,
select#designLevel,
select#backendLevel {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: var(--transition);
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select#projectSize:hover,
select#designLevel:hover,
select#backendLevel:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.form-group select,
.form-group input[type="range"] {
    width: 100%;
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="number"] {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--light-text);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

/* Remove default dropdown arrow for selects (use custom styling if needed) */
.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none !important;
    padding-right: 1rem;
}

.form-group select::-ms-expand {
    display: none;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
}

/* Collapsible options inside calculator */
#calculatorOptionsWrapper.collapsed {
    display: none;
}

.collapse-toggle {
    display: inline-block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--light-text);
    transition: var(--transition);
}

.collapse-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.option-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.card-desc {
    display: block;
    font-size: 12px;
    color: var(--muted, #6b7280);
    text-align: left;
    align-self: flex-start;
    margin-top: 6px;
    padding-left: 6px;
    padding-right: 6px;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: var(--transition);
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1;
}

.option-card input {
    appearance: none;
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    margin: 0;
    line-height: 0;
    flex-shrink: 0;
    vertical-align: middle;
    transition: var(--transition);
}

.option-card input:checked {
    border-color: var(--primary-color);
}

.option-card input:checked::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.option-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.range-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-row input[type="range"] {
    flex: 1;
    accent-color: var(--primary-color);
}

.range-value {
    color: var(--gray-text);
    font-size: 0.95rem;
    min-width: 140px;
    text-align: right;
}

.calculator-output {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Keep estimate card visible while scrolling through long option lists on wider screens */
@media (min-width: 900px) {
    .calculator-output {
        position: sticky;
        top: 96px;
        /* account for navbar height + some padding */
        align-self: start;
        /* ensure it doesn't shrink when sticky */
        width: auto;
        /* max-width removed to allow auto width */
        /* sticky behavior retained */
    }
}

.estimate-card {
    background: var(--gradient-1);
    border-radius: 16px;
    padding: 2.5rem;
    color: var(--light-text);
    box-shadow: var(--shadow);
}

.estimate-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.estimate-price {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.estimate-note {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.estimate-breakdown {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

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

@media (min-width: 900px) {
    .estimate-quick {
        grid-template-columns: repeat(2, 1fr);
    }
}

.estimate-right {
    /* placeholder for future content; keep empty */
}

.selected-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.selected-option {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
}

.selected-option .so-title {
    font-weight: 600;
    margin-bottom: 0.18rem;
}

.selected-option .so-desc {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.3;
}

@media (min-width: 900px) {
    .selected-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.estimate-item {
    background: rgba(255, 255, 255, 0.12);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.estimate-item span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.estimate-item strong {
    font-size: 1.1rem;
}

.calculator-disclaimer {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.5rem;
    color: var(--gray-text);
    line-height: 1.6;
}

/* ===== Contact Section ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

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

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

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: var(--transition);
    height: 60px;
}

.contact-method:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 30px;
}

.contact-method a {
    color: var(--light-text);
    text-decoration: none;
}

.contact-method a:hover {
    color: var(--primary-color);
}

.cta-card {
    background: var(--gradient-1);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
}

.cta-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-card p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ===== QR Code Button & Modal ===== */
.qr-btn {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 6px;
    color: var(--primary-color);
    padding: 0;
    margin-left: auto;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.qr-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.qr-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-modal-content {
    background: var(--darker-bg);
    padding: 2rem;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow);
}

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

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

.qr-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--gray-text);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.qr-modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.qr-modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.qr-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.qr-modal-content p {
    color: var(--gray-text);
    font-size: 1.2rem;
    margin-top: 1rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--darker-bg);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    color: var(--gray-text);
    margin-bottom: 1rem;
}

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

.footer-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    transition: var(--transition);
}

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

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--darker-bg);
        width: 100%;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }

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

    .language-selector {
        flex-direction: row;
        margin-left: 0;
        justify-content: center;
        padding: 1rem 0;
    }

    .language-dropdown {
        flex: 1;
        max-width: 200px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .about-content,
    .contact-content,
    .calculator-grid {
        grid-template-columns: 1fr;
    }

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

    .contribution-chart {
        padding: 1rem;
    }

    .contribution-grid {
        gap: 2px;
    }

    .contribution-day {
        width: 10px;
        height: 10px;
    }

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

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

    .calculator-form {
        padding: 2rem;
    }

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

    .estimate-breakdown {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}