:root {
    --bg: #060809;
    --bg-soft: #0b1013;
    --panel: rgba(13, 20, 23, .78);
    --panel-strong: #10191d;
    --line: rgba(190, 255, 235, .12);
    --line-strong: rgba(88, 255, 205, .28);
    --text: #f3fbf7;
    --muted: #9aaea9;
    --soft: #60736f;
    --green: #58ffcd;
    --blue: #52a9ff;
    --amber: #f0c15a;
    --red: #ff5f74;
    --shadow: 0 24px 80px rgba(0, 0, 0, .38);
    --font: "Inter", system-ui, sans-serif;
    --head: "Space Grotesk", system-ui, sans-serif;
    --mono: "Fira Code", monospace;
    --ease: cubic-bezier(.16, 1, .3, 1);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-color: var(--green) var(--bg);
    scrollbar-width: thin;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(90deg, rgba(88, 255, 205, .035) 1px, transparent 1px),
        linear-gradient(rgba(88, 255, 205, .025) 1px, transparent 1px),
        radial-gradient(circle at 82% 10%, rgba(82, 169, 255, .16), transparent 32rem),
        radial-gradient(circle at 12% 28%, rgba(88, 255, 205, .12), transparent 28rem),
        var(--bg);
    background-size: 72px 72px, 72px 72px, auto, auto, auto;
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

img,
svg {
    display: block;
}

img {
    max-width: 100%;
}

::selection {
    background: var(--green);
    color: #04100d;
}

.noise,
.scanline,
.cursor-orb {
    pointer-events: none;
    position: fixed;
}

.noise {
    inset: 0;
    z-index: 1000;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scanline {
    inset: 0;
    z-index: 999;
    opacity: .08;
    background: repeating-linear-gradient(180deg, transparent 0 7px, rgba(255, 255, 255, .06) 8px);
    mix-blend-mode: overlay;
}

.cursor-orb {
    z-index: 2;
    width: 34rem;
    height: 34rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(88, 255, 205, .13), rgba(82, 169, 255, .05) 46%, transparent 70%);
    filter: blur(34px);
    transform: translate(-50%, -50%);
    opacity: .75;
}

.container {
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
}

.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    padding: 0 32px;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 8, 9, .74);
    backdrop-filter: blur(22px);
    transition: background .3s var(--ease), height .3s var(--ease);
}

.nav.scrolled {
    height: 62px;
    background: rgba(6, 8, 9, .91);
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: var(--text);
    font-family: var(--mono);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .04em;
}

.brand-mark {
    color: var(--green);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 13px;
    transition: color .25s var(--ease), background .25s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(88, 255, 205, .08);
    color: var(--green);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-link,
.cv-link,
.menu-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .035);
    color: var(--text);
}

.icon-link,
.cv-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 40px;
    border-radius: 8px;
    transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}

.icon-link:hover,
.cv-link:hover {
    border-color: var(--green);
    background: rgba(88, 255, 205, .09);
    transform: translateY(-2px);
}

.icon-link svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.cv-link {
    padding: 0 15px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
}

.menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
}

.menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: var(--text);
    transition: transform .25s var(--ease);
}

.menu-btn.open span:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.menu-btn.open span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

.hero {
    position: relative;
    min-height: 100vh;
    padding: 128px 0 0;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 18rem;
    background: linear-gradient(180deg, transparent, var(--bg));
    z-index: 0;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, .78fr);
    gap: 64px;
    align-items: center;
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
}

.role,
.section-kicker {
    color: var(--green);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-title {
    margin: 15px 0 22px;
    font-family: var(--head);
    font-size: clamp(56px, 9vw, 112px);
    font-weight: 800;
    letter-spacing: 0;
    line-height: .86;
}

.hero-title span {
    display: block;
    overflow: hidden;
}

.hero-title span:last-child {
    color: transparent;
    -webkit-text-stroke: 1.6px var(--green);
    text-shadow: 0 0 34px rgba(88, 255, 205, .2);
}

.hero-lead {
    max-width: 660px;
    color: #c4d5d0;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.65;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border-radius: 8px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 800;
    transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}

.btn.primary {
    background: linear-gradient(135deg, var(--green), var(--blue));
    color: #03100d;
    box-shadow: 0 18px 48px rgba(88, 255, 205, .22);
}

.btn.secondary {
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .035);
    color: var(--text);
}

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

.btn.secondary:hover {
    border-color: var(--green);
    background: rgba(88, 255, 205, .08);
}

.hero-proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 620px;
    margin-top: 44px;
}

.hero-proof div,
.metric-card,
.skill-panel,
.project-card,
.contact-card {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025));
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-proof div {
    min-height: 108px;
    border-radius: 8px;
    padding: 18px;
}

.hero-proof strong {
    display: block;
    color: var(--green);
    font-family: var(--head);
    font-size: 32px;
    line-height: 1;
}

.hero-proof span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.hero-visual {
    position: relative;
    min-height: 600px;
}

.portrait-shell {
    position: relative;
    width: min(100%, 390px);
    margin-left: auto;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .5);
    transform-style: preserve-3d;
}

.portrait-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(1.03);
    transform: scale(1.01);
}

.portrait-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(6, 8, 9, .02), rgba(6, 8, 9, .48)),
        linear-gradient(90deg, rgba(88, 255, 205, .18), transparent 42%);
    mix-blend-mode: screen;
}

.portrait-ring {
    position: absolute;
    inset: 18px;
    z-index: 2;
    border: 1px solid rgba(88, 255, 205, .3);
    border-radius: 6px;
}

.terminal-card {
    position: absolute;
    left: 0;
    bottom: 56px;
    z-index: 3;
    width: min(100%, 360px);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(7, 12, 14, .88);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .45);
    backdrop-filter: blur(18px);
}

.terminal-top {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .035);
}

.terminal-top span {
    width: 8px;
    height: 8px;
    border-radius: 99px;
}

.terminal-top span:nth-child(1) { background: var(--red); }
.terminal-top span:nth-child(2) { background: var(--amber); }
.terminal-top span:nth-child(3) { background: var(--green); }

.terminal-top small {
    margin-left: auto;
    color: var(--soft);
    font-family: var(--mono);
    font-size: 11px;
}

.terminal-body {
    padding: 18px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
}

.terminal-body span,
.terminal-body .ok {
    color: var(--green);
}

.terminal-body i {
    display: inline-block;
    width: 8px;
    height: 16px;
    margin-left: 4px;
    background: var(--green);
    vertical-align: -3px;
    animation: cursorBlink .8s steps(2, start) infinite;
}

.terminal-body .ok {
    margin-top: 10px;
    opacity: .82;
}

.marquee {
    position: relative;
    z-index: 1;
    margin-top: 80px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.marquee div {
    display: flex;
    width: max-content;
    gap: 36px;
    padding: 24px 0;
    animation: marquee 32s linear infinite;
}

.marquee span {
    color: transparent;
    font-family: var(--head);
    font-size: clamp(28px, 4.6vw, 58px);
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    -webkit-text-stroke: 1px rgba(243, 251, 247, .14);
}

.section {
    position: relative;
    padding: 112px 0;
    scroll-margin-top: 82px;
}

.dark-band {
    background: linear-gradient(180deg, rgba(255, 255, 255, .018), rgba(255, 255, 255, .04));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.split {
    display: grid;
    grid-template-columns: .86fr 1.14fr;
    gap: 72px;
    align-items: start;
}

.section-title {
    max-width: 780px;
    margin-top: 12px;
    color: var(--text);
    font-family: var(--head);
    font-size: clamp(34px, 5vw, 64px);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.02;
}

.body-copy p {
    color: #c4d5d0;
    font-size: 18px;
    line-height: 1.8;
}

.body-copy p + p {
    margin-top: 22px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 56px;
}

.metric-card {
    min-height: 126px;
    border-radius: 8px;
    padding: 22px;
}

.metric-card span,
.contact-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.metric-card strong {
    display: block;
    color: var(--text);
    font-size: 17px;
    line-height: 1.35;
}

.timeline {
    margin-top: 54px;
    border-top: 1px solid var(--line);
}

.timeline-item {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 44px;
    padding: 34px 0;
    border-bottom: 1px solid var(--line);
}

.timeline-item time {
    color: var(--green);
    font-family: var(--mono);
    font-size: 13px;
}

.timeline-item h3 {
    color: var(--text);
    font-family: var(--head);
    font-size: 24px;
    line-height: 1.15;
}

.company {
    margin: 4px 0 12px;
    color: var(--blue);
    font-weight: 800;
}

.timeline-item p:not(.company) {
    max-width: 780px;
    color: var(--muted);
}

.skill-matrix {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 46px;
}

.skill-panel {
    min-height: 220px;
    border-radius: 8px;
    padding: 28px;
    transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}

.skill-panel:hover,
.project-card:hover,
.contact-card:hover,
.metric-card:hover {
    border-color: var(--line-strong);
    background: linear-gradient(145deg, rgba(88, 255, 205, .08), rgba(82, 169, 255, .04));
    transform: translateY(-5px);
}

.skill-panel h3,
.project-card h3 {
    color: var(--text);
    font-family: var(--head);
    font-size: 24px;
    line-height: 1.15;
}

.chips,
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.chips span,
.project-tags span {
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, .035);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    padding: 7px 10px;
    transition: color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}

.chips span:hover,
.project-tags span:hover {
    border-color: var(--green);
    color: var(--green);
    transform: translateY(-2px);
}

.project-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 16px;
    margin-top: 46px;
}

.project-card {
    position: relative;
    min-height: 308px;
    border-radius: 8px;
    padding: 30px;
    overflow: hidden;
    transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}

.project-card.featured {
    grid-row: span 2;
    min-height: 632px;
}

.project-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -40% auto;
    width: 16rem;
    height: 16rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(88, 255, 205, .14), transparent 68%);
    opacity: 0;
    transition: opacity .35s var(--ease);
}

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

.project-index {
    display: block;
    margin-bottom: 38px;
    color: rgba(88, 255, 205, .35);
    font-family: var(--head);
    font-size: 64px;
    font-weight: 800;
    line-height: .8;
}

.project-card p,
.project-card li {
    color: var(--muted);
    font-size: 15px;
}

.project-card p {
    margin-top: 16px;
}

.project-card ul {
    display: grid;
    gap: 12px;
    margin: 28px 0 0 18px;
}

.project-card a {
    display: inline-flex;
    margin-top: 24px;
    color: var(--green);
    font-weight: 800;
}

.cert-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 44px;
}

.cert-list span {
    min-height: 84px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .035);
    color: #d7e7e2;
    font-weight: 800;
    padding: 18px;
    transition: transform .28s var(--ease), border-color .28s var(--ease), color .28s var(--ease);
}

.cert-list span:hover {
    border-color: var(--green);
    color: var(--green);
    transform: translateY(-4px);
}

.contact-section {
    padding-bottom: 130px;
}

.contact-grid {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 64px;
    align-items: start;
}

.contact-title {
    margin-top: 12px;
    font-family: var(--head);
    font-size: clamp(38px, 6vw, 74px);
    font-weight: 800;
    line-height: .98;
}

.contact-copy {
    max-width: 530px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 18px;
}

.contact-links {
    display: grid;
    gap: 12px;
}

.contact-card {
    display: block;
    border-radius: 8px;
    padding: 22px;
    transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}

.contact-card strong {
    color: var(--text);
    font-size: 18px;
    word-break: break-word;
}

.footer {
    border-top: 1px solid var(--line);
    padding: 30px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.footer p {
    color: var(--soft);
    font-size: 13px;
}

.reveal,
.reveal-words span {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal.show,
.reveal-words.show span {
    opacity: 1;
    transform: translateY(0);
}

.reveal-words span:nth-child(2) {
    transition-delay: .09s;
}

@keyframes cursorBlink {
    50% { opacity: 0; }
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (max-width: 980px) {
    .nav-links {
        position: fixed;
        inset: 72px 18px auto;
        display: grid;
        gap: 6px;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(6, 8, 9, .96);
        box-shadow: var(--shadow);
        transform: translateY(-18px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s var(--ease), transform .25s var(--ease);
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        padding: 13px 14px;
    }

    .menu-btn {
        display: block;
    }

    .hero-grid,
    .split,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        gap: 46px;
    }

    .hero-visual {
        min-height: 520px;
    }

    .portrait-shell {
        margin: 0 auto;
    }

    .terminal-card {
        left: 50%;
        transform: translateX(-50%);
    }

    .metrics-grid,
    .cert-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-grid,
    .skill-matrix {
        grid-template-columns: 1fr;
    }

    .project-card.featured {
        min-height: auto;
    }
}

@media (max-width: 680px) {
    .container,
    .hero-grid {
        width: min(100% - 32px, 1160px);
    }

    .nav {
        padding: 0 16px;
    }

    .nav-actions {
        display: none;
    }

    .hero {
        padding-top: 110px;
    }

    .hero-title {
        font-size: 56px;
    }

    .hero-proof,
    .metrics-grid,
    .cert-list {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

    .hero-visual {
        min-height: 470px;
    }

    .portrait-shell {
        width: min(100%, 320px);
    }

    .terminal-card {
        bottom: 18px;
    }

    .section {
        padding: 82px 0;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .skill-panel,
    .project-card {
        padding: 24px;
    }

    .project-index {
        margin-bottom: 26px;
        font-size: 48px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    .cursor-orb {
        display: none;
    }
}
