/* ===== Base ===== */
:root {
    --accent: #10b981;
    --accent-hover: #059669;
    --bg-dark: #0f172a;
    --bg-dark-alt: #1e293b;
    --bg-card: #1e293b;
    --text: #e2e8f0;
    --text-muted: #b0bec5;
    --border: #334155;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

::selection {
    background: var(--accent);
    color: #fff;
}

/* ===== Accessibility ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    font-weight: 600;
    z-index: 9999;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* Visible focus outlines for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Remove default outlines when using mouse */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Utility ===== */
.text-accent {
    color: var(--accent) !important;
}

.fw-600 {
    font-weight: 600;
}

.bg-dark-alt {
    background-color: var(--bg-dark-alt);
}

/* ===== Navbar ===== */
#mainNav {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

#mainNav.navbar-shrink {
    padding: 0.5rem 0;
    border-bottom-color: var(--border);
}

#mainNav .navbar-brand {
    font-size: 1.5rem;
    color: var(--accent);
    letter-spacing: -0.02em;
}

#mainNav .nav-link {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* ===== Hero ===== */
#hero {
    background: var(--bg-dark);
    padding-top: 80px;
}

#hero h1 {
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.profile-img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--border);
    box-shadow: 0 0 60px rgba(16, 185, 129, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.03);
    box-shadow: 0 0 80px rgba(16, 185, 129, 0.25);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-size: 1.35rem;
    margin-right: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.08);
    transform: translateY(-2px);
}

/* ===== Buttons ===== */
.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-outline-light {
    border-radius: 0.5rem;
    font-weight: 600;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin-top: 0.75rem;
    border-radius: 2px;
}

/* ===== About - Skills ===== */
.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--bg-dark-alt);
    border: 1px solid var(--border);
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.skill-tag:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.06);
}

/* ===== About Stats ===== */
.about-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    display: inline;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Timeline (Experience) ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-dark-alt);
    border: 3px solid var(--accent);
    z-index: 1;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: border-color 0.2s ease;
}

.timeline-content:hover {
    border-color: var(--accent);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.timeline-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.timeline-company {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.1rem;
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ===== Education ===== */
.education-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    height: 100%;
    transition: border-color 0.2s ease;
}

.education-card:hover {
    border-color: var(--accent);
}

.education-card-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.education-card-degree {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.education-card-school {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.education-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.education-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ===== Portfolio ===== */
.portfolio-card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg-card);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-card-browser {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}

.browser-dots span:first-child { background: #ef4444; }
.browser-dots span:nth-child(2) { background: #f59e0b; }
.browser-dots span:last-child { background: #22c55e; }

.browser-url {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.75rem;
    border-radius: 0.25rem;
    flex: 1;
    text-align: center;
}

.portfolio-card-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #fff;
}

.portfolio-card-preview iframe {
    width: 200%;
    height: 200%;
    border: none;
    transform: scale(0.5);
    transform-origin: top left;
    pointer-events: none;
}

.portfolio-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.portfolio-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

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

.portfolio-card-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ===== Book Cards ===== */
.book-card {
    display: block;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    height: 100%;
}

.book-card:hover {
    color: var(--text);
    transform: translateY(-6px);
}

.book-card-img {
    width: 100%;
    max-width: 180px;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.3s ease;
}

.book-card:hover .book-card-img {
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.2);
}

.book-card-body {
    padding: 1rem 0.25rem 0;
}

.book-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}

.book-card-author {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===== Media Cards (Books & Gaming) ===== */
.media-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--bg-card);
    text-decoration: none;
    color: var(--text);
    height: 100%;
    transition: all 0.2s ease;
}

.media-card:hover {
    color: var(--text);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.media-card-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.media-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.media-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===== Game Cards ===== */
.game-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    background: var(--bg-card);
    transition: all 0.3s ease;
    height: 100%;
}

.game-card:hover {
    color: var(--text);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.game-card-img {
    width: 100%;
    height: auto;
    display: block;
}

.game-card-img-cover {
    aspect-ratio: 460 / 215;
    object-fit: cover;
    object-position: top center;
}

.game-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 460 / 215;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-alt) 100%);
    font-size: 3rem;
    color: var(--accent);
}

.game-card-body {
    padding: 1rem 1.25rem;
}

.game-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.game-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===== Connect ===== */
.connect-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    color: var(--text-muted);
    text-decoration: none;
    min-width: 120px;
    transition: all 0.2s ease;
}

.connect-card i {
    font-size: 2rem;
}

.connect-card span {
    font-size: 0.85rem;
    font-weight: 500;
}

.connect-card:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.05);
    transform: translateY(-4px);
}

/* ===== Footer ===== */
footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    #hero .row {
        flex-direction: column-reverse;
    }

    .profile-img {
        width: 200px;
        height: 200px;
    }

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

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

@media (max-width: 576px) {
    section {
        padding: 60px 0;
    }

    .connect-card {
        min-width: 100px;
        padding: 1.25rem 1rem;
    }

    .connect-card i {
        font-size: 1.5rem;
    }
}
