/* =========================================
   GOWRAB KHAN — PROFESSIONAL PORTFOLIO
   ========================================= */

:root {
    --bg: #080d18;
    --bg-soft: #0d1524;
    --surface: #101b2d;
    --surface-light: #14233a;
    --blue: #64b5ff;
    --blue-bright: #83c5ff;
    --text: #f4f7fc;
    --muted: #9aa9bf;
    --border: rgba(153, 184, 224, 0.15);
    --font-body: "DM Sans", Arial, sans-serif;
    --font-heading: "Space Grotesk", Arial, sans-serif;
    --container: 1120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--blue);
    color: var(--bg);
}

.container {
    width: min(var(--container), calc(100% - 64px));
    margin-inline: auto;
}

section {
    scroll-margin-top: 88px;
}

/* Navigation */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 13, 24, 0.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.navbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

.logo span,
.hero h1 span,
.section-heading h2 span,
.contact-panel h2 span {
    color: var(--blue);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link {
    display: inline-block;
    padding: 10px 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link.contact-link {
    padding: 10px 17px;
    border: 1px solid rgba(100, 181, 255, 0.45);
    border-radius: 8px;
    color: var(--blue-bright);
}

.nav-link.contact-link:hover {
    background: rgba(100, 181, 255, 0.1);
}

.menu-toggle {
    display: none;
}

/* Hero */

.hero {
    min-height: 680px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 65px;
    padding-top: 80px;
    padding-bottom: 100px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 13px;
    margin-bottom: 37px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.025);
    color: #c4d1e3;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
}

.status-dot,
.mini-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #73d6a0;
    box-shadow: 0 0 12px rgba(115, 214, 160, 0.5);
}

.eyebrow {
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
}

.hero h1 {
    margin: 12px 0 10px;
    font-family: var(--font-heading);
    font-size: clamp(46px, 5.2vw, 70px);
    line-height: 1.08;
    letter-spacing: -3px;
    overflow-wrap: anywhere;
}

.hero h2 {
    margin-bottom: 22px;
    font-family: var(--font-heading);
    font-size: clamp(20px, 2.4vw, 29px);
    line-height: 1.5;
    font-weight: 500;
}

.accent-text {
    color: var(--blue);
}

.hero-description {
    max-width: 500px;
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.95;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    min-height: 48px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 12px 19px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: var(--blue);
    color: #07111f;
}

.btn-primary:hover {
    background: var(--blue-bright);
}

.btn-secondary {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--blue);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 36px;
    color: #a7b6ca;
    font-size: 12px;
}

.hero-meta > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-icon {
    color: var(--blue);
}

/* Hero profile visual */

.hero-visual {
    position: relative;
    width: 100%;
    max-width: 410px;
    justify-self: end;
    isolation: isolate;
}

.visual-glow {
    position: absolute;
    z-index: -1;
    inset: 10% -8%;
    background: rgba(45, 125, 230, 0.18);
    filter: blur(65px);
    border-radius: 50%;
}

.profile-frame {
    position: relative;
    height: 480px;
    overflow: hidden;
    border: 1px solid rgba(100, 181, 255, 0.48);
    border-radius: 200px 200px 18px 18px;
    background: linear-gradient(145deg, #182d4a, #0d1422);
    box-shadow: 0 25px 90px rgba(0, 0, 0, 0.28);
}

.profile-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 60%,
        rgba(8, 13, 24, 0.25)
    );
    pointer-events: none;
}

.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 17px;
    border: 1px solid rgba(153, 184, 224, 0.2);
    border-radius: 12px;
    background: rgba(15, 26, 44, 0.94);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(14px);
}

.floating-card-top {
    top: 85px;
    left: -62px;
}

.floating-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(100, 181, 255, 0.12);
    color: var(--blue);
    font-size: 22px;
}

.floating-card strong,
.floating-card small {
    display: block;
}

.floating-card strong {
    font-size: 12px;
}

.floating-card small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.floating-card-bottom {
    right: -24px;
    bottom: 65px;
    font-size: 11px;
    font-weight: 600;
}

.visual-caption {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    color: #7f91aa;
    font-size: 10px;
    letter-spacing: 2px;
}

/* Shared sections */

.section {
    padding: 110px 0;
}

.section-bordered {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.012);
}

.section-heading {
    max-width: 680px;
    margin-bottom: 48px;
}

.section-heading h2 {
    margin-top: 12px;
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.25;
    letter-spacing: -1.5px;
}

.section-description {
    max-width: 580px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

/* About */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
}

.large-copy {
    max-width: 440px;
    font-family: var(--font-heading);
    font-size: clamp(28px, 3.5vw, 39px);
    line-height: 1.45;
    font-weight: 600;
    letter-spacing: -1px;
}

.about-details p {
    margin-bottom: 17px;
    color: var(--muted);
    font-size: 14px;
    line-height: 2;
}

.text-link {
    display: inline-flex;
    gap: 10px;
    margin-top: 7px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.text-link span {
    transition: transform 0.25s ease;
}

.text-link:hover span {
    transform: translate(3px, -3px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 75px;
    border-top: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 25px 20px 0 0;
}

.stat-number {
    color: var(--blue);
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 600;
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
}

/* Skill cards */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.info-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 285px;
    padding: 27px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(
        145deg,
        rgba(20, 35, 58, 0.8),
        rgba(13, 21, 36, 0.8)
    );
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease;
}

.info-card:hover {
    transform: translateY(-6px);
    border-color: rgba(100, 181, 255, 0.5);
    background: var(--surface);
}

.card-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.card-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(100, 181, 255, 0.2);
    border-radius: 12px;
    background: rgba(100, 181, 255, 0.08);
    color: var(--blue);
    font-size: 23px;
}

.card-index {
    color: #70829c;
    font-family: var(--font-heading);
    font-size: 12px;
}

.info-card h3,
.project-info h3 {
    margin-bottom: 10px;
    font-family: var(--font-heading);
    font-size: 19px;
}

.info-card p,
.project-info p:not(.project-category) {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.card-tag {
    margin-top: auto;
    padding-top: 22px;
    color: #8eabc9;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

/* Projects */

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.project-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(16, 27, 45, 0.7);
    transition:
        border-color 0.3s ease,
        transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(100, 181, 255, 0.4);
}

.project-art {
    position: relative;
    min-height: 260px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.portfolio-art {
    background:
        radial-gradient(
            circle at 50% 50%,
            rgba(100, 181, 255, 0.19),
            transparent 38%
        ),
        linear-gradient(135deg, #172b48, #0b1220);
}

.portfolio-art::before,
.portfolio-art::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(100, 181, 255, 0.17);
    border-radius: 50%;
}

.portfolio-art::after {
    width: 290px;
    height: 290px;
}

.art-label,
.art-bottom {
    position: absolute;
    left: 24px;
    color: #9db3ce;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 2px;
}

.art-label {
    top: 22px;
}

.art-bottom {
    bottom: 22px;
}

.art-monogram {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading);
    font-size: 100px;
    font-weight: 700;
    letter-spacing: -8px;
}

.art-monogram span {
    color: var(--blue);
}

.future-art {
    background:
        radial-gradient(
            circle at center,
            rgba(100, 181, 255, 0.11),
            transparent 45%
        ),
        linear-gradient(135deg, #101d31, #0b111e);
}

.future-symbol {
    color: var(--blue);
    font-family: var(--font-heading);
    font-size: 90px;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.project-card:hover .future-symbol {
    transform: rotate(90deg);
}

.project-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 25px;
}

.project-info > div {
    min-width: 0;
}

.project-category {
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.8px;
}

.project-info h3 {
    font-size: 18px;
}

.project-link {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--blue);
    font-size: 19px;
    transition:
        background 0.25s ease,
        color 0.25s ease;
}

.project-link:hover {
    background: var(--blue);
    color: var(--bg);
}

/* Contact */

.contact-section {
    padding-bottom: 110px;
}

.contact-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 75px 65px;
    border: 1px solid rgba(100, 181, 255, 0.22);
    border-radius: 20px;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(56, 125, 211, 0.2),
            transparent 42%
        ),
        linear-gradient(135deg, #101e33, #0d1524);
}

.contact-panel > *:not(.contact-decoration) {
    position: relative;
    z-index: 1;
}

.contact-panel h2 {
    margin: 17px 0;
    font-family: var(--font-heading);
    font-size: clamp(39px, 5vw, 57px);
    line-height: 1.15;
    letter-spacing: -2px;
}

.contact-panel > p:not(.eyebrow) {
    max-width: 470px;
    margin-bottom: 25px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

.contact-decoration {
    position: absolute;
    z-index: 0;
    right: 55px;
    bottom: -95px;
    color: rgba(100, 181, 255, 0.055);
    font-family: var(--font-heading);
    font-size: 290px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--border);
}

.footer-content {
    min-height: 105px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 22px;
    padding-bottom: 22px;
}

.footer-content .logo {
    font-size: 20px;
}

.footer-content > p {
    color: var(--muted);
    font-size: 11px;
}

.copyright {
    text-align: right;
}

/* Reveal animations */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tablet */

@media (max-width: 900px) {
    .container {
        width: min(100% - 48px, var(--container));
    }

    .nav-menu {
        gap: 20px;
    }

    .hero {
        grid-template-columns: 1fr 0.8fr;
        gap: 30px;
        min-height: auto;
        padding-top: 85px;
        padding-bottom: 95px;
    }

    .hero h1 {
        font-size: clamp(42px, 6vw, 58px);
        letter-spacing: -2px;
    }

    .profile-frame {
        height: 390px;
    }

    .floating-card-top {
        left: -20px;
    }

    .floating-card-bottom {
        right: -10px;
    }

    .section {
        padding: 85px 0;
    }

    .info-card {
        padding: 22px;
    }

    .contact-panel {
        padding: 60px 40px;
    }

    .footer-content {
        flex-wrap: wrap;
    }
}

/* Mobile navigation and layout */

@media (max-width: 680px) {
    html {
        scroll-padding-top: 76px;
    }

    .container {
        width: calc(100% - 36px);
    }

    .navbar {
        min-height: 70px;
    }

    .logo {
        font-size: 23px;
    }

    .menu-toggle {
        position: relative;
        z-index: 102;
        width: 44px;
        height: 44px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--surface);
        cursor: pointer;
    }

    .menu-toggle span {
        width: 19px;
        height: 2px;
        border-radius: 2px;
        background: var(--text);
        transition:
            transform 0.25s ease,
            opacity 0.25s ease;
    }

    .menu-toggle[aria-expanded="true"] span:first-child {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] span:last-child {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        z-index: 101;
        inset: 70px 0 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
        padding: 28px 24px;
        background: rgba(8, 13, 24, 0.98);
        border-top: 1px solid var(--border);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition:
            opacity 0.25s ease,
            transform 0.25s ease,
            visibility 0.25s ease;
    }

    .nav-menu.open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 13px 4px;
        font-size: 16px;
    }

    .nav-link.contact-link {
        margin-top: 8px;
        text-align: center;
    }

    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 55px;
        padding-top: 45px;
        padding-bottom: 75px;
    }

    .hero-content {
        order: 2;
    }

    .hero-visual {
        order: 1;
        width: min(78%, 310px);
        justify-self: center;
    }

    .profile-frame {
        height: auto;
        aspect-ratio: 0.78;
        border-radius: 160px 160px 15px 15px;
    }

    .availability {
        margin-bottom: 25px;
        font-size: 9px;
        letter-spacing: 1.2px;
    }

    .hero h1 {
        margin-top: 13px;
        font-size: clamp(43px, 11vw, 60px);
        letter-spacing: -2.5px;
    }

    .hero h2 {
        font-size: 21px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .btn {
        min-height: 50px;
    }

    .hero-meta {
        gap: 12px 18px;
        margin-top: 25px;
    }

    .floating-card {
        padding: 10px 12px;
        gap: 9px;
    }

    .floating-card-top {
        top: 52px;
        left: -35px;
    }

    .floating-card-bottom {
        right: -25px;
        bottom: 45px;
        font-size: 10px;
    }

    .floating-icon {
        width: 32px;
        height: 32px;
    }

    .visual-caption {
        font-size: 8px;
        letter-spacing: 1.3px;
    }

    .section {
        padding: 72px 0;
    }

    .section-heading {
        margin-bottom: 32px;
    }

    .section-heading h2 {
        font-size: clamp(30px, 8vw, 39px);
        letter-spacing: -1px;
    }

    .section-description {
        font-size: 13px;
    }

    .about-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 25px;
    }

    .large-copy {
        font-size: 31px;
    }

    .stats-grid {
        margin-top: 45px;
        gap: 10px;
    }

    .stat-item {
        padding-top: 18px;
        padding-right: 0;
    }

    .stat-number {
        font-size: 25px;
    }

    .stat-label {
        font-size: 10px;
    }

    .card-grid,
    .project-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .info-card {
        min-height: 250px;
        padding: 24px;
    }

    .project-art {
        min-height: 220px;
    }

    .project-info {
        padding: 21px;
    }

    .contact-section {
        padding-bottom: 75px;
    }

    .contact-panel {
        padding: 40px 25px;
        border-radius: 15px;
    }

    .contact-panel h2 {
        font-size: 42px;
        letter-spacing: -1.5px;
    }

    .contact-decoration {
        right: 0;
        bottom: -40px;
        font-size: 170px;
    }

    .footer-content {
        min-height: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-top: 25px;
        padding-bottom: 25px;
    }

    .copyright {
        text-align: left;
    }
}

/* Small phones */

@media (max-width: 380px) {
    .container {
        width: calc(100% - 28px);
    }

    .hero h1 {
        font-size: 41px;
    }

    .hero-visual {
        width: 75%;
    }

    .floating-card-top {
        left: -25px;
    }

    .floating-card-bottom {
        right: -20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-item {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .contact-panel {
        padding: 32px 20px;
    }

    .contact-panel h2 {
        font-size: 36px;
    }
}

/* Respect reduced-motion settings */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}