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

:root {
    --bg: #0c0c0c;
    --bg-elevated: #161616;
    --bg-hover: #1a1a1a;
    --border: #2a2a2a;
    --border-light: #333;
    --text: #e8e8e8;
    --text-secondary: #999;
    --text-muted: #666;
    --accent: #3b82f6;
    --accent-dim: rgba(59, 130, 246, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

/* Subtle grain texture */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.02;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.25rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(12, 12, 12, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-sizing: border-box;
    flex-wrap: wrap;
}

.logo {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-desktop {
    display: flex;
}

.logo-mobile {
    display: none;
}

.nav-top {
    display: none;
}

.nav-links-mobile {
    display: none !important;
}

.nav-social-mobile {
    display: none !important;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 2rem;
    border-left: 1px solid var(--border);
}

.nav-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    transition: all 0.2s;
    border-radius: 4px;
}

.nav-social-link:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

.nav-social-link svg,
.nav-social-link img {
    width: 18px;
    height: 18px;
}

/* Hero */
.hero {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 4rem;
    padding: 8rem 2.5rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.hero-compact {
    padding-bottom: 1rem;
}

.hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border);
}

.hero-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.hero-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 2rem;
    line-height: 1.65;
}

.hero-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-primary {
    font-family: 'IBM Plex Mono', monospace;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-outline {
    font-family: 'IBM Plex Mono', monospace;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s;
}

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

/* Terminal */
.hero-visual {
    display: flex;
    justify-content: flex-start;
}

.terminal {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 100%;
    max-width: 460px;
    overflow: hidden;
}

.terminal-wide {
    max-width: 920px;
}

.terminal-header {
    padding: 0.65rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-light);
}

.terminal-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: auto;
}

.terminal-body {
    padding: 1.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.9;
}

.terminal-body code {
    color: var(--text-secondary);
}

.code-keyword { color: #c792ea; }
.code-function { color: #82aaff; }
.code-string { color: #c3e88d; }
.code-number { color: #f78c6c; }
.code-comment { color: #546e7a; font-style: italic; }
.code-crypto { color: #ff79c6; }

.code-text { 
    color: var(--text); 
    font-style: normal;
}

/* Sections */
section {
    padding: 3rem 2.5rem;
    max-width: 1300px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.section-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.section-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-left: auto;
    transition: color 0.2s;
}

.section-link:hover {
    color: var(--text);
}

/* Dune Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 2rem 1.5rem;
    background: var(--bg-elevated);
    text-align: center;
}

.stat-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
}

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

/* Dashboards Loading */
.dashboards-loading {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 2rem 0;
}

.dashboard-meta-inline {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.dashboard-stars {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Featured Work */
.featured-work {
    padding: 3rem 2.5rem;
    max-width: 1300px;
    margin: 0 auto;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.featured-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.featured-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.featured-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.featured-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.featured-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

.featured-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.featured-card:hover .featured-link {
    color: var(--accent);
}

/* Dashboard Categories */
.category {
    border: 1px solid var(--border);
    margin-bottom: -1px;
}

.category:first-of-type {
    border-radius: 6px 6px 0 0;
}

.category:last-of-type {
    border-radius: 0 0 6px 6px;
}

.category-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-elevated);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.category-header:hover {
    background: var(--bg-hover);
}

.category-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.category-toggle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.category.open .category-toggle {
    transform: rotate(45deg);
}

.category-content {
    display: none;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.category.open .category-content {
    display: block;
}

.subcategory {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.subcategory:last-child {
    border-bottom: none;
}

.subcategory-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.dashboard-list {
    display: flex;
    flex-direction: column;
}

.dashboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.2s;
}

.dashboard-item:last-child {
    border-bottom: none;
}

.dashboard-item:hover {
    opacity: 0.7;
}

.dashboard-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dashboard-name {
    font-weight: 500;
    color: var(--text);
}

.dashboard-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dashboard-arrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* About Section */
#about {
    padding-top: 1.5rem;
}

.about-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2rem;
    border: 2px solid var(--border);
}

.about-intro p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 700px;
}

.experience-section h3,
.skills-section h3,
.contract-work h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.experience-item {
    padding-left: 1.25rem;
    border-left: 2px solid var(--border);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.exp-role {
    font-weight: 600;
    color: var(--text);
}

.exp-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.exp-company {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.exp-company a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.exp-company a:hover {
    color: var(--text);
}

.exp-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.skill-block h4 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.skill-block ul {
    list-style: none;
}

.skill-block li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}

.skill-block li:last-child {
    border-bottom: none;
}

/* Contract Work */
.client-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.client {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
}

/* Connect */
.connect-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 480px;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex-direction: row;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    min-width: 180px;
    transition: all 0.2s;
}

.social-link:hover {
    border-color: var(--border-light);
    background: var(--bg-hover);
}

.social-icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.social-link:hover .social-icon {
    color: var(--accent);
}

.social-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.social-name {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.social-handle {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text);
    font-size: 0.85rem;
}

/* Featured & Press */
.press-grid {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.press-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-elevated);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.press-item:last-child {
    border-bottom: none;
}

.press-item:hover {
    background: var(--bg-hover);
}

.press-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.press-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.press-outlet {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.press-title {
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
}

/* Clients / Worked With */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.client-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1.5rem;
    background: var(--bg-elevated);
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.client-card.client-link:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.client-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-bottom: 0.25rem;
    border-radius: 6px;
}

.client-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.client-type {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Stats Highlight */
.stats-highlight {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.5rem 1rem;
    background: var(--bg-elevated);
    text-align: center;
}

.highlight-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--accent);
}

.highlight-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Recommendations / Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.testimonial {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.testimonial blockquote {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.author-name {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.author-name:hover {
    color: var(--text);
}

.author-role {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    padding: 2.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        display: none;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1.25rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .logo-desktop {
        display: none !important;
    }

    .logo-mobile {
        display: flex;
    }

    .nav-top {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
    }

    .nav-right {
        display: none !important;
    }

    .nav-social-mobile {
        display: flex !important;
    }

    .nav-links-mobile {
        display: flex !important;
        width: 100%;
        gap: 0;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .logo {
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .logo-img {
        width: 28px;
        height: 28px;
    }

    .nav-links {
        width: 100%;
        display: flex;
        gap: 0;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .nav-links-mobile a {
        font-size: 0.7rem;
        white-space: nowrap;
        padding: 0 0.5rem;
        position: relative;
    }

    .nav-links a:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 10px;
        background: var(--text-muted);
        opacity: 0.4;
    }

    .nav-right {
        width: 100%;
        flex-direction: column;
        gap: 1.25rem;
        align-items: flex-start;
    }

    .nav-social {
        gap: 0.6rem;
        padding-left: 0;
        border-left: none;
    }

    .nav-social-link {
        width: 28px;
        height: 28px;
    }

    .nav-social-link svg,
    .nav-social-link img {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 0.75rem;
    }

    .nav-links {
        gap: 0;
    }

    .nav-links-mobile a {
        font-size: 0.65rem;
        padding: 0 0.4rem;
        position: relative;
    }

    .nav-links-mobile a:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 8px;
        background: var(--text-muted);
        opacity: 0.4;
    }

    section {
        padding: 3.5rem 1.25rem;
    }

    .hero {
        padding: 7rem 1.25rem 1rem;
    }

    .hero-avatar {
        width: 60px;
        height: 60px;
    }

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

    .about-avatar {
        width: 100px;
        height: 100px;
    }

    .logo-img {
        width: 28px;
        height: 28px;
    }

    .section-header {
        flex-wrap: wrap;
    }

    .section-link {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .social-links {
        flex-direction: column;
    }

    .social-link {
        width: 100%;
    }

    .exp-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stats-highlight {
        grid-template-columns: repeat(2, 1fr);
    }

    .highlight-value {
        font-size: 1.25rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }
}
