/* ============================================
   NOCTURNE EDITORIAL — amit0hx Portfolio
   Same luxury aesthetic as vikas0vks
   ============================================ */

/* === Tokens === */
:root {
    --bg: #0d1117;
    --bg-elevated: #151b23;
    --bg-card: #1c2129;
    --bg-card-hover: #222830;
    --surface-subtle: #2a303a;

    --gold: #d4a853;
    --gold-light: #e8c47a;
    --gold-dim: #b8923f;

    --text: #e6e1d8;
    --text-secondary: #9da3ad;
    --text-muted: #6b7280;
    --text-dark: #1a1a1a;

    --border: rgba(212, 168, 83, 0.12);
    --border-subtle: rgba(255, 255, 255, 0.06);

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'DM Sans', -apple-system, sans-serif;

    --container: 1140px;
    --gutter: clamp(1.25rem, 4vw, 3rem);

    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

::selection {
    background: rgba(212, 168, 83, 0.25);
    color: var(--gold-light);
}

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

/* === Grain === */
.grain {
    position: fixed; inset: 0; z-index: 9998;
    pointer-events: none; opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat; background-size: 200px;
}

/* === Ambient Glow === */
.ambient-glow {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 15% 20%, rgba(212, 168, 83, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 85% 75%, rgba(100, 140, 200, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse 80% 40% at 50% 0%, rgba(212, 168, 83, 0.025) 0%, transparent 60%);
}

/* === Container === */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* === Typography === */
.heading-2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 500; line-height: 1.15;
    letter-spacing: -0.02em; color: var(--text);
}
.heading-2 em { color: var(--gold); font-style: italic; }

.body-text {
    font-size: 1rem; color: var(--text-secondary);
    line-height: 1.75; max-width: 580px;
}
.body-text + .body-text { margin-top: 1.25rem; }
.body-text strong { color: var(--gold); font-weight: 500; }

.label {
    display: inline-block; font-family: var(--font-sans);
    font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 1.5rem;
}

/* === Header === */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem var(--gutter);
    transition: all 0.5s var(--ease);
}

.header--scrolled {
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 0.85rem var(--gutter);
    border-bottom: 1px solid var(--border-subtle);
}

.header__brand { display: flex; align-items: center; gap: 0.65rem; }

.header__logo {
    width: 36px; height: 36px; border-radius: 50%;
    object-fit: cover; border: 1.5px solid var(--border);
}

.header__name {
    font-family: var(--font-serif); font-size: 1.1rem;
    font-weight: 500; color: var(--text); letter-spacing: -0.01em;
}

.header__nav { display: flex; align-items: center; gap: 2.5rem; }

.header__link {
    font-size: 0.8rem; font-weight: 500;
    color: var(--text-secondary); letter-spacing: 0.02em;
    position: relative; transition: color 0.3s var(--ease);
}

.header__link::after {
    content: ''; position: absolute; bottom: -4px; left: 50%;
    transform: translateX(-50%); width: 0; height: 1.5px;
    background: var(--gold); transition: width 0.4s var(--ease-out);
}

.header__link:hover { color: var(--text); }
.header__link:hover::after { width: 100%; }

.header__link--accent {
    color: var(--text-dark); background: var(--gold);
    padding: 0.5rem 1.25rem; font-weight: 600;
    transition: all 0.3s var(--ease);
}
.header__link--accent:hover { background: var(--gold-light); transform: translateY(-1px); }
.header__link--accent::after { display: none; }

.header__socials {
    display: flex; align-items: center; gap: 0.5rem;
    padding-left: 0.5rem; border-left: 1px solid var(--border-subtle);
    margin-left: -0.5rem;
}

.header__social {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; color: var(--text-muted);
    transition: all 0.3s var(--ease);
}
.header__social:hover { color: var(--gold); transform: translateY(-2px); }

.header__menu-btn {
    display: none; flex-direction: column; gap: 6px;
    background: none; border: none; cursor: pointer;
    padding: 6px; z-index: 101;
}
.header__menu-btn span {
    display: block; width: 26px; height: 1.5px;
    background: var(--text); transition: all 0.3s var(--ease);
    transform-origin: center;
}
.header__menu-btn.active span:first-child { transform: rotate(45deg) translate(3px, 5px); }
.header__menu-btn.active span:last-child { transform: rotate(-45deg) translate(3px, -5px); }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.85rem 2rem; font-family: var(--font-sans);
    font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em;
    cursor: pointer; border: none; transition: all 0.35s var(--ease);
}
.btn--solid { background: var(--gold); color: var(--text-dark); }
.btn--solid:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(212, 168, 83, 0.2); }
.btn--outline { background: transparent; color: var(--text); border: 1.5px solid rgba(255, 255, 255, 0.15); }
.btn--outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* === Hero === */
.hero {
    min-height: 100vh; display: flex; flex-direction: column;
    justify-content: center; padding: 8rem var(--gutter) 4rem;
    max-width: var(--container); margin: 0 auto;
    position: relative; z-index: 1;
}

.hero__eyebrow {
    display: flex; align-items: center; gap: 1rem;
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 2rem;
}
.hero__line-accent { display: inline-block; width: 48px; height: 1.5px; background: var(--gold); }

.hero__heading {
    font-family: var(--font-serif);
    font-size: clamp(2.8rem, 6.5vw, 5rem);
    font-weight: 500; line-height: 1.08;
    letter-spacing: -0.03em; color: var(--text);
    max-width: 800px; margin-bottom: 2rem;
}
.hero__heading em { color: var(--gold); font-style: italic; }

.hero__sub {
    font-size: 1.05rem; color: var(--text-secondary);
    max-width: 520px; line-height: 1.7; margin-bottom: 2.5rem;
}

.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__metrics {
    display: flex; gap: 3.5rem; margin-top: auto;
    padding-top: 4rem; border-top: 1px solid var(--border-subtle);
}

.metric { display: flex; flex-direction: column; }

.metric__label-top {
    font-family: var(--font-serif);
    font-size: 2.2rem; font-weight: 600;
    color: var(--gold); line-height: 1;
}

.metric__label {
    font-size: 0.8rem; color: var(--text-muted);
    margin-top: 0.5rem; line-height: 1.4;
}

/* === Marquee === */
.marquee {
    padding: 1.25rem 0; background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden; position: relative; z-index: 1;
}
.marquee__inner {
    display: flex; gap: 2rem; white-space: nowrap;
    font-family: var(--font-sans); font-size: 0.8rem;
    font-weight: 500; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-muted);
    animation: marquee 30s linear infinite; width: max-content;
}
.marquee__dot { color: var(--gold); opacity: 0.5; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* === Section === */
.section { padding: clamp(5rem, 10vw, 8rem) 0; position: relative; z-index: 1; }

/* === Split Layout === */
.split {
    display: grid; grid-template-columns: 2fr 3fr;
    gap: clamp(2rem, 6vw, 5rem); align-items: start;
}
.split__left { position: sticky; top: 6rem; }

/* === About Cards === */
.about-cards {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem; margin-top: 2.5rem;
}

.about-card {
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease-out);
}
.about-card:hover {
    border-color: rgba(212, 168, 83, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.about-card__title {
    font-family: var(--font-serif);
    font-size: 1.05rem; font-weight: 600;
    color: var(--text); margin-bottom: 1rem;
}

.about-card__list {
    list-style: none; display: flex;
    flex-direction: column; gap: 0.6rem;
}

.about-card__list li {
    font-size: 0.85rem; color: var(--text-secondary);
    line-height: 1.5; padding-left: 1rem;
    position: relative;
}
.about-card__list li::before {
    content: ''; position: absolute; left: 0; top: 0.55em;
    width: 4px; height: 4px; background: var(--gold); border-radius: 50%;
}

/* === Skills Grid === */
.skills-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem; margin-top: 2.5rem;
}

.skill-block {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease-out);
}
.skill-block:hover {
    border-color: rgba(212, 168, 83, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.skill-block__title {
    font-family: var(--font-serif);
    font-size: 1.1rem; font-weight: 600;
    color: var(--text); margin-bottom: 1.25rem;
}

.skill-block__tags {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
}

.skill-block__tags span {
    font-size: 0.75rem; font-weight: 500;
    color: var(--text-secondary);
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    transition: all 0.3s var(--ease);
}
.skill-block__tags span:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* === Projects Grid === */
.projects-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem; margin-top: 2.5rem;
}

.project-card {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease-out);
    display: flex; flex-direction: column;
}
.project-card:hover {
    border-color: rgba(212, 168, 83, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.project-card__tag {
    display: inline-block; width: fit-content;
    font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--gold); padding: 0.25rem 0.65rem;
    border: 1px solid var(--gold);
    margin-bottom: 1rem;
}

.project-card__title {
    font-family: var(--font-serif);
    font-size: 1.1rem; font-weight: 600;
    color: var(--text); margin-bottom: 0.75rem;
    line-height: 1.3;
}

.project-card__desc {
    font-size: 0.85rem; color: var(--text-secondary);
    line-height: 1.6; margin-bottom: 1rem;
}

.project-card__list {
    list-style: none; display: flex;
    flex-direction: column; gap: 0.5rem;
    margin-bottom: 1.5rem; flex-grow: 1;
}
.project-card__list li {
    font-size: 0.8rem; color: var(--text-muted);
    padding-left: 1rem; position: relative; line-height: 1.5;
}
.project-card__list li::before {
    content: ''; position: absolute; left: 0; top: 0.5em;
    width: 4px; height: 4px; background: var(--gold); border-radius: 50%;
}

.project-card__links {
    display: flex; gap: 0.65rem; margin-top: auto;
}

.project-card__link {
    font-size: 0.75rem; font-weight: 600;
    color: var(--text-muted); padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s var(--ease);
}
.project-card__link:hover {
    border-color: var(--gold); color: var(--gold);
}

/* === Bug Bounty Cards === */
.bb-card {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    transition: all 0.4s var(--ease-out);
}
.bb-card:hover {
    border-color: rgba(212, 168, 83, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.bb-card__title {
    font-family: var(--font-serif);
    font-size: 1.05rem; font-weight: 600;
    color: var(--text); margin-bottom: 1rem;
}

.bb-card__list {
    list-style: none; display: flex;
    flex-direction: column; gap: 0.6rem;
}
.bb-card__list li {
    font-size: 0.85rem; color: var(--text-secondary);
    padding-left: 1rem; position: relative; line-height: 1.5;
}
.bb-card__list li::before {
    content: ''; position: absolute; left: 0; top: 0.55em;
    width: 4px; height: 4px; background: var(--gold); border-radius: 50%;
}

.bb-card__links {
    display: flex; flex-direction: column; gap: 0.75rem;
}

.proof-link {
    display: inline-flex; align-items: center;
    font-size: 0.85rem; font-weight: 600;
    color: var(--gold); letter-spacing: 0.02em;
    transition: all 0.3s var(--ease);
}
.proof-link:hover { color: var(--gold-light); transform: translateX(4px); }

.bb-card__tip {
    margin-top: 1.25rem; font-size: 0.78rem;
    color: var(--text-muted); font-style: italic;
    line-height: 1.5;
}

/* === Contact === */
.contact { background: var(--bg-elevated); border-top: 1px solid var(--border-subtle); }
.contact__inner { text-align: center; }
.contact__inner .heading-2 { margin-bottom: 1.25rem; }
.contact__desc { max-width: 500px; margin: 0 auto 3rem; text-align: center; }

.contact__grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem;
}

.contact-card {
    display: flex; flex-direction: column; gap: 0.35rem;
    padding: 1.5rem; background: var(--bg-card);
    border: 1px solid var(--border); text-align: left;
    transition: all 0.35s var(--ease);
}
.contact-card:hover {
    border-color: var(--gold); transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.contact-card__icon {
    color: var(--gold); display: flex;
    margin-bottom: 0.5rem; opacity: 0.7;
    transition: opacity 0.3s var(--ease);
}
.contact-card:hover .contact-card__icon { opacity: 1; }

.contact-card__label {
    font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--text-muted);
}
.contact-card__value { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.contact-card:hover .contact-card__value { color: var(--gold); }

/* === Footer === */
.footer { padding: 2rem 0; border-top: 1px solid var(--border-subtle); position: relative; z-index: 1; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; }
.footer__copy { font-size: 0.75rem; color: var(--text-muted); }
.footer__links { display: flex; gap: 2rem; }
.footer__links a { font-size: 0.8rem; color: var(--text-muted); transition: color 0.3s var(--ease); }
.footer__links a:hover { color: var(--gold); }

/* === Reveal === */
.reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
    transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === Responsive === */
@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; gap: 2rem; }
    .split__left { position: static; }
    .about-cards { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .contact__grid { grid-template-columns: repeat(2, 1fr); }
    .hero__metrics { flex-wrap: wrap; gap: 2rem; }
}

@media (max-width: 640px) {
    .header__nav {
        position: fixed; top: 0; right: -100%;
        height: 100vh; width: 75%;
        flex-direction: column; justify-content: center;
        gap: 2rem; padding: 2rem;
        background: rgba(13, 17, 23, 0.97);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-subtle);
        transition: right 0.4s var(--ease-out);
    }
    .header__nav.active { right: 0; }
    .header__menu-btn { display: flex; }
    .hero__heading { font-size: 2.4rem; }
    .hero__metrics { flex-direction: column; gap: 1.5rem; }
    .contact__grid { grid-template-columns: 1fr; }
    .footer__inner { flex-direction: column; gap: 1rem; text-align: center; }
    .hero__cta { flex-direction: column; }
    .btn { width: 100%; }
}
