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

:root,
[data-theme="default"] {
    --bg: #0a0c10;
    --bg-rgb: 10, 12, 16;
    --bg-card: #111317;
    --bg-card-rgb: 17, 19, 23;
    --border: #2d2f36;
    --accent: #7ee787;
    --accent-rgb: 126, 231, 135;
    --accent-dim: #3fb950;
    --accent-dim-rgb: 63, 185, 80;
    --text: #e6edf3;
    --text-dim: #8b949e;
    --sidebar-width: 260px;
    --font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

[data-theme="cyberpunk"] {
    --bg: #050510;
    --bg-rgb: 5, 5, 16;
    --bg-card: #0d0d26;
    --bg-card-rgb: 13, 13, 38;
    --border: #ff00ff;
    --accent: #00ffff;
    --accent-rgb: 0, 255, 255;
    --accent-dim: #ff00ff;
    --accent-dim-rgb: 255, 0, 255;
    --text: #e0e0ff;
    --text-dim: #8a8aeb;
}

[data-theme="retro"] {
    --bg: #000000;
    --bg-rgb: 0, 0, 0;
    --bg-card: #051005;
    --bg-card-rgb: 5, 16, 5;
    --border: #00ff00;
    --accent: #00ff00;
    --accent-rgb: 0, 255, 0;
    --accent-dim: #00aa00;
    --accent-dim-rgb: 0, 170, 0;
    --text: #00ff00;
    --text-dim: #00aa00;
}

[data-theme="google"] {
    --bg: #ffffff;
    --bg-rgb: 255, 255, 255;
    --bg-card: #f8f9fa;
    --bg-card-rgb: 248, 249, 250;
    --border: #dadce0;
    --accent: #1a73e8;
    --accent-rgb: 26, 115, 232;
    --accent-dim: #ea4335;
    --accent-dim-rgb: 234, 67, 53;
    --text: #202124;
    --text-dim: #5f6368;
    --font-family: 'Inter', Roboto, sans-serif;
}

body {
    font-family: var(--font-family);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    display: flex;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

::-webkit-scrollbar {
    width: 5px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent-dim);
    border-radius: 10px;
}

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.4rem;
    z-index: 100;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
}

.sidebar-logo::before {
    content: "❯ ";
}

.sidebar-tagline {
    font-size: 0.6rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border);
}

/* Profile mini in sidebar */
.sidebar-profile {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-dim);
    margin-bottom: 0.7rem;
    transition: 0.3s;
}

.sidebar-avatar:hover {
    border-color: var(--accent);
    transform: scale(1.04);
}

.sidebar-name {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.sidebar-role {
    font-size: 0.6rem;
    color: var(--accent);
    margin-bottom: 0.2rem;
}

.sidebar-location {
    font-size: 0.55rem;
    color: var(--text-dim);
}

/* Nav links in sidebar */
.sidebar-nav {
    list-style: none;
    flex: 1;
    margin-bottom: 1.5rem;
}

.sidebar-nav li {
    margin-bottom: 0.2rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.72rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.07);
    border-color: var(--border);
}

.sidebar-nav a i {
    width: 14px;
    font-size: 0.7rem;
    color: var(--accent-dim);
}

.sidebar-nav a .nav-prefix {
    color: var(--text-dim);
    font-size: 0.6rem;
    opacity: 0.6;
}

/* Status indicator */
.sidebar-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6rem;
    color: var(--text-dim);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    background: rgba(var(--accent-rgb), 0.05);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-dim);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(var(--accent-dim-rgb), 0.4);
    }

    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 4px rgba(var(--accent-dim-rgb), 0);
    }
}

/* Theme selector in sidebar */
.sidebar-theme {
    margin-bottom: 1rem;
}

.sidebar-theme label {
    display: block;
    font-size: 0.58rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.theme-selector {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 0.68rem;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.theme-selector:hover {
    border-color: var(--accent);
}

/* Social quick links at bottom */
.sidebar-socials {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.sidebar-social-link {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.sidebar-social-link:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Mobile hamburger */
.hamburger {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 1rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 90;
}

/* ── MAIN CONTENT ── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3rem 3rem;
}

.hero-content {
    text-align: center;
    max-width: 700px;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.2rem;
    border: 2px solid var(--accent-dim);
    transition: 0.3s;
}

.profile-img:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.hero h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.hero .title {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.hero .location {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.prompt-line {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin: 1rem 0;
}

.prompt-line span {
    color: var(--accent);
}

.stacks {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.stack-icon {
    background: rgba(var(--accent-rgb), 0.06);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 0.35rem 1rem;
    font-size: 0.7rem;
    font-weight: 450;
    color: var(--text-dim);
    transition: 0.2s;
}

.stack-icon:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
}

.stack-icon i {
    margin-right: 0.4rem;
    font-size: 0.7rem;
    color: var(--accent-dim);
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.5rem 1.3rem;
    border-radius: 30px;
    font-weight: 500;
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.75rem;
}

.btn-primary {
    background: var(--accent-dim);
    color: var(--bg);
}

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

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text-dim);
    background: transparent;
}

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

/* Sections */
section {
    padding: 3.5rem 3rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-title::before {
    content: "$";
    color: var(--accent);
    font-weight: 500;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-dim), transparent);
    opacity: 0.3;
}

.timeline-item {
    margin-bottom: 1.2rem;
    position: relative;
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 16px;
    width: 10px;
    height: 10px;
    background: var(--accent-dim);
    border-radius: 50%;
}

.timeline-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content:hover {
    border-color: var(--accent-dim);
    transform: translateX(4px) translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--accent-dim-rgb), 0.15);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
}

.timeline-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.timeline-date {
    color: var(--text-dim);
    font-size: 0.65rem;
}

.timeline-company {
    font-weight: 450;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-size: 0.75rem;
}

.timeline-desc {
    color: var(--text);
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 0.85;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.tag {
    background: rgba(var(--accent-rgb), 0.08);
    padding: 0.15rem 0.7rem;
    border-radius: 20px;
    font-size: 0.6rem;
    color: var(--accent-dim);
    border: 1px solid var(--border);
}

/* Carousel */
.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 0 40px;
}

.carousel-container {
    overflow: hidden;
    border-radius: 20px;
    margin: -1.5rem 0;
}

.projects-carousel {
    display: flex;
    gap: 1.5rem;
    cursor: grab;
    padding: 1.5rem 0;
}

.projects-carousel:active {
    cursor: grabbing;
}

.carousel-slide {
    min-width: calc(33.333% - 1rem);
    flex-shrink: 0;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--accent-dim-rgb), 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    border-color: var(--accent-dim);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 24px rgba(var(--accent-dim-rgb), 0.12);
}

.project-icon {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, rgba(var(--accent-dim-rgb), 0.15), rgba(var(--accent-rgb), 0.05));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.project-card:hover .project-icon {
    transform: rotate(5deg) scale(1.1);
}

.project-icon i {
    font-size: 1.6rem;
    color: var(--accent-dim);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.project-card:hover .project-icon i {
    color: var(--accent);
    transform: scale(1.1) rotate(360deg);
}

.project-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.project-desc {
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

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

.project-tech span {
    background: rgba(var(--accent-rgb), 0.08);
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.6rem;
    color: var(--accent-dim);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.project-card:hover .project-tech span {
    border-color: var(--accent-dim);
    background: rgba(var(--accent-rgb), 0.15);
}

.project-link {
    color: var(--accent-dim);
    text-decoration: none;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s;
}

.project-link:hover {
    color: var(--accent);
    gap: 0.8rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(var(--bg-card-rgb), 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    color: var(--text-dim);
    font-size: 1.2rem;
}

.carousel-btn:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.play-pause-btn {
    background: rgba(var(--bg-card-rgb), 0.9);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-dim);
}

.play-pause-btn:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
    transform: scale(1.1);
}

/* Certs unified */
.certs-unified-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.cert-card-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem 1.1rem 1.2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.cert-card-v2:hover {
    border-color: var(--accent-dim);
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(var(--accent-dim-rgb), 0.2);
}

.cert-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    padding: 12px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(4px);
}

.cert-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cert-icon svg {
    width: 100%;
    height: 100%;
}

.cert-icon-anthropic {
    background: rgba(204, 120, 92, 0.1);
    border-color: rgba(204, 120, 92, 0.25);
}

.cert-card-v2:hover .cert-icon {
    transform: scale(1.12) rotate(8deg);
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.12);
    box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.35);
}

.cert-info {
    width: 100%;
}

.cert-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 0.3rem;
}

.cert-card-v2:hover .cert-name {
    color: var(--accent);
}

.cert-issuer {
    font-size: 0.65rem;
    color: var(--text-dim);
    line-height: 1.3;
}

@media (max-width: 1100px) {
    .certs-unified-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.85rem;
    }
}

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

@media (max-width: 480px) {
    .certs-unified-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Certs (old - kept for compat) */
.certs-section {
    margin-bottom: 2rem;
}

.certs-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    margin: 1.5rem 0 1rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.certs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: stretch;
}

.cert-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.2rem 0.8rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 155px;
    max-width: 170px;
    flex: 1 0 auto;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cert-card:hover {
    border-color: var(--accent-dim);
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 15px 35px rgba(var(--accent-dim-rgb), 0.2);
}

.cert-card i {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 2rem;
    color: var(--accent-dim);
    margin-bottom: 0.7rem;
}

.cert-card:hover i {
    transform: scale(1.2) rotate(10deg);
}

.cert-card h4 {
    font-size: 0.68rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    line-height: 1.35;
}

.cert-card:hover h4 {
    color: var(--accent);
}

/* Contact */
.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-card);
    padding: 0.65rem 1.4rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-dim);
    transition: all 0.3s;
    font-size: 0.75rem;
}

.contact-item:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--accent-dim-rgb), 0.15);
}

footer {
    text-align: center;
    padding: 1.8rem;
    border-top: 1px solid var(--border);
    font-size: 0.65rem;
    color: var(--text-dim);
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 968px) {
    .carousel-slide {
        min-width: calc(50% - 0.75rem);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .hamburger {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    section {
        padding: 2rem 1.2rem;
    }

    .hero {
        padding: 4rem 1.2rem 2rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .carousel-slide {
        min-width: 100%;
    }

    .carousel-wrapper {
        padding: 0 30px;
    }
}
