:root {
    --ink: #070706;
    --ink-2: #11100d;
    --panel: rgba(21, 20, 17, 0.88);
    --panel-strong: rgba(31, 30, 25, 0.96);
    --paper: #f4efe4;
    --muted: #bdb5a5;
    --quiet: #7d766b;
    --line: rgba(244, 239, 228, 0.14);
    --line-strong: rgba(244, 239, 228, 0.28);
    --lime: #d6ff63;
    --red: #ff4f3d;
    --cyan: #67d8ff;
    --gold: #f0b44d;
    --shadow: rgba(0, 0, 0, 0.42);
    --radius: 8px;
    --hero-image: url("../images/icons8-mars-planet-pastel-color-96.png");
}

* {
    letter-spacing: 0;
}

html {
    background: var(--ink);
}

body {
    min-height: 100vh;
    background:
        linear-gradient(rgba(244, 239, 228, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244, 239, 228, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, #090807 0%, #11100d 44%, #070706 100%);
    background-size: 54px 54px, 54px 54px, auto;
    color: var(--paper);
    font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 79, 61, 0.08), transparent 22%, transparent 78%, rgba(103, 216, 255, 0.08)),
        repeating-linear-gradient(0deg, rgba(244, 239, 228, 0.03) 0, rgba(244, 239, 228, 0.03) 1px, transparent 1px, transparent 7px);
    mix-blend-mode: screen;
    opacity: 0.42;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

img {
    display: block;
}

a {
    color: inherit;
}

.site-hero {
    min-height: 72vh;
    padding: 72px 24px 36px;
    display: flex;
    align-items: flex-end;
    text-align: left;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    background-image:
        linear-gradient(90deg, rgba(7, 7, 6, 0.94) 0%, rgba(7, 7, 6, 0.82) 46%, rgba(7, 7, 6, 0.36) 100%),
        linear-gradient(180deg, rgba(7, 7, 6, 0.08) 0%, rgba(7, 7, 6, 0.76) 100%),
        var(--hero-image);
    background-position: center;
    background-size: cover;
    color: var(--paper);
}

.site-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(214, 255, 99, 0.16) 0 1px, transparent 1px 100%),
        linear-gradient(0deg, rgba(244, 239, 228, 0.08) 0 1px, transparent 1px 100%);
    background-size: 86px 86px;
    opacity: 0.28;
    animation: none;
    transform: none;
    z-index: -1;
}

.site-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 180px;
    background: linear-gradient(180deg, transparent, var(--ink));
    pointer-events: none;
    z-index: -1;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 0 58%, rgba(255, 79, 61, 0.22) 58% 59%, transparent 59%),
        linear-gradient(315deg, transparent 0 70%, rgba(214, 255, 99, 0.14) 70% 70.5%, transparent 70.5%);
    pointer-events: none;
    z-index: -1;
}

.hero-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 14px;
    color: var(--lime);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.site-hero h1 {
    margin: 0;
    max-width: 920px;
    color: var(--paper);
    font-size: 5.2rem;
    line-height: 0.95;
    font-weight: 700;
    text-shadow: none;
}

.hero-copy {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(244, 239, 228, 0.82);
    font-size: 1.18rem;
    line-height: 1.7;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-action,
.resume-btn,
.modal-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 6px;
    border: 1px solid var(--line-strong);
    padding: 0.78rem 1rem;
    color: var(--paper);
    background: rgba(244, 239, 228, 0.06);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.hero-action.primary,
.resume-btn {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--ink);
}

.hero-action.secondary {
    border-color: rgba(255, 79, 61, 0.58);
    color: var(--paper);
}

.hero-action:hover,
.resume-btn:hover,
.modal-link:hover {
    transform: translateY(-2px);
    border-color: var(--lime);
    background: rgba(214, 255, 99, 0.12);
    color: var(--paper);
    box-shadow: none;
}

.hero-action.primary:hover,
.resume-btn:hover {
    color: var(--lime);
    background: transparent;
}

.tab-navigation {
    position: sticky;
    top: 0;
    z-index: 90;
    padding: 10px 0;
    background: rgba(7, 7, 6, 0.82);
    border-top: 1px solid rgba(244, 239, 228, 0.1);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.tab-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-container::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    min-width: auto;
    min-height: 42px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.68rem 0.9rem;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
}

.tab-index {
    color: var(--quiet);
    font-size: 0.72rem;
}

.tab-btn:hover {
    transform: none;
    border-color: var(--line-strong);
    color: var(--paper);
    box-shadow: none;
}

.tab-btn.active {
    transform: none;
    border-color: rgba(214, 255, 99, 0.58);
    background: rgba(214, 255, 99, 0.11);
    color: var(--paper);
    box-shadow: inset 0 -2px 0 var(--lime);
}

.tab-btn.active .tab-index {
    color: var(--lime);
}

.tab-glow,
.tab-icon {
    display: none;
}

main {
    max-width: 1180px;
    margin: 36px auto 80px;
    padding: 0 20px;
}

.tab-content,
.tab-content:not(.active) {
    display: none;
    position: static;
    left: auto;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    z-index: auto;
}

.tab-content.active {
    display: block;
    position: static;
    opacity: 1;
    transform: none;
}

.content-section {
    margin: 0 0 74px;
    padding: 0;
    opacity: 1 !important;
    transform: none !important;
}

section::after {
    display: none;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
}

.section-heading h2,
h2 {
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--paper);
    font-size: 2.2rem;
    line-height: 1.08;
    font-weight: 700;
    text-shadow: none;
}

.section-heading::after {
    content: "";
    width: 92px;
    height: 3px;
    background: linear-gradient(90deg, var(--red), var(--lime), var(--cyan));
}

.card-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card,
.article-item,
.contact-item,
.resume-download,
.resume-preview,
.project-modal .modal-content {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 16px 44px var(--shadow);
}

.card {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.card::before,
.article-item::before,
.contact-item::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(135deg, rgba(214, 255, 99, 0.09), transparent 38%, rgba(255, 79, 61, 0.08));
    transition: opacity 180ms ease;
    pointer-events: none;
}

.card:hover,
.article-item:hover,
.contact-item:hover {
    transform: translateY(-4px);
    border-color: rgba(214, 255, 99, 0.48);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.52);
}

.card:hover::before,
.article-item:hover::before,
.contact-item:hover::before {
    opacity: 1;
}

.card[data-link]::after {
    display: none;
}

.card-img-container {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--line);
    background: var(--ink-2);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.05);
    transition: transform 280ms ease, filter 280ms ease;
}

.card:hover .card-img {
    transform: scale(1.045);
    filter: saturate(1.12) contrast(1.08);
}

.card-img-container.placeholder {
    min-height: 180px;
    background:
        linear-gradient(135deg, rgba(255, 79, 61, 0.12), transparent),
        repeating-linear-gradient(135deg, rgba(244, 239, 228, 0.05) 0 1px, transparent 1px 12px),
        var(--ink-2);
}

.card-img-container.placeholder::before {
    content: "IMG";
    color: var(--quiet);
    font-size: 0.78rem;
    font-weight: 700;
}

.card-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.card-header {
    align-items: flex-start;
    gap: 12px;
    margin: 0;
}

.card-content h3,
.card-header h3 {
    min-height: 0;
    margin: 0;
    color: var(--paper);
    font-size: 1.08rem;
    line-height: 1.28;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.card-content p {
    min-height: 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.55;
}

.card-content p:not(.card-date) {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-date,
.card-content strong,
.card-content em {
    color: var(--gold);
    font-style: normal;
}

.project-type-badge,
.modal-type-badge,
.article-date,
.skill {
    border-radius: 999px;
    border: 1px solid rgba(214, 255, 99, 0.32);
    background: rgba(214, 255, 99, 0.09);
    color: var(--lime);
    font-size: 0.74rem;
    font-weight: 700;
}

.project-type-badge {
    padding: 0.25rem 0.55rem;
}

.skills,
.skill-tags,
.modal-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: auto 0 0;
}

.skill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin: 0;
    padding: 0.28rem 0.58rem;
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.skill:hover {
    transform: none;
    background: rgba(103, 216, 255, 0.1);
    border-color: rgba(103, 216, 255, 0.42);
    color: var(--cyan);
    box-shadow: none;
}

.demo-overlay {
    background: rgba(7, 7, 6, 0.62);
}

.play-button {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: var(--lime);
}

.play-button::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid var(--ink);
}

.demo-label {
    border-radius: 999px;
    border-color: rgba(244, 239, 228, 0.2);
    background: rgba(7, 7, 6, 0.82);
}

.empty-state {
    grid-column: 1 / -1;
    margin: 0;
    padding: 22px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
}

.about-container {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 28px;
}

.about-text {
    border-left: 3px solid var(--red);
    padding-left: 22px;
}

.about-text p {
    margin: 0 0 18px;
    color: rgba(244, 239, 228, 0.84);
    font-size: 1.02rem;
    line-height: 1.78;
}

.skills-showcase {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(244, 239, 228, 0.035);
    padding: 20px;
}

.skills-showcase h3,
.blog-post h3,
.resume-download h3,
.resume-preview h3 {
    margin: 0 0 18px;
    color: var(--paper);
    font-size: 1.1rem;
    line-height: 1.25;
}

.skill-categories {
    display: grid;
    gap: 16px;
}

.skill-category {
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.skill-category:first-child {
    padding-top: 0;
    border-top: 0;
}

.skill-category h4 {
    margin: 0 0 10px;
    color: var(--gold);
    font-size: 0.86rem;
    text-transform: uppercase;
}

.blog-container,
.contact-container,
.resume-container {
    max-width: none;
}

.blog-intro {
    margin: 0 0 24px;
    text-align: left;
}

.blog-intro p,
.contact-message p,
.resume-download p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}

.blog-post {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.article-item {
    min-height: 178px;
    padding: 18px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.article-header {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 12px;
}

.article-item h4 {
    margin: 0;
    color: var(--paper);
    font-size: 1rem;
    line-height: 1.32;
}

.article-link,
.article-item h4 a {
    color: inherit;
    text-decoration: none;
}

.article-item:hover h4,
.article-item:hover .article-link,
.article-item:hover h4 a {
    color: var(--lime);
}

.article-item-video {
    border-color: rgba(255, 79, 61, 0.28);
}

.article-item-video .article-date {
    color: var(--cyan);
    border-color: rgba(103, 216, 255, 0.34);
    background: rgba(103, 216, 255, 0.08);
}

.article-date {
    padding: 0.24rem 0.56rem;
    color: var(--gold);
    border-color: rgba(240, 180, 77, 0.32);
    background: rgba(240, 180, 77, 0.08);
    white-space: normal;
}

.article-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.contact-item {
    min-height: 112px;
    padding: 18px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.contact-item:hover .contact-details h3::after {
    content: "";
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    border: 1px solid rgba(103, 216, 255, 0.3);
    background: rgba(103, 216, 255, 0.08);
}

.contact-icon svg {
    color: var(--cyan);
}

.contact-item:hover .contact-icon {
    transform: none;
    border-color: var(--cyan);
    background: rgba(103, 216, 255, 0.12);
}

.contact-details h3 {
    margin: 0 0 6px;
    color: var(--paper);
    font-size: 0.95rem;
}

.contact-value {
    margin: 0;
    color: var(--muted);
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.contact-actions {
    display: flex;
    gap: 8px;
    opacity: 1;
    transform: none;
}

.contact-link,
.copy-btn {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: rgba(244, 239, 228, 0.04);
    color: var(--paper);
}

.contact-link:hover,
.copy-btn:hover {
    transform: none;
    border-color: var(--lime);
    color: var(--lime);
    background: rgba(214, 255, 99, 0.08);
    box-shadow: none;
}

.copy-btn.copied {
    border-color: var(--lime);
    background: rgba(214, 255, 99, 0.12);
    color: var(--lime);
}

.copy-btn.copied::after {
    content: "OK";
    font-size: 0.65rem;
}

.contact-message {
    margin-top: 18px;
    padding: 18px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    text-align: left;
}

.contact-message:hover {
    box-shadow: none;
    border-color: var(--line);
}

.resume-container {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 18px;
    align-items: start;
}

.resume-download,
.resume-preview {
    padding: 20px;
}

.resume-download {
    text-align: left;
}

.resume-btn {
    margin-top: 20px;
    padding-inline: 1rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 24px;
    border-radius: 4px;
    background: rgba(7, 7, 6, 0.18);
    font-size: 0.68rem;
    font-weight: 800;
}

.btn-glow {
    display: none;
}

.resume-highlights {
    display: grid;
    gap: 12px;
}

.highlight-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(244, 239, 228, 0.035);
}

.highlight-item:hover {
    transform: none;
    border-color: rgba(240, 180, 77, 0.38);
    background: rgba(240, 180, 77, 0.07);
}

.highlight-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(240, 180, 77, 0.34);
    color: var(--gold);
    background: rgba(240, 180, 77, 0.08);
    font-size: 0.74rem;
    font-weight: 800;
}

.highlight-content h4 {
    margin: 0 0 5px;
    color: var(--paper);
    font-size: 0.98rem;
}

.highlight-content p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.52;
}

.project-modal {
    z-index: 1000;
}

.modal-overlay {
    background: rgba(7, 7, 6, 0.82);
}

.project-modal .modal-content {
    width: min(860px, 92vw);
    max-height: 88vh;
    overflow: hidden;
    background: var(--panel-strong);
}

.modal-close {
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border-color: var(--line);
    background: rgba(244, 239, 228, 0.06);
    color: var(--paper);
}

.modal-close:hover {
    transform: none;
    border-color: var(--red);
    background: rgba(255, 79, 61, 0.1);
}

.modal-header {
    padding: 24px 72px 18px 24px;
    border-bottom: 1px solid var(--line);
}

.modal-header h2 {
    color: var(--paper);
    font-size: 1.55rem;
}

.modal-type-badge {
    padding: 0.34rem 0.72rem;
}

.modal-body {
    padding: 20px 24px 24px;
}

.modal-demo {
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--ink);
}

.modal-demo .no-demo {
    color: var(--muted) !important;
    background: repeating-linear-gradient(135deg, rgba(244, 239, 228, 0.045) 0 1px, transparent 1px 12px), var(--ink-2) !important;
}

.modal-description p {
    color: var(--muted);
}

.modal-links {
    gap: 10px;
}

footer {
    margin-top: 0;
    padding: 30px 20px;
    border-top: 1px solid var(--line);
    background: var(--ink);
    color: var(--quiet);
}

footer::before {
    display: none;
}

.card:focus,
.tab-btn:focus,
.hero-action:focus,
.article-item:focus,
.contact-item:focus,
.contact-link:focus,
.copy-btn:focus,
.resume-btn:focus,
.modal-link:focus,
.modal-close:focus {
    outline: 2px solid var(--lime);
    outline-offset: 3px;
}

@media (max-width: 1100px) {
    .site-hero {
        min-height: 68vh;
    }

    .site-hero h1 {
        font-size: 4rem;
    }

    .card-container,
    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .site-hero {
        min-height: 66vh;
        padding: 54px 18px 28px;
        background-image:
            linear-gradient(180deg, rgba(7, 7, 6, 0.78) 0%, rgba(7, 7, 6, 0.9) 100%),
            var(--hero-image);
    }

    .site-hero h1 {
        font-size: 3rem;
        line-height: 1;
    }

    .hero-copy {
        font-size: 1rem;
        line-height: 1.6;
    }

    main {
        margin-top: 24px;
        padding: 0 16px;
    }

    .section-heading {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .section-heading::after {
        width: 72px;
    }

    .section-heading h2,
    h2 {
        font-size: 1.78rem;
    }

    .card-container,
    .article-grid,
    .about-container,
    .contact-info,
    .resume-container {
        grid-template-columns: 1fr;
    }

    .tab-container {
        flex-direction: row;
        align-items: stretch;
        justify-content: flex-start;
    }

    .tab-btn {
        width: auto;
        max-width: none;
    }

    .about-text {
        padding-left: 16px;
    }

    .contact-item {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .contact-actions {
        grid-column: 2;
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .site-hero h1 {
        font-size: 2.55rem;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-action {
        width: 100%;
    }

    .tab-container {
        padding: 0 12px;
        flex-direction: row;
        align-items: stretch;
    }

    .tab-btn {
        width: auto;
        max-width: none;
        padding: 0.62rem 0.72rem;
    }

    .tab-index {
        display: none;
    }

    .card {
        max-width: none;
    }

    .modal-header {
        padding: 18px 62px 14px 18px;
    }

    .modal-body {
        padding: 16px 18px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-hero,
    .card,
    .article-item,
    .contact-item,
    .hero-action,
    .resume-btn,
    .modal-link,
    .card-img {
        transition: none;
    }
}
