:root {
    /* Light Mode - Clean, crisp, corporate */
    --bg-color: #ffffff;
    --text-color: #111827;
    --text-muted: #6b7280;
    --primary-color: #1e3a8a; /* Deep corporate navy */
    --hover-bg: #f9fafb;
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --shadow-default: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    /* Dark Mode - Premium, sleek */
    --bg-color: #0b0f19;
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
    --primary-color: #60a5fa; /* Lighter blue for dark mode contrast */
    --hover-bg: #111827;
    --card-bg: #111827;
    --card-border: #1f2937;
    --shadow-default: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Header Section */
.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 4rem;
    transition: border-color 0.4s ease;
}

/* 3D Name Container */
.name-container {
    perspective: 1000px;
    display: inline-block;
}

.name-3d {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.03em;
    cursor: default;
    display: inline-block;
    padding: 2rem;
    margin: -2rem; /* Offset padding */
    transition: filter 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    width: 44px;
    height: 44px;
    border-radius: 6px; /* Professional sharp edges */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-default);
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: var(--hover-bg);
    border-color: var(--text-muted);
}

/* Section Headings */
.certificates-section h2, .timeline-section h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Certificates */
.certificates-section {
    margin-bottom: 6rem;
}

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

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 2rem;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-default);
}

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

.cert-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

.cert-number {
    font-size: 0.85rem;
    font-family: monospace;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.cert-content h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.cert-badge {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
}

.empty-card {
    border-style: dashed;
    box-shadow: none;
    background: transparent;
}

.empty-card:hover {
    border-color: var(--card-border);
    transform: none;
    box-shadow: none;
}

.empty-card h3 {
    color: var(--text-muted);
    font-weight: 500;
}

/* Timeline Horizontal */
.timeline-section {
    margin-bottom: 6rem;
}

.timeline {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    overflow-x: auto;
    overflow-y: hidden; /* Remove the vertical scrollbar */
    padding-bottom: 1.5rem; /* Increased padding for thicker scrollbar */
    scrollbar-width: auto; /* Standard thickness */
    scrollbar-color: var(--text-muted) var(--hover-bg);
}

.timeline::-webkit-scrollbar {
    height: 10px; /* Thicker scrollbar */
    width: 0px; /* Explicitly hide vertical scrollbar */
}
.timeline::-webkit-scrollbar-track {
    background: var(--hover-bg); /* Visible track from the start */
    border-radius: 10px;
}
.timeline::-webkit-scrollbar-thumb {
    background-color: var(--text-muted); /* More visible thumb */
    border-radius: 10px;
    border: 2px solid var(--hover-bg); /* Creates padding effect */
}
.timeline::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color); /* Highlight on hover */
}

.timeline-item {
    flex: 0 0 300px;
    position: relative;
    padding-top: 2rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--card-border);
}

.timeline-dot {
    position: absolute;
    top: -4px; /* Center on the 1px line */
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0 4px var(--bg-color);
}

.timeline-content {
    background: transparent;
    padding: 0;
}

.timeline-year {
    display: block;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-family: monospace;
    letter-spacing: 0.05em;
}

.timeline-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Projects Section */
.projects-section {
    margin-bottom: 6rem;
}

.projects-section h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 600;
}

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

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-default);
    display: flex;
    flex-direction: column;
}

.highlight-card {
    background: linear-gradient(145deg, var(--card-bg), var(--hover-bg));
    border-width: 1.5px;
    border-left: 4px solid var(--primary-color);
}

.project-subtitle {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.project-highlight-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(30, 58, 138, 0.03);
    border-radius: 8px;
}

[data-theme="dark"] .project-highlight-details {
    background: rgba(96, 165, 250, 0.03);
}

.highlight-detail-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.h-icon {
    font-size: 1.2rem;
}

.h-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color);
}

.h-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
}

.project-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
}

.project-description {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 800px; /* Optimized reading width */
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(30, 58, 138, 0.05); /* very subtle blue tint */
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: 1px solid rgba(30, 58, 138, 0.1);
}

[data-theme="dark"] .project-tag {
    background: rgba(96, 165, 250, 0.05);
    border-color: rgba(96, 165, 250, 0.2);
    color: var(--primary-color);
}

/* Link Button */
.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-link:hover {
    color: var(--text-color);
    text-decoration: underline;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    transform-origin: 0%;
    z-index: 1000;
}

/* CV Download Button */
.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    box-shadow: var(--shadow-default);
    transition: all 0.3s ease;
}

.cv-download-btn:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Contact Section */
.contact-section {
    margin-bottom: 6rem;
}

.contact-section h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 600;
}

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

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Snappy lift effect */
    box-shadow: var(--shadow-default);
}

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

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    background: rgba(30, 58, 138, 0.05);
    padding: 1rem;
    border-radius: 12px;
    transition: background 0.3s ease;
}

[data-theme="dark"] .contact-icon {
    background: rgba(96, 165, 250, 0.05);
}

.contact-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.contact-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Footer & Easter Egg */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.easter-eggs {
    display: flex;
    gap: 1rem;
}

.easter-egg-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.9;
    box-shadow: var(--shadow-default);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.easter-egg-btn:hover {
    opacity: 1;
    transform: scale(1.15) rotate(15deg);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

/* Snake Game Modal */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.game-modal {
    background: #111827;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.3);
    max-width: 95vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: #fff;
    font-family: monospace;
}

.score-display {
    display: flex;
    gap: 2rem;
    font-size: 1.2rem;
    font-weight: 800;
}

.score-display span:first-child {
    color: var(--primary-color);
}

.close-game-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close-game-btn:hover {
    color: #ef4444;
}

.game-viewport {
    position: relative;
    border: 4px solid #1f2937;
    background: #000;
    line-height: 0;
}

.game-canvas {
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
}

.game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.game-over-overlay h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ef4444;
    margin-bottom: 1.5rem;
}

.restart-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.restart-btn:hover {
    transform: scale(1.05);
}

.game-footer {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: monospace;
}

/* Floating Game Button */
.pause-btn-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
}

.pause-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 30px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pause-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.pause-btn svg {
    transition: transform 0.3s;
}

.pause-btn:hover svg {
    transform: rotate(15deg);
}

body.modal-open {
    overflow: hidden;
}

/* ─── Interactive Projects Section ─── */
.interactive-projects-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

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

.interactive-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-default);
    position: relative;
    overflow: hidden;
}

.interactive-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 8px 8px 0 0;
    opacity: 0.7;
}

.interactive-card--cc::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.interactive-card--snake::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.interactive-card--jass::before {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

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

.interactive-card--cc:hover { border-color: #3b82f6; }
.interactive-card--snake:hover { border-color: #10b981; }
.interactive-card--jass:hover { border-color: #8b5cf6; }

/* ─── Contact privacy ─── */
.contact-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .85rem;
    color: var(--text-muted);
    background: var(--hover-bg);
    border: 1px solid var(--card-border);
    border-left: 3px solid var(--primary-color);
    border-radius: 6px;
    padding: .85rem 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

.contact-privacy-note svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary-color);
}

.contact-card--locked {
    cursor: default;
    opacity: 0.72;
}

.contact-card--locked:hover {
    transform: none;
    border-color: var(--card-border);
    box-shadow: var(--shadow-default);
}

.contact-lock-badge {
    margin-left: auto;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    background: var(--hover-bg);
    border: 1px solid var(--card-border);
    border-radius: 99px;
    padding: .25rem .65rem;
    white-space: nowrap;
    align-self: center;
}


.ip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.interactive-card--cc .ip-icon {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.interactive-card--snake .ip-icon {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.interactive-card--jass .ip-icon {
    background: rgba(139, 92, 246, 0.08);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.ip-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.interactive-card--cc .ip-tag { color: #3b82f6; }
.interactive-card--snake .ip-tag { color: #10b981; }
.interactive-card--jass .ip-tag { color: #8b5cf6; }

.ip-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

.ip-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
}

.ip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.25s ease;
    align-self: flex-start;
}

.ip-btn--cc {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.ip-btn--cc:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.ip-btn--snake {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.ip-btn--snake:hover {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.ip-btn--jass {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.ip-btn--jass:hover {
    background: #8b5cf6;
    color: #fff;
    border-color: #8b5cf6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 14px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 7px;
    border: 3px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--card-border) var(--bg-color);
}

/* ─── Language Toggle ─── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-toggle {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    height: 44px;
    padding: 0 4px;
    box-shadow: var(--shadow-default);
    transition: all 0.3s ease;
}

.language-toggle:hover {
    border-color: var(--text-muted);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0 0.75rem;
    height: 34px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--text-color);
}

.lang-btn.active {
    background: var(--primary-color);
    color: #ffffff;
}

.lang-divider {
    width: 1px;
    height: 16px;
    background: var(--card-border);
    margin: 0 4px;
}
