/* Full rebuild homepage stylesheet */

:root {
    --bg: #0b0b0f;
    --panel: #14141b;
    --primary: #7c3aed;
    --primary-soft: #8b5cf6;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.7);
    --border: #27272a;
    --stroke: rgba(255, 255, 255, 0.12);
    --stroke-soft: rgba(255, 255, 255, 0.08);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-pill: 999px;
}

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

html {
    scroll-behavior: smooth;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color-scheme: dark;
}

body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    font-family: "Inter", sans-serif;
    color: var(--text);
    background: var(--bg) !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg);
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

.hidden {
    opacity: 1;
    visibility: visible;
}

.preloader,
.cursor-dot,
.cursor-outline {
    display: none;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    z-index: 100;
    border-bottom: 1px solid var(--stroke-soft);
    background: rgba(11, 11, 15, 0.78);
    backdrop-filter: blur(10px);
}

.scroll-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--primary);
}

.nav-container {
    width: min(1160px, calc(100% - 3rem));
    margin: 0 auto;
    min-height: 72px;
    padding: 0.95rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-logo {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    position: relative;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 550;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: auto;
    bottom: -0.45rem;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
    transition: width 0.18s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
}

.main-content,
.portfolio-page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100vw;
    min-height: 100svh;
    overflow-x: clip;
    background: transparent;
}

.portfolio-vanta-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100vw;
    height: 100svh;
    overflow: hidden;
    background: var(--bg);
    pointer-events: none;
    contain: strict;
}

.portfolio-page .section {
    width: 100%;
    max-width: 100vw;
    min-height: auto !important;
    display: block !important;
    position: relative;
    overflow: hidden;
    padding: 6.2rem 1.5rem;
    isolation: isolate;
    background: transparent;
}

.portfolio-page .section > .immersive-background,
.portfolio-page .section > .particles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: transparent;
}

.portfolio-page .section > .immersive-background {
    z-index: 0;
}

.portfolio-page .section > .particles-container {
    z-index: 1;
    pointer-events: none;
    contain: paint;
}

.portfolio-page .section > .particles-placeholder {
    display: none;
}

.portfolio-vanta-background canvas,
.particles-container canvas,
.vanta-canvas {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    background: var(--bg) !important;
}

.portfolio-page .container {
    width: min(1160px, 100%);
    max-width: calc(100vw - 3rem);
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.section-header {
    max-width: 760px;
    margin: 0 auto 2rem;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 0.9rem;
    padding: 0.32rem 0.7rem;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-title {
    margin: 0 0 0.8rem;
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.section-copy {
    margin: 0 auto;
    max-width: 68ch;
    color: var(--muted);
    line-height: 1.7;
}

.hero {
    padding-top: 8rem;
    min-height: 100svh !important;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
    gap: 1.3rem;
    align-items: center;
    min-width: 0;
}

.hero-kicker {
    margin-bottom: 0.85rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.hero-title {
    margin: 0 0 0.9rem;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
}

.gradient-text {
    display: block;
    color: var(--primary-soft);
}

.hero-subtitle {
    margin: 0 0 1rem;
    font-size: clamp(1.08rem, 2vw, 1.35rem);
    font-weight: 600;
}

.hero-description {
    margin: 0 0 1.45rem;
    max-width: 65ch;
    color: var(--muted);
    line-height: 1.72;
}

.hero-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.64rem 0.95rem;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button.primary {
    border-color: var(--primary);
    background: var(--primary);
}

.button:hover {
    transform: translateY(-2px);
    border-color: var(--primary-soft);
}

.panel,
.card {
    min-width: 0;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    background: rgba(20, 20, 27, 0.9);
}

.panel {
    padding: 1rem;
}

.terminal-header {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid var(--stroke-soft);
}

.terminal-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.terminal-title {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.76rem;
}

.hero-metrics {
    display: grid;
    gap: 0.6rem;
}

.metric {
    padding: 0.72rem;
    border: 1px solid var(--stroke-soft);
    border-radius: 11px;
}

.metric strong {
    display: block;
    font-size: 1rem;
}

.metric span {
    color: var(--muted);
    font-size: 0.83rem;
}

.terminal-lines {
    margin-top: 0.85rem;
    color: var(--muted);
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.78rem;
    line-height: 1.62;
    overflow-wrap: anywhere;
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 1rem;
}

.card {
    padding: 1rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover,
.panel:hover {
    border-color: rgba(124, 58, 237, 0.42);
}

.about-copy p + p {
    margin-top: 0.8rem;
}

.focus-panel .list li {
    margin-bottom: 0.35rem;
}

.card-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--stroke-soft);
    border-radius: 11px;
    color: var(--primary-soft);
}

.chip-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.chip {
    display: inline-flex;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.grid {
    display: grid;
    gap: 0.85rem;
}

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

.card-primary {
    min-height: 206px;
}

.card-primary h3,
.cert-card h3,
.writeup-card h3,
.tool-group h3,
.timeline-step h3 {
    margin: 0 0 0.5rem;
    font-size: 0.98rem;
    line-height: 1.35;
}

.card-primary p,
.writeup-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.56;
}

.tag-row,
.tool-tags {
    margin-top: 0.72rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag,
.tool-tag {
    padding: 0.26rem 0.52rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--stroke);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
}

.tag {
    border-color: rgba(124, 58, 237, 0.44);
    color: var(--primary-soft);
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.timeline-step {
    position: relative;
}

.timeline-index {
    margin: 0 0 0.42rem;
    color: var(--primary-soft);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.36rem;
}

.list li {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.44;
}

.list li::before {
    content: "• ";
    color: var(--primary-soft);
}

.cert-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.cert-summary-provider {
    display: inline-flex;
    margin-bottom: 0.55rem;
    padding: 0.26rem 0.54rem;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 700;
}

.cert-summary-item {
    color: var(--muted);
    font-size: 0.82rem;
}

.tools-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.tool-group {
    padding: 0.95rem;
}

.note {
    margin-top: 0.92rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.66;
}

.writeup-card {
    min-height: 170px;
}

.writeup-card p {
    margin-bottom: 0.82rem;
}

.link-button {
    min-height: 36px;
    width: auto;
    padding: 0.42rem 0.74rem;
    font-size: 0.8rem;
}

.contact-panel {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    padding: 1.5rem;
}

.contact-panel .section-title {
    margin-bottom: 0.58rem;
}

.contact-panel .section-copy {
    margin-bottom: 1.15rem;
}

.footer-tagline,
.footer-link-immersive {
    color: var(--muted);
}

.footer-link-immersive:hover {
    color: var(--primary-soft);
}

.footer-immersive {
    position: relative;
    border-top: 1px solid var(--stroke-soft);
    background: rgba(20, 20, 27, 0.75);
    padding: 2.2rem 1.5rem 1.1rem;
}

.footer-background {
    display: none;
}

.footer-content-immersive {
    width: min(1160px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1rem;
}

.footer-logo-immersive {
    display: grid;
    gap: 0.35rem;
}

.logo-text {
    font-weight: 700;
}

.logo-tagline {
    color: var(--muted);
    font-size: 0.88rem;
}

.footer-links-immersive,
.footer-social-immersive {
    display: grid;
    gap: 0.4rem;
    align-content: start;
}

.footer-links-immersive h3,
.footer-social-immersive h3 {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.footer-link-immersive,
.social-icon {
    color: var(--muted);
    font-size: 0.88rem;
}

.footer-divider {
    width: min(1160px, 100%);
    margin: 1rem auto 0.7rem;
    border-top: 1px solid var(--stroke-soft);
}

.footer-bottom-immersive {
    width: min(1160px, 100%);
    margin: 0 auto;
    color: var(--muted);
    font-size: 0.82rem;
}

.back-to-top-immersive {
    display: none;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(14px);
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

@media (max-width: 1080px) {
    .hero-grid,
    .about-layout {
        grid-template-columns: 1fr;
    }

    .timeline,
    .cert-summary-grid,
    .tools-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
        width: 34px;
        height: 28px;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
    }

    .nav-toggle span {
        display: block;
        height: 2px;
        border-radius: 999px;
        background: var(--text);
    }
}

@media (max-width: 760px) {
    .portfolio-page .section {
        padding: 5rem 1rem;
    }

    .hero {
        padding-top: 7rem;
    }

    .grid.cols-3,
    .timeline,
    .cert-summary-grid,
    .tools-layout {
        grid-template-columns: 1fr;
    }

    .section-header {
        margin-bottom: 1.8rem;
    }

    .hero-title {
        font-size: clamp(2.55rem, 12vw, 3.8rem);
    }

    .hero-actions,
    .contact-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .nav-links {
        display: none;
    }

    .footer-content-immersive {
        grid-template-columns: 1fr;
    }
}

/* Premium homepage section redesign. Hero and background effects are intentionally untouched. */
.portfolio-page .section:not(.hero) {
    padding: 6.25rem 0;
}

.portfolio-page .section:not(.hero) .container {
    width: min(1200px, 100%);
    padding: 0 1.5rem;
}

.portfolio-page .section:not(.hero) .section-title {
    color: var(--text);
    font-size: clamp(2rem, 3.8vw, 3rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.portfolio-page .section:not(.hero) .section-copy,
.portfolio-page .section:not(.hero) p {
    line-height: 1.6;
}

.portfolio-page .section:not(.hero) .section-header {
    max-width: 760px;
    margin: 0 0 2.6rem;
    text-align: left;
}

.portfolio-page .section:not(.hero) .card,
.portfolio-page .section:not(.hero) .panel,
.focus-panel-modern,
.cert-summary-grid .cert-card,
.tools-layout .tool-group {
    background: rgba(17, 17, 19, 0.86);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.portfolio-page .section:not(.hero) .card:hover,
.portfolio-page .section:not(.hero) .panel:hover,
.focus-panel-modern:hover,
.cert-summary-grid .cert-card:hover,
.tools-layout .tool-group:hover {
    border-color: rgba(124, 58, 237, 0.46);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    transform: translateY(-3px);
}

.about-redesign {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.about-main {
    max-width: 760px;
}

.about-main .section-copy {
    max-width: 540px;
    margin-top: 1rem;
}

.about-copy-large {
    margin-top: 2rem;
    display: grid;
    gap: 1.15rem;
    color: var(--muted);
    font-size: 1.04rem;
}

.focus-panel-modern {
    padding: 1rem;
}

.panel-label {
    display: block;
    margin: 0 0 1rem;
    color: var(--primary-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.focus-stack {
    display: grid;
    gap: 0.75rem;
}

.focus-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.05rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.focus-item > span {
    display: grid;
    width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    border: 1px solid rgba(124, 58, 237, 0.36);
    border-radius: 999px;
    color: var(--primary-soft);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
}

.focus-item h3 {
    margin-bottom: 0.25rem;
    color: var(--text);
    font-size: 1rem;
}

.focus-item p {
    color: var(--muted);
    font-size: 0.92rem;
}

.exploring-shell {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.exploring-copy .section-copy {
    max-width: 520px;
}

.chip-field {
    min-height: 280px;
    display: flex;
    align-items: center;
}

.chip-layout {
    justify-content: flex-start;
    gap: 1rem;
}

.chip {
    min-height: 46px;
    padding: 0.8rem 1.05rem;
    border-color: rgba(124, 58, 237, 0.34);
    background: rgba(17, 17, 19, 0.72);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.chip:nth-child(2n) {
    transform: translateY(16px);
}

.chip:nth-child(3n) {
    transform: translateY(-12px);
}

.chip:hover {
    border-color: var(--primary-soft);
    color: var(--primary-soft);
    transform: translateY(-4px);
}

.labs-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
    gap: 2rem;
    align-items: end;
    margin-bottom: 2.1rem;
}

.labs-intro .section-copy {
    max-width: 430px;
    justify-self: end;
    margin: 0;
}

.labs-grid {
    gap: 1.15rem;
}

.labs-grid .card-primary {
    min-height: 300px;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
}

.labs-grid .card-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 1.2rem;
    border-color: rgba(124, 58, 237, 0.38);
    background: rgba(124, 58, 237, 0.12);
    color: var(--text);
}

.labs-grid h3 {
    margin-bottom: 0.65rem;
    font-size: 1.12rem;
}

.labs-grid p {
    color: var(--muted);
}

.labs-grid .tag-row {
    margin-top: auto;
    padding-top: 1.3rem;
}

.roadmap-section .section-header {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.roadmap-section .section-copy {
    margin-left: auto;
    margin-right: auto;
}

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

.roadmap-section .timeline {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.roadmap-section .timeline::before {
    content: "";
    position: absolute;
    top: 1rem;
    bottom: 1rem;
    left: 1.05rem;
    width: 1px;
    background: var(--border);
}

.timeline-step {
    position: relative;
    padding: 1.15rem 1.2rem 1.15rem 4rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(17, 17, 19, 0.78);
}

.timeline-step::before {
    content: "";
    position: absolute;
    left: 0.72rem;
    top: 1.25rem;
    width: 0.7rem;
    height: 0.7rem;
    border: 4px solid var(--bg);
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.5);
    z-index: 1;
}

.timeline-step:hover {
    border-color: rgba(124, 58, 237, 0.46);
    transform: translateX(4px);
}

.timeline-step h3 {
    margin-bottom: 0.8rem;
}

.cert-section-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.cert-copy {
    position: sticky;
    top: 6.5rem;
}

.cert-copy .section-copy {
    margin-bottom: 1.4rem;
}

.cert-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.cert-summary-grid .cert-card {
    min-height: 150px;
    padding: 1.1rem;
}

.cert-summary-grid .cert-card:nth-child(3n + 1) {
    transform: translateY(12px);
}

.cert-summary-provider {
    border-color: rgba(124, 58, 237, 0.32);
    background: rgba(124, 58, 237, 0.11);
    color: var(--primary-soft);
}

.cert-summary-grid .cert-card:not(:nth-child(3n + 1)):hover {
    transform: translateY(-3px);
}

.cert-summary-grid .cert-card:nth-child(3n + 1):hover {
    transform: translateY(5px);
}

.tools-section-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
    gap: clamp(2rem, 5vw, 4rem);
}

.tools-copy {
    align-self: start;
}

.tools-copy .section-copy {
    max-width: 500px;
}

.tools-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.tools-layout .tool-group {
    min-height: 185px;
    padding: 1.15rem;
}

.tool-group h3 {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.writeups-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.writeups-heading {
    position: sticky;
    top: 6.5rem;
}

.writeups-heading .section-copy {
    max-width: 390px;
}

.writeups-list {
    gap: 1rem;
}

.writeup-card {
    min-height: 235px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.writeup-card:first-child {
    grid-column: span 2;
}

.writeup-card h3 {
    max-width: 680px;
    font-size: 1.16rem;
}

.writeup-card p {
    max-width: 660px;
    color: var(--muted);
}

.writeup-card .link-button {
    align-self: flex-start;
    margin-top: 1rem;
}

.contact-section .container {
    display: grid;
    place-items: center;
}

.contact-panel {
    width: min(880px, 100%);
    padding: clamp(2rem, 6vw, 4rem);
    border-radius: 24px;
}

.contact-panel .section-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.contact-panel .section-copy {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.contact-actions {
    justify-content: center;
    gap: 0.8rem;
}

@media (max-width: 1080px) {
    .about-redesign,
    .exploring-shell,
    .labs-intro,
    .cert-section-layout,
    .tools-section-layout,
    .writeups-layout {
        grid-template-columns: 1fr;
    }

    .cert-copy,
    .writeups-heading {
        position: static;
    }

    .labs-intro .section-copy {
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .portfolio-page .section:not(.hero) {
        padding: 4.8rem 0;
    }

    .portfolio-page .section:not(.hero) .container {
        padding: 0 1rem;
    }

    .chip-field {
        min-height: auto;
    }

    .chip:nth-child(2n),
    .chip:nth-child(3n) {
        transform: none;
    }

    .chip:hover {
        transform: translateY(-3px);
    }

    .cert-summary-grid,
    .tools-layout {
        grid-template-columns: 1fr;
    }

    .cert-summary-grid .cert-card:nth-child(3n + 1) {
        transform: none;
    }

    .cert-summary-grid .cert-card:hover,
    .cert-summary-grid .cert-card:nth-child(3n + 1):hover {
        transform: translateY(-3px);
    }

    .writeup-card:first-child {
        grid-column: auto;
    }

    .timeline-step {
        padding-left: 3.2rem;
    }
}

/* Refinement pass: centered hierarchy, structured chips, stronger roadmap, reusable view-more. */
.portfolio-page .section:not(.hero) {
    padding: clamp(4.25rem, 6vw, 5.75rem) 0;
}

.portfolio-page .section:not(.hero) .section-header {
    max-width: 780px;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
    text-align: center;
}

.portfolio-page .section:not(.hero) .section-header .section-copy {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.about-redesign {
    max-width: 1080px;
    margin: 0 auto;
    align-items: stretch;
}

.about-main {
    max-width: none;
    padding: clamp(1.4rem, 3vw, 2rem);
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(17, 17, 19, 0.64);
}

.about-copy-large {
    margin-top: 0;
}

.focus-panel-modern {
    padding: clamp(1.2rem, 3vw, 1.6rem);
}

.exploring-section .section-header {
    margin-bottom: 2.4rem;
}

.chip-field {
    min-height: auto;
    justify-content: center;
}

.chip-layout {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    justify-content: center;
    gap: 0.9rem;
}

.chip,
.chip:nth-child(2n),
.chip:nth-child(3n) {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: none;
    text-align: center;
    font-weight: 700;
}

.chip:hover,
.chip:nth-child(2n):hover,
.chip:nth-child(3n):hover {
    transform: translateY(-3px);
}

.labs-grid {
    max-width: 1120px;
    margin: 0 auto;
    gap: 1.25rem;
}

.labs-grid .card-primary {
    min-height: 315px;
    padding: 1.5rem;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.labs-grid .card-primary:hover {
    box-shadow: 0 26px 76px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(124, 58, 237, 0.18);
    transform: translateY(-6px);
}

.tag-row {
    gap: 0.45rem;
}

.tag,
.tool-tag {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    border-color: rgba(124, 58, 237, 0.26);
    background: rgba(124, 58, 237, 0.08);
    color: rgba(255, 255, 255, 0.82);
}

.roadmap-shell {
    max-width: 1080px;
}

.roadmap-section .timeline {
    gap: 0;
}

.roadmap-section .timeline::before {
    top: 0.5rem;
    bottom: 0.5rem;
    left: 50%;
    background: rgba(124, 58, 237, 0.38);
}

.roadmap-milestone {
    width: calc(50% - 2.25rem);
    min-height: 230px;
    margin: 0 0 1.4rem;
    padding: 1.45rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.1rem;
    align-items: start;
    border-radius: 22px;
}

.roadmap-milestone:nth-child(even) {
    margin-left: calc(50% + 2.25rem);
}

.roadmap-milestone::before {
    top: 1.65rem;
    left: calc(100% + 1.82rem);
    width: 0.75rem;
    height: 0.75rem;
    border: 5px solid var(--bg);
}

.roadmap-milestone:nth-child(even)::before {
    left: auto;
    right: calc(100% + 1.82rem);
}

.roadmap-milestone:hover {
    transform: translateY(-4px);
}

.roadmap-milestone:nth-child(even):hover {
    transform: translateY(-4px);
}

.roadmap-index {
    width: 3.1rem;
    height: 3.1rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(124, 58, 237, 0.36);
    border-radius: 16px;
    background: rgba(124, 58, 237, 0.12);
    color: var(--text);
    font-family: "JetBrains Mono", monospace;
    font-size: 1rem;
    font-weight: 700;
}

.roadmap-card-body h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.roadmap-card-body .list {
    gap: 0.55rem;
}

.cert-summary-grid {
    max-width: 1120px;
    margin: 0 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.cert-summary-grid .cert-card,
.cert-summary-grid .cert-card:nth-child(3n + 1) {
    min-height: 172px;
    padding: 1.25rem;
    transform: none;
}

.cert-summary-grid .cert-card:hover,
.cert-summary-grid .cert-card:nth-child(3n + 1):hover {
    transform: translateY(-4px);
}

.cert-summary-grid .cert-card h3 {
    margin-bottom: 0.9rem;
    font-size: 1rem;
    line-height: 1.45;
}

.certification-preview-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.tools-layout {
    max-width: 1120px;
    margin: 0 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.tools-layout .tool-group {
    min-height: 190px;
    padding: 1.25rem;
}

.writeups-list {
    max-width: 1120px;
    margin: 0 auto;
}

.view-more-hidden {
    display: none !important;
}

.view-more-revealed {
    animation: viewMoreReveal 0.42s ease both;
}

.view-more-action {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.view-more-button {
    width: auto;
    border-color: rgba(124, 58, 237, 0.32);
    background: rgba(124, 58, 237, 0.08);
}

.view-more-button:hover {
    border-color: rgba(124, 58, 237, 0.58);
    background: rgba(124, 58, 237, 0.16);
}

@keyframes viewMoreReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .cert-summary-grid,
    .tools-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .roadmap-section .timeline::before {
        left: 1.2rem;
    }

    .roadmap-milestone,
    .roadmap-milestone:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding-left: 3.8rem;
    }

    .roadmap-milestone::before,
    .roadmap-milestone:nth-child(even)::before {
        left: 0.82rem;
        right: auto;
    }

    .roadmap-index {
        position: absolute;
        left: 1.9rem;
        top: 1.25rem;
        width: 2.4rem;
        height: 2.4rem;
        border-radius: 12px;
        font-size: 0.82rem;
    }
}

@media (max-width: 760px) {
    .portfolio-page .section:not(.hero) {
        padding: 3.75rem 0;
    }

    .portfolio-page .section:not(.hero) .section-header {
        margin-bottom: 1.75rem;
    }

    .chip-layout,
    .cert-summary-grid,
    .tools-layout {
        grid-template-columns: 1fr;
    }

    .about-main,
    .focus-panel-modern,
    .labs-grid .card-primary,
    .cert-summary-grid .cert-card,
    .tools-layout .tool-group,
    .writeup-card {
        border-radius: 16px;
    }
}
