
/* ============================================================================
   AFTAH CV TEMPLATE - EXTERNAL CSS (GREEN THEME VERSION)
   File: online.css
   ============================================================================ */

/* CSS Variables & Theme System */
:root {
    --primary-color: #16a34a;
    --secondary-color: #15803d;
    --accent-color: #22c55e;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    --gradient-secondary: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #22c55e;
    --secondary-color: #16a34a;
    --accent-color: #4ade80;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --gradient-secondary: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

/* Hacker Theme */
[data-theme="hacker"] {
    --primary-color: #00ff00;
    --secondary-color: #00cc00;
    --accent-color: #00ff66;
    --text-primary: #00ff00;
    --text-secondary: #00cc00;
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --border-color: #00ff00;
    --shadow: 0 4px 6px -1px rgba(0, 255, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 255, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #001100 0%, #003300 100%);
    --gradient-secondary: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

[data-theme="hacker"] body {
    font-family: 'Fira Code', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    background: linear-gradient(45deg, #000000, #0a0a0a);
    position: relative;
}

/* Hacker Mode Matrix Effect */
[data-theme="hacker"] body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 255, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Link Styles - GREEN THEME */
a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Light theme - Dark Green Links */
:root a {
    color: #15803d;
}

:root a:hover {
    color: #166534;
}

/* Dark theme - Bright Green Links */
[data-theme="dark"] a {
    color: #22c55e;
}

[data-theme="dark"] a:hover {
    color: #4ade80;
}

/* Hacker theme - Neon Green Links */
[data-theme="hacker"] a {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

[data-theme="hacker"] a:hover {
    color: #00ff66;
    text-shadow: 0 0 10px #00ff66;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.hidden { display: none !important; }
.visible { display: block !important; }

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="dark"] header {
    background: rgba(17, 24, 39, 0.95);
}

[data-theme="hacker"] header {
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    object-fit: cover;
    transition: var(--transition);
}

[data-theme="hacker"] .logo img {
    filter: drop-shadow(0 0 10px var(--primary-color));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

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

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

[data-theme="hacker"] .nav-links a:hover {
    text-shadow: 0 0 10px var(--primary-color);
}

/* Controls */
.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle, .lang-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover, .lang-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

[data-theme="hacker"] .theme-toggle:hover,
[data-theme="hacker"] .lang-toggle:hover {
    box-shadow: 0 0 20px var(--primary-color);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Hero Section */
.hero {
    padding: 10rem 0 6rem;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

[data-theme="hacker"] .hero {
    background: var(--gradient-primary);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    animation: slideInLeft 1s ease-out;
}

.hero-text h1 {
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="hacker"] .hero-text h1 {
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-color);
}

.hero-text .subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

[data-theme="hacker"] .hero-text .subtitle {
    color: var(--secondary-color);
    text-shadow: 0 0 10px var(--secondary-color);
}

.hero-text p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

[data-theme="hacker"] .hero-text p {
    color: var(--text-secondary);
}

.hero-avatar {
    text-align: center;
    animation: slideInRight 1s ease-out;
}

.hero-avatar img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.hero-avatar img:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

[data-theme="hacker"] .hero-avatar img {
    border-color: var(--primary-color);
    box-shadow: 0 0 50px var(--primary-color);
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

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


.btn::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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

[data-theme="hacker"] .btn-primary {
    background: rgba(0, 255, 0, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

[data-theme="hacker"] .btn-outline {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="hacker"] .social-links a {
    background: rgba(0, 255, 0, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

/* Sections */
section {
    padding: 6rem 0;
    position: relative;
}

section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 4rem;
    color: var(--text-primary);
    position: relative;
}

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

[data-theme="hacker"] .section-title {
    text-shadow: 0 0 20px var(--primary-color);
}

/* Experience Section */
.experience-grid {
    display: grid;
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.experience-item {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 20px;
    border-left: 6px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.experience-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color)0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.experience-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.experience-item:hover::before {
    opacity: 0.05;
}

[data-theme="hacker"] .experience-item {
    border-left-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.experience-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.experience-company {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 600;
}

.experience-meta {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.experience-location, .experience-period, .experience-type {
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.experience-meta i {
    color: var(--primary-color);
    width: 16px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-item {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg, var(--primary-color), transparent, var(--primary-color));
    opacity: 0.1;
    transition: transform 0.5s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.skill-item:hover::before {
    transform: rotate(180deg);
}

[data-theme="hacker"] .skill-item {
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.2);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.skill-name {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.skill-percentage {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

[data-theme="hacker"] .skill-percentage {
    text-shadow: 0 0 10px var(--primary-color);
}

.skill-bar {
    background: var(--border-color);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.skill-progress {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    height: 100%;
    border-radius: 6px;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Portfolio Section */
.portfolio-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 1rem 2rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1rem;
}

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

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

[data-theme="hacker"] .tab-btn.active {
    box-shadow: 0 0 20px var(--primary-color);
}

/* Portfolio Grid - CENTERED AND LANDSCAPE IMAGE LAYOUT */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
    justify-items: center;
}

.portfolio-item {
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    width: 100%;
    max-width: 300px;
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

[data-theme="hacker"] .portfolio-item {
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.2);
}

/* Portfolio Image Container - WHITE BACKGROUND FOR LOGOS */
.portfolio-image-container {
    width: 100%;
    height: 140px;
    background: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .portfolio-image-container {
    background: #ffffff;
}

[data-theme="hacker"] .portfolio-image-container {
    background: #ffffff;
    border: 1px solid var(--primary-color);
    box-shadow: inset 0 0 20px rgba(0, 255, 0, 0.1);
}

.portfolio-image {
    width: 240px;
    height: 70px;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.1);
}

[data-theme="hacker"] .portfolio-image {
    filter: drop-shadow(0 2px 8px rgba(0, 255, 0, 0.3));
}

.portfolio-content {
    padding: 2rem;
    position: relative;
}

.portfolio-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.portfolio-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: var(--transition);
    justify-content: center;
    width: 100%;
}

.portfolio-link:hover {
    gap: 1rem;
    text-decoration: underline;
}

[data-theme="hacker"] .portfolio-link:hover {
    text-shadow: 0 0 10px var(--primary-color);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-item {
    background: var(--bg-primary);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--primary-color)20%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.contact-item:hover::before {
    opacity: 0.1;
}

[data-theme="hacker"] .contact-item {
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
}


.contact-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

[data-theme="hacker"] .contact-icon {
    text-shadow: 0 0 20px var(--primary-color);
}

.contact-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.contact-info {
    color: var(--text-secondary);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    position: relative;
}

[data-theme="hacker"] footer {
    border-top-color: var(--primary-color);
    box-shadow: 0 -10px 30px rgba(0, 255, 0, 0.1);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-logo img {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    object-fit: cover;
}

.footer-text {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr 280px;
        gap: 3rem;
    }
    
    .hero-avatar img {
        width: 250px;
        height: 250px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 15px 15px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding: 8rem 0 4rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-avatar img {
        width: 220px;
        height: 220px;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .experience-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .portfolio-tabs {
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Portfolio Mobile Adjustments */
    .portfolio-image-container {
        height: 120px;
        padding: 15px;
    }
    
    .portfolio-image {
        width: 200px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 7rem 0 3rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text .subtitle {
        font-size: 1.2rem;
    }
    
    .hero-avatar img {
        width: 180px;
        height: 180px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .experience-item,
    .skill-item,
    .contact-item {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .social-links a {
        width: 50px;
        height: 50px;
    }
    
    /* Portfolio Small Mobile */
    .portfolio-grid {
        max-width: 300px;
    }
    
    .portfolio-image-container {
        height: 100px;
        padding: 10px;
    }
    
    .portfolio-image {
        width: 180px;
        height: 50px;
    }
    
    .portfolio-content {
        padding: 1.5rem;
    }
}

/* RTL Support */
[dir="rtl"] .experience-item {
    border-left: none;
    border-right: 6px solid var(--primary-color);
}

[dir="rtl"] .hero-content {
    direction: rtl;
}

[dir="rtl"] .nav-links {
    direction: rtl;
}

[dir="rtl"] .cta-buttons {
    direction: rtl;
}

/* Print Styles */
@media print {
    header, .controls, .portfolio-tabs, .social-links {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }
    
    .hero {
        background: white !important;
        padding: 2rem 0;
    }
    
    .hero-text h1,
    .hero-text .subtitle,
    .hero-text p {
        color: black !important;
    }
    
    section {
        page-break-inside: avoid;
        padding: 2rem 0;
    }
    
    .section-title {
        color: black !important;
        font-size: 18pt;
    }
    
    .experience-item,
    .skill-item,
    .portfolio-item,
    .contact-item {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
    
    .portfolio-image-container {
        background: white !important;
        border: 1px solid #ccc !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 0 0 2px var(--text-primary);
        --shadow-lg: 0 0 0 3px var(--text-primary);
    }
    
    .btn-primary {
        border-width: 3px;
    }
    
    .btn-outline {
        border-width: 3px;
    }
}

/* Focus Styles */
button:focus,
select:focus,
a:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

[data-theme="hacker"] ::-webkit-scrollbar-thumb {
    box-shadow: 0 0 10px var(--primary-color);
}

/* Link Color Overrides for All Elements */
/* Light theme - Dark Green Links */
:root a,
:root .portfolio-link,
:root .contact-info a,
:root .experience-company,
:root .skill-percentage {
    color: #15803d;
}

:root a:hover,
:root .portfolio-link:hover,
:root .contact-info a:hover {
    color: #166534;
}

/* Dark theme - Bright Green Links */
[data-theme="dark"] a,
[data-theme="dark"] .portfolio-link,
[data-theme="dark"] .contact-info a,
[data-theme="dark"] .experience-company,
[data-theme="dark"] .skill-percentage {
    color: #22c55e;
}

[data-theme="dark"] a:hover,
[data-theme="dark"] .portfolio-link:hover,
[data-theme="dark"] .contact-info a:hover {
    color: #4ade80;
}

/* Hacker theme - Neon Green Links */
[data-theme="hacker"] a,
[data-theme="hacker"] .portfolio-link,
[data-theme="hacker"] .contact-info a,
[data-theme="hacker"] .experience-company,
[data-theme="hacker"] .skill-percentage {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

[data-theme="hacker"] a:hover,
[data-theme="hacker"] .portfolio-link:hover,
[data-theme="hacker"] .contact-info a:hover {
    color: #00ff66;
    text-shadow: 0 0 10px #00ff66;
}

/* Additional Portfolio Styling */
.portfolio-item-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Special handling for logo visibility */
.portfolio-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(-45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f8f9fa 75%), 
                linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.03;
    z-index: 0;
}

.portfolio-image {
    position: relative;
    z-index: 1;
}
