/* ==========================================================================
   1. DESIGN TOKENS & BASE STYLES
   ========================================================================== */
:root {
    --bg: #03070a;
    --panel: #071218cc;
    --panel2: #0a1b22e8;
    --line: #1ce6c3;
    --cyan: #35c9ff;
    --green: #76ff9a;
    --text: #ecffff;
    --muted: #8dacb1;
    --danger: #ff5577;
    --shadow: 0 18px 70px #0009;
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 50% -20%, #0b3137 0, #03070a 42%), var(--bg);
    color: var(--text);
    font-family: Inter, Segoe UI, Arial, sans-serif;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(#0000 96%, #35c9ff10 97%), linear-gradient(90deg, #0000 96%, #76ff9a0c 97%);
    background-size: 38px 38px;
    mask-image: linear-gradient(to bottom, #000 0, #0008 70%, transparent);
    z-index: -3;
}

/* ==========================================================================
   2. GLOBAL FX & LAYOUT UTILITIES
   ========================================================================== */
.noise {
    position: fixed;
    inset: 0;
    opacity: .05;
    pointer-events: none;
    z-index: 30;
    background-image: url('../images/cross_pattern.png');
    mix-blend-mode: screen;
}

.scanline {
    position: fixed;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
    filter: drop-shadow(0 0 9px var(--line));
    animation: globalScan 8s linear infinite;
    z-index: 29;
    pointer-events: none;
}

@keyframes globalScan {
    from { top: -5%; }
    to { top: 105%; }
}

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

img {
    max-width: 100%;
    display: block;
}

.shell {
    width: min(1180px, 92vw);
    margin: auto;
}

.panel {
    background: linear-gradient(145deg, #091820dd, #061015cc);
    border: 1px solid #35c9ff22;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, #35c9ff08 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .8s;
}

.panel:hover::before {
    transform: translateX(100%);
}

.cursor {
    position: fixed;
    width: 18px;
    height: 18px;
    border: 1px solid var(--line);
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 22px #1ce6c388;
}

/* ==========================================================================
   3. NAVIGATION & BUTTONS
   ========================================================================== */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #03080bd9;
    backdrop-filter: blur(18px);
    border-bottom: 1px solid #35c9ff24;
}

.navin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}

.brand {
    font-weight: 900;
    letter-spacing: .16em;
}

.brand b {
    color: var(--line);
}

.navlinks {
    display: flex;
    gap: 25px;
    font-size: .88rem;
    color: #b5d6d9;
}

.navlinks a:hover {
    color: var(--line);
}

.status {
    display: flex;
    gap: 9px;
    align-items: center;
    font-size: .74rem;
    color: var(--green);
    border: 1px solid #76ff9a38;
    border-radius: 999px;
    padding: 8px 12px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 15px var(--green);
    animation: pulse 1.7s infinite;
}

@keyframes pulse {
    50% { opacity: .3; transform: scale(.72); }
}

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

.btn {
    padding: 13px 18px;
    border: 1px solid #35c9ff5c;
    border-radius: 10px;
    background: #081820;
    color: #eaffff;
    font-weight: 750;
    letter-spacing: .03em;
    position: relative;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-110%);
    background: linear-gradient(90deg, transparent, #35c9ff2c, transparent);
    transition: transform .5s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px #35c9ff18;
}

.btn:hover::before {
    transform: translateX(110%);
}

.btn.primary {
    background: linear-gradient(135deg, #0db69c, #168fc4);
    border-color: transparent;
}

/* ==========================================================================
   4. HERO SECTION & HOLOGRAM V6
   ========================================================================== */
.hero {
    min-height: calc(100vh - 76px);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 50px;
    align-items: center;
    padding: 72px 0;
}

.eyebrow {
    font-family: ui-monospace, Consolas, monospace;
    color: var(--line);
    letter-spacing: .18em;
    font-size: .78rem;
}

.badge-cta {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    width: fit-content;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--green);
    border: 1px solid #76ff9a38;
    border-radius: 999px;
    padding: 8px 14px;
    text-decoration: none;
    transition: transform .25s, box-shadow .25s, background .25s;
}

.badge-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px #76ff9a1e;
    background: #76ff9a10;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 6.7rem);
    line-height: .86;
    margin: 18px 0 24px;
    letter-spacing: -.07em;
}

.hero h1 .role-text {
    display: block;
    color: transparent;
    -webkit-text-stroke: 1px #92f9ff99;
    text-shadow: 0 0 30px #35c9ff25;
}

.name-cipher {
    display: inline-block;
    color: #fff;
    cursor: pointer;
    transition: text-shadow .25s;
}

.name-cipher:hover {
    text-shadow: 0 0 20px #1ce6c366;
}

.lead {
    font-size: 1.1rem;
    color: #afc8cc;
    line-height: 1.75;
    max-width: 690px;
}

.metrics {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

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

.metric small {
    color: var(--muted);
}

.hero-hud {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 28px;
    font: 700 .72rem ui-monospace, Consolas;
    color: #bceef2;
    letter-spacing: .1em;
}

.hero-hud span {
    border: 1px solid #35c9ff35;
    background: #06151caa;
    padding: 9px 12px;
    border-radius: 7px;
    box-shadow: inset 0 0 18px #35c9ff0b;
}

#liveClock {
    color: var(--green);
    min-width: 116px;
    text-align: center;
    text-shadow: 0 0 12px #76ff9a77;
}

/* Isolated Layer Hologram System */
.holo-wrap {
    perspective: 1400px;
}

.holo[data-hologram] {
    --rx: 0deg;
    --ry: 0deg;
    position: relative;
    min-height: 530px;
    border: 1px solid #35c9ff43;
    border-radius: 34px;
    background: linear-gradient(150deg, #0b2029b8, #06101570);
    box-shadow: inset 0 0 90px #35c9ff0c, var(--shadow);
    transform-style: preserve-3d;
    transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
    transition: transform .18s ease-out;
    overflow: hidden;
}

.holo-core {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    animation: holoBobV6 4.2s ease-in-out infinite;
}

@keyframes holoBobV6 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(0, -14px, 20px) scale(1.012); }
}

.holo::before,
.holo::after {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid #76ff9a25;
    border-radius: 25px;
    transform: translateZ(45px);
    pointer-events: none;
}

.holo::after {
    inset: 33px;
    border-color: #35c9ff1d;
    transform: translateZ(80px);
}

/* .portrait {
    --portrait-x: 0px;
    --portrait-y: 0px;
    position: absolute;
    inset: 70px 35px 30px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    transform: translate3d(var(--portrait-x), var(--portrait-y), 45px);
    transition: transform .18s ease-out;
    z-index: 5;
} */
 .portrait {
    --portrait-x: 0px;
    --portrait-y: 0px;
    position: absolute;
    inset: 70px 35px 30px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    transform: translate3d(var(--portrait-x), var(--portrait-y), 45px);
    transition: transform .18s ease-out;
    z-index: 5;
}

.portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #13536b55, #33c3f722 60%, transparent);
    mix-blend-mode: color;
    pointer-events: none;
    z-index: 6;
}

/* .portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(.15) contrast(1.08) drop-shadow(0 0 25px #35c9ff66);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
} */
.portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(1) contrast(1.15) brightness(1.05) drop-shadow(0 0 25px #45c6f566);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}


.holo .rings {
    --ring-x: 0px;
    --ring-y: 0px;
    position: absolute;
    inset: 8% 10%;
    border: 1px dashed #35c9ff70;
    border-radius: 50%;
    transform-origin: center;
    animation: holoRingClockwiseV6 11s linear infinite;
}

.holo .rings:nth-child(2) {
    inset: 18% 3%;
    border-color: #76ff9a40;
    animation: holoRingCounterV6 16s linear infinite;
}

@keyframes holoRingClockwiseV6 {
    from { transform: translate3d(var(--ring-x), var(--ring-y), 30px) rotateZ(0deg) rotateX(64deg); }
    to { transform: translate3d(var(--ring-x), var(--ring-y), 30px) rotateZ(360deg) rotateX(64deg); }
}

@keyframes holoRingCounterV6 {
    from { transform: translate3d(var(--ring-x), var(--ring-y), 46px) rotateZ(360deg) rotateY(62deg); }
    to { transform: translate3d(var(--ring-x), var(--ring-y), 46px) rotateZ(0deg) rotateY(62deg); }
}

.holo .hud,
.holo .holo-label {
    position: absolute;
    z-index: 15;
}

.holo .hud {
    left: 24px;
    right: 24px;
    top: 24px;
    display: flex;
    justify-content: space-between;
    font: 700 .68rem ui-monospace, Consolas;
    color: #9cfded;
    letter-spacing: .15em;
    transform: translateZ(70px);
}

.holo .hud .cipher {
    color: var(--line);
    opacity: .85;
    text-shadow: 0 0 8px #1ce6c377;
}

.holo-label {
    left: 30px;
    bottom: 22px;
    font: 700 .78rem ui-monospace, Consolas;
    color: #bceef2;
    transform: translateZ(75px);
}

.holo-label b {
    display: block;
    color: var(--green);
    font-size: 1.1rem;
    margin-top: 6px;
}

.holo-scan {
    position: absolute;
    z-index: 12;
    left: 4%;
    right: 4%;
    height: 2px;
    top: 8%;
    background: linear-gradient(90deg, transparent, #76ff9a, #35c9ff, transparent);
    box-shadow: 0 0 18px #35c9ff, 0 0 30px #76ff9a88;
    pointer-events: none;
    animation: holoScanV6 3.1s ease-in-out infinite;
}

@keyframes holoScanV6 {
    0% { top: 8%; opacity: .15; }
    45% { opacity: 1; }
    100% { top: 91%; opacity: .18; }
}

.holo-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

/* .holo-particles i {
    position: absolute;
    left: calc((var(--i) * 37) * 1%);
    top: calc((var(--i) * 53) * 1%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #79fff1;
    box-shadow: 0 0 10px #35c9ff;
    animation: holoDust calc(3s + (var(--i) * .14s)) ease-in-out infinite;
    animation-delay: calc(var(--i) * -.22s);
} */

.holo-particles i{
    position:absolute;
    width:3px;
    height:3px;
    border-radius:50%;
    background:#79fff1;
    box-shadow:0 0 10px #35c9ff;
    animation:holoDust 3s ease-in-out infinite;
}

@keyframes holoDust {
    0%, 100% { opacity: .12; transform: translateY(8px) scale(.7); }
    50% { opacity: .9; transform: translateY(-18px) scale(1.35); }
}

/* ==========================================================================
   5. SECTIONS & PORTFOLIO PIECES
   ========================================================================== */
section {
    padding: 105px 0;
    scroll-margin-top: 90px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 42px;
    gap: 20px;
}

.section-head h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -.05em;
    margin: 7px 0;
}

.section-head p {
    max-width: 530px;
    color: var(--muted);
    line-height: 1.7;
}

.section-controls {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.reveal-toggle {
    min-width: 230px;
    cursor: pointer;
}

.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity .8s, transform .8s;
}

.reveal.show {
    opacity: 1;
    transform: none;
}



/* About Grid */
#about .shell {
    position: relative;
}

.about-grid {
    display: grid;
    /* grid-template-columns: 1.2fr .8fr; */
    grid-template-columns:minmax(0,2fr) minmax(320px,1fr);
    gap: 24px;
    align-items:start;
    margin-bottom: 20px;
}

.about-photo {
    position: absolute;
    top: 12px;
    right: 10px;
    z-index: 10;
}

.about-photo img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--line);
    box-shadow: 0 0 20px var(--line), 0 0 45px #35c9ff66;
    background: #071218;
}

.terminal {
    padding: 32px;
    font-family: ui-monospace, Consolas, monospace;
    line-height: 1.8;
}

.terminal .prompt { color: var(--line); }
.terminal .value { color: #dff; }

.fact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items:start;
}

.fact {
    padding: 25px;
    min-height: 150px;
    transform-style: preserve-3d;
    transition: transform .35s;
}

.fact:hover {
    transform: rotateX(4deg) rotateY(-5deg) translateY(-6px);
}

.fact strong {
    font-size: 2rem;
    color: var(--green);
}

.fact span {
    display: block;
    color: var(--muted);
    margin-top: 10px;
}

/* Timeline/Experience */
.timeline {
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 155px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(var(--cyan), var(--green), transparent);
}

.exp {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 52px;
    margin-bottom: 22px;
    opacity: 0;
    transform: translateY(35px) rotateX(8deg);
    transition: opacity .75s, transform .75s;
}

.exp.show {
    opacity: 1;
    transform: none;
}

.exp time {
    font: 700 .8rem ui-monospace, Consolas;
    color: var(--line);
    padding-top: 25px;
}

.exp-card {
    padding: 28px;
}

.exp-card h3 {
    font-size: 1.35rem;
    margin: 0 0 6px;
}

.company {
    color: var(--green);
    font-weight: 750;
}

.exp-card li {
    color: #afc6c8;
    margin: 9px 0;
    line-height: 1.55;
}

/* Project Showcases */
.projects {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.project {
    grid-column: span 6;
    min-height: 470px;
    padding: 18px;
    transform-style: preserve-3d;
    transition: transform .35s;
}

.project.wide {
    grid-column: span 12;
}

.project-media {
    height: 285px;
    border-radius: 15px;
    background: #020609;
    overflow: hidden;
    border: 1px solid #35c9ff20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform .5s;
}

.project:hover {
    transform: perspective(900px) rotateX(2deg) rotateY(-3deg) translateY(-8px);
}

.project:hover img {
    transform: scale(1.035);
}

.project-copy {
    padding: 21px 10px 10px;
}

.project-copy h3 {
    font-size: 1.45rem;
    margin: 0 0 9px;
}

.project-copy p {
    color: var(--muted);
    line-height: 1.55;
}

.linkline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--line);
    font: 700 .75rem ui-monospace, Consolas;
    letter-spacing: .08em;
}

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

#skills .skill {
    display: flex;
    flex-direction: column;
    min-height: 390px;
    padding: 24px;
}

#skills .skill h3 {
    color: var(--line);
}

#skills .skill ul {
    padding: 0;
    list-style: none;
    color: #b8cbd0;
    line-height: 2;
    margin-top: auto;
}

.stack-counter {
    margin: 4px 0 18px;
}

.stack-percent {
    display: flex;
    align-items: flex-start;
    font-family: ui-monospace, Consolas, monospace; /* Swapped out the old serif look */
    color: #47dfdf;
    line-height: .82;
    text-shadow: 0 0 24px #ff315d33;
}

.stack-percent span {
    font-size: clamp(3.2rem, 4.6vw, 5rem);
    font-weight: 600;
}

.stack-percent b {
    font-size: 1.85rem;
    margin-top: 5px;
}

.stack-progress {
    height: 5px;
    margin: 22px 0 15px;
    border-radius: 999px;
    background: #ffffff12;
    overflow: hidden;
    box-shadow: inset 0 0 10px #0008;
    position: relative;
    overflow: hidden;
}

/* .stack-progress i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d4e1e2, #60eaff, #e18888, #f14444);
    box-shadow: 0 0 18px #35c9ff;
    transition: width 1.5s cubic-bezier(.2, .8, .2, 1);
} */

.stack-progress i {
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(90deg, #d4e1e2, #60eaff, #e18888, #f14444);
    position: relative;
}

.stack-progress i::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.8),
        transparent
    );
    animation: shine 2s linear infinite;
}

@keyframes shine {
    100% {
        left: 140%;
    }
}

.stack-counter.active .stack-progress i {
    width: calc(var(--stack-percent) * 1%);
}

.stack-counter small {
    display: block;
    color: #b8d5da;
    font: 500 .76rem/1.55 ui-monospace, Consolas, monospace;
    min-height: 36px;
}

/* Education & Certs */
.education {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.edu {
    padding: 28px;
    min-height: 230px;
}

.edu small { color: var(--line); }
.edu h3 { line-height: 1.25; }
.edu p { color: var(--muted); line-height: 1.6; }

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

.cert {
    padding: 14px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform .35s;
}

.cert:hover {
    transform: perspective(900px) rotateX(3deg) rotateY(-4deg) translateY(-7px);
}

.cert-image {
    height: 230px;
    background: #020609;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cert-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.cert h3 { font-size: 1rem; margin: 15px 8px 4px; }
.cert p { margin: 0 8px 10px; color: var(--muted); font-size: .82rem; }

/* Progressive certificate disclosure */
.cert-extra,
.journal-extra {
    display: none;
}

#certificates.expanded .cert-extra,
#journal.expanded .journal-extra {
    display: block;
    animation: revealExtra .65s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes revealExtra {
    from { opacity: 0; transform: translateY(28px) rotateX(8deg) scale(.97); }
    to { opacity: 1; transform: none; }
}

/* Journal Styles */
.journal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.journal-card {
    padding: 28px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform .35s, border-color .35s;
}

.journal-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: linear-gradient(110deg, transparent 25%, #35c9ff1d 50%, transparent 75%);
    transform: translateX(-120%);
    transition: transform .8s;
}

.journal-card:hover::before {
    transform: translateX(120%);
}

.journal-card:hover {
    transform: perspective(900px) translateY(-7px) rotateX(2deg);
    border-color: #35c9ff66;
}

.journal-meta {
    font: 700 .72rem ui-monospace, Consolas;
    color: var(--green);
    letter-spacing: .13em;
}

.journal-card h3 { margin: 12px 0 9px; font-size: 1.18rem; }
.journal-card p { margin: 0; color: var(--muted); line-height: 1.65; }

/* ==========================================================================
   6. INNER SUB-PAGES & MODALS
   ========================================================================== */
.modal {
    position: fixed;
    inset: 0;
    background: #000d;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 35px;
}

.modal.open {
    display: flex;
}

.modal img {
    max-width: min(1100px, 95vw);
    max-height: 88vh;
    object-fit: contain;
    border: 1px solid #35c9ff55;
    box-shadow: 0 0 80px #35c9ff2e;
    background: #020609;
}

.close {
    position: fixed;
    right: 28px;
    top: 22px;
    border: 1px solid #fff4;
    background: #071218;
    color: #fff;
    font-size: 1.5rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
}

.single-hero { padding: 90px 0 45px; }
.single-hero h1 { font-size: clamp(3rem, 7vw, 6rem); letter-spacing: -.06em; margin: .2em 0; }
.single-grid { display: grid; grid-template-columns: .65fr 1.35fr; gap: 24px; }

.single-meta {
    padding: 27px;
    height: max-content;
    position: sticky;
    top: 100px;
}

.single-meta dt { font: 700 .72rem ui-monospace; color: var(--line); margin-top: 19px; }
.single-meta dd { margin: 6px 0; color: #c5dadd; }
.single-content { padding: 27px; }
.single-content p { color: #b3c8cc; line-height: 1.85; }

.gallery { display: grid; gap: 18px; margin-top: 30px; }
.gallery figure { margin: 0; background: #020609; border: 1px solid #35c9ff1f; border-radius: 18px; padding: 12px; overflow: hidden; }
.gallery img { width: 100%; max-height: 680px; object-fit: contain; margin: auto; }

.achievement { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.achievement article { padding: 25px; }
.achievement h3 { color: var(--line); }

/* Contact Form Section */
.contact {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 25px;
}

.contact-card,
.form {
    padding: 30px;
}

.contact-card p { color: var(--muted); line-height: 1.7; }
.social-link { font-size: .82rem; }
.form { display: grid; gap: 13px; }

.form input,
.form textarea {
    width: 100%;
    border: 1px solid #35c9ff28;
    background: #02090d;
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    outline: none;
}

.form input:focus,
.form textarea:focus {
    border-color: var(--line);
    box-shadow: 0 0 0 3px #1ce6c315;
}

.form textarea {
    min-height: 140px;
    resize: vertical;
}

.form-status {
    margin: 0;
    min-height: 1.4em;
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.form-status.success { color: var(--green); }
.form-status.error { color: var(--danger); }

img.img-cipher {
    filter: blur(16px) contrast(2.1) brightness(1.55) hue-rotate(70deg) saturate(2.4);
    transition: filter .8s ease .8s, transform .5s;
}

img.img-cipher.decrypted {
    filter: none;
}

.plane-fly {
    position: fixed;
    z-index: 999;
    left: var(--plane-x, 50%);
    top: var(--plane-y, 50%);
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 10px #1ce6c399);
}

.plane-fly.launch {
    animation: planeLaunch 6.6s cubic-bezier(.3, .7, .2, 1) forwards;
}

@keyframes planeLaunch {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-38deg) scale(.7);
    }
    12% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-38deg) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translate(70vw, -60vh) rotate(-38deg) scale(.4);
    }
}

footer {
    padding: 30px 0;
    border-top: 1px solid #35c9ff1b;
    color: #87a7ac;
}

.footer-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.back-to-top {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: #87a7ac;
    border: 1px solid #35c9ff5c;
    border-radius: 999px;
    padding: 8px 14px;
    text-decoration: none;
    transition: transform .25s, box-shadow .25s, color .25s;
}

.back-to-top:hover {
    color: #eaffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px #35c9ff18;
}

.footer-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
}

/* ==========================================================================
   7. RESPONSIVE DESIGN & MEDIA QUERIES
   ========================================================================== */
@media(max-width:900px) {
    .navlinks { display: none; }
    .hero, .about-grid, .contact, .single-grid, .achievement { grid-template-columns: 1fr; }
    .holo[data-hologram] { min-height: 450px; }
    .skills, .education, .certs { grid-template-columns: 1fr 1fr; }
    #skills .skill { min-height: 350px; }
    .timeline::before { left: 0; }
    .exp { grid-template-columns: 1fr; gap: 5px; padding-left: 22px; }
    .project, .project.wide { grid-column: span 12; }
    .single-meta { position: relative; top: 0; }

    /* Keep the profile photo in normal flow on narrow screens so it
       can't overlap the terminal text like it does when absolutely
       positioned against the full-width shell. */
    .about-photo {
        position: static;
        width: 130px;
        margin: 0 auto 24px;
    }
    .terminal { padding-top: 28px; }
}

@media(max-width:700px) {
    .journal-grid { grid-template-columns: 1fr; }
    .hero-hud { display: grid; grid-template-columns: 1fr 1fr; }
    .hero-hud #liveClock { grid-column: 1 / -1; }
    .contact-card .actions { display: grid; grid-template-columns: 1fr 1fr; }
}

@media(max-width:600px) {
    .metrics { gap: 16px; flex-wrap: wrap; }
    .skills, .education, .certs, .fact-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 40px; }
    .holo[data-hologram] { min-height: 390px; }
    .portrait { inset: 55px 10px 20px; }
    .project-media { height: 225px; }
    .section-head { display: block; }
    .cursor { display: none; }
}

.resume-dropdown{
    position:relative;
    display:inline-block;
}

.resume-menu{
    position:absolute;
    top:110%;
    left:0;
    min-width:220px;
    background:#111;
    border:1px solid rgba(255,255,255,.1);
    border-radius:12px;
    overflow:hidden;
    opacity:0;
    visibility:hidden;
    transform:translateY(10px);
    transition:.3s;
    z-index:100;
}

.resume-dropdown:hover .resume-menu{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.resume-menu a{
    display:block;
    padding:12px 18px;
    color:#fff;
    text-decoration:none;
    transition:.25s;
}

.resume-menu a:hover{
    background:rgba(255,255,255,.08);
}

#liveClock{
    cursor:pointer;
    user-select:none;
    transition:all .25s ease;
}

#liveClock:hover{
    color:var(--cyan);
    text-shadow:0 0 10px var(--cyan);
}
@media (max-width: 700px) {
    .dot {
        display: none !important;
    }
}

/* ===== Terminal window chrome (used for Experience) ===== */
.term-window {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1.5rem;
    background: color-mix(in srgb, var(--bg) 92%, black);
}

.term-bar {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1rem;
    background: color-mix(in srgb, var(--bg) 78%, black);
    border-bottom: 1px solid var(--line);
}

.term-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.term-dot--red    { background: #ff5f56; }
.term-dot--yellow { background: #ffbd2e; }
.term-dot--green  { background: #27c93f; }

.term-title {
    margin-left: .5rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: .82rem;
    letter-spacing: .02em;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.term-body {
    padding: 1.75rem;
}

@media (max-width: 640px) {
    .term-body { padding: 1.25rem; }
    .term-title { font-size: .74rem; }
}

/* ===== Terminal dots in the nav bar ===== */
.nav-term {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-right: .85rem;
    flex-shrink: 0;
}

.nav-title {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: .78rem;
    color: var(--muted);
    margin-left: .6rem;
    margin-right: auto;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .nav-title { display: none; } /* not enough room next to nav links on mobile */
}

.nav-title {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: .78rem;
    color: var(--muted);
    margin-left: .6rem;
    white-space: nowrap;
    /* margin-right: auto;  <- remove this line */
}

.status {
    margin-left: auto; /* push just the AVAILABLE badge to the far right instead */
}

.term-dot {
    animation: dot-blink 2.4s ease-in-out infinite;
}

.term-dot--yellow { animation-delay: .3s; }
.term-dot--green  { animation-delay: .6s; }

@keyframes dot-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}