/* ============================================
   Jehad Tawfik Portfolio
   Design System: Mastercard-Inspired
   Warm cream canvas, pill shapes, orbital arcs,
   circular portraits, editorial typography
   ============================================ */

/* --- Custom Properties --- */
:root {
    /* Surface & Background */
    --canvas-cream: #F3F0EE;
    --lifted-cream: #FCFBFA;
    --white: #FFFFFF;
    --soft-bone: #F4F4F4;

    /* Primary */
    --ink-black: #141413;
    --charcoal: #262627;

    /* Accent */
    --signal-orange: #CF4500;
    --light-signal-orange: #F37338;
    --clay-brown: #9A3A0A;

    /* Neutrals & Text */
    --slate-gray: #696969;
    --granite: #555555;
    --dust-taupe: #D1CDC7;
    --ghost-cream: #E8E2DA;

    /* Semantic */
    --link-blue: #3860BE;

    /* Typography */
    --font-primary: 'Sofia Sans', Arial, sans-serif;

    /* Spacing */
    --nav-height: 72px;
    --max-width: 1200px;
    --section-padding: 128px;
    --gutter: 48px;

    /* Radius Scale */
    --radius-sm: 6px;
    --radius-btn: 20px;
    --radius-card: 40px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-nav: rgba(0, 0, 0, 0.04) 0px 4px 24px 0px;
    --shadow-card: rgba(0, 0, 0, 0.08) 0px 24px 48px 0px;

    /* Ease */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 32px);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--canvas-cream);
    color: var(--ink-black);
    line-height: 1.4;
    overflow-x: hidden;
}

::selection {
    background-color: var(--ink-black);
    color: var(--canvas-cream);
}

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

ul, ol {
    list-style: none;
}

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

strong {
    font-weight: 700;
}

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

/* --- Eyebrow Label --- */
.section-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--light-signal-orange);
    flex-shrink: 0;
}

.eyebrow-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.56px;
    color: var(--slate-gray);
    text-transform: uppercase;
}

/* --- Section Titles --- */
.section-title {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 500;
    letter-spacing: -0.72px;
    line-height: 1.22;
    color: var(--ink-black);
    margin-bottom: 48px;
    max-width: 600px;
}

/* --- Body Text --- */
.body-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--ink-black);
    margin-bottom: 20px;
    letter-spacing: -0.08px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.32px;
    border: 1.5px solid var(--ink-black);
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    text-decoration: none;
    white-space: nowrap;
}

.btn--ink {
    background: var(--ink-black);
    color: var(--canvas-cream);
    border-radius: var(--radius-btn);
    padding: 6px 24px;
}

.btn--ink:hover {
    background: var(--charcoal);
    transform: translateY(-1px);
}

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

.btn--outline {
    background: var(--white);
    color: var(--ink-black);
    border-radius: var(--radius-btn);
    padding: 6px 24px;
}

.btn--outline:hover {
    background: var(--soft-bone);
    transform: translateY(-1px);
}

.btn--sm {
    font-size: 14px;
    padding: 4px 18px;
}

.btn--lg {
    padding: 14px 40px;
    font-size: 16px;
    border-radius: var(--radius-card);
}

/* --- Satellite CTA (circle with arrow) --- */
.satellite-cta {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-black);
    transition: all 0.25s var(--ease-out);
    z-index: 2;
    border: none;
    text-decoration: none;
}

.satellite-cta:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-nav);
}

.satellite-cta--small {
    width: 40px;
    height: 40px;
    bottom: -4px;
    right: -4px;
}

/* --- Portrait Circle --- */
.portrait-circle {
    position: relative;
    border-radius: 50%;
    overflow: visible;
}

.portrait-circle--large {
    width: 300px;
    height: 300px;
}

.portrait-circle--skill {
    width: 160px;
    height: 160px;
}

.portrait-circle--contact {
    width: 200px;
    height: 200px;
    background: var(--lifted-cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portrait-circle__placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--ghost-cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portrait-circle__initials {
    font-size: 72px;
    font-weight: 700;
    color: var(--dust-taupe);
    letter-spacing: -2px;
    user-select: none;
}

.portrait-circle__icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--ghost-cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   NAVIGATION - Floating Pill
   ============================================ */
.nav-wrapper {
    position: fixed;
    top: 24px;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    padding: 0 24px;
    transition: top 0.3s var(--ease-out);
}

.nav-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    padding: 16px 40px;
    background: var(--white);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-nav);
}

.nav-pill__logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink-black);
    letter-spacing: -0.4px;
    flex-shrink: 0;
}

.nav-pill__links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-pill__link {
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 500;
    color: var(--ink-black);
    letter-spacing: -0.48px;
    border-radius: var(--radius-pill);
    transition: all 0.2s ease;
}

.nav-pill__link:hover {
    background: var(--soft-bone);
}

.nav-pill__link--active {
    background: var(--soft-bone);
}

.nav-pill__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-pill__toggle-bar {
    width: 22px;
    height: 2px;
    background: var(--ink-black);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-height) + 64px) var(--gutter) 96px;
}

.hero__container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 64px;
    align-items: center;
    position: relative;
}

.hero__ghost {
    position: absolute;
    top: -60px;
    left: -20px;
    font-size: clamp(80px, 15vw, 160px);
    font-weight: 700;
    letter-spacing: -4px;
    color: var(--ghost-cream);
    user-select: none;
    pointer-events: none;
    line-height: 1;
    z-index: 0;
}

.hero__content {
    position: relative;
    z-index: 1;
}

.hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.5s var(--ease-out) 0.15s forwards;
}

.hero__name {
    font-size: clamp(48px, 7vw, 64px);
    font-weight: 500;
    letter-spacing: -1.28px;
    line-height: 1;
    color: var(--ink-black);
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.5s var(--ease-out) 0.3s forwards;
}

.hero__subtitle {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--granite);
    max-width: 480px;
    margin-bottom: 40px;
    letter-spacing: -0.1px;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.5s var(--ease-out) 0.45s forwards;
}

.hero__subtitle strong {
    color: var(--ink-black);
}

.hero__cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.5s var(--ease-out) 0.6s forwards;
}

.hero__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    opacity: 0;
    animation: fadeIn 0.8s var(--ease-out) 0.5s forwards;
}

.hero__circle {
    position: relative;
    width: 280px;
    height: 280px;
}

.hero__circle-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--ghost-cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__orbit {
    position: absolute;
    width: 400px;
    height: 300px;
    top: -20px;
    left: -60px;
    pointer-events: none;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--section-padding) 0;
}

.section--lifted {
    background: var(--lifted-cream);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about__layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 80px;
    align-items: start;
    margin-bottom: 80px;
}

.about__portrait-col {
    display: flex;
    justify-content: center;
    padding-top: 32px;
}

.about__stats {
    display: flex;
    gap: 24px;
}

.stat-pill {
    flex: 1;
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-nav);
    text-align: center;
}

.stat-pill__number {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -2px;
    color: var(--ink-black);
    line-height: 1;
    display: block;
}

.stat-pill__number::after {
    content: '+';
    font-size: 32px;
    color: var(--light-signal-orange);
    font-weight: 500;
}

.stat-pill__label {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-gray);
    letter-spacing: -0.14px;
}

/* ============================================
   SKILLS CONSTELLATION
   ============================================ */
.skills__constellation {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 64px 48px;
    padding: 40px 0;
}

.skills__orbits {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.skill-node {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.skill-node__label {
    padding-top: 24px;
}

.skill-node__title {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.48px;
    line-height: 1.2;
    color: var(--ink-black);
    margin-bottom: 8px;
}

.skill-node__desc {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--slate-gray);
}

/* ============================================
   PROJECTS - Stadium Cards
   ============================================ */
.projects__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-stadium {
    background: var(--white);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}

.project-stadium:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.project-stadium__media {
    position: relative;
    height: 200px;
    background: var(--canvas-cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-stadium__placeholder {
    opacity: 0.5;
}

.project-stadium__chip {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-black);
    background: var(--white);
    border-radius: var(--radius-pill);
    letter-spacing: -0.13px;
}

.project-stadium__body {
    padding: 32px;
}

.project-stadium__title {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.48px;
    color: var(--ink-black);
    margin-bottom: 12px;
}

.project-stadium__desc {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--granite);
    margin-bottom: 20px;
}

.project-stadium__tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.project-stadium__tech span {
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--slate-gray);
    background: var(--soft-bone);
    border-radius: var(--radius-pill);
    letter-spacing: -0.13px;
}

.project-stadium__links {
    display: flex;
    gap: 10px;
}

/* ============================================
   EXPERIENCE
   ============================================ */
.exp-timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.exp-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 32px;
    padding: 40px;
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-nav);
    transition: all 0.3s var(--ease-out);
}

.exp-card:hover {
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

.exp-card__date {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.56px;
    color: var(--light-signal-orange);
    padding-top: 4px;
    white-space: nowrap;
}

.exp-card__role {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.48px;
    color: var(--ink-black);
    margin-bottom: 4px;
}

.exp-card__company {
    font-size: 16px;
    font-weight: 500;
    color: var(--slate-gray);
    margin-bottom: 12px;
}

.exp-card__desc {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--granite);
}

/* ============================================
   CONTACT
   ============================================ */
.contact__layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 64px;
    align-items: start;
}

.contact__methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 32px 0 40px;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: var(--white);
    border: 1.5px solid var(--dust-taupe);
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-black);
    letter-spacing: -0.15px;
    transition: all 0.2s ease;
    width: fit-content;
}

.contact-pill:hover {
    border-color: var(--ink-black);
    box-shadow: var(--shadow-nav);
}

.contact__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.contact__orbit {
    position: absolute;
    width: 300px;
    height: 400px;
    pointer-events: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--ink-black);
    color: var(--white);
}

.footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 96px var(--gutter) 48px;
}

.footer__headline {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 500;
    letter-spacing: -0.72px;
    line-height: 1.22;
    margin-bottom: 64px;
    max-width: 500px;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    margin-bottom: 64px;
}

.footer__col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__col-header {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.56px;
    color: var(--slate-gray);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.footer__link {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s ease;
    line-height: 1.5;
}

.footer__link:hover {
    color: var(--white);
}

.footer__ext {
    font-size: 11px;
    opacity: 0.5;
    margin-left: 2px;
}

.footer__divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin-bottom: 32px;
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer__copyright {
    font-size: 13px;
    font-weight: 400;
    color: var(--slate-gray);
}

.footer__social {
    display: flex;
    gap: 20px;
}

.footer__social a {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s ease;
}

.footer__social a:hover {
    color: var(--white);
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 19, 0.4);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
        --gutter: 32px;
    }

    .hero__container {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero__visual {
        display: none;
    }

    .hero__ghost {
        font-size: 100px;
    }

    .about__layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about__portrait-col {
        order: -1;
    }

    .portrait-circle--large {
        width: 220px;
        height: 220px;
    }

    .portrait-circle__initials {
        font-size: 52px;
    }

    .contact__layout {
        grid-template-columns: 1fr;
    }

    .contact__visual {
        display: none;
    }

    .skills__constellation {
        gap: 48px 32px;
    }

    .skills__orbits {
        display: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --section-padding: 64px;
        --gutter: 24px;
        --nav-height: 60px;
    }

    /* Nav mobile */
    .nav-wrapper {
        top: 16px;
        padding: 0 16px;
    }

    .nav-pill {
        padding: 12px 24px;
    }

    .nav-pill__links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: var(--white);
        padding: 96px 32px 32px;
        gap: 4px;
        transition: right 0.3s var(--ease-out);
        border-radius: var(--radius-card) 0 0 var(--radius-card);
        box-shadow: var(--shadow-card);
        z-index: 999;
    }

    .nav-pill__links--open {
        right: 0;
    }

    .nav-pill__link {
        font-size: 18px;
        padding: 14px 20px;
        width: 100%;
        border-radius: var(--radius-btn);
    }

    .nav-pill__toggle {
        display: flex;
    }

    .nav-pill__toggle--active .nav-pill__toggle-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .nav-pill__toggle--active .nav-pill__toggle-bar:nth-child(2) {
        opacity: 0;
    }
    .nav-pill__toggle--active .nav-pill__toggle-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Hero mobile */
    .hero {
        padding-top: calc(var(--nav-height) + 48px);
        min-height: auto;
        padding-bottom: 64px;
    }

    .hero__ghost {
        font-size: 60px;
        top: -30px;
    }

    .hero__name {
        font-size: 40px;
        letter-spacing: -0.8px;
    }

    .hero__cta {
        flex-direction: column;
    }

    .hero__cta .btn {
        width: 100%;
    }

    /* Skills mobile */
    .skills__constellation {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .skill-node {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .skill-node__label {
        padding-top: 16px;
    }

    .portrait-circle--skill {
        width: 120px;
        height: 120px;
    }

    /* Projects mobile */
    .projects__grid {
        grid-template-columns: 1fr;
    }

    /* Experience mobile */
    .exp-card {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 28px;
    }

    /* Stats mobile */
    .about__stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-pill {
        padding: 24px;
    }

    .stat-pill__number {
        font-size: 36px;
    }

    /* Footer mobile */
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer__grid {
        grid-template-columns: 1fr;
    }
}

/* --- Print --- */
@media print {
    .nav-wrapper, .hero__ghost, .hero__visual, .hero__orbit,
    .skills__orbits, .contact__visual, .satellite-cta {
        display: none !important;
    }

    body {
        background: white;
        color: #111;
    }

    .section {
        padding: 32px 0;
        break-inside: avoid;
    }

    .section--lifted {
        background: white;
    }

    .footer {
        background: #f5f5f5;
        color: #111;
    }
}
