/* =========================================================
   MAGDI SAAD
   CYBERSECURITY PORTFOLIO
========================================================= */

:root {

    --bg: #050807;
    --bg-2: #07100d;

    --panel: rgba(7, 17, 14, .78);
    --panel-strong: rgba(3, 10, 8, .94);

    --green: #20f0a0;
    --green-2: #10c981;

    --green-soft:
        rgba(32, 240, 160, .075);

    --green-line:
        rgba(32, 240, 160, .22);

    --white: #f1f6f3;
    --text: #b8c4bf;
    --muted: #6e7c76;

    --border:
        rgba(255,255,255,.075);

    --container: 1220px;

}


* {

    margin: 0;
    padding: 0;

    box-sizing: border-box;

}


html {

    scroll-behavior: smooth;

}


body {

    min-height: 100vh;

    overflow-x: hidden;

    color: var(--white);

    background:

        radial-gradient(
            circle at 76% 18%,
            rgba(32,240,160,.075),
            transparent 27%
        ),

        radial-gradient(
            circle at 12% 68%,
            rgba(32,240,160,.035),
            transparent 30%
        ),

        var(--bg);

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    line-height: 1.6;

}


body::before {

    content: "";

    position: fixed;

    inset: 0;

    z-index: -2;

    pointer-events: none;

    background-image:

        linear-gradient(
            rgba(32,240,160,.026) 1px,
            transparent 1px
        ),

        linear-gradient(
            90deg,
            rgba(32,240,160,.026) 1px,
            transparent 1px
        );

    background-size: 55px 55px;

}


body::after {

    content: "";

    position: fixed;

    inset: 0;

    z-index: 100;

    pointer-events: none;

    opacity: .025;

    background-image:

        url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

}


a {

    color: inherit;

    text-decoration: none;

}


button {

    font: inherit;

}


img {

    max-width: 100%;

    display: block;

}


.container {

    width:
        min(
            calc(100% - 64px),
            var(--container)
        );

    margin-inline: auto;

}


/* =========================================================
   NAVIGATION
========================================================= */

.navbar {

    position: fixed;

    inset: 0 0 auto;

    z-index: 60;

    height: 76px;

    background:
        rgba(4, 8, 7, .90);

    backdrop-filter:
        blur(18px);

    border-bottom:
        1px solid
        rgba(255,255,255,.05);

}


.nav-container {

    height: 100%;

    display: flex;

    align-items: center;

    gap: 30px;

}


.brand {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-right: auto;

}


.brand-mark {

    width: 46px;
    height: 46px;

    display: grid;

    place-items: center;

    border:
        1px solid
        var(--green);

    color:
        var(--green);

    font-size: 11px;

    font-weight: 800;

}


.brand-copy strong,
.brand-copy small {

    display: block;

}


.brand-copy strong {

    font-size: 13px;

    letter-spacing: .16em;

}


.brand-copy small {

    margin-top: 1px;

    color:
        var(--muted);

    font-size: 7px;

    letter-spacing: .19em;

}


.top-nav {

    display: flex;

    align-items: center;

    gap: 29px;

}


.top-link {

    position: relative;

    color:
        #aeb9b4;

    font-size: 11px;

    transition:
        color .25s ease;

}


.top-link:hover,
.top-link.active {

    color:
        var(--green);

}


.top-link.active::after {

    content: "";

    position: absolute;

    left: 0;
    right: 0;

    bottom: -14px;

    width: 20px;

    height: 2px;

    background:
        var(--green);

}


.cv-button {

    padding:
        11px 16px;

    border:
        1px solid
        var(--green-line);

    border-radius: 4px;

    color:
        var(--green);

    font-size: 10px;

    font-weight: 800;

    transition:
        .25s ease;

}


.cv-button:hover {

    background:
        var(--green-soft);

    border-color:
        var(--green);

}


.menu-toggle {

    display: none;

    width: 40px;
    height: 40px;

    padding: 8px;

    border:
        1px solid
        var(--green-line);

    background:
        transparent;

    cursor: pointer;

}


.menu-toggle span {

    display: block;

    height: 1px;

    margin: 5px 0;

    background:
        var(--green);

}


/* =========================================================
   HERO
========================================================= */

.hero {

    position: relative;

    min-height: 100vh;

    padding-top: 126px;

    padding-bottom: 28px;

}


.hero-grid {

    position: absolute;

    inset: 76px 0 0;

    pointer-events: none;

    background:

        radial-gradient(
            circle at 70% 45%,
            rgba(32,240,160,.04),
            transparent 28%
        );

}


.hero-container {

    min-height: 585px;

    display: grid;

    grid-template-columns:
        minmax(0,.92fr)
        minmax(0,1.08fr);

    align-items: center;

    gap: 30px;

}


.hero-copy {

    position: relative;

    z-index: 10;

}


.eyebrow {

    color:
        var(--green);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .17em;

}


.eyebrow i {

    display: inline-block;

    width: 4px;
    height: 4px;

    margin:
        0 7px 2px;

    border-radius: 50%;

    background:
        var(--green);

}


.hello {

    margin-top: 45px;

    color:
        #a9b5b0;

    font-size: 20px;

}


.hero .hero-name {

    margin-top: 4px;

    font-size:
        clamp(
            60px,
            6.3vw,
            94px
        );

    line-height: .9;

    letter-spacing: -.07em;

    font-weight: 800;

}


.hero .hero-name span {

    display: block;

    color:
        var(--green);

}


.hero .hero-role {

    margin-top: 25px;

    font-size:
        clamp(
            23px,
            2.6vw,
            35px
        );

    line-height: 1.1;

    letter-spacing: -.035em;

    font-weight: 650;

}


.hero-description {

    max-width: 650px;

    margin-top: 27px;

    color:
        var(--text);

    font-size: 14px;

    line-height: 1.9;

}


.hero-actions {

    display: flex;

    flex-wrap: wrap;

    gap: 11px;

    margin-top: 31px;

}


.hero-btn {

    min-height: 51px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 18px;

    padding:
        0 22px;

    border-radius: 4px;

    font-size: 11px;

    font-weight: 800;

    cursor: pointer;

}


.hero-btn b {

    font-size: 15px;

    font-weight: 500;

}


.hero-btn.primary {

    border: 0;

    background:
        var(--green);

    color:
        #03100a;

}


.hero-btn.secondary {

    border:
        1px solid
        var(--green-line);

    background:
        rgba(5,16,13,.7);

    color:
        var(--white);

}


.hero-btn:hover {

    transform:
        translateY(-2px);

}


.social-row {

    display: flex;

    gap: 10px;

    margin-top: 31px;

}


.social-row a {

    width: 39px;
    height: 39px;

    display: grid;

    place-items: center;

    border:
        1px solid
        var(--border);

    border-radius: 50%;

    color:
        var(--muted);

    font-size: 9px;

    font-weight: 800;

}


.social-row a:hover {

    color:
        var(--green);

    border-color:
        var(--green-line);

}


/* =========================================================
   HERO HUD
========================================================= */

.hero-visual {

    position: relative;

    height: 600px;

    display: grid;

    place-items: center;

}


.ambient-glow {

    position: absolute;

    width: 460px;
    height: 460px;

    border-radius: 50%;

    background:

        radial-gradient(
            circle,
            rgba(32,240,160,.10),
            transparent 68%
        );

    filter:
        blur(8px);

}


.visual-ring {

    position: absolute;

    border-radius: 50%;

    pointer-events: none;

}


.ring-outer {

    width: 565px;
    height: 565px;

    border:
        1px solid
        rgba(32,240,160,.12);

}


.ring-middle {

    width: 470px;
    height: 470px;

    border:
        1px dashed
        rgba(32,240,160,.25);

    animation:
        rotate 28s linear infinite;

}


.ring-inner {

    width: 405px;
    height: 405px;

    border:
        1px solid
        transparent;

    border-top-color:
        rgba(32,240,160,.8);

    border-right-color:
        rgba(32,240,160,.18);

    animation:
        rotateReverse 17s linear infinite;

}


@keyframes rotate {

    to {
        transform:
            rotate(360deg);
    }

}


@keyframes rotateReverse {

    to {
        transform:
            rotate(-360deg);
    }

}


/* =========================================================
   HUD FRAME
========================================================= */

.hud-frame {

    position: absolute;

    width: 600px;
    height: 555px;

    border:
        1px solid
        rgba(32,240,160,.24);

    clip-path:
        polygon(
            13% 0,
            87% 0,
            100% 12%,
            100% 88%,
            87% 100%,
            13% 100%,
            0 88%,
            0 12%
        );

}


/* =========================================================
   PHOTO
========================================================= */

.profile-circle {

    position: relative;

    z-index: 20;

    width: 365px;
    height: 365px;

    flex-shrink: 0;

    overflow: hidden;

    border:
        2px solid
        var(--green);

    border-radius: 50%;

    background:
        #07100d;

    box-shadow:

        0 0 0 6px
        rgba(32,240,160,.04),

        0 0 0 14px
        rgba(32,240,160,.025),

        0 0 45px
        rgba(32,240,160,.20);

}


.profile-circle img {

    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    max-width: none;

    display: block;

    object-fit: cover;

    object-position:
        center 17%;

    opacity: 1;

    visibility: visible;

    filter: none;

    transform:
        scale(1.02);

}


.profile-circle::after {

    content: "";

    position: absolute;

    inset: 8px;

    z-index: 2;

    border:
        1px solid
        rgba(32,240,160,.25);

    border-radius: 50%;

    pointer-events: none;

}


/* =========================================================
   CROSSHAIRS
========================================================= */

.crosshair {

    position: absolute;

    z-index: 4;

    width: 105px;

    height: 1px;

    background:
        rgba(32,240,160,.45);

}


.crosshair::before {

    content: "";

    position: absolute;

    top: -10px;

    width: 1px;
    height: 21px;

    background:
        rgba(32,240,160,.45);

}


.crosshair-left {

    left: 55px;

}


.crosshair-left::before {

    left: 0;

}


.crosshair-right {

    right: 55px;

}


.crosshair-right::before {

    right: 0;

}


/* =========================================================
   BINARY
========================================================= */

.binary-code {

    position: absolute;

    left: 28px;

    top: 224px;

    z-index: 8;

    display: flex;

    flex-direction: column;

    gap: 5px;

    color:
        var(--green);

    font-family:
        "Courier New",
        monospace;

    font-size: 9px;

    letter-spacing: .28em;

    opacity: .68;

}


/* =========================================================
   TERMINAL
========================================================= */

.terminal-card {

    position: absolute;

    top: 57px;

    right: 0;

    z-index: 25;

    width: 250px;

    min-height: 180px;

    padding: 14px;

    border:
        1px solid
        var(--green-line);

    background:
        var(--panel-strong);

    box-shadow:
        0 20px 55px
        rgba(0,0,0,.42);

    font-family:
        "Courier New",
        monospace;

}


.terminal-head {

    padding-bottom: 10px;

    border-bottom:
        1px solid
        rgba(255,255,255,.06);

}


.terminal-dots {

    display: flex;

    gap: 6px;

}


.terminal-dots i {

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background:
        rgba(32,240,160,.68);

}


.terminal-body {

    margin-top: 10px;

    color:
        #87958f;

    font-size: 9px;

    line-height: 1.65;

}


.terminal-body p {

    margin-top: 7px;

}


.terminal-body strong {

    display: block;

    color:
        var(--green);

    font-weight: 400;

}


.terminal-body .online {

    font-weight: 800;

}


/* =========================================================
   HUD LABELS
========================================================= */

.visual-label {

    position: absolute;

    right: 2px;

    bottom: 37px;

    z-index: 12;

}


.visual-label span {

    display: block;

    color:
        var(--green);

    font-size: 8px;

    letter-spacing: .22em;

}


.visual-label strong {

    display: block;

    margin-top: 6px;

    font-size: 17px;

    line-height: 1.12;

}


.visual-side-label {

    position: absolute;

    left: 18px;

    top: 60px;

    display: flex;

    flex-direction: column;

    color:
        var(--green);

    font-size: 8px;

    line-height: 1.9;

    letter-spacing: .23em;

}


.visual-bottom-label {

    position: absolute;

    left: 35px;

    bottom: 20px;

    display: flex;

    flex-direction: column;

    color:
        rgba(32,240,160,.82);

    font-size: 8px;

    line-height: 2;

    letter-spacing: .16em;

}


/* =========================================================
   STATS
========================================================= */

.stats {

    position: relative;

    z-index: 20;

    display: grid;

    grid-template-columns:
        repeat(5,1fr);

    border:
        1px solid
        var(--green-line);

    background:
        rgba(5,15,12,.70);

}


.stat {

    min-height: 101px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding:
        16px 24px;

    border-right:
        1px solid
        var(--green-line);

}


.stat:last-child {

    border-right: 0;

}


.stat strong {

    color:
        var(--green);

    font-size: 28px;

    line-height: 1;

}


.stat span {

    margin-top: 8px;

    color:
        var(--muted);

    font-size: 8px;

    text-transform: uppercase;

    letter-spacing: .11em;

}


/* =========================================================
   SECTION SELECTOR
========================================================= */

.section-selector-wrap {

    position: relative;

    z-index: 25;

    margin-top: 18px;

}


.section-selector {

    display: grid;

    grid-template-columns:
        repeat(7,1fr);

    border:
        1px solid
        var(--green-line);

    background:
        rgba(4,12,10,.92);

}


.selector-item {

    min-height: 66px;

    padding:
        12px 13px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: flex-start;

    gap: 4px;

    border: 0;

    border-right:
        1px solid
        var(--green-line);

    background:
        transparent;

    color:
        var(--muted);

    cursor: pointer;

    text-align: left;

}


.selector-item:last-child {

    border-right: 0;

}


.selector-item small {

    color:
        rgba(32,240,160,.45);

    font-family:
        "Courier New",
        monospace;

    font-size: 8px;

}


.selector-item strong {

    color:
        #aab7b1;

    font-size: 9px;

    letter-spacing: .07em;

}


.selector-item:hover {

    background:
        rgba(32,240,160,.045);

}


.selector-item:hover strong,
.selector-item.active strong {

    color:
        var(--green);

}


.selector-item.active {

    background:
        rgba(32,240,160,.06);

    box-shadow:
        inset 0 -2px 0
        var(--green);

}


.selector-item.active small {

    color:
        var(--green);

}


/* =========================================================
   HIDDEN SECTIONS
========================================================= */

.portfolio-section {

    display: none;

    padding:
        85px 0 95px;

    border-top:
        1px solid
        rgba(255,255,255,.025);

}


.portfolio-section.visible {

    display: block;

    animation:
        reveal .45s ease both;

}


@keyframes reveal {

    from {

        opacity: 0;

        transform:
            translateY(20px);

    }

    to {

        opacity: 1;

        transform:
            translateY(0);

    }

}


/* =========================================================
   HEADINGS
========================================================= */

.section-heading {

    margin-bottom: 44px;

}


.section-heading > span {

    color:
        var(--green);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .18em;

}


.section-heading h2 {

    margin-top: 10px;

    font-size:
        clamp(
            38px,
            5vw,
            62px
        );

    line-height: .95;

    letter-spacing: -.055em;

}


/* =========================================================
   ABOUT
========================================================= */

.about-layout {

    display: grid;

    grid-template-columns:
        1.2fr .8fr;

    gap: 60px;

}


.section-lead {

    max-width: 760px;

    color:
        var(--white);

    font-size: 21px;

    line-height: 1.6;

}


.about-main p:not(.section-lead) {

    max-width: 760px;

    margin-top: 20px;

    color:
        var(--text);

    font-size: 14px;

    line-height: 1.9;

}


.fact-grid {

    display: grid;

    gap: 10px;

}


.fact {

    padding: 18px;

    border:
        1px solid
        var(--border);

    background:
        rgba(7,18,15,.55);

}


.fact span {

    display: block;

    color:
        var(--green);

    font-size: 8px;

    letter-spacing: .15em;

}


.fact strong {

    display: block;

    margin-top: 7px;

    color:
        var(--white);

    font-size: 13px;

}


/* =========================================================
   LARGE CARD
========================================================= */

.large-card {

    display: grid;

    grid-template-columns:
        90px 1fr;

    gap: 30px;

    padding: 35px;

    border:
        1px solid
        var(--green-line);

    background:
        rgba(7,18,15,.58);

}


.card-index {

    color:
        var(--green);

    font-family:
        "Courier New",
        monospace;

    font-size: 12px;

}


.kicker {

    color:
        var(--green);

    font-size: 8px;

    font-weight: 800;

    letter-spacing: .18em;

}


.large-card h3 {

    margin-top: 10px;

    font-size: 30px;

    line-height: 1.15;

}


.large-card h4 {

    margin-top: 10px;

    color:
        #c0cbc6;

    font-size: 14px;

    font-weight: 500;

}


.large-card p {

    margin-top: 17px;

    color:
        var(--text);

    font-size: 14px;

    line-height: 1.85;

}


/* =========================================================
   TAGS
========================================================= */

.tag-row {

    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 22px;

}


.tag-row span {

    padding:
        6px 9px;

    border:
        1px solid
        rgba(32,240,160,.14);

    color:
        #91a099;

    background:
        rgba(32,240,160,.025);

    font-size: 8px;

}


/* =========================================================
   PROJECTS
========================================================= */

.project-grid {

    display: grid;

    grid-template-columns:
        repeat(2,1fr);

    gap: 12px;

}


.project-card {

    min-height: 290px;

    padding: 28px;

    border:
        1px solid
        var(--border);

    background:
        rgba(7,18,15,.52);

    transition:
        .25s ease;

}


.project-card:hover {

    transform:
        translateY(-4px);

    border-color:
        var(--green-line);

}


.featured-project {

    grid-column:
        1 / -1;

    min-height: 250px;

    border-color:
        var(--green-line);

}


.project-top {

    display: flex;

    justify-content:
        space-between;

    gap: 20px;

    color:
        var(--green);

    font-size: 8px;

    letter-spacing: .15em;

}


.project-card h3 {

    margin-top: 30px;

    font-size: 27px;

    line-height: 1.12;

}


.project-card p {

    margin-top: 14px;

    color:
        var(--text);

    font-size: 13px;

    line-height: 1.85;

}


.card-link {

    display: inline-block;

    margin-top: 19px;

    color:
        var(--green);

    font-size: 10px;

    font-weight: 800;

}


/* =========================================================
   SKILLS
========================================================= */

.skills-grid {

    display: grid;

    grid-template-columns:
        repeat(2,1fr);

    gap: 12px;

}


.skill-card {

    padding: 28px;

    border:
        1px solid
        var(--border);

    background:
        rgba(7,18,15,.52);

}


.skill-card > span {

    color:
        var(--green);

    font-family:
        "Courier New",
        monospace;

    font-size: 9px;

}


.skill-card h3 {

    margin-top: 16px;

    font-size: 21px;

}


.skill-card p {

    margin-top: 10px;

    color:
        var(--text);

    font-size: 12px;

    line-height: 1.8;

}


/* =========================================================
   CERTIFICATES
========================================================= */

.certificate-grid {

    display: grid;

    grid-template-columns:
        repeat(2,1fr);

    gap: 10px;

}


.certificate-card {

    min-height: 110px;

    display: grid;

    grid-template-columns:
        42px 1fr;

    column-gap: 14px;

    align-content: center;

    padding:
        18px 20px;

    border:
        1px solid
        var(--border);

    background:
        rgba(7,18,15,.52);

}


.certificate-card span {

    grid-row:
        span 2;

    color:
        var(--green);

    font-family:
        "Courier New",
        monospace;

    font-size: 9px;

}


.certificate-card strong {

    color:
        var(--white);

    font-size: 13px;

}


.certificate-card small {

    margin-top: 3px;

    color:
        var(--muted);

    font-size: 9px;

}


/* =========================================================
   PUBLICATIONS
========================================================= */

.publication-card {

    display: grid;

    grid-template-columns:
        150px 1fr;

    gap: 35px;

    padding: 36px;

    border:
        1px solid
        var(--green-line);

    background:
        rgba(7,18,15,.58);

}


.publication-index {

    color:
        var(--green);

    font-family:
        "Courier New",
        monospace;

    font-size: 11px;

    line-height: 1.7;

    letter-spacing: .12em;

}


.publication-card h3 {

    margin-top: 10px;

    font-size: 29px;

    line-height: 1.2;

}


.publication-card p {

    margin-top: 17px;

    color:
        var(--text);

    font-size: 14px;

    line-height: 1.85;

}


/* =========================================================
   CONTACT
========================================================= */

.contact-box {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 40px;

    padding: 35px;

    border:
        1px solid
        var(--green-line);

    background:
        rgba(7,18,15,.58);

}


.contact-links {

    display: flex;

    flex-direction: column;

    gap: 13px;

}


.contact-links a {

    padding-bottom: 10px;

    border-bottom:
        1px solid
        var(--border);

    color:
        var(--green);

    font-size: 12px;

}


/* =========================================================
   SECURITYHUB CTA
========================================================= */

.hub-cta {

    margin-top: 10px;

    padding:
        52px 0;

    border-top:
        1px solid
        rgba(32,240,160,.10);

    background:

        radial-gradient(
            circle at 80% 50%,
            rgba(32,240,160,.07),
            transparent 32%
        ),

        rgba(3,10,8,.7);

}


.hub-cta-inner {

    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 40px;

}


.hub-cta-inner > div {

    max-width: 700px;

}


.hub-cta-inner > div > span {

    color:
        var(--green);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .18em;

}


.hub-cta h3 {

    margin-top: 10px;

    font-size:
        clamp(
            28px,
            3.5vw,
            42px
        );

    line-height: 1;

    letter-spacing: -.045em;

    font-weight: 700;

}


.hub-cta h3 strong {

    color:
        var(--green);

    font-weight: 700;

}


.hub-cta p {

    max-width: 600px;

    margin-top: 15px;

    color:
        var(--text);

    font-size: 12px;

    line-height: 1.75;

}


.hub-button {

    min-width: 260px;

    min-height: 58px;

    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 25px;

    padding:
        0 20px;

    border:
        1px solid
        var(--green-line);

    color:
        var(--green);

    background:
        rgba(7,19,16,.72);

    font-size: 10px;

    font-weight: 800;

}


.hub-button:hover {

    border-color:
        var(--green);

    background:
        var(--green-soft);

}


.hub-button b {

    font-size: 17px;

    font-weight: 400;

}


/* =========================================================
   FOOTER
========================================================= */

footer {

    border-top:
        1px solid
        rgba(255,255,255,.05);

    padding:
        25px 0;

    background:
        rgba(2,6,5,.8);

}


.footer-inner {

    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 20px;

}


.footer-inner strong,
.footer-inner small {

    display: block;

}


.footer-inner strong {

    font-size: 11px;

    letter-spacing: .15em;

}


.footer-inner small {

    margin-top: 3px;

    color:
        var(--muted);

    font-size: 7px;

    letter-spacing: .15em;

}


.footer-inner > a {

    color:
        var(--green);

    font-size: 9px;

    font-weight: 800;

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {


    .top-nav {

        gap: 18px;

    }


    .hero-container {

        grid-template-columns:
            1fr 1fr;

    }


    .hero-visual {

        transform:
            scale(.88);

        transform-origin:
            center;

    }


    .stats {

        grid-template-columns:
            repeat(3,1fr);

    }


    .stat:nth-child(3) {

        border-right: 0;

    }


    .stat:nth-child(n+4) {

        border-top:
            1px solid
            var(--green-line);

    }


    .section-selector {

        grid-template-columns:
            repeat(4,1fr);

    }


    .selector-item:nth-child(4) {

        border-right: 0;

    }


    .selector-item:nth-child(n+5) {

        border-top:
            1px solid
            var(--green-line);

    }

}


/* =========================================================
   TABLET / MOBILE NAV
========================================================= */

@media (max-width: 850px) {


    .top-nav {

        position: absolute;

        top: 68px;

        left: 18px;
        right: 18px;

        display: none;

        flex-direction: column;

        gap: 0;

        padding: 10px;

        background:
            rgba(4,9,8,.98);

        border:
            1px solid
            var(--green-line);

    }


    .top-nav.open {

        display: flex;

    }


    .top-link {

        padding: 13px;

        border-bottom:
            1px solid
            rgba(255,255,255,.04);

    }


    .top-link.active::after {

        display: none;

    }


    .cv-button {

        display: none;

    }


    .menu-toggle {

        display: block;

    }


    .hero {

        padding-top:
            108px;

    }


    .hero-container {

        grid-template-columns:
            1fr;

        text-align:
            center;

    }


    .hero-copy {

        display: flex;

        flex-direction: column;

        align-items: center;

    }


    .hero-description {

        margin-inline:
            auto;

    }


    .hero-visual {

        width: 100%;

        height: 590px;

        transform:
            scale(.78);

        margin-top:
            -25px;

        margin-bottom:
            -70px;

    }


    .about-layout,
    .contact-box {

        grid-template-columns:
            1fr;

    }


    .hub-cta-inner {

        flex-direction:
            column;

        align-items:
            flex-start;

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 620px) {


    .container {

        width:
            min(
                calc(100% - 36px),
                var(--container)
            );

    }


    .brand-copy {

        display: none;

    }


    .hero .hero-name {

        font-size:
            clamp(
                55px,
                17vw,
                78px
            );

    }


    .hero .hero-role {

        font-size:
            24px;

    }


    .hero-description {

        font-size:
            12px;

    }


    .hero-actions {

        width: 100%;

        flex-direction:
            column;

    }


    .hero-btn {

        width: 100%;

    }


    .hero-visual {

        width: 145%;

        height: 530px;

        transform:
            scale(.60);

        margin-left:
            -22.5%;

        margin-top:
            -45px;

        margin-bottom:
            -90px;

    }


    .stats {

        grid-template-columns:
            1fr;

    }


    .stat,
    .stat:nth-child(even) {

        border-right: 0;

        border-bottom:
            1px solid
            var(--green-line);

    }


    .stat:last-child {

        border-bottom: 0;

    }


    .section-selector {

        grid-template-columns:
            repeat(2,1fr);

    }


    .selector-item,
    .selector-item:nth-child(4) {

        border-right:
            1px solid
            var(--green-line);

        border-bottom:
            1px solid
            var(--green-line);

    }


    .selector-item:nth-child(even) {

        border-right: 0;

    }


    .selector-item:last-child {

        border-bottom: 0;

    }


    .portfolio-section {

        padding:
            65px 0 75px;

    }


    .section-heading {

        margin-bottom:
            30px;

    }


    .section-lead {

        font-size:
            17px;

    }


    .large-card,
    .publication-card {

        grid-template-columns:
            1fr;

        gap:
            18px;

        padding:
            25px;

    }


    .project-grid,
    .skills-grid,
    .certificate-grid {

        grid-template-columns:
            1fr;

    }


    .featured-project {

        grid-column:
            auto;

    }


    .project-card h3,
    .large-card h3,
    .publication-card h3 {

        font-size:
            23px;

    }


    .hub-cta {

        padding:
            42px 0;

    }


    .hub-cta h3 {

        font-size:
            29px;

    }


    .hub-button {

        width: 100%;

        min-width: 0;

    }


    .footer-inner {

        flex-direction:
            column;

        align-items:
            flex-start;

    }

}

/* =========================================================
   RESPONSIVE POLISH
   Preserves the original visual design.
========================================================= */

.hero-name {
    max-width: 100%;
    overflow-wrap: anywhere;
    transition:
        color .25s ease,
        transform .25s ease,
        text-shadow .25s ease;
}

.hero-name:hover,
.hero-name:focus-visible {
    color: var(--green);
    transform: translateY(-2px);
    text-shadow: 0 0 22px rgba(32,240,160,.12);
}

.hero-role {
    transition:
        color .25s ease,
        transform .25s ease;
}

.hero-role:hover {
    color: var(--green);
    transform: translateX(3px);
}

.selector-item,
.top-link,
.hero-btn,
.social-row a,
.cv-button,
.card-link,
.hub-button {
    -webkit-tap-highlight-color: transparent;
}

.selector-item {
    touch-action: manipulation;
    transition:
        background .25s ease,
        color .25s ease,
        box-shadow .25s ease,
        transform .2s ease;
}

.selector-item:hover,
.selector-item:focus-visible {
    transform: translateY(-2px);
}

.selector-item:active,
.hero-btn:active,
.cv-button:active,
.social-row a:active,
.hub-button:active,
.card-link:active {
    transform: scale(.98);
}

.experience-list {
    display: grid;
    gap: 18px;
}

.contact-location {
    margin-top: 18px;
    color: var(--green);
    font-size: 11px;
    letter-spacing: .08em;
}

@media (max-width: 1100px) {

    .hero-container {
        gap: 18px;
    }

    .hero-name {
        font-size: clamp(50px, 7vw, 82px);
    }

}

@media (max-width: 850px) {

    .hero-container {
        min-height: auto;
    }

    .hero-name {
        font-size: clamp(48px, 11vw, 76px);
        line-height: .93;
    }

    .hero-role {
        font-size: clamp(21px, 5vw, 30px);
    }

    .hero-description {
        width: min(100%, 620px);
    }

    .hero-visual {
        max-width: 100%;
        overflow: visible;
    }

    .large-card,
    .publication-card,
    .project-card,
    .skill-card,
    .certificate-card {
        min-width: 0;
    }

}

@media (max-width: 620px) {

    .container {
        width: calc(100% - 28px);
    }

    .hero-name {
        width: 100%;
        font-size: clamp(36px, 12.5vw, 62px);
        line-height: .95;
        letter-spacing: -.055em;
    }

    .hero-role {
        width: 100%;
        font-size: clamp(19px, 5.8vw, 25px);
        line-height: 1.12;
    }

    .hello {
        margin-top: 30px;
        font-size: 17px;
    }

    .eyebrow {
        font-size: 8px;
        letter-spacing: .12em;
    }

    .hero-description {
        font-size: 12px;
        line-height: 1.75;
    }

    .hero-actions {
        gap: 9px;
    }

    .hero-btn {
        min-height: 48px;
        padding-inline: 17px;
    }

    .social-row {
        justify-content: center;
    }

    .selector-item {
        min-height: 72px;
        padding: 12px 10px;
    }

    .selector-item strong {
        font-size: 8px;
    }

    .portfolio-section {
        overflow: hidden;
    }

    .contact-links a {
        overflow-wrap: anywhere;
    }

}

@media (hover: none) {

    .hero-name:hover,
    .hero-role:hover,
    .selector-item:hover {
        transform: none;
    }

}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

}
