/* =========================================================
   Haridev G - portfolio
   Editorial black, one accent. Google Sans + Geist Mono.
   ========================================================= */

:root {
    /* surface */
    --bg: #08080a;
    --bg-elev: #0e0e12;
    --bg-hi: #131318;
    --line: #1e1e24;
    --line-hi: #2c2c35;

    /* ink */
    --text: #f2f2f4;
    --text-dim: #b4b4be;
    --muted: #85858f;
    --faint: #55555e;

    /* the one accent */
    --accent: #8b7bff;
    --accent-hi: #a294ff;
    --accent-soft: rgba(139, 123, 255, 0.13);

    /* type */
    --sans: "Google Sans", "Google Sans Text", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;

    /* metrics */
    --wrap: 1080px;
    --gutter: clamp(1.25rem, 5vw, 3rem);
    --nav-h: 68px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 24px);
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    font-synthesis-weight: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

::selection {
    background: var(--accent);
    color: #0b0b10;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--accent);
    color: #0b0b10;
    padding: 0.6rem 1rem;
    font-weight: 600;
    border-radius: 0 0 6px 0;
}

.skip-link:focus {
    left: 0;
}

/* ---------------------------------------------------------
   Reveal on scroll
   --------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ---------------------------------------------------------
   Nav
   --------------------------------------------------------- */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav.is-stuck {
    background: rgba(8, 8, 10, 0.72);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border-bottom-color: var(--line);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
}

.nav__mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.nav__brand .dot {
    color: var(--accent);
}

.nav__links {
    display: flex;
    gap: 2rem;
}

.nav__links a {
    position: relative;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    transition: color 0.2s var(--ease);
}

.nav__links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}

.nav__links a:hover,
.nav__links a.is-active {
    color: var(--text);
}

.nav__links a.is-active::after {
    transform: scaleX(1);
}

.nav__toggle {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

/* Both bars sit on the exact vertical centre and are offset by transform only,
   so the open state is a true X regardless of padding or border. */
.nav__toggle span {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    height: 1.5px;
    margin-top: -0.75px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.28s var(--ease);
}

.nav__toggle span:first-child {
    transform: translateY(-4px);
}

.nav__toggle span:last-child {
    transform: translateY(4px);
}

.nav__toggle[aria-expanded="true"] span:first-child {
    transform: rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:last-child {
    transform: rotate(-45deg);
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
    position: relative;
    padding-top: calc(var(--nav-h) + clamp(4rem, 13vh, 9rem));
    padding-bottom: clamp(4rem, 10vh, 7rem);
    overflow: hidden;
}

.hero::before {
    /* single soft accent bloom - the only "glow" on the page */
    content: "";
    position: absolute;
    top: -30%;
    right: -10%;
    width: min(760px, 90vw);
    aspect-ratio: 1;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 62%);
    pointer-events: none;
    z-index: -1;
}

.eyebrow {
    display: inline-flex;
    flex-wrap: wrap;
    max-width: 100%;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.75rem;
}

.pulse {
    /* stay on the first line when the eyebrow wraps on narrow screens */
    align-self: flex-start;
    margin-top: 0.42em;
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    70% {
        box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

.hero__title {
    font-size: clamp(2.6rem, 8.2vw, 5.25rem);
    line-height: 1.03;
    font-weight: 700;
    letter-spacing: -0.035em;
    margin-bottom: 1.75rem;
}

.hero__title em {
    font-style: normal;
    color: var(--accent);
}

.hero__lede {
    max-width: 46ch;
    font-size: clamp(1.02rem, 1.9vw, 1.18rem);
    color: var(--text-dim);
    margin-bottom: 2.5rem;
}

.hero__lede strong {
    color: var(--text);
    font-weight: 600;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: clamp(3.5rem, 8vh, 5.5rem);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.22s var(--ease), border-color 0.22s var(--ease),
        color 0.22s var(--ease), transform 0.22s var(--ease);
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: var(--text);
    color: #0b0b10;
}

.btn--primary:hover {
    background: #fff;
}

.btn--ghost {
    border-color: var(--line-hi);
    color: var(--text);
}

.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent-hi);
    background: var(--accent-soft);
}

/* stats row */
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 4vw, 3rem);
    border-top: 1px solid var(--line);
    padding-top: 1.75rem;
}

.stat dt {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.stat dd {
    font-size: clamp(1.7rem, 4.4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stat__unit {
    font-size: 0.5em;
    font-weight: 600;
    color: var(--muted);
    margin-left: 0.18em;
}

.stat--live dd {
    color: var(--accent);
}

/* a words stat in a row of numerals - smaller, so it sits on one line */
.stat--role dd {
    font-size: clamp(1.15rem, 2.5vw, 1.55rem);
    font-weight: 600;
    line-height: 1.25;
}

.stat__sub {
    margin-top: 0.5rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--faint);
}

.stat__tick {
    margin-top: 0.5rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--faint);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.stat__prompt {
    color: var(--accent);
    opacity: 0.75;
}

/* ---------------------------------------------------------
   Section shell
   --------------------------------------------------------- */
.section {
    padding-block: clamp(4rem, 11vh, 7.5rem);
    border-top: 1px solid var(--line);
}

.section__head {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    align-items: baseline;
    column-gap: 1rem;
    margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.section__num {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    padding-top: 0.35rem;
}

.section__title {
    font-size: clamp(1.65rem, 4.2vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.section__note {
    grid-column: 2;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

/* ---------------------------------------------------------
   Work / timeline
   --------------------------------------------------------- */
.timeline {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.job {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--bg-elev), var(--bg));
    transition: border-color 0.3s var(--ease);
}

.job:hover {
    border-color: var(--line-hi);
}

.job__org {
    display: flex;
    gap: 0.95rem;
    align-items: flex-start;
}

.job__logo {
    flex: none;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--bg-hi);
    overflow: hidden;
}

.job__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.job__logo--wordmark {
    /* Beinex ships a wordmark, not a square icon - give it room instead of cropping */
    width: auto;
    padding-inline: 0.9rem;
}

.job__logo--wordmark img {
    width: auto;
    height: 17px;
    object-fit: contain;
}

.job__id h3 {
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.job__meta {
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--muted);
    margin-top: 0.3rem;
    line-height: 1.7;
}

.job__dur {
    display: block;
    color: var(--faint);
}

.roles {
    list-style: none;
    display: grid;
    gap: 1.35rem;
}

.role {
    position: relative;
    padding-left: 1.5rem;
}

.role::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--line-hi);
}

.role:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 3px;
    top: calc(0.55em + 13px);
    bottom: -1.35rem;
    width: 1px;
    background: var(--line);
}

.role--current::before {
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.role h4 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.role--current h4 {
    color: var(--text);
}

.role__when {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

.role__dur {
    color: var(--faint);
}

.role__dur::before {
    content: "\00b7";
    margin-inline: 0.45em;
}

.role__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.role__tags span,
.card__tags span {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    border: 1px solid var(--line);
    background: var(--bg-hi);
    border-radius: 5px;
    padding: 0.16rem 0.5rem;
}

/* ---------------------------------------------------------
   Projects
   --------------------------------------------------------- */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    padding: clamp(1.5rem, 3vw, 2.15rem);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--bg-elev), var(--bg));
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.card:hover {
    border-color: var(--line-hi);
    transform: translateY(-3px);
}

.card__logo {
    height: 60px;
    display: flex;
    align-items: center;
}

.card__logo--ktu img {
    width: 52px;
    height: 52px;
}

.card__logo--bsf img {
    width: auto;
    height: 52px;
}

.card__title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.card__kicker {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 0.25rem;
    margin-bottom: 0.9rem;
}

.card__desc {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1.1rem;
}

.card__stat {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
}

.card__stat strong {
    color: var(--accent);
    font-weight: 600;
}

.link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.1rem;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--line-hi);
    padding-bottom: 2px;
    width: fit-content;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease), gap 0.2s var(--ease);
}

.link:hover {
    color: var(--accent-hi);
    border-color: var(--accent);
    gap: 0.6rem;
}

.more {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 1.4rem clamp(1.5rem, 3vw, 2.15rem);
    border: 1px solid var(--line);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.more:hover {
    border-color: var(--line-hi);
    background: var(--bg-elev);
}

.more__body {
    display: grid;
    gap: 0.2rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.more__body strong {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.015em;
}

.more__go {
    font-size: 1.2rem;
    color: var(--muted);
    transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.more:hover .more__go {
    color: var(--accent);
    transform: translate(2px, -2px);
}

/* ---------------------------------------------------------
   Stack
   --------------------------------------------------------- */
.stack__label {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 0.85rem;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid var(--line);
}

.stack__label:not(:first-child) {
    margin-top: 3rem;
}

.stack__grid {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.stack__grid li {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-elev);
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.stack__grid li:hover {
    border-color: var(--line-hi);
    background: var(--bg-hi);
}

.stack__grid--core li {
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.stack__grid--core img {
    width: 22px;
    height: 22px;
}

/* Flask / SQLAlchemy / Django ship near-black artwork - flatten them to white */
.stack__grid img.ico-lt {
    filter: brightness(0) invert(1);
    opacity: 0.88;
}

.stack__grid--rest li {
    padding: 0.42rem 0.8rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    background: transparent;
}

/* ---------------------------------------------------------
   Contact
   --------------------------------------------------------- */
.contact__lede {
    max-width: 44ch;
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    color: var(--text-dim);
    margin-bottom: 2.5rem;
}

.contact__list {
    list-style: none;
    border-top: 1px solid var(--line);
}

.contact__list a {
    display: grid;
    grid-template-columns: 7.5rem 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 0.5rem 1.15rem 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--text);
    transition: padding 0.25s var(--ease), color 0.25s var(--ease);
}

.contact__list a:hover {
    padding-left: 0.85rem;
    color: var(--accent-hi);
}

.contact__k {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.contact__v {
    font-size: clamp(1rem, 2.4vw, 1.22rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    overflow-wrap: anywhere;
}

.contact__go {
    color: var(--faint);
    transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.contact__list a:hover .contact__go {
    color: var(--accent);
    transform: translate(2px, -2px);
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.footer {
    border-top: 1px solid var(--line);
    padding-block: 2.25rem;
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--faint);
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 860px) {
    .job {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }
}

@media (max-width: 720px) {
    .nav__toggle {
        display: flex;
    }

    .nav__links {
        position: fixed;
        inset: var(--nav-h) 0 auto 0;
        flex-direction: column;
        gap: 0;
        background: rgba(8, 8, 10, 0.97);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid var(--line);
        padding: 0.5rem var(--gutter) 1.5rem;
        clip-path: inset(0 0 100% 0);
        transition: clip-path 0.35s var(--ease);
    }

    .nav__links.is-open {
        clip-path: inset(0 0 0 0);
    }

    .nav__links a {
        font-size: 1.05rem;
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--line);
        color: var(--text);
    }

    .nav__links a::after {
        display: none;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: baseline;
        border-bottom: 1px solid var(--line);
        padding-bottom: 1rem;
    }

    .stat dt {
        margin-bottom: 0;
    }

    .stat dd {
        text-align: right;
    }

    .stat__tick,
    .stat__sub {
        grid-column: 1 / -1;
        margin-top: 0.35rem;
    }

    .section__head {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .section__num {
        padding-top: 0;
    }

    .section__note {
        grid-column: 1;
    }

    .contact__list a {
        grid-template-columns: 1fr auto;
    }

    .contact__k {
        grid-column: 1 / -1;
        margin-bottom: -0.35rem;
    }
}

/* ---------------------------------------------------------
   Reduced motion
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

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

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