/* ============================================================
   Shaikh Faizan — portfolio site
   Design concept: the page presented as a live design file —
   frames, layer labels, an inspector-style skill panel, and a
   collaborator cursor tag. Built by hand in PHP.
   ============================================================ */

:root {
    /* Color */
    --canvas: #F4F5F1;
    --canvas-alt: #ECEEE8;
    --ink: #12141B;
    --slate: #666B78;
    --line: #D8DAD3;
    --blue: #2C6EFF;
    --blue-dim: #E7EEFF;
    --coral: #FF5B35;
    --green: #16A672;
    --white: #FFFFFF;
    --steel: #4A5773;

    /* Type */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Layout */
    --max-width: 1080px;
    --frame-pad: clamp(24px, 5vw, 64px);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}

body {
    margin: 0;
    background: var(--canvas);
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: -1px -1px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

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

/* ---------- Collaborator cursor tag ---------- */
.cursor-tag {
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    align-items: center;
    gap: 6px;
    background: var(--blue);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 8px 3px 6px;
    border-radius: 3px 12px 12px 12px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-2px, -2px);
    white-space: nowrap;
}
.cursor-tag.is-active { display: flex; }
.cursor-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--white);
}

/* ---------- Toolbar / nav ---------- */
.toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(244, 245, 241, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.toolbar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px var(--frame-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.toolbar-file {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--slate);
}
.file-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--coral);
    flex-shrink: 0;
}
.toolbar-nav {
    display: flex;
    gap: 4px;
}
.toolbar-nav a {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 6px;
    color: var(--slate);
}
.toolbar-nav a:hover { color: var(--ink); }
.toolbar-nav a.is-active {
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 0 0 1px var(--line);
}
.toolbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.toolbar-toggle span {
    width: 18px;
    height: 2px;
    background: var(--ink);
}

/* ---------- Frames (sections) ---------- */
.frame {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 72px var(--frame-pad) 0;
}
.frame:last-of-type { padding-bottom: 72px; }
.frame-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--line);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(24px, 3vw, 32px);
    margin: 0 0 28px;
}

/* ---------- Hero ---------- */
.frame-hero { padding-top: 48px; }
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 48px;
    align-items: center;
}
.hero-greeting {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate);
    margin: 0;
}
.hero-rule {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--blue);
    margin: 10px 0 20px;
}
.hero-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(36px, 5.5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 0 0 18px;
    color: var(--ink);
}
.hero-role {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.45;
    color: var(--steel);
    margin: 0 0 32px;
}
.hero-contact {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0 0 36px;
}
.hero-contact li {
    display: flex;
    align-items: center;
    gap: 12px;
}
.hero-contact a {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink);
}
.hero-contact a:hover { color: var(--blue); }
.hero-contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--blue);
    flex-shrink: 0;
}
.hero-contact-icon svg { width: 100%; height: 100%; }
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
}
.selection-box {
    position: relative;
    width: min(280px, 70vw);
    aspect-ratio: 1;
    border: 1.5px dashed var(--blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-dim);
}
.skill-cloud {
    position: relative;
    width: 100%;
    max-width: 440px;
    min-height: 380px;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 20px 14px;
    padding: 20px;
}
.skill-float {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.01em;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    padding: 12px 20px;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(18, 20, 27, 0.07), 0 1px 2px rgba(18, 20, 27, 0.04);
    white-space: nowrap;
    animation: floatY 4.8s ease-in-out infinite;
}
.skill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
}
.skill-float-1 { animation-duration: 4.2s; animation-delay: 0s; }
.skill-float-2 { animation-duration: 5.1s; animation-delay: 0.4s; }
.skill-float-3 { animation-duration: 4.6s; animation-delay: 0.9s; }
.skill-float-4 { animation-duration: 5.4s; animation-delay: 0.2s; }
.skill-float-5 { animation-duration: 4.9s; animation-delay: 0.7s; }

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.avatar-placeholder {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 64px;
    color: var(--blue);
    background: var(--white);
    width: 78%;
    height: 78%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(18,20,27,0.06);
}
.handle {
    position: absolute;
    width: 9px;
    height: 9px;
    background: var(--white);
    border: 1.5px solid var(--blue);
    border-radius: 2px;
}
.handle-tl { top: -5px; left: -5px; }
.handle-tr { top: -5px; right: -5px; }
.handle-bl { bottom: -5px; left: -5px; }
.handle-br { bottom: -5px; right: -5px; }
.dim-label {
    position: absolute;
    bottom: -28px;
    right: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--blue);
    background: var(--canvas);
    padding: 2px 6px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    padding: 12px 22px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: var(--ink);
    color: var(--white);
}
.btn-primary:hover { box-shadow: 0 4px 14px rgba(18,20,27,0.18); }
.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ---------- About ---------- */
.about-grid { max-width: 720px; }
.about-copy .lead {
    font-size: 19px;
    font-weight: 500;
    margin: 0 0 16px;
}
.about-copy p { color: var(--slate); margin: 0 0 12px; }

/* ---------- Skills ---------- */
.skill-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 640px;
}
.skill-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    align-items: center;
    gap: 16px;
}
.skill-label {
    font-size: 14px;
    font-weight: 500;
}
.skill-track {
    height: 6px;
    background: var(--canvas-alt);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.skill-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 3px;
    position: relative;
}
.skill-fill::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--white);
    border: 2px solid var(--blue);
    border-radius: 50%;
}
.skill-value {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--slate);
    min-width: 34px;
    text-align: right;
}

/* ---------- Experience timeline ---------- */
.timeline {
    display: flex;
    flex-direction: column;
    max-width: 720px;
    border-left: 1px solid var(--line);
    margin-left: 4px;
}
.timeline-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 20px;
    padding: 20px 0 20px 24px;
    position: relative;
}
.timeline-row::before {
    content: '';
    position: absolute;
    left: -4.5px;
    top: 26px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid var(--canvas);
}
.timeline-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--green);
    background: rgba(22,166,114,0.1);
    padding: 4px 8px;
    border-radius: 4px;
    height: fit-content;
    white-space: nowrap;
}
.timeline-body h3 {
    font-family: var(--font-display);
    font-size: 17px;
    margin: 0 0 6px;
}
.timeline-body p {
    color: var(--slate);
    margin: 0;
    font-size: 14.5px;
}

/* ---------- Work / brands ---------- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.work-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.work-card:hover {
    border-color: var(--blue);
    transform: translateY(-2px);
}
.work-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
}
.work-desc {
    color: var(--slate);
    font-size: 13.5px;
}

/* ---------- CTA ---------- */
.frame-cta {
    text-align: center;
    padding-top: 96px;
    padding-bottom: 96px !important;
}
.cta-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(24px, 3vw, 34px);
    margin: 0 0 12px;
}
.cta-sub {
    color: var(--slate);
    max-width: 46ch;
    margin: 0 auto 28px;
}

/* ---------- Page header (What I do / Contact) ---------- */
.frame-page-hero { padding-top: 56px; }
.page-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(32px, 5vw, 46px);
    margin: 0 0 16px;
}
.page-lead {
    color: var(--slate);
    font-size: 17px;
    max-width: 56ch;
    margin: 0;
}

/* ---------- Services (What I do) ---------- */
.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.service-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 26px;
}
.service-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--coral);
    background: rgba(255,91,53,0.1);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 12px;
}
.service-card h2 {
    font-family: var(--font-display);
    font-size: 19px;
    margin: 0 0 10px;
}
.service-card p {
    color: var(--slate);
    font-size: 14.5px;
    margin: 0;
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 48px;
}
.contact-info h2 {
    font-family: var(--font-display);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate);
    margin: 0 0 14px;
}
.contact-info h2:not(:first-child) { margin-top: 32px; }
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.contact-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
}
.contact-key {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--slate);
}
.contact-list a { color: var(--blue); font-weight: 500; }

.contact-form-wrap {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 32px;
}
.form-row { margin-bottom: 18px; }
.form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.form-row input,
.form-row textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 14.5px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--canvas);
    color: var(--ink);
    resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
    border-color: var(--blue);
    background: var(--white);
}
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.form-notice {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}
.form-success {
    background: rgba(22,166,114,0.1);
    color: var(--green);
}
.form-error {
    background: rgba(255,91,53,0.1);
    color: var(--coral);
}
.form-error ul { padding-left: 18px; list-style: disc; }

/* ---------- Status bar / footer ---------- */
.statusbar {
    border-top: 1px solid var(--line);
    background: var(--canvas-alt);
}
.statusbar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px var(--frame-pad);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--slate);
}
.statusbar-sep { margin: 0 8px; opacity: 0.5; }
.statusbar-right {
    display: flex;
    gap: 16px;
}
.statusbar-social:hover { color: var(--blue); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .contact-grid { grid-template-columns: 1fr; }
    .timeline-row { grid-template-columns: 90px 1fr; }
}

@media (max-width: 640px) {
    .toolbar-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--canvas);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        padding: 8px var(--frame-pad) 16px;
        display: none;
    }
    .toolbar-nav.is-open { display: flex; }
    .toolbar-toggle { display: flex; }
    .skill-row { grid-template-columns: 1fr; row-gap: 6px; }
    .skill-value { text-align: left; }
    .cursor-tag { display: none !important; }
}
