/* ═══════════════════════════════════════════════════════
   NISHANT RAJORA | PORTFOLIO — style.css
   Aesthetic: engineering datasheet / blueprint precision
   ═══════════════════════════════════════════════════════ */

:root {
    --paper: #EEF2F6;
    --surface: #FFFFFF;
    --ink: #10182A;
    --muted: #5B6472;
    --line: rgba(16, 24, 42, 0.12);
    --line-strong: rgba(16, 24, 42, 0.22);

    --signal: #1F4FA6;
    --signal-dim: rgba(31, 79, 166, 0.08);
    --amber: #C2792B;
    --amber-dim: rgba(194, 121, 43, 0.12);

    --font-display: 'Fraunces', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@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;
    }
}

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ── FAINT BLUEPRINT GRID ── */
#grid-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 1;
}

/* ═══════════════════════ NAVBAR ═══════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    height: 68px;
    backdrop-filter: blur(10px);
    background: rgba(238, 242, 246, 0.85);
    border-bottom: 1px solid var(--line);
    transition: background .3s;
}

.navbar.scrolled {
    background: rgba(238, 242, 246, 0.97);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 34px;
}

.nav-links a {
    text-decoration: none;
    font-size: 14px;
    color: var(--muted);
    transition: color .2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--signal);
    transition: width .25s var(--ease);
}

.nav-links a:hover {
    color: var(--ink);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--amber);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 20px 6%;
    gap: 18px;
    z-index: 999;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    text-decoration: none;
    font-size: 15px;
    color: var(--muted);
}

.mobile-menu a:hover {
    color: var(--ink);
}

/* ═══════════════════════ HERO ═══════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 68px 6% 56px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 72px;
    flex: 1;
    padding-top: 32px;
}

.hero-left {
    flex: 1.05;
    max-width: 620px;
}

.kicker {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--signal);
    margin-bottom: 22px;
    letter-spacing: 0.02em;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(40px, 5.4vw, 64px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin-bottom: 26px;
    color: var(--ink);
}

.hero-name-accent {
    font-style: italic;
    font-weight: 500;
    color: var(--signal);
}

.hero-desc {
    max-width: 480px;
    font-size: 16px;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 36px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 13px 26px;
    background: var(--ink);
    color: var(--paper);
    font-size: 14px;
    font-weight: 500;
    border-radius: 3px;
    text-decoration: none;
    transition: background .2s, transform .2s var(--ease);
}

.btn-primary:hover {
    background: var(--signal);
    transform: translateY(-2px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 13px 26px;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    border-radius: 3px;
    text-decoration: none;
    transition: border-color .2s, transform .2s var(--ease);
}

.btn-ghost:hover {
    border-color: var(--signal);
    color: var(--signal);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1;
}

.stat-text {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
}

/* ── HERO RIGHT: DATASHEET ── */
.hero-right {
    flex: 0.95;
    display: flex;
    justify-content: center;
}

.datasheet {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    padding: 28px 26px 0;
}

.datasheet-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--signal);
}

.dc-tl {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.dc-tr {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
}

.dc-bl {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
}

.dc-br {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.datasheet-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.datasheet-specs {
    display: flex;
    flex-direction: column;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13.5px;
}

.spec-row dt {
    color: var(--muted);
    flex-shrink: 0;
}

.spec-row dd {
    text-align: right;
    color: var(--ink);
    font-weight: 500;
}

.spec-live {
    color: var(--amber) !important;
}

.datasheet-stats {
    padding: 8px 0 26px;
}

.datasheet-stats img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.datasheet-log {
    margin: 20px -26px 0;
    padding: 16px 26px 20px;
    background: var(--paper);
    border-top: 1px solid var(--line);
}

.log-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 10px;
}

.log-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .35;
    }
}

.log-body {
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--ink);
    min-height: 96px;
}

.log-body .line-accent {
    color: var(--signal);
}

.log-body .line-done {
    color: var(--amber);
}

.log-cursor {
    display: inline-block;
    width: 6px;
    height: 12px;
    background: var(--signal);
    vertical-align: text-bottom;
    animation: blink .7s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-scroll-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 36px;
    font-size: 12px;
    color: var(--muted);
}

.scroll-line {
    width: 40px;
    height: 1px;
    background: var(--line-strong);
}

/* ═══════════════════════ SECTIONS ═══════════════════════ */
.section {
    padding: 110px 6%;
    max-width: 1320px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 56px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.section-index {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--signal);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(30px, 3.6vw, 42px);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ═══════════════════════ ABOUT ═══════════════════════ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 72px;
}

.about-text p {
    font-size: 16px;
    line-height: 1.85;
    color: var(--muted);
    margin-bottom: 22px;
    max-width: 62ch;
}

.about-text strong {
    color: var(--ink);
}

.hl {
    color: var(--signal);
    font-style: italic;
}

.fact-list {
    list-style: none;
    margin-top: 28px;
    border-top: 1px solid var(--line);
}

.fact-list li {
    display: flex;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
    color: var(--ink);
}

.fact-list li span {
    flex: 0 0 130px;
    color: var(--muted);
    font-size: 12px;
}

/* Domain grid (replaces radar chart) */
.domains-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 16px;
}

.domains-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.domain-tile {
    background: var(--surface);
    padding: 22px 20px;
    transition: background .2s;
}

.domain-tile:hover {
    background: var(--signal-dim);
}

.domain-mark {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--signal);
    margin-bottom: 10px;
}

.domain-tile h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.domain-tile p {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
}

/* ═══════════════════════ PROJECTS ═══════════════════════ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.project-card {
    background: var(--surface);
    padding: 30px 28px;
    transition: background .2s;
}

.project-card:hover {
    background: #FBFCFD;
}

.project-tag {
    display: inline-block;
    color: var(--signal);
    font-family: var(--font-mono);
    font-size: 11px;
    margin-bottom: 16px;
}

.project-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

.project-card h3 a {
    color: var(--ink);
    text-decoration: none;
    background-image: linear-gradient(var(--signal), var(--signal));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1px;
    transition: background-size .25s var(--ease);
}

.project-card h3 a:hover {
    background-size: 100% 1px;
    color: var(--signal);
}

.project-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tech-stack span {
    border: 1px solid var(--line);
    padding: 4px 9px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
}

/* ═══════════════════════ SKILLS ═══════════════════════ */
.skills-categories {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.skill-group {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.skill-group-label {
    font-size: 13px;
    color: var(--muted);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-size: 13.5px;
    color: var(--ink);
    background: var(--surface);
    transition: border-color .2s, color .2s;
}

.skill-tag:hover {
    border-color: var(--signal);
    color: var(--signal);
}

/* ═══════════════════════ CONTACT ═══════════════════════ */
.contact-wrapper {
    max-width: 680px;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 44px;
}

.contact-intro {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 32px;
    line-height: 1.7;
    max-width: 50ch;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: var(--surface);
    text-decoration: none;
    color: var(--ink);
    transition: background .2s;
}

.contact-item:hover {
    background: var(--signal-dim);
}

.ci-icon {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--signal);
    flex-shrink: 0;
}

.ci-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.ci-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--muted);
}

.ci-value {
    font-size: 14.5px;
    color: var(--ink);
}

.ci-arrow {
    font-size: 16px;
    color: var(--muted);
    transition: transform .2s;
}

.contact-item:hover .ci-arrow {
    transform: translateX(3px);
    color: var(--signal);
}

.contact-item-social {
    align-items: flex-start;
    padding-top: 20px;
    padding-bottom: 20px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 8px;
}

.social-links a {
    font-size: 14px;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line-strong);
    transition: color .2s, border-color .2s;
}

.social-links a:hover {
    color: var(--signal);
    border-color: var(--signal);
}

/* ═══════════════════════ FOOTER ═══════════════════════ */
.footer {
    padding: 0 6% 40px;
    max-width: 1320px;
    margin: 0 auto;
}

.footer-line {
    height: 1px;
    background: var(--line);
    margin-bottom: 28px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
    gap: 12px;
}

.footer-logo {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
}

/* ═══════════════════════ MOTION ═══════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay {
    transition-delay: .15s;
}

/* ═══════════════════════ RESPONSIVE ═══════════════════════ */
@media (max-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .about-visual {
        max-width: 480px;
    }
}

@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
        align-items: stretch;
        gap: 44px;
    }

    .nav-status {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 5%;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 68px 5% 44px;
    }

    .section {
        padding: 72px 5%;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skill-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .contact-card {
        padding: 26px;
    }

    .footer-inner {
        justify-content: center;
        text-align: center;
    }
}