/* ===== Clean developer portfolio (navy / teal) ===== */
:root {
    --navy: #0a192f;
    --light-navy: #112240;
    --lightest-navy: #233554;
    --slate: #8892b0;
    --light-slate: #a8b2d1;
    --lightest-slate: #ccd6f6;
    --white: #e6f1ff;
    --green: #64ffda;
    --green-tint: rgba(100, 255, 218, 0.1);
    --border: #233554;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --nav-h: 80px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Scroll progress bar ===== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), #0ea5e9, var(--green));
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
    z-index: 200;
    width: 0%;
    transition: width 0.1s linear;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== Cursor glow spotlight ===== */
#cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle, rgba(100, 255, 218, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s;
    opacity: 0;
}
#cursor-glow.visible {
    opacity: 1;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--navy);
    color: var(--slate);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    cursor: none;
}

/* ===== Custom Cursor ===== */
#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
}
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background: var(--green);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    transition: width 0.2s var(--ease-out-expo), height 0.2s var(--ease-out-expo), background 0.2s, opacity 0.2s;
    box-shadow:
        0 0 8px rgba(100, 255, 218, 0.6),
        0 0 20px rgba(100, 255, 218, 0.3),
        0 0 40px rgba(100, 255, 218, 0.1);
    mix-blend-mode: screen;
}
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.35s var(--ease-out-expo), height 0.35s var(--ease-out-expo),
                border-radius 0.35s var(--ease-out-expo), background 0.25s, opacity 0.2s;
    background-image: conic-gradient(
        from var(--ring-angle, 0deg),
        var(--green),
        rgba(14, 165, 233, 0.8),
        rgba(100, 255, 218, 0.2),
        rgba(14, 165, 233, 0.8),
        var(--green)
    );
    background-origin: border-box;
    background-clip: border-box;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 2px;
    animation: cursorRingSpin 4s linear infinite;
}
@keyframes cursorRingSpin {
    to { --ring-angle: 360deg; }
}
@property --ring-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
/* Hover state — expand + morph */
.cursor-dot.hover {
    width: 6px;
    height: 6px;
    background: #fff;
    box-shadow:
        0 0 12px rgba(100, 255, 218, 0.9),
        0 0 30px rgba(100, 255, 218, 0.5),
        0 0 60px rgba(100, 255, 218, 0.2);
}
.cursor-ring.hover {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    animation: cursorRingSpin 2s linear infinite, cursorPulse 1.5s ease-in-out infinite;
}
@keyframes cursorPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
/* Click state — shrink burst */
.cursor-dot.click {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 20px rgba(100, 255, 218, 1),
        0 0 50px rgba(100, 255, 218, 0.6);
}
.cursor-ring.click {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    opacity: 0.4;
}
/* Text cursor state */
.cursor-dot.text {
    width: 3px;
    height: 24px;
    border-radius: 2px;
    background: var(--green);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}
.cursor-ring.text {
    width: 30px;
    height: 34px;
    border-radius: 8px;
}
/* Ensure native cursors are hidden */
a, button, .btn, .tab, .card, .feature-img-link {
    cursor: none !important;
}
input, textarea, select {
    cursor: none !important;
}
/* Hide on mobile and touch devices */
@media (max-width: 768px), (pointer: coarse), (hover: none) {
    .cursor-dot, .cursor-ring, #cursor-trail {
        display: none !important;
    }
    body, a, button, .btn, .tab, .card, .feature-img-link, input, textarea, select {
        cursor: auto !important;
    }
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--green);
}
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 4px;
}
ul {
    list-style: none;
}
img {
    max-width: 100%;
    display: block;
}

::selection {
    background: var(--green-tint);
}

::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: var(--navy);
}
::-webkit-scrollbar-thumb {
    background: var(--lightest-navy);
    border-radius: 6px;
}

/* ===== Side rails ===== */
.side {
    position: fixed;
    bottom: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: var(--light-slate);
}
.side-left {
    left: 40px;
    animation: sideSlideLeft 0.8s var(--ease-out-expo) 1.2s both;
}
.side-right {
    right: 40px;
    animation: sideSlideRight 0.8s var(--ease-out-expo) 1.4s both;
}
@keyframes sideSlideLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes sideSlideRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.side ul {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.side a {
    color: var(--light-slate);
    font-size: 12px;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    transition: color 0.25s, transform 0.25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.side a:hover {
    color: var(--green);
    transform: translateY(-3px);
}
.side a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.side-right a {
    writing-mode: vertical-rl;
    letter-spacing: 2px;
}
.side-line {
    width: 1px;
    height: 90px;
    background: var(--light-slate);
    animation: lineGrow 0.6s var(--ease-out-expo) 1.6s both;
}
@keyframes lineGrow {
    from { height: 0; }
    to   { height: 90px; }
}

/* ===== Header / nav ===== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    transition:
        box-shadow 0.3s,
        height 0.3s,
        transform 0.4s var(--ease-out-expo);
    animation: headerDrop 0.6s var(--ease-out-expo) 0.2s both;
}
@keyframes headerDrop {
    from { opacity: 0; transform: translateY(-100%); }
    to   { opacity: 1; transform: translateY(0); }
}
#header.scrolled {
    height: 66px;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}
#header.hide-nav {
    transform: translateY(-100%);
}
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 2px solid var(--green);
    border-radius: 6px;
    color: var(--green);
    font-weight: 700;
    font-family: var(--font-mono);
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.logo:hover {
    background: var(--green-tint);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.15);
}
#header nav {
    display: flex;
    align-items: center;
    gap: 30px;
}
#header ol {
    display: flex;
    gap: 26px;
    counter-reset: item;
}
#header ol li {
    animation: navItemDrop 0.5s var(--ease-out-expo) both;
}
#header ol li:nth-child(1) { animation-delay: 0.3s; }
#header ol li:nth-child(2) { animation-delay: 0.4s; }
#header ol li:nth-child(3) { animation-delay: 0.5s; }
#header ol li:nth-child(4) { animation-delay: 0.6s; }
@keyframes navItemDrop {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
#header ol a {
    color: var(--lightest-slate);
    font-size: 13px;
    font-family: var(--font-mono);
    transition: color 0.2s;
    position: relative;
}
#header ol a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--green);
    transition: width 0.3s var(--ease-out-expo);
}
#header ol a:hover::after,
#header ol a.active::after {
    width: 100%;
}
#header ol a span {
    color: var(--green);
    margin-right: 5px;
}
#header ol a:hover,
#header ol a.active {
    color: var(--green);
}
.btn {
    border: 1px solid var(--green);
    color: var(--green);
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-family: var(--font-mono);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--green);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}
.btn:hover {
    background: var(--green-tint);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.12);
    transform: translateY(-1px);
}
.resume-btn {
    animation: navItemDrop 0.5s var(--ease-out-expo) 0.7s both;
}

#menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
#menu-toggle span {
    width: 26px;
    height: 2px;
    background: var(--green);
    transition: 0.3s;
}
#menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
#menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
#menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* mobile menu */
#mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 340px;
    height: 100vh;
    background: var(--light-navy);
    box-shadow: -10px 0 30px -15px rgba(2, 12, 27, 0.7);
    z-index: 99;
    transform: translateX(105%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
#mobile-menu.open {
    transform: translateX(0);
}
body.menu-open {
    overflow: hidden;
}
#mobile-menu ol {
    display: flex;
    flex-direction: column;
    gap: 28px;
    text-align: center;
    margin-bottom: 40px;
    counter-reset: item;
}
#mobile-menu a {
    font-size: 16px;
    color: var(--lightest-slate);
}
#mobile-menu span {
    display: block;
    color: var(--green);
    font-size: 13px;
    font-family: var(--font-mono);
    margin-bottom: 4px;
}
#mobile-menu nav {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== Layout ===== */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 100px;
}
.section {
    padding: 100px 0;
}
.section.narrow {
    max-width: 700px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: clamp(20px, 3vw, 26px);
    color: var(--lightest-slate);
    font-weight: 600;
    margin-bottom: 42px;
    white-space: nowrap;
}
.section-title .num {
    color: var(--green);
    font-size: 16px;
    font-family: var(--font-mono);
    font-weight: 400;
}
.section-title .rule {
    height: 1px;
    background: var(--lightest-navy);
    width: 100%;
    max-width: 300px;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.8s var(--ease-out-expo) 0.3s;
}
.section-title.reveal.in .rule {
    transform: scaleX(1);
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}
.hero .tag {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 15px;
    margin-bottom: 24px;
}
.big {
    font-weight: 700;
    line-height: 1.08;
}
.hero .name {
    font-size: clamp(32px, 6vw, 56px);
    color: var(--lightest-slate);
    background: linear-gradient(
        90deg,
        var(--lightest-slate) 0%,
        var(--green) 50%,
        var(--lightest-slate) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 4s ease-in-out infinite;
}
@keyframes textShimmer {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 200% center; }
}
.hero .sub {
    font-size: clamp(28px, 6vw, 52px);
    color: var(--slate);
    margin-top: 4px;
    perspective: 1000px;
}
#typewriter {
    display: inline-block;
    color: var(--green);
    transform-origin: center bottom;
    transition: transform 0.25s var(--ease-out-expo), opacity 0.25s ease, filter 0.25s ease;
    will-change: transform, opacity;
}
#typewriter.flip-out {
    opacity: 0;
    transform: rotateX(-90deg) translateY(-10px);
    filter: blur(4px);
}
#typewriter.flip-in {
    opacity: 1;
    transform: rotateX(0deg) translateY(0);
    filter: blur(0);
}
.hero-desc {
    max-width: 540px;
    margin: 24px 0 44px;
    color: var(--slate);
}
.big-btn {
    display: inline-block;
    padding: 16px 26px;
    font-size: 14px;
    animation: pulseGlow 3s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(100, 255, 218, 0); }
    50%      { box-shadow: 0 0 20px 2px rgba(100, 255, 218, 0.15); }
}

/* ===== About ===== */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
}
.about-grid p {
    margin-bottom: 16px;
}
.hl {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 14px;
}
.tech-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 16px;
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: 13px;
}
.tech-list li {
    position: relative;
    padding-left: 20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.4s, transform 0.4s var(--ease-out-expo);
}
.about-grid.reveal.in .tech-list li {
    opacity: 1;
    transform: translateX(0);
}
.about-grid.reveal.in .tech-list li:nth-child(1) { transition-delay: 0.3s; }
.about-grid.reveal.in .tech-list li:nth-child(2) { transition-delay: 0.38s; }
.about-grid.reveal.in .tech-list li:nth-child(3) { transition-delay: 0.46s; }
.about-grid.reveal.in .tech-list li:nth-child(4) { transition-delay: 0.54s; }
.about-grid.reveal.in .tech-list li:nth-child(5) { transition-delay: 0.62s; }
.about-grid.reveal.in .tech-list li:nth-child(6) { transition-delay: 0.7s; }
.about-grid.reveal.in .tech-list li:nth-child(7) { transition-delay: 0.78s; }
.about-grid.reveal.in .tech-list li:nth-child(8) { transition-delay: 0.86s; }
.about-grid.reveal.in .tech-list li:nth-child(9) { transition-delay: 0.94s; }
.tech-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--green);
}
.tech-list li:hover {
    color: var(--green);
    transform: translateX(4px);
    transition-delay: 0s !important;
}

.about-photo {
    position: relative;
    max-width: 300px;
}
.photo-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: visible;
    border-radius: 6px;
    transition: transform 0.4s var(--ease-out-expo);
    animation: floatPhoto 6s ease-in-out infinite;
}
@keyframes floatPhoto {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 58%;
    border-radius: 6px;
    filter: grayscale(100%) contrast(1.05);
    transition: filter 0.4s, transform 0.4s var(--ease-out-expo);
    position: relative;
    z-index: 2;
}
.photo-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid var(--green);
    border-radius: 6px;
    transform: translate(16px, 16px);
    transition: transform 0.4s var(--ease-out-expo);
    z-index: 1;
}
.photo-frame:hover {
    animation-play-state: paused;
    transform: translate(-4px, -4px);
}
.photo-frame:hover img {
    filter: none;
    transform: scale(1.02);
}
.photo-frame:hover::after {
    transform: translate(12px, 12px);
}

/* ===== Experience ===== */
.jobs {
    display: flex;
    gap: 24px;
}
.tabs {
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--lightest-navy);
    min-width: 150px;
}
.tab {
    background: none;
    border: none;
    color: var(--slate);
    font-family: var(--font-mono);
    font-size: 13px;
    text-align: left;
    padding: 12px 20px;
    cursor: pointer;
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}
.tab:hover {
    color: var(--green);
    background: var(--green-tint);
}
.tab.active {
    color: var(--green);
    border-left-color: var(--green);
    background: var(--green-tint);
}
.panel {
    display: none;
}
.panel.active {
    display: block;
    animation: panelSlide 0.4s var(--ease-out-expo);
}
@keyframes panelSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ===== Services ===== */
.services-section { padding-top: 80px; padding-bottom: 120px; }
.services-intro { display: grid; grid-template-columns: 1.1fr .9fr; gap: 80px; align-items: end; margin: 46px 0 42px; }
.services-kicker { color: var(--green); font-family: var(--font-mono); font-size: 13px; margin: 0 0 12px; }
.services-intro h2 { color: var(--lightest-slate); font-size: clamp(30px, 4vw, 46px); line-height: 1.12; letter-spacing: -1px; margin: 0; font-weight: 600; }
.services-intro h2 span { color: var(--green); }
.services-lead { color: var(--light-slate); font-size: 16px; line-height: 1.75; margin: 0 0 3px; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service-card { display: flex; flex-direction: column; min-height: 385px; padding: 28px 25px 24px; background: rgba(17, 34, 64, .78); border: 1px solid rgba(35, 53, 84, .9); border-radius: 7px; transition: transform .35s var(--ease-out-expo), border-color .3s, box-shadow .35s; }
.service-card:hover { transform: translateY(-7px); border-color: rgba(100, 255, 218, .55); box-shadow: 0 18px 35px -20px rgba(2, 12, 27, .9); }
.service-card-featured { border-color: rgba(100, 255, 218, .4); background: linear-gradient(145deg, rgba(22, 52, 78, .95), rgba(17, 34, 64, .8)); }
.service-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.service-index { color: var(--green); font-family: var(--font-mono); font-size: 12px; }
.service-icon { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid rgba(100, 255, 218, .35); border-radius: 50%; color: var(--green); font-size: 18px; }
.service-card h4 { color: var(--lightest-slate); font-size: 20px; font-weight: 600; line-height: 1.25; margin: 0 0 14px; }
.service-card p { color: var(--light-slate); font-size: 14px; line-height: 1.65; margin: 0; }
.service-card ul { margin: 24px 0 28px; padding: 0; }
.service-card li { color: var(--slate); font-family: var(--font-mono); font-size: 11px; margin-bottom: 9px; padding-left: 17px; position: relative; }
.service-card li::before { content: "▹"; color: var(--green); left: 0; position: absolute; }
.service-link { color: var(--green); font-family: var(--font-mono); font-size: 12px; margin-top: auto; }
.service-link span, .services-note a span { display: inline-block; margin-left: 7px; transition: transform .25s; }
.service-link:hover span, .services-note a:hover span { transform: translateX(4px); }
.services-note { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 18px 20px; border: 1px dashed var(--lightest-navy); border-radius: 6px; }
.services-note-mark { display: grid; place-items: center; flex: 0 0 auto; width: 23px; height: 23px; border: 1px solid var(--green); border-radius: 50%; color: var(--green); font-family: var(--font-mono); font-size: 12px; }
.services-note p { color: var(--slate); font-size: 13px; margin: 0 auto 0 0; }
.services-note a { color: var(--green); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }

.panel h4 {
    font-size: 20px;
    color: var(--lightest-slate);
    font-weight: 500;
}
.panel .at {
    color: var(--green);
}
.panel .range {
    color: var(--slate);
    font-size: 13px;
    font-family: var(--font-mono);
    margin: 4px 0 18px;
}
.bullets li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
    font-size: 15px;
    transition: transform 0.2s, color 0.2s;
}
.bullets li:hover {
    transform: translateX(4px);
    color: var(--lightest-slate);
}
.bullets li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--green);
    transition: transform 0.2s;
}
.bullets li:hover::before {
    transform: translateX(2px);
}

/* ===== Featured projects ===== */
.feature {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
    margin-bottom: 110px;
}
.feature.reveal {
    opacity: 0;
    transform: translateX(-40px);
}
.feature.reverse.reveal {
    transform: translateX(40px);
}
.feature.reveal.in {
    animation: featureSlideIn 0.8s var(--ease-out-expo) forwards;
}
.feature.reverse.reveal.in {
    animation: featureSlideInReverse 0.8s var(--ease-out-expo) forwards;
}
@keyframes featureSlideIn {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes featureSlideInReverse {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
.feature:last-of-type {
    margin-bottom: 0;
}

.feature-img {
    grid-column: 1 / 8;
    grid-row: 1 / -1;
    position: relative;
    border-radius: 6px;
}
.feature-img-link {
    display: block;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: var(--light-navy);
    aspect-ratio: 16 / 10;
}
.feature-img-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 25, 47, 0.5);
    mix-blend-mode: screen;
    transition: background 0.4s;
}
.feature-img-link:hover::after {
    background: transparent;
}
.feature-img img {
    border-radius: 6px;
    filter: grayscale(60%) contrast(1);
    transition: filter 0.4s, transform 0.6s var(--ease-out-expo);
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.feature-img-link:hover img {
    filter: none;
    transform: scale(1.03);
}

.feature-text {
    grid-column: 7 / -1;
    grid-row: 1 / -1;
    text-align: right;
    position: relative;
    z-index: 3;
}
.feature-label {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 13px;
    margin-bottom: 10px;
}
.feature.reverse .feature-label {
    justify-content: flex-end;
}
.feature-num {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
    letter-spacing: 1px;
    opacity: 0.85;
}
.feature-num::after {
    content: "";
    display: inline-block;
    width: 26px;
    height: 1px;
    margin-left: 10px;
    vertical-align: middle;
    background: var(--green);
    opacity: 0.5;
}
@media (max-width: 900px) {
    .feature.reverse .feature-label {
        justify-content: flex-start;
    }
}
.feature-title {
    font-size: clamp(20px, 2.5vw, 24px);
    color: var(--lightest-slate);
    margin-bottom: 22px;
}
.feature-title a {
    color: inherit;
}
.feature-title a:hover {
    color: var(--green);
}
.feature-desc {
    background: var(--light-navy);
    border-radius: 6px;
    padding: 24px;
    color: var(--light-slate);
    font-size: 15px;
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}
.feature-tech {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 18px;
    margin: 22px 0 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--light-slate);
}
.feature-links {
    display: flex;
    justify-content: flex-end;
    gap: 18px;
}
.project-status {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 12px;
}
.feature-links a {
    color: var(--lightest-slate);
    display: inline-flex;
    transition: color 0.2s, transform 0.3s var(--ease-out-expo);
}
.feature-links a:hover {
    color: var(--green);
    transform: translateY(-3px);
}

/* reversed layout */
.feature.reverse .feature-img {
    grid-column: 6 / -1;
}
.feature.reverse .feature-text {
    grid-column: 1 / 7;
    text-align: left;
}
.feature.reverse .feature-tech {
    justify-content: flex-start;
}
.feature.reverse .feature-links {
    justify-content: flex-start;
}

/* ===== Other noteworthy ===== */
.section.other {
    text-align: center;
}
.other-title {
    font-size: clamp(22px, 4vw, 28px);
    color: var(--lightest-slate);
    font-weight: 600;
}
.archive-link {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 14px;
    margin: 12px 0 50px;
}
.archive-link:hover {
    text-decoration: underline;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    text-align: left;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--light-navy);
    border-radius: 6px;
    border-top: 3px solid transparent;
    padding: 32px 28px;
    color: var(--light-slate);
    transition:
        transform 0.4s var(--ease-out-expo),
        box-shadow 0.4s var(--ease-out-expo),
        border-color 0.3s,
        background 0.3s;
    will-change: transform;
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.4);
}
.card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow:
        0 20px 35px -10px rgba(2, 12, 27, 0.6),
        0 0 15px 1px rgba(100, 255, 218, 0.08);
    border-top-color: var(--green);
    background: #172a45;
}
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}
.folder {
    color: var(--green);
    display: inline-flex;
    transition: transform 0.3s;
}
.card:hover .folder {
    transform: rotate(-6deg) scale(1.08);
}
.card-links {
    display: flex;
    gap: 14px;
}
.card-links a {
    color: var(--light-slate);
    display: inline-flex;
    transition: color 0.2s, transform 0.2s;
}
.card-links a:hover {
    color: var(--green);
    transform: translateY(-2px);
}
.card h4 {
    font-size: 18px;
    margin-bottom: 12px;
}
.card h4 a {
    color: var(--lightest-slate);
    transition: color 0.2s;
}
.card:hover h4 a {
    color: var(--green);
}
.card p {
    font-size: 15px;
    color: var(--slate);
    flex-grow: 1;
    line-height: 1.7;
}
.card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid var(--lightest-navy);
}
.card-tech li {
    font-size: 12px;
    color: var(--slate);
    font-family: var(--font-mono);
}

/* ===== Entrance animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
.reveal {
    opacity: 0;
}
.reveal.in {
    animation: fadeUp 0.7s var(--ease-out-expo) forwards;
}
.hero .reveal.in {
    animation-duration: 0.8s;
}
[data-delay="1"].in {
    animation-delay: 0.1s;
}
[data-delay="2"].in {
    animation-delay: 0.2s;
}
[data-delay="3"].in {
    animation-delay: 0.3s;
}
[data-delay="4"].in {
    animation-delay: 0.4s;
}
[data-delay="5"].in {
    animation-delay: 0.5s;
}
[data-delay="6"].in {
    animation-delay: 0.6s;
}

/* ===== Alternative reveal directions ===== */
@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: none; }
}
@keyframes fadeRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: none; }
}
@keyframes fadeScale {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.reveal-left.in {
    animation: fadeLeft 0.7s var(--ease-out-expo) forwards;
}
.reveal-right.in {
    animation: fadeRight 0.7s var(--ease-out-expo) forwards;
}
.reveal-scale.in {
    animation: fadeScale 0.6s var(--ease-out-expo) forwards;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    #cursor-glow, #cursor-trail, .cursor-dot, .cursor-ring {
        display: none !important;
    }
    body, a, button, .btn, .tab, .card, .feature-img-link {
        cursor: auto !important;
    }
    .reveal, .reveal.in,
    .reveal-left, .reveal-left.in,
    .reveal-right, .reveal-right.in,
    .reveal-scale, .reveal-scale.in {
        opacity: 1;
        animation: none;
    }
    .tech-list li {
        opacity: 1;
        transform: none;
    }
    .photo-frame {
        animation: none;
    }
    .hero .name {
        -webkit-text-fill-color: var(--lightest-slate);
        animation: none;
    }
    .big-btn {
        animation: none;
    }
    .side-left, .side-right, .side-line,
    #header, .resume-btn, #header ol li {
        animation: none;
        opacity: 1;
    }
}

/* ===== Contact ===== */
.contact {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 120px 0;
}
.contact-num {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 14px;
    margin-bottom: 20px;
}
.contact-title {
    font-size: clamp(32px, 5vw, 46px);
    color: var(--lightest-slate);
    margin-bottom: 20px;
}
.contact-title.reveal.in {
    animation: fadeScale 0.7s var(--ease-out-expo) forwards;
}
.contact-desc {
    color: var(--slate);
    margin-bottom: 40px;
}

/* ===== Contact Form Styling ===== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto 30px auto;
    text-align: left;
    background: var(--light-navy);
    padding: 30px;
    border-radius: 6px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}
.contact-form:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -10px rgba(2, 12, 27, 0.6), 0 0 15px rgba(100, 255, 218, 0.05);
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--green);
    letter-spacing: 0.5px;
}
.form-control {
    background: var(--navy);
    border: 1.5px solid var(--border);
    border-radius: 4px;
    padding: 12px 16px;
    color: var(--lightest-slate);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.form-control:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.1);
}
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}
.submit-btn-container {
    display: flex;
    justify-content: flex-end;
}
.form-status {
    font-family: var(--font-mono);
    font-size: 13px;
    margin-top: 15px;
    text-align: center;
    min-height: 20px;
    transition: opacity 0.3s;
}
.form-status.success {
    color: var(--green);
}
.form-status.error {
    color: #f43f5e;
}
.form-status.info {
    color: #38bdf8;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 32px 26px;
    color: var(--light-slate);
    font-size: 12px;
    font-family: var(--font-mono);
    border-top: 1px solid var(--lightest-navy);
}
footer p {
    transition: color 0.2s;
}
footer:hover p {
    color: var(--green);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    main {
        padding: 0 40px;
    }
    #header {
        padding: 0 30px;
    }
    #header ol,
    .resume-btn {
        display: none;
    }
    #menu-toggle {
        display: flex;
        z-index: 101;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-photo {
        justify-self: center;
        margin-top: 20px;
    }
    .side {
        display: none;
    }
    /* stack featured projects */
    .feature {
        display: block;
        margin-bottom: 70px;
        position: relative;
    }
    .feature-img,
    .feature.reverse .feature-img {
        grid-column: 1 / -1;
    }
    .feature-img-link::after {
        background: rgba(10, 25, 47, 0.7);
    }
    .feature-text,
    .feature.reverse .feature-text {
        grid-column: 1 / -1;
        text-align: left;
        padding: 24px 0 0;
    }
    .feature-desc {
        background: transparent;
        box-shadow: none;
        padding: 0;
    }
    .feature-tech,
    .feature.reverse .feature-tech {
        justify-content: flex-start;
        margin-top: 16px;
    }
    .feature-links,
    .feature.reverse .feature-links {
        justify-content: flex-start;
    }
    .services-intro {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .service-grid {
        grid-template-columns: 1fr;
    }
    .service-card {
        min-height: 0;
    }
    .photo-frame::after {
        transform: translate(10px, 10px);
    }
    .photo-frame:hover::after {
        transform: translate(8px, 8px);
    }
}
@media (max-width: 600px) {
    main {
        padding: 0 24px;
    }
    #header {
        padding: 0 20px;
    }
    .jobs {
        flex-direction: column;
    }
    .services-section {
        padding-top: 55px;
        padding-bottom: 80px;
    }
    .services-intro {
        margin-top: 32px;
    }
    .services-lead {
        font-size: 15px;
    }
    .services-note {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .services-note p {
        flex: 1 1 calc(100% - 45px);
    }
    .services-note a {
        margin-left: 37px;
    }
    .tabs {
        flex-direction: row;
        border-left: none;
        border-bottom: 2px solid var(--lightest-navy);
        overflow-x: auto;
        min-width: 0;
    }
    .tab {
        border-left: none;
        border-bottom: 2px solid transparent;
        margin-left: 0;
        margin-bottom: -2px;
    }
    .tab.active {
        border-left: none;
        border-bottom-color: var(--green);
    }
    .tech-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
