.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section {
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    display: inline-block;
    position: relative;
    color: var(--primary-dark);
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
}

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(247, 248, 250, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}
.main-nav.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(247, 248, 250, 0.96);
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}
.logo-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 2rem;
}
.brand-symbol {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 2px;
    padding: 0.2rem 0.6rem;
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand-symbol:hover {
    transform: scale(1.08) rotate(-2deg);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1.4rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
}
.nav-link i {
    color: var(--primary);
    font-size: 1rem;
    transition: var(--transition);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: var(--transition);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}
.nav-link:hover,
.nav-link.active {
    color: var(--primary-dark);
    background: var(--bg-glass);
    box-shadow: var(--shadow-sm);
}
.nav-link:hover i,
.nav-link.active i {
    transform: translateY(-2px) scale(1.1);
}

.theme-toggle {
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: var(--transition);
    margin-right: 0.5rem;
}
.theme-toggle:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: rotate(20deg);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}
.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 4px;
    transition: var(--transition);
    transform-origin: center;
}
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 2;
}
.hero-text {
    animation: slideUp 0.8s ease-out;
}
.hero-badge-wrapper {
    margin-bottom: 1rem;
}
.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 0.4rem 2.2rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.2);
}
.hero-name {
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}
.hero-subtitle-wrapper {
    height: 2.8rem;
    margin-bottom: 1.2rem;
}
.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent);
    padding-left: 0.5rem;
    animation: blink-caret 0.75s step-end infinite;
}
@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent); }
}
.hero-desc {
    font-size: 1.08rem;
    color: var(--text-muted);
    max-width: 520px;
    margin-bottom: 2.2rem;
    line-height: 2;
}
.hero-desc strong {
    color: var(--primary-dark);
}
.hero-stats {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 2.2rem;
}
.stat-item {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    padding: 0.7rem 1.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    text-align: center;
    min-width: 120px;
    flex: 1;
    transition: var(--transition);
}
.stat-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}
.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    line-height: 1.2;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.hero-actions {
    margin-top: 0.5rem;
}
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 2.2rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(44, 62, 80, 0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
}
.btn-download::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: 0.6s;
}
.btn-download:hover::before {
    right: 100%;
}
.btn-download:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 36px rgba(44, 62, 80, 0.3);
    background: var(--primary-light);
}
.btn-download i {
    font-size: 1.1rem;
    transition: var(--transition);
}
.btn-download:hover i:last-child {
    transform: translateX(-6px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideUp 0.8s ease-out 0.2s both;
}
.profile-placeholder {
    width: 370px;
    height: 370px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    font-weight: 800;
    color: #fff;
    box-shadow: var(--shadow-xl);
    border: 6px solid rgba(255, 255, 255, 0.5);
    position: relative;
    transition: var(--transition);
}
.profile-placeholder img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 45%;
}
.profile-placeholder:hover {
    transform: scale(1.04);
    box-shadow: 0 30px 70px rgba(44, 62, 80, 0.25);
}
.profile-placeholder .ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.4);
    animation: spin 10s linear infinite;
}
.profile-placeholder .ring:first-of-type {
    inset: -12px;
    border-top-color: rgba(255, 255, 255, 0.25);
    animation-duration: 8s;
}
.profile-placeholder .ring:nth-of-type(2) {
    inset: -24px;
    border-top-color: var(--accent);
    animation-duration: 12s;
    animation-direction: reverse;
}
.profile-placeholder .ring:nth-of-type(3) {
    inset: -36px;
    border-top-color: rgba(255, 255, 255, 0.2);
    animation-duration: 16s;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.hero-bg-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at 20% 30%, rgba(44, 62, 80, 0.04) 0%, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(184, 148, 108, 0.05) 0%, transparent 60%);
}

.bg-shapes {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.03;
    background: var(--primary);
    transition: all 0.8s ease;
}
.shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--accent), transparent);
    animation: floatShape 18s ease-in-out infinite alternate;
}
.shape-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
    background: radial-gradient(circle, var(--secondary), transparent);
    animation: floatShape 22s ease-in-out infinite alternate-reverse;
}
.shape-3 {
    width: 200px;
    height: 200px;
    top: 40%;
    left: 20%;
    background: radial-gradient(circle, var(--primary-light), transparent);
    animation: floatShape 14s ease-in-out infinite alternate;
}
@keyframes floatShape {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.1); }
}
.particles-container {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.05;
    animation: floatParticle linear infinite;
}
@keyframes floatParticle {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-70px) scale(1.3); }
    100% { transform: translateY(0) scale(1); }
}

.about-section {
    background: var(--bg-card);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}
.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.3rem;
    line-height: 2.1;
}
.about-text strong {
    color: var(--primary-dark);
}
.about-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.8rem;
}
.highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-soft);
    padding: 0.5rem 1.6rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.highlight-badge i {
    color: var(--primary);
    font-size: 1rem;
}
.highlight-badge:hover {
    background: var(--bg-glass);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.about-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
}
.interactive-terminal {
    width: 100%;
    max-width: 480px;
    background: var(--bg-terminal);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    direction: ltr;
    font-family: 'Courier New', monospace;
    transition: var(--transition);
}
.interactive-terminal:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(44, 62, 80, 0.18);
}
.terminal-header {
    background: #0f172a;
    padding: 0.7rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.terminal-header .dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: inline-block;
}
.terminal-header .dot.red { background: #ef4444; }
.terminal-header .dot.yellow { background: #f59e0b; }
.terminal-header .dot.green { background: #10b981; }
.terminal-header .terminal-title {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-right: 0.8rem;
}
.terminal-body {
    padding: 1.4rem 1.4rem 1rem;
    color: var(--text-terminal);
    font-size: 0.85rem;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.terminal-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: terminalAppear 0.3s ease forwards;
}
@keyframes terminalAppear {
    to { opacity: 1; }
}
.terminal-line .prompt {
    color: #10b981;
    font-weight: bold;
}
.terminal-line .command {
    color: #60a5fa;
}
.terminal-line.output {
    color: #cbd5e1;
    padding-right: 1.5rem;
}
.terminal-line .cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: #e2e8f0;
    animation: blink 0.9s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.skills-section {
    background: var(--bg-body);
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.skill-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}
.skill-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.6rem;
}
.skill-card-header i {
    font-size: 1.8rem;
    color: var(--primary);
    background: rgba(44, 62, 80, 0.08);
    padding: 0.7rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.skill-card:hover .skill-card-header i {
    transform: scale(1.1) rotate(-4deg);
}
.skill-card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
}
.skill-item {
    margin-bottom: 1rem;
}
.skill-item:last-child {
    margin-bottom: 0;
}
.skill-name {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}
.skill-name span {
    color: var(--primary);
    font-weight: 700;
}
.skill-bar {
    height: 6px;
    background: var(--bg-soft);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.skill-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 1.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    width: 0%;
}

.projects-section {
    background: var(--bg-card);
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.project-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent);
}
.project-thumb {
    height: 190px;
    overflow: hidden;
    position: relative;
    background: var(--bg-soft);
}
.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.project-card:hover .project-thumb img {
    transform: scale(1.05);
}
.project-thumb .overlay {
    position: absolute;
    inset: 0;
    background: rgba(44, 62, 80, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    transition: var(--transition);
}
.project-card:hover .overlay {
    opacity: 1;
}
.overlay a {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.overlay a:hover {
    transform: scale(1.12);
    background: var(--accent);
}
.project-body {
    padding: 1.6rem;
}
.project-body h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 0.6rem;
}
.project-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.9;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.project-tag {
    background: var(--bg-soft);
    color: var(--text-secondary);
    padding: 0.2rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.project-tag:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.project-links {
    margin-top: 0.8rem;
}
.project-github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-soft);
    color: var(--text-primary);
    padding: 0.3rem 1.2rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.project-github-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.project-github-link i {
    font-size: 1rem;
}

.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-modal.active {
    display: flex;
    opacity: 1;
}

.gallery-modal-content {
    position: relative;
    width: 92%;
    max-width: 1100px;
    max-height: 92vh;
    background: transparent;
    border-radius: var(--radius);
    overflow: hidden;
}

.gallery-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #fff;
    font-size: 2.8rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    line-height: 1;
    opacity: 0.8;
}

.gallery-close:hover {
    transform: rotate(90deg) scale(1.1);
    opacity: 1;
}

.gallery-slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slides {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.3);
}

.gallery-slides img {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 0;
    transform: scale(0.95);
}

.gallery-slides img.active {
    opacity: 1;
    transform: scale(1);
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.25);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gallery-prev {
    right: -30px;
}

.gallery-next {
    left: -30px;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.5);
}

.gallery-prev:active,
.gallery-next:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-counter {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.4rem 1.4rem;
    border-radius: var(--radius-full);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-thumb {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-thumb:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.project-thumb img {
    transition: transform 0.5s ease, filter 0.5s ease;
}

.project-thumb:hover img {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.project-thumb::after {
    content: '🔍 کلیک کنید';
    position: absolute;
    bottom: 20px;
    right: 50%;
    transform: translateX(50%) translateY(10px);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-thumb:hover::after {
    opacity: 1;
    transform: translateX(50%) translateY(0);
}

@media (max-width: 1024px) {
    .gallery-prev {
        right: -15px;
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .gallery-next {
        left: -15px;
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .gallery-slides img {
        max-height: 75vh;
    }
}

@media (max-width: 768px) {
    .gallery-prev {
        right: 5px;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        background: rgba(0, 0, 0, 0.5);
        border-color: rgba(255, 255, 255, 0.15);
    }
    
    .gallery-next {
        left: 5px;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        background: rgba(0, 0, 0, 0.5);
        border-color: rgba(255, 255, 255, 0.15);
    }
    
    .gallery-prev:hover,
    .gallery-next:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-50%) scale(1.05);
    }
    
    .gallery-close {
        top: -40px;
        font-size: 2.2rem;
    }
    
    .gallery-slides img {
        max-height: 70vh;
        border-radius: var(--radius-sm);
    }
    
    .gallery-counter {
        bottom: -38px;
        font-size: 0.8rem;
        padding: 0.3rem 1rem;
    }
    
    .gallery-modal-content {
        width: 95%;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .gallery-prev,
    .gallery-next {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        border-width: 1px;
    }
    
    .gallery-prev {
        right: 3px;
    }
    
    .gallery-next {
        left: 3px;
    }
    
    .gallery-close {
        top: -35px;
        font-size: 1.8rem;
    }
    
    .gallery-slides img {
        max-height: 60vh;
        max-width: 98%;
    }
    
    .gallery-counter {
        bottom: -32px;
        font-size: 0.7rem;
        padding: 0.2rem 0.8rem;
    }
    
    .project-thumb::after {
        font-size: 0.6rem;
        padding: 0.2rem 0.8rem;
        bottom: 12px;
    }
}

.timeline-section {
    background: var(--bg-body);
}
.timeline-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 1rem 0;
}
.timeline-grid::before {
    content: '';
    position: absolute;
    right: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--accent), var(--primary));
    transform: translateX(50%);
    border-radius: var(--radius-full);
}
.timeline-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 0;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    align-self: flex-start;
    padding-left: 3rem;
    padding-right: 0;
}
.timeline-item:nth-child(even) {
    align-self: flex-end;
    padding-right: 3rem;
    padding-left: 0;
    flex-direction: row-reverse;
}
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 50%;
    bottom: 0;
    width: 3px;
    height: 1.5rem;
    background: var(--accent);
    transform: translateX(50%);
    opacity: 0.4;
}
.timeline-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    border: 3px solid var(--accent);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    z-index: 2;
}
.timeline-item:hover .timeline-icon {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
    border-color: var(--primary);
}
.timeline-content {
    background: var(--bg-card);
    padding: 1.2rem 1.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    flex: 1;
}
.timeline-item:hover .timeline-content {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}
.timeline-content h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 0.3rem;
}
.timeline-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.contact-section {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    min-height: 80px;
    width: 100%;
}
.contact-item:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}
.contact-item i {
    font-size: 1.3rem;
    color: var(--primary);
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.contact-item:hover i {
    transform: scale(1.1);
}
.contact-item div {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.contact-item span {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.contact-item a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    line-height: 1.5;
}
.contact-item a:hover {
    color: var(--primary);
}
.contact-message {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
    justify-content: center;
}
.contact-message p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.9;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-form .form-group {
    width: 100%;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 2rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.15);
}
.btn-submit:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(44, 62, 80, 0.2);
}
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.form-feedback {
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    display: none;
}
.form-feedback.success {
    display: block;
    color: #0f7b3a;
    background: #d1fae5;
}
.form-feedback.error {
    display: block;
    color: #9b1c1c;
    background: #fee2e2;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-4px) scale(1.05);
}

.footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-social {
    display: flex;
    gap: 0.8rem;
}
.social-link {
    width: 42px;
    height: 42px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.social-link:hover {
    color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
    animation: slideUp 0.6s ease-out both;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }
    .hero-text { order: 2; }
    .hero-image { order: 1; }
    .hero-desc {
        max-width: 100%;
        margin: 0 auto 2rem;
    }
    .hero-stats { justify-content: center; }
    .hero-actions { text-align: center; }
    .about-grid { grid-template-columns: 1fr; }
    .profile-placeholder { width: 300px; height: 300px; }
    .interactive-terminal { max-width: 100%; }
    .timeline-grid::before { right: 30px; }
    .timeline-item {
        width: 100%;
        padding-right: 3.5rem !important;
        padding-left: 0 !important;
        align-self: flex-start !important;
        flex-direction: row !important;
    }
    .timeline-item:nth-child(even) {
        padding-right: 3.5rem !important;
        padding-left: 0 !important;
        flex-direction: row !important;
    }
    .timeline-item:not(:last-child)::after { right: 30px; }
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .contact-info { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 76px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 76px);
        background: rgba(247, 248, 250, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1.5rem;
        gap: 0.8rem;
        box-shadow: var(--shadow-lg);
        border-left: 1px solid var(--border-color);
        transition: right 0.4s ease;
        z-index: 999;
        overflow-y: auto;
    }
    .nav-links.active { right: 0; }
    .nav-link {
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    .nav-link::after { display: none; }
    .theme-toggle {
        margin-right: 0;
        align-self: flex-start;
        margin-top: 0.5rem;
    }
    .hero-name { font-size: 3rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .section-title { font-size: 2.1rem; }
    .profile-placeholder { width: 220px; height: 220px; }
    .stat-item { min-width: 100px; padding: 0.5rem 1.2rem; }
    .timeline-grid { padding: 0.5rem 0; }
    .timeline-grid::before { right: 20px; }
    .timeline-item {
        padding-right: 2.8rem !important;
        padding-left: 0 !important;
    }
    .timeline-item:nth-child(even) {
        padding-right: 2.8rem !important;
        padding-left: 0 !important;
    }
    .timeline-item:not(:last-child)::after { right: 20px; }
    .timeline-icon { width: 44px; height: 44px; min-width: 44px; font-size: 1.2rem; }
    .timeline-content { padding: 0.8rem 1.2rem; }
    .contact-info { grid-template-columns: 1fr; }
    .contact-item { min-height: 70px; padding: 0.6rem 0.8rem; }
    .footer-content { flex-direction: column; gap: 0.8rem; text-align: center; }
    .shape-1, .shape-2, .shape-3 { display: none; }
    .back-to-top { bottom: 1.5rem; right: 1.5rem; width: 42px; height: 42px; font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .hero-name { font-size: 2.4rem; }
    .container { padding: 0 1rem; }
    .hero-stats { gap: 0.6rem; }
    .stat-item { min-width: 80px; padding: 0.4rem 0.8rem; }
    .stat-number { font-size: 1.6rem; }
    .profile-placeholder { width: 170px; height: 170px; }
    .btn-download { padding: 0.7rem 1.6rem; font-size: 0.85rem; }
    .interactive-terminal .terminal-body {
        font-size: 0.75rem;
        padding: 1rem;
        min-height: 220px;
    }
    .contact-item { min-height: 60px; padding: 0.5rem 0.6rem; }
    .contact-item i { width: 28px; height: 28px; min-width: 28px; font-size: 1rem; }
    .contact-item a { font-size: 0.75rem; }
}
