* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Inter', 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      background: #f5f7fb;
      color: #1e293b;
      line-height: 1.5;
      padding: 1.5rem 1.25rem;
    }

    .container {
      max-width: 1200px;
      margin: 0 auto;
      background: white;
      border-radius: 28px;
      box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.08);
      overflow: hidden;
      padding: 2rem 2rem;
    }

    /* Profile section */
    .profile-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 2.5rem;
      align-items: center;
      margin-bottom: 1.8rem;
    }
    .bio-area {
      flex: 2.2;
      min-width: 240px;
    }
    .photo-area {
      flex: 1;
      text-align: center;
      min-width: 170px;
    }
    .photo-area img {
      width: 100%;
      max-width: 220px;
      border-radius: 50%;
      object-fit: cover;
      aspect-ratio: 1 / 1;
      box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15);
      border: 4px solid white;
      background: #eef2ff;
      transition: transform 0.2s ease;
    }
    .photo-area img:hover {
      transform: scale(1.02);
    }

    name {
      font-size: clamp(1.8rem, 5vw, 2.6rem);
      font-weight: 800;
      font-family: 'Montserrat', sans-serif;
      background: linear-gradient(135deg, #0f2b3d, #1e4a76);
      background-clip: text;
      -webkit-background-clip: text;
      color: transparent;
      letter-spacing: -0.3px;
      display: inline-block;
      margin-bottom: 0.5rem;
    }

    .bio-text {
      font-size: 0.95rem;
      line-height: 1.6;
      color: #2c3e50;
      margin: 1rem 0 1.2rem;
    }

    /* Social icons */
    .social-icons {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      align-items: center;
      margin-top: 0.5rem;
    }
    .social-icons a {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 0.9rem;
      font-weight: 500;
      color: #1f6392;
      text-decoration: none;
      transition: all 0.2s;
      background: #f1f5f9;
      padding: 0.4rem 1rem;
      border-radius: 40px;
      border: 1px solid #e2e8f0;
    }
    .social-icons a i {
      font-size: 1.1rem;
    }
    .social-icons a:hover {
      background: #ffffff;
      color: #f09228;
      border-color: #f09228;
      transform: translateY(-2px);
    }

    /* Section headings */
    .section {
      margin: 2rem 0 0.85rem 0;
    }
    heading {
      font-size: 1.65rem;
      font-weight: 700;
      font-family: 'Montserrat', sans-serif;
      border-left: 5px solid #f09228;
      padding-left: 1rem;
      display: inline-block;
    }

    /* Card styling */
    .section-card {
      border: 1px solid #e9edf2;
      border-radius: 20px;
      background: #ffffff;
      margin: 0.5rem 0 1.5rem 0;
      overflow: hidden;
      box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    }

    .list-item {
      padding: 0.85rem 1.5rem;
      border-bottom: 1px solid #eff3f8;
    }
    .list-item:last-child {
      border-bottom: none;
    }
    .list-item strong {
      color: #1e3a5f;
      font-weight: 700;
    }
    .date-meta {
      font-size: 0.8rem;
      color: #5b6e8c;
      margin-left: 0.5rem;
    }

    .pub-item {
      padding: 1rem 1.5rem;
      border-bottom: 1px solid #eff3f8;
    }
    .pub-item:last-child {
      border-bottom: none;
    }
    .papertitle {
      font-weight: 700;
      font-size: 0.98rem;
      color: #1e466e;
      text-decoration: none;
    }
    .papertitle:hover {
      color: #f09228;
      text-decoration: underline;
    }
    .authors {
      font-size: 0.85rem;
      margin: 0.2rem 0 0.2rem;
      color: #334155;
    }
    .venue-text {
      font-size: 0.8rem;
      color: #4b556b;
    }

    .info-row {
      display: flex;
      flex-wrap: wrap;
      padding: 1rem 1.5rem;
      border-bottom: 1px solid #eff3f8;
      gap: 0.75rem;
      align-items: baseline;
    }
    .info-row:last-child {
      border-bottom: none;
    }
    .info-row > div {
      flex: 1 1 150px;
      font-size: 0.85rem;
    }
    .badge {
      background: #eef3fc;
      color: #1e5d9e;
      padding: 0.2rem 0.8rem;
      border-radius: 30px;
      font-size: 0.7rem;
      font-weight: 600;
      display: inline-block;
    }
    .amount-highlight {
      font-weight: 700;
      color: #1f6e43;
    }

    .awards-content {
      padding: 1rem 1.5rem 1.2rem 1.5rem;
    }
    .awards-content ul {
      padding-left: 1.5rem;
      margin: 0.5rem 0 0.8rem;
    }
    .awards-content li {
      margin: 0.3rem 0;
    }

    /* ============================================= */
    /* ACADEMIC SERVICES - TWO DESIGNS (DESKTOP FIRST) */
    /* ============================================= */
    
    /* DESKTOP DESIGN (original spacious table-like layout) */
    .services-desktop {
      display: block;
    }
    .service-row-desktop {
      display: flex;
      flex-wrap: wrap;
      padding: 0.85rem 1.5rem;
      border-bottom: 1px solid #eff3f8;
      gap: 1rem;
      align-items: baseline;
    }
    .service-row-desktop:last-child {
      border-bottom: none;
    }
    .service-badge-desktop {
      background: #eef3fc;
      color: #1e5d9e;
      padding: 0.2rem 0.8rem;
      border-radius: 30px;
      font-size: 0.7rem;
      font-weight: 600;
      min-width: 80px;
      text-align: center;
    }
    .service-venue-desktop {
      font-weight: 600;
      color: #1e3a5f;
      min-width: 140px;
      font-size: 0.85rem;
    }
    .service-name-desktop {
      color: #2c3e50;
      flex: 1;
      font-size: 0.85rem;
    }
    .service-publisher-desktop {
      color: #5b6e8c;
      font-size: 0.8rem;
      min-width: 100px;
    }

     /* MOBILE DESIGN (compact, minimal whitespace) - hidden by default*/
  .services-mobile {
      display: none;
    }

    .service-entry-mobile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-bottom: 1px solid #eff3f8;
    font-size: 0.75rem;
    }

    .service-entry-mobile:last-child {
    border-bottom: none;
    }

    /* FIX: lock badge position */
    .service-badge-mobile {
    flex: 0 0 auto;
    background: #eef3fc;
    color: #1e5d9e;
    padding: 0.12rem 0.5rem;
    border-radius: 30px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    }

    /* FIX: force title to take full row */
    .service-name-mobile {
    flex: 1 1 100%;
    color: #2c3e50;
    font-size: 0.73rem;
    line-height: 1.3;
    }

    /* FIX: keep type + publisher aligned on one line */
    .service-venue-mobile {
    flex: 0 0 auto;
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.75rem;
    white-space: nowrap;
    }

    .service-publisher-mobile {
    flex: 0 0 auto;
    color: #5b6e8c;
    font-size: 0.65rem;
    background: #f8fafc;
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
    white-space: nowrap;
    }
    

    /* ========== MEDIA QUERY: SWITCH TO MOBILE DESIGN AT 720px ========== */
    @media (max-width: 720px) {
      body {
        padding: 0.8rem;
      }
      .container {
        padding: 1.2rem;
      }
      .profile-grid {
        flex-direction: column-reverse;
        text-align: center;
        gap: 1.2rem;
      }
      .social-icons {
        justify-content: center;
      }
      .social-icons a {
        padding: 0.35rem 0.85rem;
        font-size: 0.8rem;
      }
      heading {
        font-size: 1.45rem;
      }
      .info-row {
        flex-direction: column;
        gap: 0.3rem;
        padding: 1rem 1.2rem;
      }
      .list-item, .pub-item {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
      }
      
      /* SWITCH: hide desktop, show mobile */
      .services-desktop {
        display: none;
      }
      .services-mobile {
        display: block;
      }
    }

    /* Small tablet adjustments (optional fine-tuning) */
    @media (min-width: 721px) and (max-width: 900px) {
      .service-venue-desktop {
        min-width: 120px;
      }
      .service-name-desktop {
        font-size: 0.8rem;
      }
    }

    .footer-note {
      margin-top: 2rem;
      text-align: center;
      font-size: 0.7rem;
      color: #6c757d;
      border-top: 1px solid #e9edf2;
      padding-top: 1.2rem;
    }
    a {
      text-decoration: none;
    }

    /* ============================================= */
    /* RESEARCH GRANTS - TWO DESIGNS (DESKTOP FIRST) */
    /* ============================================= */

    /* DESKTOP DESIGN (original spacious layout) */
    .grants-desktop {
    display: block;
    }
    .grant-row-desktop {
    display: flex;
    flex-wrap: wrap;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    align-items: baseline;
    border-bottom: 1px solid #eff3f8;
    }
    .grant-row-desktop:last-child {
    border-bottom: none;
    }
    .grant-row-desktop > div {
    flex: 1 1 auto;
    font-size: 0.85rem;
    }
    .grant-support {
    min-width: 140px;
    }
    .grant-org {
    min-width: 80px;
    }
    .grant-badge {
    min-width: 90px;
    }
    .grant-amount {
    min-width: 100px;
    font-weight: 700;
    color: #1f6e43;
    }
    .grant-year {
    min-width: 60px;
    }
    .grant-desc {
    flex: 2;
    min-width: 200px;
    color: #4b5563;
    }

    /* MOBILE DESIGN (compact, minimal whitespace) */
    .grants-mobile {
    display: none;
    }
    .grant-entry-mobile {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #eff3f8;
    }
    .grant-entry-mobile:last-child {
    border-bottom: none;
    }
    .grant-line1-mobile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    }
    .grant-badge-mobile .badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.6rem;
    }
    .grant-amount-mobile {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f6e43;
    }
    .grant-year-mobile {
    font-size: 0.7rem;
    color: #5b6e8c;
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    }
    .grant-title-mobile {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    }
    .grant-title-mobile strong {
    color: #1e3a5f;
    }
    .grant-desc-mobile {
    font-size: 0.75rem;
    color: #4b5563;
    line-height: 1.4;
    }

    /* Media query - switch to mobile at 720px */
    @media (max-width: 720px) {
        .grants-desktop {
            display: none;
        }
        .grants-mobile {
            display: block;
        }

        /* FIX: Ensure no cutoff */
        .section-card {
            overflow: visible;
        }
        
        .services-mobile {
            display: block;
            overflow: visible;
        }
    }