/* ==================== CSS VARIABLES ==================== */
:root {
    /* Light Mode - Default */
    --primary: #009B9E;
    --primary-dark: #007A7C;
    --primary-light: #33AFB1;
    --primary-soft: rgba(0, 155, 158, 0.1);
    --primary-glow: rgba(0, 155, 158, 0.2);
    
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F1F3F5;
    --bg-card: #FFFFFF;
    
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-muted: #6B6B6B;
    
    --border-light: #E5E5E5;
    --border-medium: #CCCCCC;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    --bg-primary: #0A0A0A;
    --bg-secondary: #141414;
    --bg-tertiary: #1F1F1F;
    --bg-card: #1A1A1A;
    
    --text-primary: #EDEDED;
    --text-secondary: #C0C0C0;
    --text-muted: #909090;
    
    --border-light: #2A2A2A;
    --border-medium: #3A3A3A;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    line-height: 1.6;
    font-size: 16px;
}

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

.section {
    padding: 80px 0;
    animation: fadeInUp 0.6s ease-out;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.logo a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

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

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    width: 36px;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

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

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

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

/* ==================== HERO SECTION ==================== */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: start;
    min-height: 80vh;
    padding: 2rem 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

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

.profile-photo {
    width: 100%;
    max-width: 280px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--primary);
    transition: all 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.02);
}

/* Contact Cards */
.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

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

.contact-details {
    flex: 1;
}

.contact-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.contact-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

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

.contact-btn {
    padding: 0.4rem 1rem;
    background: transparent;
    border: 1.5px solid var(--primary);
    border-radius: 6px;
    color: var(--primary);
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

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

/* ==================== STATS SECTION ==================== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 2rem 0 2rem 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1rem 0.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

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

.stat-card:active {
    transform: scale(0.98);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.stat-icon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.25rem;
    color: var(--primary-soft);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.stat-card:hover .stat-icon {
    opacity: 1;
}

/* ==================== CARDS & GRIDS ==================== */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

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

.card h3, .card p, .card li, .card h4 {
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

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

/* Projects */
.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

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

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

.project-header h3 {
    color: var(--primary);
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.expand-btn {
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.expand-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag,
.skill-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.tech-tag:hover,
.skill-tag:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.project-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    animation: slideDown 0.3s ease;
}

.project-details ul {
    margin: 0.5rem 0 1rem 1.5rem;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

/* Articles */
.article-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

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

.article-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.article-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.article-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.article-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.article-link:hover {
    gap: 0.75rem;
}

/* Skills */
.skill-category {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
}

.skill-category h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Experience */
.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.experience-header h2 {
    color: var(--primary);
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.experience-period {
    color: var(--text-muted);
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

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

.contact-form-card input,
.contact-form-card textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.contact-form-card input:focus,
.contact-form-card textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--bg-card);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
    border: 1px solid var(--border-light);
}

.modal-content h2, .modal-content p {
    font-family: 'Times New Roman', Georgia, 'Arial', 'Calibri', serif;
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--primary);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .profile-photo {
        margin: 0 auto;
    }
    
    .contact-card {
        text-align: left;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        gap: 1.5rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .stats-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 600px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 0.75rem 0.5rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
    
    .stat-icon {
        font-size: 1rem;
        top: 0.5rem;
        right: 0.5rem;
    }
}

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