/* ═══════════════════════════════════════════════════════════════
   mobile.css — iPhone-inspired portfolio layout
   Activates: max-width 767px
   Desktop: #mobile-view is display:none; all desktop chrome intact
   ═══════════════════════════════════════════════════════════════ */

/* ── Always hidden on desktop ── */
#mobile-view { display: none; }


/* ═══════════════════════════════════════════════════════════════
   Mobile — 767px and below
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── Hide all desktop chrome ── */
  .menubar,
  #window-layer,
  .dock-container,
  #contact-fab,
  #contact-popup,
  #chat-fab,
  #chat-popup,
  .desktop-icons,
  .desktop-bg {
    display: none !important;
  }

  body {
    background: #0c0a18;
    overflow: hidden;
  }

  /* ── Root mobile container ── */
  #mobile-view {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: linear-gradient(170deg, #100d24 0%, #0c0a18 55%, #0f0b20 100%);
    z-index: 9999;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
                 "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #fff;
  }


  /* ────────────────────────────────────────────
     Status Bar
     ────────────────────────────────────────────  */
  .mob-status-bar {
    flex-shrink: 0;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px 0 26px;
    background: rgba(10, 8, 22, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }

  .mob-clock {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.94);
    letter-spacing: 0.01em;
  }

  .mob-sb-right {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,0.88);
  }

  .mob-battery {
    display: flex;
    align-items: center;
    gap: 1px;
  }

  .mob-battery-body {
    width: 22px;
    height: 11px;
    border: 1.5px solid rgba(255,255,255,0.65);
    border-radius: 3.5px;
    padding: 1.5px;
  }

  .mob-battery-fill {
    width: 72%;
    height: 100%;
    background: rgba(255,255,255,0.82);
    border-radius: 1.5px;
  }

  .mob-battery-tip {
    width: 2px;
    height: 5px;
    background: rgba(255,255,255,0.5);
    border-radius: 0 1px 1px 0;
  }


  /* ────────────────────────────────────────────
     Main scrollable area
     ────────────────────────────────────────────  */
  .mob-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
  }

  .mob-main::-webkit-scrollbar { display: none; }


  /* ────────────────────────────────────────────
     Hero
     ────────────────────────────────────────────  */
  .mob-hero {
    padding: 36px 20px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: radial-gradient(ellipse 90% 55% at 50% 0%,
                  rgba(124,92,252,0.2) 0%, transparent 70%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .mob-avatar-ring {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(135deg, rgba(124,92,252,0.7) 0%, rgba(82,30,165,0.5) 100%);
    margin-bottom: 18px;
    flex-shrink: 0;
  }

  .mob-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c5cfc 0%, #521ea5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
  }

  .mob-name {
    font-size: 27px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    margin: 0 0 5px;
    line-height: 1.15;
  }

  .mob-title {
    font-size: 13px;
    color: rgba(255,255,255,0.48);
    letter-spacing: 0.015em;
    margin: 0 0 14px;
  }

  .mob-open-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(52,199,89,0.1);
    border: 1px solid rgba(52,199,89,0.22);
    border-radius: 20px;
    padding: 5px 13px;
    font-size: 11.5px;
    color: rgba(80,225,105,0.88);
    font-weight: 500;
    margin-bottom: 22px;
    letter-spacing: 0.01em;
  }

  .mob-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34c759;
    flex-shrink: 0;
    animation: mob-dot-pulse 2.2s ease-in-out infinite;
  }

  @keyframes mob-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.55; transform: scale(0.82); }
  }


  /* ── Metrics ── */
  .mob-metrics {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 340px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 14px 6px;
    margin-bottom: 22px;
  }

  .mob-metric {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
  }

  .mob-metric-divider {
    width: 1px;
    height: 30px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
  }

  .mob-metric-val {
    font-size: 21px;
    font-weight: 700;
    color: #a78bfa;
    letter-spacing: -0.02em;
    line-height: 1;
  }

  .mob-metric-lbl {
    font-size: 9.5px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }


  /* ── CTA Buttons ── */
  .mob-cta-row {
    display: flex;
    gap: 10px;
  }

  .mob-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 20px;
    min-height: 44px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s cubic-bezier(0.34,1.56,0.64,1);
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.01em;
    white-space: nowrap;
    font-family: inherit;
  }

  .mob-btn:active {
    transform: scale(0.94);
    opacity: 0.85;
  }

  .mob-btn--primary {
    background: #7c5cfc;
    color: #fff;
    box-shadow: 0 4px 18px rgba(124,92,252,0.38);
  }

  .mob-btn--outline {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.88);
    border: 1px solid rgba(255,255,255,0.14);
  }


  /* ────────────────────────────────────────────
     Sections
     ────────────────────────────────────────────  */
  .mob-section {
    padding: 6px 16px 2px;
  }

  .mob-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 4px 9px;
  }

  .mob-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: rgba(255,255,255,0.32);
  }

  .mob-section-count {
    font-size: 11px;
    color: rgba(255,255,255,0.22);
  }


  /* ── Cards ── */
  .mob-card {
    background: rgba(255,255,255,0.042);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 18px 16px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mob-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
  }

  .mob-card-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255,255,255,0.28);
    margin-bottom: -4px;
  }


  /* ────────────────────────────────────────────
     About
     ────────────────────────────────────────────  */
  .mob-bio {
    font-size: 14px;
    line-height: 1.62;
    color: rgba(255,255,255,0.76);
    margin: 0;
  }

  .mob-bio--secondary {
    font-size: 13px;
    color: rgba(255,255,255,0.48);
    line-height: 1.58;
  }


  /* ── Tags ── */
  .mob-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .mob-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.68);
    border: 1px solid rgba(255,255,255,0.1);
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  .mob-tag--accent {
    background: rgba(124,92,252,0.14);
    color: #b4a0fa;
    border-color: rgba(124,92,252,0.24);
  }

  .mob-tag--core {
    background: rgba(250,204,21,0.09);
    color: rgba(253,224,71,0.85);
    border-color: rgba(250,204,21,0.18);
  }

  .mob-tag--tech {
    background: rgba(96,165,250,0.09);
    color: rgba(147,197,253,0.82);
    border-color: rgba(96,165,250,0.18);
    font-size: 11px;
  }

  .mob-tag--domain {
    background: rgba(52,211,153,0.09);
    color: rgba(110,231,183,0.82);
    border-color: rgba(52,211,153,0.18);
  }

  .mob-tag--muted {
    background: transparent;
    color: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.07);
    font-size: 11px;
  }


  /* ── Status badges ── */
  .mob-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .mob-badge--green {
    background: rgba(52,199,89,0.14);
    color: rgba(80,225,105,0.9);
    border: 1px solid rgba(52,199,89,0.22);
  }

  .mob-badge--purple {
    background: rgba(124,92,252,0.14);
    color: #b4a0fa;
    border: 1px solid rgba(124,92,252,0.24);
  }


  /* ────────────────────────────────────────────
     Experience Cards
     ────────────────────────────────────────────  */
  .mob-exp-card {
    gap: 10px;
  }

  .mob-exp-card--current {
    border-color: rgba(124,92,252,0.2);
    background: rgba(124,92,252,0.055);
  }

  .mob-exp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .mob-exp-left { flex: 1; min-width: 0; }

  .mob-exp-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
  }

  .mob-exp-role {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
    line-height: 1.3;
    margin: 0;
  }

  .mob-exp-company {
    font-size: 12.5px;
    color: rgba(255,255,255,0.5);
    margin: 3px 0 0;
  }

  .mob-exp-date {
    font-size: 10.5px;
    color: rgba(255,255,255,0.32);
    white-space: nowrap;
  }

  .mob-exp-summary {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    line-height: 1.52;
    margin: 0;
  }

  .mob-exp-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .mob-exp-highlights li {
    font-size: 12.5px;
    color: rgba(255,255,255,0.48);
    padding-left: 14px;
    position: relative;
    line-height: 1.45;
  }

  .mob-exp-highlights li::before {
    content: '·';
    position: absolute;
    left: 3px;
    color: rgba(167,139,250,0.65);
    font-size: 18px;
    line-height: 1;
    top: -2px;
  }


  /* ────────────────────────────────────────────
     Project Cards
     ────────────────────────────────────────────  */
  .mob-proj-card { gap: 9px; }

  .mob-proj-category {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(167,139,250,0.65);
  }

  .mob-proj-title {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
    line-height: 1.3;
    margin: 0;
  }

  .mob-proj-summary {
    font-size: 13px;
    color: rgba(255,255,255,0.52);
    line-height: 1.52;
    margin: 0;
  }

  .mob-proj-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .mob-proj-link {
    font-size: 13px;
    font-weight: 600;
    color: #9d82f8;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s;
  }

  .mob-proj-link:active { opacity: 0.65; }


  /* ────────────────────────────────────────────
     Education Cards
     ────────────────────────────────────────────  */
  .mob-edu-card { gap: 8px; }

  .mob-edu-card--active {
    border-color: rgba(124,92,252,0.2);
    background: rgba(124,92,252,0.055);
  }

  .mob-edu-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .mob-edu-left { flex: 1; min-width: 0; }

  .mob-edu-degree {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    line-height: 1.35;
    margin: 0;
  }

  .mob-edu-institution {
    font-size: 12.5px;
    color: rgba(255,255,255,0.52);
    margin: 3px 0 2px;
  }

  .mob-edu-location {
    font-size: 11.5px;
    color: rgba(255,255,255,0.32);
    margin: 0;
  }

  .mob-edu-date {
    font-size: 11.5px;
    color: rgba(255,255,255,0.32);
    margin: 0;
  }


  /* ────────────────────────────────────────────
     Contact Rows (iOS Settings style)
     ────────────────────────────────────────────  */
  .mob-contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.12s;
    cursor: pointer;
  }

  .mob-contact-row:last-child { border-bottom: none; }
  .mob-contact-row:active { opacity: 0.65; }

  .mob-contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(124,92,252,0.14);
    border: 1px solid rgba(124,92,252,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a78bfa;
    flex-shrink: 0;
  }

  .mob-contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .mob-contact-label {
    font-size: 11px;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
  }

  .mob-contact-value {
    font-size: 13.5px;
    color: rgba(255,255,255,0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mob-contact-chevron {
    color: rgba(255,255,255,0.2);
    flex-shrink: 0;
  }


  /* ────────────────────────────────────────────
     Desktop Experience Hint
     ────────────────────────────────────────────  */
  .mob-desktop-hint {
    margin: 8px 16px 16px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 9px;
  }

  .mob-desktop-hint-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.28);
    margin-bottom: 2px;
  }

  .mob-desktop-hint-text {
    font-size: 13px;
    color: rgba(255,255,255,0.42);
    line-height: 1.55;
    margin: 0;
  }

  .mob-desktop-hint-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.22);
    margin: 0;
  }


  /* ── Footer ── */
  .mob-footer {
    padding: 6px 16px 18px;
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.18);
  }


  /* ────────────────────────────────────────────
     Tab Bar
     ────────────────────────────────────────────  */
  .mob-tab-bar {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    background: rgba(10, 8, 22, 0.88);
    backdrop-filter: blur(34px) saturate(1.8);
    -webkit-backdrop-filter: blur(34px) saturate(1.8);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 100;
  }

  .mob-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 4px 10px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    font-family: inherit;
  }

  .mob-tab span {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.18s ease;
  }

  .mob-tab svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1),
                color 0.18s ease;
  }

  .mob-tab.is-active {
    color: #7c5cfc;
  }

  .mob-tab.is-active svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(124,92,252,0.5));
  }

  .mob-tab:active svg {
    transform: scale(0.9);
  }

  /* ── Onboarding modal: stack avatar on top ── */
  .mb-window--onboarding {
    width: calc(100vw - 32px);
    max-width: 420px;
    padding: 18px 20px 20px;
  }

  .ob-body-row {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .ob-avatar-col {
    padding-bottom: 0;
  }

  .ob-avatar-img {
    height: 120px;
  }

} /* end @media (max-width: 767px) */


/* ═══════════════════════════════════════════════════════════════
   430px — larger modern phones (iPhone 14 Plus, 15 Plus)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 430px) {
  .mob-metrics { max-width: 100%; }
}


/* ═══════════════════════════════════════════════════════════════
   390px — standard modern iPhone (iPhone 14, 15)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 390px) {
  .mob-name { font-size: 25px; }
  .mob-metric-val { font-size: 19px; }
  .mob-btn { padding: 10px 17px; font-size: 13.5px; }
}


/* ═══════════════════════════════════════════════════════════════
   375px — iPhone SE / older iPhones
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 375px) {
  .mob-hero { padding: 28px 16px 22px; }
  .mob-avatar-ring { width: 80px; height: 80px; }
  .mob-avatar { font-size: 23px; }
  .mob-name { font-size: 23px; }
  .mob-metric-val { font-size: 18px; }
  .mob-metric-lbl { font-size: 9px; }
  .mob-btn { padding: 9px 14px; font-size: 13px; gap: 5px; }
  .mob-section { padding: 4px 12px 2px; }
  .mob-card { padding: 15px 13px; }
  .mob-tab { padding: 8px 3px 9px; }
  .mob-tab svg { width: 20px; height: 20px; }
  .mob-tab span { font-size: 9px; }
}
